feat(spec,lint): adaptive record surface + semantic span + navigation.size (#2578)#2595
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
Renderer companion: objectstack-ai/objectui#2237 |
Step 1 (framework) of #2578 — field-heavy objects, AI-authored: - deriveRecordSurface(def, opts): pure spec derivation of the default record surface (page vs drawer/modal) from authorable (visible, non-system) field count; mobile forces page. A DERIVATION, not an authored key — a `recordSurface` object key fails ADR-0085 §2's admission test (field count is machine-inferable, modal-vs-page is pure re-arrangement). - FormField.span: 'auto' | 'full' — relative field width decoupled from the per-surface derived column count (mobile 1 / modal 2 / page 3-4); replaces absolute colSpan as the primary primitive (colSpan retained + clamped by the renderer). `half` deferred. - validateFormLayout lint: form-field-unknown + absolute-colspan-discouraged (both warnings with fix hints, ADR-0078/0019, same bar for AI + hand authors). - ADR-0085 §2 rejected-keys clarification (recordSurface); changeset. Additive only (0 breaking). spec 6677 tests + api-surface green; lint 121 tests + tsc green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…2578) Add NavigationConfig.size ('auto'|sm|md|lg|xl|full, default 'auto'), aligned with FormView.modalSize; deprecate the pixel `width` and `drawerWidth`. A pixel width can't be authored blind — the author (often AI) doesn't know the client viewport. 'auto' means the renderer derives the size from field count and clamps to the viewport, so AI writes nothing. Additive; api-surface unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
os-zhuang
force-pushed
the
feat/adaptive-layout-2578
branch
from
July 4, 2026 16:59
1ab1584 to
d8316b5
Compare
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 90 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
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.
Framework / spec side of #2578. All metadata is AI-authored, so the design goal is to make AI unable to get presentation wrong — presentation (surface / width / columns) is runtime-derivable, so none of it is an authored key.
What
deriveRecordSurface(spec/src/data/record-surface.ts) — the default record surface (page vs drawer/modal) derived from authorable field count; mobile always pages. A derivation, not an authored key: arecordSurfaceobject key fails ADR-0085 §2's admission test (field count is machine-inferable). Explicit override remains the assigned-page path.FormField.span(auto|full) — relative field width, decoupled from the per-surface derived column count; replaces the fragile absolutecolSpan(retained + clamped by the renderer).NavigationConfig.size(auto| sm | md | lg | xl | full) — T-shirt overlay size aligned withFormView.modalSize; deprecates the pixelwidth/drawerWidth(a pixel width can't be authored blind — the author doesn't know the client viewport).auto⇒ renderer derives size from field count + viewport, AI writes nothing.validateFormLayoutlint —form-field-unknown+absolute-colspan-discouraged(both warnings with fix hints; ADR-0078/0019, same bar for AI and hand authors).recordSurfaceas rejected, to prevent re-proposal) + changeset.Tests
check:api-surface(regenerated, additive) — greenCompanion
Renderer side lives in objectstack-ai/objectui (companion PR). Build-independent: objectui ships a local mirror of
deriveRecordSurfacepending this spec's release, then consolidates to the import.Refs #2578
🤖 Generated with Claude Code