Repository navigation
feat(spec): an action's answer fields gain a table format, drawn from its columns - #34500
Conversation
…lumns `table` draws an array of objects as rows, one cell per entry of the field row's new `columns`. Refused: `columns` beside any other format, `table` without `columns`, `table` as a cell format and as the dialog-level default. Claude-Session: https://claude.ai/code/session_01ADHkmRAxMkAHLvWYP3eojs Co-authored-by: Claude <noreply@anthropic.com>
…hangeset Ledger rows for the new row refinement (24 dropped-refinement sites), the `columns` liveness rows graded planned until the console renderer lands, the reference page, the strictness counts, and a minor changeset. Claude-Session: https://claude.ai/code/session_01ADHkmRAxMkAHLvWYP3eojs Co-authored-by: Claude <noreply@anthropic.com>
… contract The two hand-written format unions refused the widened set where the action renderers forward `resultDialog` uncast; derive them like the label members beside them. Claude-Session: https://claude.ai/code/session_01ADHkmRAxMkAHLvWYP3eojs Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check8 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 173 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 c9678091016d7406225783f61a9aa6af25d5bc7b && git checkout c9678091016d7406225783f61a9aa6af25d5bc7b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 107d2e8497270aad611f77a81bc341f48c6d3e00 635bb5a7ab0681bf71396c424ae17e67c4f5031e && git checkout -B drift-repro 107d2e8497270aad611f77a81bc341f48c6d3e00 && git merge --no-ff 635bb5a7ab0681bf71396c424ae17e67c4f5031e
node scripts/docs-audit/affected-docs.mjs --json 107d2e8497270aad611f77a81bc341f48c6d3e00 |
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head e05528a · 2026-11-16T23:13Z |
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract reviewServed-tier: Inputs read: card #34391 (body and all 8 comments), PR #34500 (body, file list, net diff against merge-base Check-runs on the head, at the time of reading: 65 runs, no failure. Completed green: Check Changeset, Spec property liveness, Governed Surface Queue Guard, PR-body guards, Lint and Repo Gates and every Lint shard, Type Check · source gates, Build Docs, Build UI Deps, Check Documentation Links, Dogfood Regression Gate. PENDING (in progress, no verdict yet): Build Core, Test Core 1/8 to 8/8, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Type Check UI, Lint UI, Build and E2E UI, Live E2E UI, Test UI 1/16 to 16/16. This record does not stand in for those: the spec test suite, the workspace type-check and the UI type-check (the one the ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
S1 (should-fix) — The cell rule of the
No must-fix. S1 is open on this head and earns a delta review of its fix; N1 and N2 may ride with it or be left as accepted deviations. Implemented-by: VERDICT: PASS |
…the describes A cell draws its value in the column's format when it fits, and as compact JSON text otherwise, whatever the format; a missing value draws an empty cell; an element that is not an object draws itself in the first cell. Claude-Session: https://claude.ai/code/session_01ADHkmRAxMkAHLvWYP3eojs Co-authored-by: Claude <noreply@anthropic.com>
The table column row adds one strictObject site. Claude-Session: https://claude.ai/code/session_01ADHkmRAxMkAHLvWYP3eojs Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRAxMkAHLvWYP3eojs Co-authored-by: Claude <noreply@anthropic.com>
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 635bb5a · 2026-11-17T00:59Z |
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract reviewServed-tier: Delta review. The previous at-tier record is comment 6932322404, a pass on head Check-runs on the new head, at the time of reading: 45 runs, no failure. Completed green (12): Check Changeset, Spec property liveness, Governed Surface Queue Guard, PR-body guards, Check PR Size, Check Documentation Links, Flag docs affected by code changes, Dogfood Regression Gate, Plan Test Core shards, Plan Test UI shards, filter, Auto Label. Skipped (9): the opt-in and queue-only jobs. PENDING (24, in progress, no verdict yet): Build Core, Test Core 1/8 to 8/8, Build Docs, Build UI Deps, Live E2E UI, Type Check · workspace, Type Check · source gates, Type Check · consumer gates, Type Check · debt ledger, Lint · ESLint, Lint · docs and code guards, Lint · CI, release and engine gates, Lint · repo and tooling gates, Lint · PM dispatch-gates, and the three scoped Lint jobs (tooling self-tests, slot lookup and corpus, query-options erasure). Not yet created on this head: the Test UI shards, Type Check UI, Lint UI, Build and E2E UI. This record does not stand in for any of them. Two matter to this delta in particular and the seat reads them before landing: Test Core (it carries ① Derived judgments
② Semver levelUnchanged from the previous record and still right: ③ Boundary flags
④ Design judgment
Walked against the cases: format omitted and a string, S1: closed. Every statement of the cell rule now has the one reading, parts (a), (b) and (c) of the finding are each answered in the bullet, and the describe, the refusal message and the ledger notes agree with it. N1: closed. The N2: closed. The row N3 (nit, new) — "an element that is not an object" does not say where an array element or a
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ Final head · 2026-11-17T01:41Z
|
|
repo:objectstack#2 · os-steve · session_01ADHkmSmxJiAWk7fuq3Q1Sf 席位核对L1 verdict: ACCEPT · card #34391 · area o2-A · first review · read at 2026-11-17T01:44Z Checklist, read against GitHub and the head tree, not against the report:
L2 owed: yes, and it is in. The touched surfaces are Landing tier. |
|
repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ Landing · 2026-11-17T01:45Z · head
L1 ACCEPT 6935285388 and contract review PASS 6934473605 on this head. Ready for review and auto-merge through the queue; #34391 closes with the merge. |
Requested by Steve · project thread
Fixes #34391
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: none — the console does not draw
tableyet (columnsis[PLANNED — not yet rendered], livenessplanned); teaching it inskills/**before the renderer lands would advertise a format that draws nothing, so the skill line belongs with the renderer half维护者速读
table,字段可写columns列清单;四种写错的组合在解析阶段直接报错。table的字段只显示标题。回滚即撤本 PR。packages/spec/src/ui/action.zod.ts(新拒收与resultDialog上的渲染约定)、ui/packages/core/src/actions/ActionRunner.ts(两行类型改为从契约派生)、packages/spec/liveness/action.json。pnpm --filter @objectstack/spec exec vitest run src/ui/action-answer-table-format.test.ts,预期 47 例全绿。What changes
ACTION_ANSWER_FIELD_FORMATSgainstable. The shared field row (actionAnswerFieldRow, used by bothresultDialog.fieldsandpreflight.fields) gainscolumns: an array of{ path, label?, format? }, wherepathis read in ONE element of the array. A column reuses the row's alias map (key/field/nametopath,titletolabel,display/rendertoformat).columnsbeside anyformatother thantable, or on a field with noformat(the dialog-level default is nevertable):customat...fields.N.columns.format: 'table'withoutcolumns, or withcolumns: []:customat...fields.N.columns. Refused, not defaulted to the element's keys (seat ruling R2; Prime Directive 12).tableas a cellformat:invalid_valueat...columns.M.format, with its own message.resultDialog.format: 'table':invalid_valueatresultDialog.format, with its own message (seat ruling R3).z.enum(...).exclude(['table']); there is no second hand-written list (R3, R4).tableis stated onresultDialogbeside the other five formats (R5). Where R5 and the console's existing behaviour for the sibling formats differ, this PR matches the sibling, as R5 allows: a MISSING value is skipped like any other field's, and a NON-ARRAY value draws asjson, ascode-listdoes (the console'sResultField).columnscarries the[PLANNED — not yet rendered]marker, and its liveness rows (preflight.fields.columnsand its three children) areplanneduntil the console reader lands; theresultDialogrow's note says the same.ui/packages/core/src/actions/ActionRunner.ts: the two hand-writtenformatunions onResultDialogSpec/ResultDialogFieldSpecnow derive from the contract (SpecResultDialog['format'],SpecResultDialogField['format']), the way their label members already do. Without it the widening reds@object-ui/components' build, becauseaction-button.tsxandaction-icon.tsxforwardschema.resultDialoguncast into the runner's type (measured: TS2322 at both sites). Type only; no renderer change.content/docs/references/ui/action.mdx, the strictness-ledger counts, liveness state counts.dropped-refinements.baseline.jsongains the 24 sites the build named for the new row refinement (a value-dependent rule, so it has no projectable arm).check:authorable-surfaceandcheck:api-surfaceare green with no file change (no export was added).@objectstack/specminor,@object-ui/corepatch.Renderer contract the console half must honour
From the
resultDialogdoc comment (packages/spec/src/ui/action.zod.ts, thetablebullet):columnsone cell, incolumnsorder;label, falling back to itspath;pathin the element; a missing value (the path resolves toundefined) draws an empty cell;format(omitted:text) when it fits that format the way a field's value must (qrcode,secretandtexttake a string,code-listan array of strings); any value that does not fit, whatever the column's format (an object or an array under the omittedtext, a number undersecret), draws as compact JSON text, which is also howjsondraws in a cell;[]draws the header row over an empty-state line;json, ascode-listdoes.Tests
packages/spec/src/ui/action-answer-table-format.test.ts(47 cases). Every case runs at both surfaces. CONTROL: each of the five pre-existing formats parses on a field and as the dialog default, a barepathrow parses, and the row still refuses an unknown key and an unknown format and answers its aliases. Widening: atablerow parses and is kept as written; each non-tableformat parses as a cell; a column answers all six aliases. Refusals 1 to 4 each assertcode+ path + the first clause of the message.packages/spec/src/ui/action-preflight.test.ts, the case "fieldsisresultDialog.fields' row: its aliases and its format set" usedformat: 'table'as its unknown-format probe.tableis now a member, so the probe ischart; the assertion (invalid_valueatpreflight.fields.0.format) is unchanged.packages/spec/scripts/strictness-ledger.test.tspins the number ofstrictObjectsites inpackages/spec/src/ui/action.zod.ts. The new column row adds one closed object, so the pinned count moves from 12 to 13; nothing else in the test changes.packages/spec/scripts/strictness-ledger.test.ts, the case "does not count a z.object( that appears inside a comment" pins the strictObject site count ofui/action.zod.ts; the new column row adds one site, 12 to 13 (comment line added beside the earlier moves).Acceptance notes
tableorcolumns, neither of which parsed before.tablefield draws its label and no value (ResultFieldhas notablebranch). This is whycolumnsis marked planned.ui/edit is outside the original file surface; the seat accepted it (claim amendment 6932171004). It is the minimum that keeps the required UI checks green and touches no renderer.Verification
Head and gate readings are in the report comment on the card (
os-dev-report), taken after the last commit.Ablations (each refusal removed, its pins red, restored to HEAD)
Run with
scripts/ablation-replace.mjsonpackages/spec/src/ui/action.zod.ts, againstaction-answer-table-format.test.ts:if (row.columns !== undefined)made false): 12 failed (the five formats and the no-format case, at both surfaces).columnsmissing or empty check made false): 4 failed.Each leg restored: blob equal to HEAD,
git diff HEADempty.Local runs
pnpm --filter @objectstack/spec test: 847 files, 27116 passed, 1 todo.pnpm --filter @objectstack/spec typecheck: exit 0 (test typecheck included).pnpm --filter @objectstack/spec check:generated --fix: all 14 artifacts current;check:livenessexit 0.type-checkof@object-ui/core,@object-ui/components,@object-ui/app-shell: exit 0 (red before theActionRunner.tsedit).check-governed-merges.mjs --teston the file list: NOT governed.Generated by Claude Code