Repository navigation
feat(spec)!: a field-heavy task flow on desktop derives a bounded modal; mobile keeps full-screen - #23747
Conversation
…al; mobile keeps full-screen
deriveRecordFlowSurface maps a desktop field-heavy create/edit/child task
flow to { overlay, modal, size: 'auto' } so the renderer's lg/xl bound
applies; viewport 'mobile' keeps size 'full'. The #2604 D1 docblock gains a
dated amendment line naming the ruling. Test pins flip to the new value, plus
a heavy form with an embedded line-items table (no subtable split).
Claude-Session: https://claude.ai/code/session_01FaR7ExTuo2XxtaZH3xKJ1e
Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): ⛔ 1 release-owned page(s) name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 142 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 52e5667f2bfd93b74ddf543e380afd1ed7824162 && git checkout 52e5667f2bfd93b74ddf543e380afd1ed7824162
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin a869ea6362e2f44daeedc557b848493fd33f9020 c5defce712d8e260a240495af34faecd899a21e0 && git checkout -B drift-repro a869ea6362e2f44daeedc557b848493fd33f9020 && git merge --no-ff c5defce712d8e260a240495af34faecd899a21e0
node scripts/docs-audit/affected-docs.mjs --json a869ea6362e2f44daeedc557b848493fd33f9020
|
席位核对 · ACCEPT · PR #23747 @
|
Contract reviewServed-tier: Inputs read: card #23734 body and all 5 comments (the ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #23734
Clause-②: no
The spec half of objectstack-ai/objectui#12521 ruling
6203721639(letter B, maintainer 「B (推荐)」):deriveRecordFlowSurfacenow derives, for a field-heavy task flow on desktop, a bounded modal (size: 'auto', so the renderer'slg/xlbound applies); a mobile posture keeps the full-screen modal.What changed
packages/spec/src/data/record-surface.ts: the task-flow arm. When the base derivation says'page'(field-heavy, or mobile), a task flow (create/edit/child-create/child-edit) answers{ container: 'overlay', surface: 'modal', size }withsize: 'full'only forviewport: 'mobile'andsize: 'auto'otherwise. No new parameter, export or type member: the mobile posture was already theviewportinput, andRecordFlowSurface.sizewas already'auto' | 'full'. The docblock states the viewport split and the no-subtable-split reading, and carries a dated amendment line on the Design: record create/edit/subtable surface + return-flow model (follow-up to #2578) #2604 D1 statement it cites (the original D1 sentence is kept, not rewritten).packages/spec/src/data/record-surface.test.ts: the pins that assertedsize: 'full'for a heavy desktop task flow are flipped to assertsize: 'auto'(heavy task flows, the fatchild-editchild, thepageThresholdcase, now a fulltoEqual). Added: an explicitviewport: 'desktop'leg, heavy-on-mobile stays'full', and a heavy form with an embedded line-items table (arepeaterfield) takes the same bounded modal on desktop and full-screen on mobile..changeset/23734-heavy-flow-bounded-modal.md:@objectstack/specminor, BREAKING line with the FROM / TO table and the one-line fix (navigation.size: 'full'orFormView.modalSize: 'full'for an object that genuinely needs full-screen on desktop), ADR-0087 dispositionnot-required (no-migration-prescription).Premise measured first (ruling item 2)
The ruling asked whether #2604 D1 chose full-screen for a field-heavy task flow with an embedded child or line-items table. Read on objectstack#2604 (design comment
4884632356, the D1 table and its scope note):D1 sized task flows by authorable field count alone, and its own scope note puts the in-form
inlineEdit(line-items) grid outside the design. The derivation's input is the object def, so it never sees an embedded grid either. D1 therefore never chose full-screen for that case: the split the ruling conditions on does not apply, and the bounded modal covers every field-heavy desktop task flow. A test states this. No fork is reported to objectui#12521.Consumers swept
git grep -n "deriveRecordFlowSurface"across the repo (packages,examples,content/docs,skills): the only callers arerecord-surface.tsand its test. The other hits are the generatedapi-surface/export-originsrosters (unchanged: no export moved) andcontent/docs/releases/v12.mdx(release-owned, not edited). The console consumer (objectuiAppContent.tsx, keyed onsize === 'full') is in objectui#12521 / objectui PR 12546; no objectui file is touched here.Verification (at
c5defce)pnpm --filter @objectstack/spec build:: exit 0;pnpm --filter @objectstack/spec typecheck:: exit 0.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/data/record-surface.test.ts:: 15 passed.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2(whole package) :: 21808 passed, 1 todo, exit 0.pnpm --filter @objectstack/spec check:generated:: all 14 generated artifacts up to date (no regeneration needed: the docblock is not a.describe()).scripts/ablation-replace.mjs(anchor hit x1, blob changed, restored to the HEAD blob withgit diff HEADempty): size forced to'full'everywhere: 4 failed / 11 passed; size forced to'auto'everywhere: 2 failed / 13 passed (the mobile legs).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 84 derived commands, run locally with exit codes recorded;--ranreconciliation: 84 accounted, 83 run, 1 NOT MEASURED. Three gates first exited 3 on prerequisites (shallow clone, unbuilt@objectstack/formula/@objectstack/objectql) and were re-run green after fetching the pinned fixture commit and building those two packages. NOT MEASURED:pnpm check:dual-build-cjs-loads(needs every package'sdist; CI runs it).Acceptance notes
skills/objectstack-ui/rules/navigation.md(Record Presentation, "Surface (page vs drawer)") says a field-heavy object opens create/edit/detail as a full page. That was already inexact before this change (create/edit has been a full-screen modal since Design: record create/edit/subtable surface + return-flow model (follow-up to #2578) #2604), and it is now a bounded modal on desktop. Not edited here:skills/**is a governed surface outside this card's claimed file surface. Drift only, no runtime or authoring consequence (the paragraph tells authors not to set the surface). Carrier: none.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01FaR7ExTuo2XxtaZH3xKJ1e