fix(page,field): consume the spec's type/label/maxLength keys (framework#1878 §3 recheck) - #2867
Merged
Merged
Conversation
…ork#1878 §3 recheck) Three forward-drifts where objectui read a different key than the spec declares, so authoring the documented key silently no-oped: - page `type` -> `pageType`: PageSchema declares the page KIND as `type`; PageRenderer reads `schema.pageType` with a 'record' fallback and NOTHING mapped between them, so every non-record page (home/app/list/utility) rendered with the record max-width, a wrong data-page-type and a suppressed header. PageView now passes pageType alongside the SchemaNode discriminator `type` (which must stay -- ComponentRegistry dispatches on it). - page `label` -> `title`: PageSchema.label is required but the region renderer read only `title`. Dual-reads now, mirroring DashboardRenderer. Coupled with the above: the header is gated on pageType !== 'record', so fixing label alone would still render nothing. - field maxLength/minLength: validation already dual-read them, but ObjectForm's HTML-attribute pass and TextAreaField read max_length only -- no browser cap, no character counter for spec-authored metadata. Browser-verified against the showcase: capability_map (type:'home') now renders data-page-type="home", max-w-screen-2xl and its title; record pages unchanged. 625 tests green across the touched packages. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to objectstack-ai/objectstack
docs/naming-drift-recheck. Three FORWARD-DRIFTs found by rechecking the 2026-06 audit's §3 list — cases where objectui reads a different key than the spec declares, so the author does everything right and nothing happens.1 + 2. The page pair (coupled — must land together)
PageSchemadeclares the page KIND astype(record|home|app|utility|list) and requireslabel. But:PageRendererreadsschema.pageTypewith a'record'fallback (page.tsx:391) — and nothing mappedtype→pageType. The boundary passedtypeonly (PageView.tsx:123).schema.title, neverlabel(page.tsx:503-507).Coupled because the header is gated on
pageType !== 'record'— pinned false by drift #1, so wiringlabelalone would still render no title.Observable today in the showcase:
capability_map(type:'home'),active_projects(type:'list') andcommand_center_jsx(type:'home') all rendered as record pages — record max-width,data-page-type="record", no title.Why it hid for a year: the spec's
typedefaults to'record'and the renderer's fallback is'record', so the most common page kind looked correct by coincidence.Fix:
PageViewpassespageTypealongsidetype(which must stay —ComponentRegistrydispatches on it), andPageRendererdual-readstitle ?? label, mirroring the fallbackDashboardRendereralready uses.3. field
maxLength/minLengthValidation already dual-reads these (
fields/src/index.tsx:2013,2022, citing the same #1878 closeout), but two readers were missed:ObjectForm's HTML-attribute pass (:607-608) andTextAreaField(:39) readmax_lengthonly — so a spec-authoredmaxLengthproduced no browser cap and no character counter. Both now dual-read.Verification
capability_mapnow reportsdata-page-type="home",max-w-screen-2xland renders its<h1>Capability Map(screenshot in the framework PR thread). Record pages re-checked unchanged — stilldata-page-type="record", no duplicate title.🤖 Generated with Claude Code