Repository navigation
fix(cli,runner): objectui generate page and the core/runner READMEs name the pageType that draws the title; the 11436 pin reads package READMEs and the generator's output (objectui#11450) - #11473
Conversation
… name the pageType that draws the title; the 11436 pin reads package READMEs and the generator's output (objectui#11450) - generatePage writes `pageType: "app"`; its markdown child opens with prose, not a `#` heading that would draw a second h1. - packages/core/README.md (`app`) and packages/runner/README.md (`home`) name the drawing page type in their page fences. - packages/runner/src/App.tsx drops the unreachable index fallback page. - page-node-headings-drawn-11436 walks every packages/**/README.md and runs the real generator; its ledger row reads `packages/**`. Claude-Session: https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37 Co-authored-by: Claude <noreply@anthropic.com>
…ild draws in its environment (objectui#11450) It draws the unknown-type alert, not nothing: plugin-markdown is not registered there. Claude-Session: https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37 Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
…eholder (objectui#11450) `utilities/runner.mdx` said twice that `/` shows the built-in `No index page found.` placeholder. That page never rendered, and this PR deletes it. Measured with the real LocalBundleLoader and no src/app-data: `/` draws the 404 block, `Page not found: /`, as the runner README says. Claude-Session: https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37 Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
…pagetype Brings in objectui#11463, which changed scripts/__tests__/body-dialect-census.test.ts. Claude-Session: https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37 Co-authored-by: Claude <noreply@anthropic.com>
…allback page as a migrated producer (objectui#11450) objectui#11450 deleted that page, so packages/runner/src/App.tsx builds no page document and the list's `children:` lit control had nothing to read. The block's rationale and every other entry stay as they are. Claude-Session: https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37 Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Fixes #11450
Clause-②: no
What changed
A
pagenode with nopageTypeis arecordpage.PageRendererleaves a record page'sh1to apage:headerblock and never drawstitleordescription. Each producer below wrote a titled page with nopageType. Each now names the page type that draws its title.objectui generate page NAME(generatePageinpackages/cli/src/commands/generate.ts)"pageType": "app", and the markdown child readsWelcome to NAME, not# Welcome to NAMEexamples/hello-world. With the title drawn, a#heading in the markdown would be a secondh1(see below).packages/core/README.md› Type Definitions (PageNodeSchemaliteral)pageType: 'app'PageNodeSchemainguide/schema-rendering.md.packages/runner/README.md› Example Schema"pageType": "home"homeis the landing page laid out dashboard-style, and PR objectui#11449 chosehomefor the catalog's "Dashboard" KPI page (full-dashboard.json).packages/runner/src/App.tsxfallback welcome pageBoth values are members of
@objectstack/spec'sPageTypeSchema, whichPageNodeSchema.pageTypetakes.Measured first, at BASE
5988b6b53One-time render probes through the real
SchemaRendererwith the@object-ui/componentsrenderers and plugin-markdown registered, waiting for the lazy markdown module to settle. The probe files were not committed.{"type":"page","title":"Reports","children":[{"type":"markdown","content":"# Welcome to Reports"}]}, rendereddata-page-type="record". The page drew noh1forReports. Once plugin-markdown settled, the markdown child drew oneh1,Welcome to Reports."pageType": "app"drew twoh1s:Reports, thenWelcome to Reports."pageType": "app"and the markdown textWelcome to Reports(no#), it drew oneh1,Reports, and the markdown drew a paragraph.h1,Reports; the markdown draws a paragraph.So the card's premise holds for the title: it never drew. "No heading" is true in a host without plugin-markdown, and in a host with it the only heading was the markdown's
Welcome to NAME. AddingpageTypealone would have broken the one-page-one-h1rule (objectui#3434). That is why the generator's markdown now opens with prose. The built CLI (node packages/cli/dist/cli.js g page Probe) writes the new shape.packages/runner/src/App.tsx: deleted, not fixedWhen
loadPagereturned nothing, the code calledsetError('Page not found: …')and then, for/only, stored a built-in page titled "Welcome to Object UI" readingNo index page found.. The render checkserror || !pageSchemabefore it reachesSchemaRenderer, and the error was always set on that path, so the stored page could never render. Measured at BASE by renderingRunnerAppat/with a loader that answersnull, with and without an app config: both drew the 404 block (404,Page not found: /,Go Home), and neither containedNo index page found.. The same probe after the deletion draws the same thing. The deletion is behaviour-neutral, and it matches the runner README's own account (a missing document "renders as a 404"). Making the page reachable instead would have changed what the runner renders and made that README wrong. ESLint'sno-explicit-anywarning on the deletedas anygoes with it.README population at BASE
Read with the pin's own fence reader over every
packages/**/README.md(43 tracked files, none generated, none in an ignored directory; 442 fences, 22 that mentionpage): exactly twotype: "page"object literals, both titled and with nopageType,packages/core/README.md› Type Definitions andpackages/runner/README.md› Example Schema.git grepfor atype: "page"key over the same READMEs finds the same two lines. No README declares a page-node interface. There was no third README to fix.The pin
packages/components/src/__tests__/page-node-headings-drawn-11436.test.tsxnow reads two more populations with the same reader and the same assertions:README.mdanywhere underpackages/(a filesystem walk that skipsnode_modules,dist,.turboandcoverageand does enter test directories);objectui generate pagewrites. The test RUNS the realgenerateinto a throwaway directory, withprocess.cwd()stubbed for the one call (the lever the cli test already uses), and reads the file back. It imports the generator's source by relative path, because@object-ui/clipublishes its commands only as a bin.The floor names the three new producers (
packages/core/README.md› Type Definitions,packages/runner/README.md› Example Schema, and the generator). The LIT control requires the README walk to find more than 20 files and 100 fences, and at least one README below a package root. The pin has 66 cases, 6 of them new: a render and a live control for each new producer.Where the rendered assertion lives. This package's
.test.tsfiles run in the node-environmentunitproject, which renders nothing. The pin already renders, with the static and live-control legs beside it, so the generator's rendered heading is asserted there. A second renderer in the cli package would be the two-readers shape PR objectui#11449 retired. The cli test keeps the shape:generate-page-dialect-9847.test.tsupdates its exact scaffold and adds an objectui#11450 case asserting thepageTypeis a drawing member ofPageTypeSchemaand that no markdown child opens an ATX#heading. That second half is the one the pin cannot see, because plugin-markdown is not registered in the pin's environment (leg c below).The ledger row for the pin in
scripts/markdown-test-inputs.mjsnow readscontent/docs/**andpackages/**, with the rootREADME.mdasnotRead(a bareREADME.mdliteral resolves against every ancestor directory).node scripts/markdown-test-inputs.mjs --audit: all 114 candidates adjudicated.Reverse verification
Every leg ran from committed head
4d90c76e4, and I wrote each prediction down before the run. Mutations went through objectstack'sablation-replace.mjs(its anchors must hit) or a script with anEXIT INT TERMtrap and absolute paths. Each restore was proven by blob == HEAD and an emptygit diff HEAD.generate.tsand both READMEs; blob == BASE blob for each), the new tests unchanged. Predicted 9 failed / 60 passed. Got 9 failed / 60 passed:pageType: "app",line ingenerate.ts(anchor 1 → 0). Predicted 5 failed / 64 passed. Got 5 failed / 64 passed: the record check, the generator's render and live control, and the two cli cases.#back in the generated markdown (anchor 1 → 0, replacement 0 → 1). Predicted 2 failed / 67 passed, with the pin green. Got 2 failed / 67 passed, both in the cli test. The pin cannot see a secondh1drawn by plugin-markdown, and the cli assertion is what catches it.README.mdx, so it finds nothing. Predicted 2 failed / 63 passed of 65, the four README cases gone. Got 2 failed / 63 passed (65): the LIT control and the floor.packages/**and thenotReadentry dropped from the row,--auditexits 1 with 5unadjudicated-documentfindings naming the pin.check:doc-snippetscompiles the core README block: withpageType: 'detail'there it reportsTS2322: Type '"detail"' is not assignable to type 'PageType | undefined'at that block, 776 judged and 1 failed.Tests and gates (head
ea95fb6e7)generate-page-dialect-9847.test.tsandapp-generator.test.ts; all sixpackages/runnertest files;guide-schema-rendering-data-context-8021.test.tsx;scripts/__tests__/markdown-test-inputs.test.tsand the eight otherscripts/__tests__files that import or name it; and the eight furtherscripts/__tests__files the ledger records as readers of the two edited READMEs.turbo run build --filter='@object-ui/components^...' --filter='@object-ui/cli^...' --filter='@object-ui/runner^...' --concurrency=2: 14 successful. Then thecheck:doc-snippets --build-filterclosure: 35 successful.pnpm --filter @object-ui/components type-checkexits 0 at this head.@object-ui/cliand@object-ui/runnertype-checkexit 0 at4d90c76e4, and neither package changed after it.--listFilesOnlyputs the cli test in the cli program, and the pin pluspackages/cli/src/commands/generate.tsin the components test program.pnpm check:doc-snippets: 776 of 776 blocks judged, 0 failed.check:readme-exports(43 READMEs),check:control-bytes,check:new-line-citations(0 new),check:changeset-claims,check:pending-changeset-literals,check:test-path-roots,check:phantom-deps,check:self-import,check:doc-types,check:doc-fences,changeset:check,node scripts/check-changeset-presence.mjs(2 changesets declared), andnode scripts/markdown-test-inputs.mjs --audit.node scripts/check-governed-queue-guard.mjs --testover the 9 paths: NOT GOVERNED, an ordinary pull request.--no-inline-config --format jsonover the 5 changed lintable files: 5 files, 0 errors, 1 warning. The warning isreact-hooks/preserve-manual-memoizationonApp.tsx'sloaderuseMemo, which BASE has too. The narrowing holds:--print-configgives 116 to 119 rules for the four TypeScript files and 0 forscripts/markdown-test-inputs.mjs. JSON and markdown files have no ESLint config.eslint.config.jssets noparserOptions.projectorprojectService, and no rule undereslint-rules/reads the filesystem (both greps exit 1, against a control grep that hits). So no verdict on an untouched file can move.Changesets:
@object-ui/clipatch (the generator) and@object-ui/runnerpatch (App.tsx). The README edits need none: the presence gate subtracts*.mdfrom published files.NOT MEASURED, a declared narrowing: the whole
packages/componentsandpackages/clisuites, and the repo-widepnpm lint. CI runs them.38629a052, after mergingorigin/main6007dd4e4):scripts/__tests__/body-dialect-census.test.tsno longer listspackages/runner/src/App.tsxamong the producers objectui#7181 migrated, because this PR deletes the fallback page that entry pinned. With the entry put back, the census fails exactly as CI did (expected ... to contain 'children:', 1 failed / 21 passed). The 44 test files that read a changed file (1805 tests) pass on the merged head.Acceptance notes
content/docs/utilities/runner.mdxsaid twice that, with no metadata,/shows "the built-inNo index page found.placeholder". Both sentences now say/renders the 404 block,Page not found: /. Measured with the realLocalBundleLoaderand nosrc/app-data:RunnerAppat/draws404,Page not found: /andGo Home. The 18 tests the ledger records as readers ofrunner.mdxpass atccd5d34f1.objectui generate --output DIRis ignored. The CLI declares--output("Output directory for generated schemas", defaultschemas/), andcontent/docs/utilities/cli.mdxlists it. The action never passes it togenerate. Measured with the built CLI:g page Probe --output custom/wrotepages/probe.jsonand nocustom/directory. That is a different defect from this card, so it is not fixed here./, the runner'sGo Homebutton navigates to/, the page it is already on.Concurrency:
maingained objectui#11460, objectui#11461 and objectui#11462 after BASE. None touches these files. objectui#11460 editspackages/layout/README.md, which the widened pin now reads. It holds no page node on the new tip (grep exit 1; the same file has 15typelines).Session:
https://claude.ai/code/session_01YLg8XqWGJ785fwQ5v4pH37(dispatched os-dev run,domain:uiseat 1).Generated by Claude Code