Repository navigation
feat(components): the page renderer no longer compiles kind jsx as html (objectui#12486) - #12679
Conversation
…ml (objectui#12486) @objectstack/spec 18 retired the page kind jsx, and objectui now resolves 18.0.0-next.2, whose COMPILED_PAGE_KINDS is html alone and whose stored-row rehydration rewrites a stored jsx page to html. So the renderer's kind === 'jsx' arm goes, and the kind read is the authoring type again, with no widening annotation. A raw node that still carries jsx takes the template / page-type path a node with no kind takes. - page.tsx: the arm, the widened read and the getJsxManifest comment. - layout.zod.ts: comments that named jsx as live. - the app-shell requires-stamp server double reads the installed spec's COMPILED_PAGE_KINDS instead of a hand copy that still listed jsx. - a render pin: a jsx node paints nothing from its source and draws what an absent-kind node draws; html still compiles. Claude-Session: https://claude.ai/code/session_011K9g23W67dy2zwnyzaoB6o Co-authored-by: Claude <noreply@anthropic.com>
REWORK round 1 → PR #12679 ·
|
… (objectui#12486) The pending objectui#12464 changeset said the page renderer still renders a stored kind jsx page as html. This branch drops that arm, so the paragraph is deleted; this PR's own changeset states the new behaviour. Claude-Session: https://claude.ai/code/session_011K9g23W67dy2zwnyzaoB6o Co-authored-by: Claude <noreply@anthropic.com>
…12486) The objectui#12464 paragraph it pointed at was deleted in the previous commit, so the sentence named nothing. Claude-Session: https://claude.ai/code/session_011K9g23W67dy2zwnyzaoB6o 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
|
Contract reviewServed-tier: Reviewed read-only against card objectui#12486 (body and every comment), its parent objectui#12464 with triage ruling ① Derived judgmentsThe arm, and what the renderer now does — right. On Can any producer still hand it
The The narrowing is complete and nothing else narrows or widens. The only behaviour change is the one arm. The pin. Check-runs on the head. Every required check is green: Drift. Between the merge-base ② Semver level
③ Boundary flagsDev report
Implemented-by: VERDICT: PASS Generated by Claude Code |
席位核对 · ACCEPT ·
|
Fixes #12486
Clause-②: no (narrowing)
Half 2 of objectui#12464. The page renderer drops its
kind === 'jsx'arm now that objectui resolves@objectstack/spec18.0.0-next.2(built from objectstacke5136ff10f, which carriesc5dd7fce30), as triage's ruling6190403616set the condition and the unlock6215013185measured it met.The narrowing (the claim's Clause-② reason)
@object-ui/components'PageRendererused to compile a node'ssourcewhen itskindwashtmlorjsx. It now compiles it forhtmlonly.kind: 'jsx'is no longer compiled. It takes the template / page-type layout path that a node with nokindtakes: it draws itschildrenorregionsand never readssource. Such a node can only come from code built past the types:PageNodeSchema.kindand its zod face have refusedjsxsince objectui#12464.jsx. next.2'sCOMPILED_PAGE_KINDSis['html'], its page parse refusesjsxby name (the save door answers 422,os validatereports it), and spec 18's stored-row rehydration rewrites a storedjsxpage tohtmlbefore it is served.minoron@object-ui/components, per this repo's version policy. OneCONTRACT_REVIEW_TIERreview is owed before ready, per the claim.What changed
packages/components/src/renderers/layout/page.tsx: the arm is gone. The read ofschema.kindis the authoring type again (const kind = schema.kind, no widening annotation), and the comment abovegetJsxManifestnameskind:'html'.packages/types/src/zod/layout.zod.ts: comments only. The.extractcomment no longer describes the pre-next.2 state, and the list of re-attached spec checks no longer namesjsx(next.2'scheckPageSourceCompletenessreadshtmlandreact;COMPILED_PAGE_KINDSishtml). No code line in the file moved.packages/app-shell/src/views/metadata-admin/ResourceEditPage.pageRequiresStamp-11357.test.tsx: the server double reads the installed@objectstack/spec/uiCOMPILED_PAGE_KINDS(through an asyncvi.hoistedimport) instead of its hand copy ofhtmlandjsx. The card named the file underviews/; it lives underviews/metadata-admin/.packages/components/src/renderers/layout/__tests__/page-kind-jsx-not-compiled-12486.test.tsx..changeset/12486-drop-page-kind-jsx-arm.md:@object-ui/components: minor, stating the narrowing in words.What a stray
kind: 'jsx'node draws: the decision, on the four axesThe options: A, the renderer's existing path for a kind it does not name (template / page type, as for an absent kind); B, a named error panel for
jsx; C, a generic loud panel for any undeclared kind.jsx. On objectuimainat4be76e030, the onlykind: 'jsx'writer outside CHANGELOGs and pending changesets is the retired-value pin inpackages/types(control: the same grep findskind: 'html'in many files). On objectstackmainat7a6ba03, only the test fixtures of the conversion and refusal machinery write it. B and C serve no measured case.objectui validate. A adds no consumer tolerance and re-honours nothing. B would be a second, consumer-side spelling of a refusal the contract owns.Implemented: A. The trade-off, stated plainly: at render, A is quiet (the source is not read); the refusal lives at authoring and save.
Evidence (all at head
bc88318)pnpm exec turbo run build --filter='@object-ui/app-shell^...' --concurrency=2:Tasks: 28 successful, 28 total, exit 0 (3m0s on a shared box).VITE_BASE_PATH=/console/ pnpm --filter @object-ui/console exec vite build: exit 0,apps/console/dist/index.htmlpresent (a 100.8s build on a shared box).pnpm --filtertype-check:@object-ui/components0,@object-ui/types0,@object-ui/app-shell0. Both edited test files are inputs of their package'stsconfig.test.json(read with--listFilesOnly).Test Files 88 passed (88),Tests 2192 passed (2192). The set:packages/components/src/renderers/layout/, the app-shell requires-stamp test, 25 components tests that render page kinds, and 58packages/types/srctests that namejsxorkind.if (kind === 'html' || kind === 'jsx')), through objectstack'sscripts/ablation-replace.mjs: anchor hits 1 to 0, blobb2b94175toee18452c. The pin went2 failed | 1 passed(subject and same-path red, control green), and@object-ui/componentstype-checkwent red with TS2367 on the re-added comparison, because the authoring-type read refuses it. Restore: blob after restore equals the HEAD blobb2b94175, andgit diff HEADis empty.check:changeset-claims0,changeset:check0,check:test-path-roots0,check:spec-symbols0,check-changeset-presence0,check:new-line-citations0,check:control-bytes0. eslint on the 4 changed source files: 0 errors (9 warnings, all on untouched lines).check-governed-queue-guard --test: NOT GOVERNED.packages/app-shell/suite and the fullpnpm test; the CI shards run them.Acceptance notes
.changeset/12464-retire-page-kind-jsx.mdkept a paragraph (it startedUnchanged:) saying the renderer still renders a storedjsxpage ashtml. This PR makes that false, so the seat's REWORK round 1 widened the file surface to that changeset's prose, and commit240a30f9deleted the paragraph (frontmatter untouched). The supersede sentence in this PR's own changeset was dropped as redundant.packages/spec/liveness/page.json, in thesourcerow's note, cites the renderer'skind:'jsx' branch. After this PR that branch is thekind:'html'one. Prose drift in a ledger note that no gate reads; no carrier; not filed.Session:
https://claude.ai/code/session_011K9g23W67dy2zwnyzaoB6oGenerated by Claude Code