Skip to content

fix(spec)!: retire columnState from the stored view row - #36435

Merged
os-zhuang merged 5 commits into
mainfrom
claude/project-thread-sfzptl
Nov 22, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/project-thread-sfzptl

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

repo:objectstack#7 · zhuangjianguo · session_01QsR2jT24Rn8qK81aEFebXj

Fixes #36403

Clause-②: no (narrowing) — columnState stops being an accepted key on a view item record and on a flattened view overlay; no published export is removed
Metadata-protocol: narrowed
Skills-docs: none — skills/** never names columnState (git grep at the head)

维护者速读

  • 用户能看到什么变化:大多数列表用户无感;列宽早已只记在浏览器里、列顺序随「保存」存进视图本身。只有一种情况看得出来:某个视图上存着旧的列布局(列顺序、列宽),而读者自己的浏览器里没有记,升级前他看到这份旧布局,升级后看到视图本来的列顺序和列宽。这是维护者在 在列表上的改动都改成临时的(排序、筛选、分组、列的显示和顺序):立即生效但不保存,出现「放弃」和「保存」;列宽、行高、标签页顺序只记在浏览器里;退掉服务端的个人列表偏好 #35955 的裁定(旧布局不迁移),已在本卡重述(7079029398),升级说明里写明。再保存带这个字段的视图会被明确拒绝并告诉怎么改。
  • 为什么做:这是「列表改动先是草稿、列宽只记在浏览器里」那张卡剩下的规范一半;这个字段已经没有地方写入,只剩旧数据里存着的布局还会被读出来套用,留着它,旧布局就会一直盖住视图本身的设置。
  • 出错会怎样:旧数据里只存了列布局、别的什么都没有的个人覆盖行会变成无效行,需要删掉;其余视图读出时自动去掉该字段,照常显示和保存。撤回本次合并即可恢复。
  • 要你做什么:无。

What changes

columnState (the console grid's per-user column order and widths, admitted as a runtime-only overlay key at commit d5552ca) retires from the stored view row under ADR-0049 enforce-or-remove. Route: the view-overlay-owner-hidden-removed precedent (seat ruling on the card thread), as one family on both doors.

  • Schema (packages/spec/src/ui/view.zod.ts): retiredKey(VIEW_COLUMN_STATE_RETIRED) on viewItemWireFields() (view item record, member 1 of the view union) and on flattenedViewOverlayFields() (members 3 and 4). ViewColumnStateSchema (module-private) is deleted. VIEW_CONSOLE_ROUND_TRIP_KEYS loses columnState (six keys to five). The authoring doors, which never declared the key, keep refusing it by name: VIEW_ITEM_SURFACE.guidance now carries the retirement text, and the list view body (ListViewShapeSchema.guidance) carries VIEW_LIST_COLUMN_STATE_RETIRED, which names no migration command because no conversion reaches a list view body.
  • ADR-0087: D2 view-column-state-removed (conversions/entries/18/, step 18, order 83, retiredAfter: '18.6.0'): strips the key from a record (viewKind list/form with a config object) and from a flattened overlay (no config, no container slot), in views and viewItems; containers untouched. RETIRED_KEYS_BY_MAJOR[18]: ui/ViewItemWire:columnState, ui/ViewMetadata:columnState (declared, not judged, the owner / hidden blind spot). D3 view-column-state-retired with the identity-only residue in its acceptance criteria; a STEP18_RATIONALE fragment.
  • Generated: content/docs/references/ui/view.mdx (the two columnState rows become never / [REMOVED], the two nested-shape tables go). authorable-surface/, json-schema.manifest/, api-surface/ are byte-identical: ViewItemWire is a discriminated union with no top-level properties and ui/ViewMetadata is unemitted, so no ratchet sees these rows (the same reading as the owner / hidden retirement).
  • Pins: new packages/spec/src/ui/view-column-state-retirement.test.ts (tombstone at each member and at the write door, the assembled channel, the authoring doors, D2 on stored rows and both collections, idempotence, load-path retirement, the residue, the registrations). Updated pins that asserted the key round-trips: spec view-metadata-schema, view-console-round-trip-keys, view-overlay-viewkind-arm, view-overlay-owner-hidden-retirement (its CONTROL toggle), view-spelling-walk, strictness-ledger (strip sites 2 → 1), metadata-form-zod-reconciliation (ledger row dropped), retired-key-removal-version (JOIN row); @objectstack/metadata-protocol protocol.graft-folded-form-sections; ui data-objectstack listViews.roundTripKeys-11013 and app-shell ObjectView.viewConfigSaveEnvelope-10210. The metadata-protocol and app-shell files also gain a module-top import '@objectstack/lint' (check:test-source-alias).
  • Strictness ledger: docs/audits/2026-07-unknown-key-strictness-ledger.counts/ui.md regenerated (view.zod.ts strip sites 2 → 1) and the ledger row's Class cell goes from mixed · 1 authorable, 1 wire to authorable, with a Retire the server-side column state key (columnState) from view metadata #36403 note.
  • Changeset: @objectstack/spec minor, BREAKING banner with FROM → TO, ADR-0087 marker registered view-column-state-retired.

Not lossless for a reader (L2 M1). Until this release the console still applied a stored layout: a record's key rode listViews() through VIEW_ITEM_ROUND_TRIP_KEYS, an overlay's survived narrowPersonalizationOverlay through VIEW_OVERLAY_OWNED_KEYS, and objectViewListRenderer.tsx:787 seeded the grid from it for a reader with no draft order and no widths in the browser. After the strip that reader sees the view's own column order and widths. That is the ruled outcome (the maintainer's #35955 body, items 5 and 6 and its acceptance; restated on #36403 as comment 7079029398), so no stored order is moved into fieldOrder. The D2 docblock and summary, the D3 reason and acceptance criteria (a new first sentence: what an operator checks after the upgrade), both prescriptions, the STEP18 fragment and the changeset say so (2fff67a6).

No console source changes: @object-ui/data-objectstack's VIEW_ITEM_ROUND_TRIP_KEYS and @object-ui/app-shell's VIEW_ROW_STATE_KEYS are derived from VIEW_CONSOLE_ROUND_TRIP_KEYS and narrow with it.

Tests

At head 2fff67a6 (text-only delta over 94e3b6a8: docblocks, the two prescription strings, the D2 summary, the D3 reason / acceptanceCriteria, the STEP18 fragment, the changeset, and the regenerated view.mdx; no logic, schema shape or test changes): @objectstack/spec src/ui src/conversions src/migrations src/shared Test Files 252, 1 failed on a local gitignored spec-changes.json my gen:spec-changes run had written (the conversion-conflict absence pin reads it; file removed, test Tests 6 passed (6)); then src/ui/view-column-state-retirement.test.ts src/migrations src/conversions/view-spelling-walk.test.ts src/shared Test Files 47 passed (47), Tests 1264 passed (1264); @objectstack/cli migrate-meta-engine-guidance Tests 3 passed (3) after a spec build; check:generated, check:upgrade-guide, check:spec-changes, check:docs, check:doc-authoring, check:strictness-ledger, check:liveness, check:nul-bytes, check-adr-0087-registration --base origin/main, check-changeset-no-major --base origin/main: all exit 0; overlap-check clean.

The rest at head 94e3b6a8 unless named; commands ran through scripts/pm/os-verify-lock.sh (verdict line command-exit 0).

  • @objectstack/spec targeted (src/ui src/conversions src/migrations src/shared src/system/metadata-form-zod-reconciliation.test.ts scripts/strictness-ledger.test.ts): Test Files 254 passed (254), Tests 8682 passed (8682) at 4467e71c; re-run of src/ui/view-column-state-retirement.test.ts src/migrations at head: Test Files 6 passed (6), Tests 214 passed (214) (the only later spec edit is the D3 entry's prose).
  • @objectstack/metadata-protocol (protocol.graft-folded-form-sections, protocol.save-union-issues, metadata-diagnostics.union-issues): Test Files 3 passed (3), Tests 98 passed (98).
  • @objectstack/cli test/migrate-meta-engine-guidance.test.ts: Tests 3 passed (3) (it first caught a tracker id in the D3 guidance, fixed in 94e3b6a8).
  • ui: packages/data-objectstack/ whole package Test Files 125 passed, 1 failed before the pin edit, then the edited file green; the 26 app-shell / plugin-list / plugin-grid / plugin-detail / react / components test files that name columnState, VIEW_CONSOLE_ROUND_TRIP_KEYS, buildViewConfigSaveBody or sanitizeViewOverride, plus the edited roundTripKeys file: Test Files 27, 1 failed (the envelope pin) then green after the edit; at head the envelope file Tests 4 passed (4).
  • Full app-shell, full spec and every other importer of @objectstack/spec: CI (Test Core, Test UI) at 94e3b6a8.
Derived gate list (dispatch-gates --commands, 124 commands)

123 commands derived at 4467e71c ran; 116 exit 0 on the first pass. The seven others:

  • check:strictness-ledger and check:generated (the same drift): red, real — view.zod.ts strip sites 2 → 1; counts regenerated and the ledger row's Class cell updated in fd4fcaf5; green at head.
  • check:test-source-alias: red, real — the two edited test files reach import('@objectstack/lint'); a module-top side-effect import added to each; green at head.
  • @objectstack/cli migrate-meta-engine-guidance, check:skill-examples, check:dual-build-cjs-loads: PREREQUISITE NOT MET (no built dist); after building the closure, check:skill-examples and check:dual-build-cjs-loads exit 0 and the cli test was the real red named above.
  • check-plugin-teardown-shape.mjs --self-test: exit 3, cannot read its positive-control commit in this shallow clone — NOT MEASURED locally, CI runs it.

Re-run at head 94e3b6a8, all exit 0: check:durability-log-level (new at head), check:generated, check:strictness-ledger, check:api-surface, check:authorable-surface, check:spec-changes, check:upgrade-guide, check:docs, check:variant-docs, check:liveness, check:test-source-alias, check:doc-authoring, check-adr-0087-registration --base origin/main, check-changeset-no-major --base origin/main, check-empty-changeset --base origin/main, check:nul-bytes, check:cross-package-test-inputs, check-platform-checklist --changed-from origin/main.

  • Full dogfood (owed: ! title and a (narrowing) arm) at the current head 2fff67a6: pnpm --filter @objectstack/dogfood test under the lock, VERDICT command-exit 0, Test Files 485 passed | 3 skipped (488), Tests 4108 passed | 68 skipped (4176), no failures (the same figures as the earlier run at 94e3b6a8).

Acceptance notes

Verification

Two-minute check: pnpm --filter @objectstack/spec exec vitest run src/ui/view-column-state-retirement.test.ts; expect 15 tests green, among them a stored overlay row with columnState rehydrating without it and a fresh one refused with the `view.columnState` was removed in @objectstack/spec 18.7.0 prescription.

Read first: packages/spec/src/ui/view.zod.ts (the two tombstone sites and VIEW_COLUMN_STATE_RETIRED), packages/spec/src/conversions/entries/18/view-column-state-removed.ts (the record vs overlay discriminator), packages/spec/src/migrations/entries/semantic/18.view-column-state-retired.ts.


🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jT24Rn8qK81aEFebXj

The console grid's per-user column order and widths were declared on the
view item record and the flattened overlay members of the `view` union.
Nothing writes or reads them any more: column widths live in the reader's
browser and a column order is saved into the view itself. The key is a
retiredKey() tombstone on both doors, the D2 conversion
view-column-state-removed strips it from stored rows and sources, and the
D3 entry view-column-state-retired records the identity-only residue.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jT24Rn8qK81aEFebXj
…ate retirement

The view.zod.ts strip sites go 2 -> 1 (ViewColumnStateSchema left with the
key), so its Class cell is no longer a split. The two edited test files pay
the @objectstack/lint load at collection.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jT24Rn8qK81aEFebXj
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation protocol:system protocol:ui tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 22, 2026
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/spec, touching 19 documentable anchor(s). ⚠️ 3 changed file(s) yielded no anchor (packages/spec/src/migrations/entries/retired-keys/18.ui__ViewItemWire__columnState.ts, packages/spec/src/migrations/entries/retired-keys/18.ui__ViewMetadata__columnState.ts, packages/spec/src/migrations/registry.ts.template), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

8 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/automation/flows.mdx (via crm_case (literal, a string literal in fixture))
  • content/docs/automation/queues-and-assignment-rules.mdx (via crm_case (literal, a string literal in fixture))
  • content/docs/concepts/metadata-lifecycle.mdx (via /api/v1/meta/view/:name (route, a path literal in surface))
  • content/docs/deployment/cli.mdx (via crm_case (literal, a string literal in fixture))
  • content/docs/deployment/seed-tenancy-repair.mdx (via crm_case (literal, a string literal in fixture))
  • content/docs/kernel/services-checklist.mdx (via /api/v1/meta/view/:name (route, a path literal in surface))
  • content/docs/protocol/objectui/index.mdx (via /api/v1/meta/view/:name (route, a path literal in surface))
  • content/docs/ui/forms.mdx (via /api/v1/meta/view/:name (route, a path literal in surface))

⛔ 2 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-5.mdx (via retiredAfter (symbol, a field of const object viewColumnStateRemoved), retiredFromLoadPath (symbol, a field of const object viewColumnStateRemoved))
  • content/docs/releases/v17/17-6.mdx (via /api/v1/meta/view/:name (route, a path literal in surface))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 3 changed file(s) yielded no anchor (packages/spec/src/migrations/entries/retired-keys/18.ui__ViewItemWire__columnState.ts, packages/spec/src/migrations/entries/retired-keys/18.ui__ViewMetadata__columnState.ts, packages/spec/src/migrations/registry.ts.template) — pages documenting those are invisible to this run
  • 9 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 68 of 250 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 174 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 6a35635a3385d74859186c271b306da0c999e6a7 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 98c986531dc63b67d1bac296242d5815376c4821 — the merge of head 2fff67a6d15a13ef6cc19d408d2399ae994ed60b into base 6a35635a3385d74859186c271b306da0c999e6a7, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 98c986531dc63b67d1bac296242d5815376c4821 && git checkout 98c986531dc63b67d1bac296242d5815376c4821
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6a35635a3385d74859186c271b306da0c999e6a7 2fff67a6d15a13ef6cc19d408d2399ae994ed60b && git checkout -B drift-repro 6a35635a3385d74859186c271b306da0c999e6a7 && git merge --no-ff 2fff67a6d15a13ef6cc19d408d2399ae994ed60b

node scripts/docs-audit/affected-docs.mjs --json 6a35635a3385d74859186c271b306da0c999e6a7

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 6a35635a3385d74859186c271b306da0c999e6a7 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 REWORK · head 94e3b6a84f3bff59251ed680a59740be3eb3b2b4 · 2026-11-22T12:13Z

维护者速读

  • 用户能看到什么变化:列表用户感觉不到。视图上残留的「个人列布局」字段 columnState 从规范里退掉了:再保存带这个字段的视图,会被明确拒绝并提示怎么改;已存的视图读出时会自动去掉它。
  • 为什么做:卡 Retire the server-side column state key (columnState) from view metadata #36403。这是「列表改动先是草稿、列宽只记在浏览器里」那张卡剩下的规范一半:这个字段已经没有地方写入了。
  • 出错会怎样:最坏情况是,只存了列布局、别的什么都没有的个人覆盖行会变成无效行,要手动删掉(changeset 写明了)。可以整体撤回。
  • 要你做什么:无。
  • 席位意见:REWORK,共 2 项,都只改 PR 正文或立一张卡,不动代码。退役套件、声明和 dogfood 我读下来都是对的,见下面。

要改的(2 项)

  1. PR 正文缺 Skills-docs: 一行。 种类是 narrowed,又带 (narrowing) 分支,所以要有这一行,缺了就判 REWORK;l1-face 也标了。正文写「zero hits, so no Skills-docs: line is owed」,但规定是:没有要改的,也要写一行 none — 理由,不是不写(同 feat(spec,ui)!: every grid that renders editable selects a cell first, and object-grid singleClickEdit is retired #36357)。我在 head 上 git grep 过 skills/,columnState 一处也没有,所以写 Skills-docs: none — skills/** never names columnState (git grep at the head) 就属实。只加在 PR 正文。
  2. objectViewListRenderer.tsx:787 那一级回退,要有一张已经立好的卡来接。 席位问它该不该进本 PR。我的判断:不必进本 PR,但现在写的「carrier: seat 7」不够,要立卡,正文写上卡号 #N。理由:

席位核对

  • 形态:draft、base main、Fixes #36403;23 个文件,改动 652 行。Fixes 能成立:卡要的是规范这一半,也就是退掉视图行上的这个键,本 PR 交付的就是这个。
  • l1-face 标的 changeset:@objectstack/metadata-protocol 和 @object-ui/data-objectstack 各只改了一个测试文件(protocol.graft-folded-form-sections.test.ts、listViews.roundTripKeys-11013.test.ts),两个包的 files 都只发布 dist,所以不欠条目。VIEW_CONSOLE_ROUND_TRIP_KEYS 少了一个键,这两个包是在运行时从 spec 读这个列表的,它们自己的 dist 不变,也不欠。@objectstack/spec 是 minor,有 BREAKING 标注、FROM → TO 和修复方法。
  • 声明:Clause-②: no (narrowing) 属实,只有收窄,没有放宽:两个新的提示常量 VIEW_COLUMN_STATE_RETIRED 和 VIEW_LIST_COLUMN_STATE_RETIRED 都没有导出;删掉的 ViewColumnStateSchema 本来就不导出;VIEW_CONSOLE_ROUND_TRIP_KEYS 从 6 个键变成 5 个,只是收窄。Metadata-protocol: narrowed 属实;changeset 里有 <!-- adr-0087: registered view-column-state-retired -->,check:adr-0087-registration 已过。
  • 退役套件(按 spec-property-retirement 逐面核):
    • 墓碑:retiredKey() 墓碑挂在 viewItemWireFields() 和 flattenedViewOverlayFields() 上,覆盖 view union 的第 1、3、4 个成员。
    • 写作入口:原来就会按名字拒绝,现在改用退役说明。列表视图正文用的是不带迁移命令的那一版说明,因为没有 conversion 会走到列表视图正文,这个区分是对的。
    • 迁移:D2 conversion view-column-state-removed 在 views 和 viewItems 里都只删记录和打平覆盖行上的这个键,不动容器;D3 条目;RETIRED_KEYS_BY_MAJOR[18] 两行;STEP18 理由。
    • 文档与台账:生成的 view.mdx;严格度台账重新生成;retired-key-removal-version 的 JOIN 一行。
    • 「只剩身份字段的覆盖行」这一类,changeset 和 D3 都写明了处理方式(读出时标为无效,用 --apply 会报告 failed,删掉即可)。它就是本 PR 唯一带进来的不兼容,写得够清楚。
    • 正文说 authorable-surface/、json-schema.manifest/、api-surface/ 逐字节不变,理由和 owner / hidden 退役时一样,我照收。
  • dogfood:欠全量(标题带 !,还有 (narrowing) 分支)。正文钉在本 head 94e3b6a8 上:485 个文件通过、3 个跳过,4108 条通过、68 条跳过,0 失败,所以钉到了 head。第 1、2 项只改正文,head 不会动,这个钉子在落地时仍然有效。
  • 文本逐句核:changeset 的 FROM → TO 四条、修复方法、--from 17 和 --stored --apply 两个命令、身份字段那一类,都与 diff 和两段退役说明一致。view.mdx 的两行和 describe 一致。
  • CI @ 94e3b6a8:63 success · 11 expected skip · 0 failed · 0 pending;mergeable_state clean。
  • 落地条款:非受管的收窄,改动 875 行。两项改完后我做增量 L1,只核正文那一行和卡号;再加上契约档 L2 PASS,按先例由席位用 --land 落地(dogfood 已经钉到 head)。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 94e3b6a84f3bff59251ed680a59740be3eb3b2b4
Local-runs: none
Scope: packages/spec/src/conversions/entries/18/view-column-state-removed.ts, packages/spec/src/conversions/registry.ts, packages/spec/src/migrations/entries/retired-keys/18.ui__ViewItemWire__columnState.ts, packages/spec/src/migrations/entries/retired-keys/18.ui__ViewMetadata__columnState.ts, packages/spec/src/migrations/entries/semantic/18.view-column-state-retired.ts, packages/spec/src/migrations/registry.ts.template, packages/spec/src/ui/view.zod.ts + none

Read for this record: card #36403 with its three comments, PR #36435 body, file list and net diff against main (merge base 97b9d1e6), and the check-runs on the head. Code outside the diff was read, not reviewed: ui/packages/app-shell/src/views/objectViewListRenderer.tsx, listDraftStore.ts, objectViewTabs.ts, ui/packages/data-objectstack/src/index.ts, the two owner / hidden precedent conversions, scripts/pm/check-governed-merges.mjs, scripts/pm/check-governed-queue-guard.mjs, scripts/pm/clause2-line.mjs. Nothing was built or run.

① Derived judgments

  • Accept set, view item record (viewItemWireFields()): columnState goes from an accepted optional object to a retiredKey() tombstone. Narrowing. Named right by the dev.
  • Accept set, flattened list and form overlays (flattenedViewOverlayFields()): same change. Narrowing. Named right.
  • Authoring doors (VIEW_ITEM_SURFACE.guidance, ListViewShapeSchema.guidance): the key was refused before and is refused now. Only the message changes. No accept-set change. Named right.
  • VIEW_CONSOLE_ROUND_TRIP_KEYS: a published const loses one key, six to five. The export stays. Its as const type narrows, so a consumer that indexes .columnState stops compiling. The changeset names this line. The body sentence "no published export is removed" is true as written.
  • ViewColumnStateSchema: module-private, deleted. No public surface.
  • The narrowing arm names what stops being accepted: columnState on a view item record and on a flattened view overlay. That is exactly the two tombstone sites in the diff. No other key or value is narrowed.
  • Stored rows: the D2 strip changes what a stored row is served as. One class, the column-state-only overlay with no _isOverride marker, moves from badged valid to badged invalid. The dev names that class in the D2 docblock, the D3 entry and the changeset. A second effect is not named right. See M1.
  • Generated baselines: view.mdx regenerated. authorable-surface, json-schema.manifest and api-surface carry no diff. Spec property liveness, Lint · docs & code guards and Build Core are green on the head, so the gates agree.

② Semver level

  • Changeset .changeset/36403-view-column-state-retired.md: @objectstack/spec minor. Metadata-protocol: narrowed takes at least minor on the package the diff moves (AGENTS.md, changeset rule). Correct. A major is not allowed and none is claimed.
  • Clause-②: no (narrowing): correct. The clause asks whether the card widens the accept set or the public surface. It does neither. The (narrowing) arm is owed and present, in the PR body and in the changeset body. The card and the claim comment wrote yes (narrowing). The claim said the thread re-judges the arm from the diff, and the re-judged value is the right one.
  • BREAKING banner, FROM and TO lines, the one-line fix and one ADR-0087 marker (registered view-column-state-retired) are all in the changeset. Check Changeset is green twice on the head.
  • retiredAfter: '18.6.0' with "removed in 18.7.0" in the prescription: packages/spec/package.json is at 18.6.0 and the bump is minor, so the two agree.
  • Dogfood battery: the PR body pins the full battery to this head (94e3b6a8, VERDICT command-exit 0, 485 files passed, 3 skipped, 4108 tests passed). The CI dogfood shards are skipped on a PR run, so the body line is the only battery evidence and it is on the reviewed head. Not re-run here.
  • Governance: check-governed-merges.mjs reads paths and size. No path in this PR is on its register (packages/spec/src/** is clear, docs/adr/** is untouched) and 875 changed lines is under the 3000 threshold. So the path predicate answers not governed. The declaration decides instead: the fifth leg of check-governed-queue-guard.mjs (card governance: the guard scripts join the governed register, .claude/** lands by declared rule-change, and a narrowed spec change lands only by the maintainer #35321) reads Metadata-protocol: narrowed and the (narrowing) arm and refuses the queued PR until both halves exist, an authorized approved review or the maintainer's own enqueue, and a PASS record on the current head at this tier. This PR is governed by that leg. A seat must not arm it on a record alone. This record is a FAIL, so neither half exists yet.

③ Boundary flags

④ Design judgment

packages/spec/src/ui/view.zod.ts. The two tombstones sit on the two members that declared the key, and the authoring doors keep their refusal by name. The prescription text is one constant with a fix an author can follow. The list view body gets its own text with no migration command, which is right because no conversion reaches that body. ViewColumnStateSchema had no other reader. The TDZ note above the constant still holds for a string constant. Holds, apart from the sentence M1 covers.

packages/spec/src/conversions/entries/18/view-column-state-removed.ts. The discriminator is the union of the two precedent entries: a record needs viewKind list or form and a config object, an overlay has no config and no container slot, a container is left alone. A row with a non-object config or another viewKind is not stripped, and the door refuses it with the tombstone text, which is the safe side. The strip is idempotent. Both collections are covered. The fixture shows all five row shapes and three notices. The mechanics hold. Its account of the effect does not. See M1.

packages/spec/src/conversions/registry.ts. Import and row are placed in identifier order. Order 83 is one above the highest (82) and unique. No other step-18 conversion reads columnState, so the position cannot change another conversion's result. Holds.

18.ui__ViewItemWire__columnState.ts and 18.ui__ViewMetadata__columnState.ts. The keys match the precedent rows for owner. Each says plainly that no gate judges it and why. Holds.

18.view-column-state-retired.ts (D3). One entry for one family is right. The acceptance criteria state the two stored classes and the remedy for the residue. The reason field is wrong on the main point. See M1.

registry.ts.template. The fragment's order 123 is unique and follows 122. Its text says no writer is left and describes the strip and the residue. It makes no claim about readers. Holds.

M1 (must-fix) — the D2 and D3 entries say the strip changes nothing a reader sees, and the tree says it does. At the merge base and at this head, a stored columnState is read and applied. A record's key rides listViews() through VIEW_ITEM_ROUND_TRIP_KEYS (ui/packages/data-objectstack/src/index.ts). An overlay's key survives narrowPersonalizationOverlay through VIEW_OVERLAY_OWNED_KEYS. Both reach objectViewListRenderer.tsx:787, which hands viewDef.columnState to the grid whenever listDraftPreference returns no column state, that is for any reader with no draft order and no widths in this browser. ListView.tsx passes it on and objectGridColumnState.ts seeds the grid from it. So before this PR such a reader sees the stored column order and widths, and after it sees the view's own. That is a visible change to stored documents, not a lossless delete. Three sentences in hits files deny it: the D2 docblock ("it changes no render: no reader applies a stored column layout any more"), the D3 reason ("The delete is lossless for what anyone sees" and "no reader applies it any more"), and the D2 summary ("nothing writes or reads it"). The changeset does say a stored layout is not carried forward, so the PR contradicts itself, and the D3 record is the one an upgrading operator is told to trust. The D3 acceptance criteria also give the operator nothing to check for this change. Fix, one of two. Either state the loss in the D2 docblock, the D3 reason and acceptance criteria, and the prescription, with the #35955 ruling linked on this card as its authority. Or carry a stored order into fieldOrder where the view sets none and say only the widths are dropped. The choice is the maintainer's or the seat's, not the reviewer's.

S1 (should-fix) — the ADR-0049 basis is stated as a census result the census did not return. view.zod.ts says "The console's readers that still named the key read rows at rest, and the D2 conversion strips the key from those on every read", which admits the reader in the same docblock that calls the key unread, and VIEW_COLUMN_STATE_RETIRED tells an author "nothing writes or reads it any more". Reword both so the published text says no writer is left and the stored layout is no longer applied from this release, and correct the changeset sentence "Since #35955 nothing writes or reads it" to match.

Nit: the owner / hidden docblock in view.zod.ts (near line 6028) still lists columnState among the keys the toolbar writes. It is a dated census note and can stay.

Implemented-by: claude/project-thread-sfzptl
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: FAIL

The D2 docblock and summary, the D3 reason, the prescriptions and the
changeset said nothing reads the key. Until this release the console
still applied a stored layout for a reader with no column order or
widths of their own; after the strip that reader sees the view's own.
State that loss as the ruled outcome (a stored layout is not migrated),
add an operator check to the D3 acceptance criteria, and say no writer
is left rather than no reader.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jT24Rn8qK81aEFebXj
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 REWORK(增量)· head 2fff67a6d15a13ef6cc19d408d2399ae994ed60b · 2026-11-22T12:59Z

维护者速读

要改的(1 项)

  1. dogfood 全量没有钉在当前 head 上。 标题带 !,声明里又有 (narrowing) 分支,按清单要在当前 head 上跑一遍全量 dogfood 并钉住;没跑或只跑了一部分,都判 REWORK。正文第 57 行记的是 94e3b6a8 上的读数(485 个文件、4108 条用例通过,0 失败),然后写「2fff67a6 只改文字,所以这次读数照样有效」。这条规定不看改动大小:2fff67a6 改的是退役拒绝时给出的说明、D2 的 summary 和 D3 的 reason,这些文字在加载路径上都会真的输出。我在本 head 上 git grep 过 packages/qa/dogfood,columnState、column-state 和新加的说法都没有出现,所以我预计它会是绿的;但这只是预计,不能代替在 head 上跑出来的读数。
    • 怎么改:在 2fff67a6 上加锁跑 pnpm --filter @objectstack/dogfood test,把 VERDICT 和 Test Files / Tests 两行读数写进正文,换掉第 57 行的说法。只改正文,不动文件,head 不变。
    • 这之后我的增量 L1 只核这一行。

增量核对(94e3b6a8 → 2fff67a6,1 个提交,6 个文件,只改文字)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 2fff67a6d15a13ef6cc19d408d2399ae994ed60b
Local-runs: none
Scope: packages/spec/src/conversions/entries/18/view-column-state-removed.ts, packages/spec/src/conversions/registry.ts, packages/spec/src/migrations/entries/retired-keys/18.ui__ViewItemWire__columnState.ts, packages/spec/src/migrations/entries/retired-keys/18.ui__ViewMetadata__columnState.ts, packages/spec/src/migrations/entries/semantic/18.view-column-state-retired.ts, packages/spec/src/migrations/registry.ts.template, packages/spec/src/ui/view.zod.ts + none

Delta review. The previous record is FAIL 7079005648 at head 94e3b6a8. This record covers the one commit on top of it, 2fff67a6 (parent 94e3b6a8), and carries the rest of that record forward unchanged.

Read for this record: card #36403 with its four comments, including the ruling of record 7079029398. Card #35955 body. PR #36435 body, its three comments, its file list, the net diff against main (merge base 97b9d1e6) and the diff 94e3b6a8..2fff67a6. The check-runs on the head. Code outside the diff was read, not reviewed: ui/packages/app-shell/src/views/objectViewListRenderer.tsx near line 787. Nothing was built or run.

① Derived judgments

  • The delta is text only. It touches six files, 56 lines added and 24 removed: the changeset, the regenerated view.mdx, and four hits files. In packages/spec/src every changed line is a comment line or a line of a string literal. No schema shape, no apply logic, no registry row, no order number and no test file moves. conversions/registry.ts and the two retired-keys entries are byte-identical to 94e3b6a8.
  • The changed string values are published text: the two prescriptions (VIEW_COLUMN_STATE_RETIRED, VIEW_LIST_COLUMN_STATE_RETIRED), the D2 summary, the D3 reason and acceptanceCriteria, and the STEP18 fragment. They change what a refusal or a migration report says. They change nothing that is accepted or refused.
  • Accept set and public surface: unchanged from the previous record. The narrowing is still exactly the two tombstone sites, and VIEW_CONSOLE_ROUND_TRIP_KEYS still goes from six keys to five. Every derived judgment of the previous record stands.
  • The effect the previous record said was not named is now named right. A stored columnState was applied until this release for a reader with no column order or widths of their own in the browser, and after the strip that reader sees the view's own. The tree agrees: the renderer rung still reads viewPref?.columnState ?? viewDef.columnState ?? listSchema.columnState.
  • Generated: view.mdx carries the new prescription text in both rows, and nothing else. Lint · docs & code guards and Build Docs are green on the head.

② Semver level

  • Changeset: still @objectstack/spec minor with Metadata-protocol: narrowed. The delta rewrites one paragraph of its body. The BREAKING banner, the FROM and TO lines, the fix and the ADR-0087 marker are unchanged. Check Changeset is green twice on the head.
  • Clause-②: no (narrowing): unchanged in the PR body and still correct. The delta widens nothing and narrows nothing further.
  • Check-runs on 2fff67a6: 63 success, 11 skipped, no failure and none pending. Test Core 10 of 10, Test UI 16 of 16, the type checks, the lint families, Spec property liveness, PR-body guards and Governed Surface Queue Guard are green.
  • Dogfood battery: the body keeps the full battery at 94e3b6a8 with the same figures (VERDICT command-exit 0, 485 files passed and 3 skipped, 4108 tests passed and 68 skipped) and says 2fff67a6 changes only text. That holds. The delta moves no logic, and no file under the dogfood package or packages/qa names columnState, so no battery test can read the reworded strings. The pin stays valid for this head.
  • Governance: unchanged. The path predicate still answers not governed, and the PR is governed by declaration, through the narrowing leg of the queue guard. Nothing in the delta changes the declaration, the arm or the face. This record supplies the PASS half on the current head. The other half, an authorized approved review or the maintainer's own enqueue, is still owed. A seat must not arm the PR on this record alone. The PR is still a draft.

③ Boundary flags

④ Design judgment

M1: closed. Every place the loss must be stated now states it, and none still denies it.

  • view-column-state-removed.ts, docblock. "Both ends are gone" became "The writer is gone", with "The reader is NOT gone until this conversion runs". "It changes no render" is deleted. A new paragraph, "Not lossless for what a reader sees", names the path the key took (listViews() through VIEW_ITEM_ROUND_TRIP_KEYS, narrowPersonalizationOverlay through VIEW_OVERLAY_OWNED_KEYS, then the list renderer), names the reader affected, and cites the ruling and comment 7079029398. Each step agrees with the tree.
  • Same file, summary. "Nothing writes or reads it" became "nothing writes it" plus "a stored layout is no longer applied: every reader sees the view's own column order and widths".
  • 18.view-column-state-retired.ts, reason. "The delete is lossless for what anyone sees" became "The delete is NOT lossless for what a reader sees", followed by who is affected, what they see after, the ruling, and the fieldOrder consequence. It carries no tracker id, as the guidance test requires, and Test Core is green.
  • Same file, acceptanceCriteria. A new first sentence gives the operator a check: open a list whose row held the key in a browser with no layout of its own, and expect the view's own order and widths. It then gives the remedy, Save to the view or set width. The previous record said the operator had nothing to check. Now there is one.
  • Both prescriptions in view.zod.ts. VIEW_COLUMN_STATE_RETIRED says nothing writes it and a stored layout is no longer applied. VIEW_LIST_COLUMN_STATE_RETIRED says "that layout is no longer applied" where it said "nothing reads it any more".
  • registry.ts.template, the STEP18 fragment. It now says a stored row is served without the key and its layout is no longer applied, as ruled.
  • The changeset. "Nothing writes or reads it" became "nothing writes it", and the paragraph states the before, the after, the ruling and the remedy.
  • A search of the head for the three old sentences finds none outside the changelog history of other packages.

S1: closed. The view.zod.ts docblock now reads "The writer is gone" and "The reader was not gone: until this release the console applied a stored layout". The prescription and the changeset follow the wording the finding asked for. The ADR-0049 basis is now stated as what the census returned: no writer, and a reader that the D2 strip starves.

The previous nit, the dated census note near view.zod.ts line 6028, is left as written. The previous record said it can stay. It is not reopened.

Files with no delta: conversions/registry.ts, the two retired-keys entries. Their judgment from the previous record stands.

Tried to break the new text. The prescription says "every reader sees the view's own column order and widths", and a reader with widths in their own browser sees those instead. The next sentence of the same string says the console keeps widths in each reader's browser, and the phrase is the ruling's own, so it holds. The acceptance sentence tells the operator to use a browser with no layout of their own, which is the right control for that case.

Nit: the header comment of the D3 entry still quotes ruling B as "one D3 entry per retirement family, even when D2 is lossless". It is the general rule, not a claim about this D2, but it now sits above a reason that says the opposite of lossless. It can stay or lose the clause on a later prose pass.

No must-fix, no should-fix.

Implemented-by: claude/project-thread-sfzptl
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 ACCEPT(增量)· head 2fff67a6d15a13ef6cc19d408d2399ae994ed60b · 2026-11-22T13:39Z

维护者速读

增量核对(head 没动,仍是 2fff67a6)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Seat record (2026-11-22T13:44Z) on head 2fff67a6d15a13ef6cc19d408d2399ae994ed60b. This PR declares a narrowing, so the merge queue's Governed Surface Queue Guard admits it only on the maintainer's approval. The PR body's summary line 「要你做什么:无」 is superseded by this record.

维护者速读

  • 用户能看到什么变化:大多数列表用户无感。列宽早已只记在浏览器里,列顺序随「保存」存进视图本身。只有一种情况看得出来:某个视图上还存着旧的列布局,而读者自己的浏览器里没有记,升级后他看到的是视图本来的列顺序和列宽。这是你在 在列表上的改动都改成临时的(排序、筛选、分组、列的显示和顺序):立即生效但不保存,出现「放弃」和「保存」;列宽、行高、标签页顺序只记在浏览器里;退掉服务端的个人列表偏好 #35955 的裁定(旧布局不迁移),升级说明里写明。
  • 为什么做:这个字段已经没有地方写入,只剩旧数据里的布局还被读出来套用,会一直盖住视图本身的设置;这是「列表改动先是草稿、列宽只记在浏览器里」那张卡剩下的规范一半。
  • 出错会怎样:只存了列布局、别的什么都没有的个人覆盖行会变成无效行,需要删掉;其余视图读出时自动去掉该字段,照常显示和保存。再保存带这个字段的视图会被明确拒绝并说明怎么改。撤回本次合并即可恢复。
  • 先看:packages/spec/src/ui/view.zod.ts 里两处 retiredKey(VIEW_COLUMN_STATE_RETIRED),它们决定哪里拒绝这个字段。
  • 两分钟验证:CI 65 项通过、0 失败;完整 dogfood 在此提交上通过(报告 7079948576,485 个文件、4108 个测试,退出码 0)。
  • 要你做什么:批准本 PR(它把原来能存的字段改成拒绝,属于「收窄」,只能由你批);批后由席位放进合并队列。
  • 席位意见:同意合入。合同审查一轮失败后增量通过,L1 两次返工后增量通过。

席位核对

ACCEPT · Tier H (a declared narrowing: Clause-②: no (narrowing), Metadata-protocol: narrowed, queue guard leg for a declared narrowing)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Tier H hand-off (2026-11-22T13:44Z): this PR declares a narrowing (Clause-②: no (narrowing)), so the queue guard admits it only on the maintainer's approval. Head 2fff67a6d15a13ef6cc19d408d2399ae994ed60b. The seat record above carries the 维护者速读; seat ACCEPT, L1 delta ACCEPT 7079978166, L2 delta PASS 7079510048. After an approving review the seat runs the pre-landing checks and enqueues it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 22, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 22, 2026 13:45
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 595844b Nov 22, 2026
84 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-sfzptl branch November 22, 2026 14:23
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
…ted (showOnCreate) (objectstack-ai#36449)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbCxiFE11rsKwyNffJZKYqJs)_

repo:objectstack#7 · zhuangjianguo · session_01QsR2jVMKrYARogu1S6PcHj

Part of objectstack-ai#36425 (PR 1 of 2: the field key and its save-time refusal. PR 2
retires the internal create and edit forms in the Console and Studio,
adds the readers of this key, the Studio switch and the lint notice. The
skills text is objectstack-ai#36455, a domain:skills card.)

Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up objectstack-ai#36455

## 维护者速读

-
用户能看到什么变化:这一步用户无感。对象的字段定义可以写「新建时显示」开关(默认开);给必填字段关掉它,保存定义时会被拒绝并说明原因。新建弹窗按这个开关隐藏字段,要等第二个改动。
-
为什么做:这是「内部新建和编辑表单作废」这张卡的前一半,先把字段上的开关定下来,后一半让新建弹窗、整页新建和动作弹出的新建窗口都按字段分组排,并读这个开关。
-
出错会怎样:最坏情况是某个应用包给必填字段关了这个开关,安装或保存时被拒绝,提示里写了两种改法;现有的定义里没有这个开关,不受影响,撤回本次合并即可。
- 要你做什么:无。

## What changes

`FieldSchema` (`packages/spec/src/data/field.zod.ts`) gains
**`showOnCreate`**, an optional boolean.

- **Meaning.** Absent or `true`: the field is asked for when a record is
created, as today. `false`: every create surface (the create dialog, the
full-page create, an action-opened create) leaves the field out;
editing, the record page and lists still show it. The key has no
default, so no field parsed today changes shape.
- **Name and admission (ADR-0085 §2).** Per the seat's reading on the
claim: the key is a field's creation-time intent (which fields this
business asks for when a record is born), not inferable from the schema,
and it binds every create surface rather than one page, so its name
names no page or dialog. The ADR note rides the week's ADR card after
this lands; `docs/adr/**` is untouched here.
- **The one refused pair.** `showOnCreate: false` on a `required: true`
field is refused in `FieldSchema`'s `superRefine`, at the field's
`showOnCreate` key, so every door that parses a field refuses it
(`defineStack`, `os validate`, the metadata save; the object door
locates it at `fields.NAME.showOnCreate`). The reason it gives is the
card's item 6, which makes no exception: a required field is always
asked for when a record is created, so the person creating it sees every
value the record must have. The message names both fixes (keep the field
on create, or drop `required`). A `defaultValue` makes no exception
either (the seat's ruling, card comment 7079131071 item 3): the insert
would resolve the default, so such a create could pass, but the field is
still asked for, with its default filled in. A `requiredWhen` field is
accepted: its gate is a predicate the parse cannot judge, and the write
door still refuses a create born inside it.
- **Liveness ledger.** `liveness/field.json` gains a `showOnCreate` row,
`planned`, evidence the parse-time refusal. Its readers are PR 2's
create surfaces, and the row flips to `live` in that PR, citing them.
- **Generated.** `authorable-surface/data.json`
(`data/Field:showOnCreate`), `liveness/state-counts/field.md`, and the
three reference pages that render `FieldSchema` (`data/field.mdx`,
`data/object.mdx`, `system/migration.mdx`), from `check:generated
--fix`.
- **Changeset.** `@objectstack/spec` minor; `@objectstack/driver-sql`
and `@objectstack/metadata-core` patch, since their every-field-key
ledgers (`FIELD_KEY_STORAGE_CLASS`, `FIELD_REFERENCE_POSITIONS`) now
classify the key.

### What this PR deliberately leaves to PR 2

The claim's lines (`Clause-②: yes (narrowing)`, `Metadata-protocol:
semantic`) describe the whole card. Their narrowing and semantic halves
belong to PR 2, where an internal form stops steering the create and
edit forms; the seat amends the claim when PR 2 opens. Two items move
there by the seat's ruling on this split, and the skills text goes to
its own card:

- the lint notice for a still-declared internal form (card item 8): its
sentence says the form is no longer loaded, which is false until PR 2
retires the readers;
- the Studio switch (card item 7: the `field.form.ts` row, the eleven
metadata-forms locale packs, the field inspector): a switch offered
before any create surface honours it is the shape ADR-0078 rules out;
- the skills text (card item 9) is objectstack-ai#36455 (domain:skills: skills text
lands only in a domain:skills PR), hence `Skills-docs: follow-up
objectstack-ai#36455`.

## Tests

- `packages/spec/src/data/field-show-on-create.test.ts` (new): the key
parses switched on and off and stays absent when not authored;
`showOnCreate: false` beside `required: true` is a full `safeParse`
failure located at `showOnCreate` with a `custom` issue whose message
opens with its first sentence; the same with a `defaultValue`; the
object door locates it at `fields.amount.showOnCreate`; four controls
are full `safeParse` successes (on + required, required alone, off + not
required, off + `requiredWhen`).
- Review round at `1c0012aa`: the refusal's comment, message, describe
and the changeset now give the card's reason instead of saying no create
could pass (L2 S1); the skills follow-up names objectstack-ai#36455 (L1-d). The new
test's message assertion follows the reworded first sentence; that file
and the reconciliation file ran green at `1c0012aa` (`Tests 81 passed`);
`check:generated` 14 of 14 up to date after regenerating the three
reference pages; `check:liveness`, `check-changeset-no-major` and
`check-nul-bytes` exit 0. The rest of the derived set ran at `197434e9`;
this round changed only prose, a test regex and regenerated references.
- CI round at `b86db2be`: Test Core at `1c0012aa` was red in three
shards, all field-key pins this key owes: `metadata-protocol`
`protocol.meta-types-degenerate-derivation.test.ts` (`field` serves 85
top-level properties, was 84), `driver-sql`
`builtin-column-collision.test.ts` ("classifies EVERY FieldSchema key":
`showOnCreate` is `presentation`, the DDL never reads it) and
`metadata-core` `object-schema-fls-references.test.ts` ("classifies
every FieldSchema key": `showOnCreate: keep`, a boolean facet that names
no field). Each of the three files ran green locally at `b86db2be` (18,
11 and 63 tests).
- L1-d round at `d8b82f70`: the changeset adds those two patch entries;
`check-changeset-no-major`, `check-empty-changeset` and
`check-changeset-fixed` exit 0 against `origin/main`. No code changed
since `b86db2be`, where all 74 checks finished green (62 success, 12
skipped).
- Reverse verification (one-off, committed fix first,
`scripts/ablation-replace.mjs`): replacing the refusal's condition with
`false` turned exactly the three refusal cases red and left the controls
green; the file was restored to its HEAD blob (`aebcfbd38223`, `git diff
HEAD` empty).

- Package suite at the head before the last commit: `pnpm --filter
@objectstack/spec test` (local project, under the verify lock) → `Test
Files 1 failed | 871 passed (872)`, `Tests 1 failed | 27913 passed | 1
todo`. The one red was `metadata-form-zod-reconciliation.test.ts`
("field: every top-level key the author may write is offered, or its
omission is recorded" named `showOnCreate`). The last commit records the
key as not yet offered (an `omit` row whose reason is the `planned`
grade; PR 2 deletes the row and offers the switch); that file and the
new test then ran green at `197434e9`: `Test Files 2 passed`, `Tests 81
passed`.
- `pnpm --filter @objectstack/spec typecheck` → exit 0.
`scripts/liveness/` (repo project) → `Test Files 2 passed`, `Tests 87
passed`.
- `test:repo` beyond `scripts/liveness/` is left to CI's Test Core: the
diff touches no repo-project test.

## Acceptance notes

- Overlap at push (`d8b82f70`, unchanged from `b86db2be`):
`overlap-check.mjs` reports clean merges with `origin/main` and objectstack-ai#36435,
objectstack-ai#36411, objectstack-ai#36386, objectstack-ai#36351. objectstack-ai#36392 conflicts only in the generated
`liveness/state-counts/field.md`; objectstack-ai#36399, which also adds a field key,
conflicts there and in the `field` property-count pin, which whichever
lands second raises by one and regenerates.
- The card's acceptance lines are UI readings (the create dialog, the
full-page create, the action modal, the Studio switch). They are PR 2's,
with live checks and screenshots there; this PR has no rendered surface.

## Verification

<details><summary>Derived gate families at 197434e: 115 derived, 114
run green, 1 NOT MEASURED</summary>

- `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack
--commands` derived 115 commands; each ran with its exit code recorded
before any pipe, and `--ran` reconciled: "115 derived famil(ies)
accounted for — 114 run, 1 NOT-MEASURED".
- Seven families first exited 3 (PREREQUISITE NOT MET: a
`packages/spec/dist` the loop's own siblings had rebuilt without
declarations, and the shallow clone missing the teardown fixture
commit). After `pnpm --filter @objectstack/spec build` and fetching the
fixture commit, all seven re-ran at exit 0: `check-plugin-teardown-shape
--self-test`, `check:api-surface`, `check:dual-source-exports`,
`check:entry-nameability`, `check:exported-any`, `check:generated` (it
had reported `api-surface/` stale against that same dist; 14 of 14 up to
date after the rebuild), `check:skill-examples`.
- NOT MEASURED: `pnpm check:dual-build-cjs-loads` (exit 3, prerequisite
not met in this container), left to CI.
- `node scripts/check-nul-bytes.mjs` → exit 0.

</details>

Two-minute check: `pnpm --filter @objectstack/spec exec vitest run
src/data/field-show-on-create.test.ts` → 5 passed.

First files to read: `packages/spec/src/data/field.zod.ts` (the
`showOnCreate` key beside `hidden`, and the new `superRefine` block
before `referenceVia`), `packages/spec/liveness/field.json` (the
`planned` row).

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jVMKrYARogu1S6PcHj)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QsR2jVMKrYARogu1S6PcHj
<!-- signed: repo:objectstack#7 · zhuangjianguo ·
session_01QsR2jVMKrYARogu1S6PcHj -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
…, and object-grid singleClickEdit is retired (objectstack-ai#36357)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9Ubb2rJZB694pnkwLCMmCEJ3ev)_

Fixes objectstack-ai#36270

repo:objectstack#7 · zhuangjianguo · session_01QsR2jSHfkSrXZxbdWoQxnW

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — skills/ never names singleClickEdit,
keyboardNavigation or object-grid's editing gestures (git grep at the
head)

## 维护者速读

- 用户看到的变化:所有「可编辑」的表格(对象视图自己画的表格、页面里放的 object-grid
表格,和列表页一样)都改成「先选中、再编辑」:单击选中单元格,双击、回车、F2 或直接打字进入编辑,改完一格立刻保存;「全部保存 /
全部取消」那条保存栏不再出现。不可编辑的表格不变,单击仍然打开记录。元数据里的
`singleClickEdit`(单击即编辑)作废:写了会报错并提示删掉,`os migrate meta` 能自动删除。
- 为什么:按您的裁定 A「统一新编辑方式」。新方式里单击是「选中」,`singleClickEdit` 已经没有可切换的东西,按
ADR-0049「要么执行、要么删除」退役;`keyboardNavigation` 的说明也改成实际行为(可编辑表格上方向键导航始终开启)。
- 最坏情况:有人在页面元数据里写了
`singleClickEdit`,升级后该页面校验失败,需要删掉这个键(提示里写明了怎么做,迁移工具可自动删);或者某张可编辑表格的使用者习惯了单击就编辑,现在要多一次双击。本仓、hotcrm、gallery
中没有任何地方写过这个键。
- 需要您做的:无(L2 由席位在最终提交上做)。

## What changes

The ruling A on objectstack-ai#36270 (record 7076617499): one editing model. Every
grid that renders editable uses the list page's select-first cell model,
and the key that only made sense in the old model is retired.

- **`ui/packages/plugin-grid/src/ObjectGrid.tsx`** (the one behaviour
hunk): `hostCellSelection = cellSelectionProp ?? inlineEditable`. Absent
a host's `cellSelection`, a grid that renders editable (`editable` AND
the object's inline-edit verdict AND the reader's `update` grant) is
select-first; a read-only grid keeps click-to-open. A host's `true`
(`ListView`, the related tab) or `false` still wins. The data table is
handed `singleClickEdit: true` unconditionally: it is inert under
select-first, and it is the staged model's old default for a host that
passes `false`.
- **`@objectstack/spec`**:
`ComponentPropsMap['object-grid'].singleClickEdit` is a `retiredKey()`
tombstone; D2 conversion `object-grid-single-click-edit-removed` (strip,
whatever the value; order 83), D3
`object-grid-single-click-edit-retired`, `RETIRED_KEYS_BY_MAJOR[18]` row
`ui/ObjectGridProps:singleClickEdit`, a `STEP18_RATIONALE` fragment
(order 123), ledger `page.json` regions note [122] plus the narrowed
[43]. `keyboardNavigation`'s describe narrows to what is enforced:
always on for a grid that renders editable, `true` turns it on for a
read-only grid.
- **`@object-ui/types`**: `ObjectGridSchema.singleClickEdit?: never`
with a `retirementTombstone()` zod twin; the `object-view` `table` slot
inherits it (`TABLE_INHERITED_TOMBSTONES`, as `defaultSort`).
`DataTableSchema.singleClickEdit` (host-paired) is unchanged.
- **`@object-ui/plugin-view`**: `table.singleClickEdit` leaves
`OBJECT_VIEW_TABLE_RELAY_KEYS`. The earlier host-level `cellSelection`
spread is gone: `ObjectGrid`'s default covers the object-view grid,
authored nodes and react pages in one place.
- **`object-grid` inputs, `sdui.manifest.json`,
`content/docs/ui/components/*`**: the `singleClickEdit` input is gone
and the `editable` / `keyboardNavigation` descriptions say what the grid
does. Docs and READMEs (`plugin-grid.mdx`, `plugin-view.mdx`, both
packages' READMEs) describe select-first everywhere and the staged model
as a host's `cellSelection={false}`.
- BREAKING changeset
`.changeset/36270-object-grid-single-click-edit-retired.md`
(`@objectstack/spec` minor plus the three ui packages), with the FROM →
TO table and `<!-- adr-0087: registered … -->`.

## The card's Done-when: the five grid families

- **The object-view grid** (Studio view preview, a page placing an
`object-view`) and **the authored `object-grid` node**: changed here.
Pinned by `ObjectView.perCellSave-36270.test.tsx` and
`authoredGridPerCellSave-36270.test.tsx`, with the ablation below.
- **The related tab**: already select-first. `RelatedList.tsx` passes
`cellSelection: true`, pinned by `RelatedList.tab-35892.test.tsx`;
unchanged.
- **The record picker and the designer grids** (`RecordPickerDialog`,
`ObjectManager`, `FieldDesigner`): they render `ObjectGrid` without
`editable`, so they are read-only and unchanged.
- **Dashboard tables**: they are `data-table` / `object-data-table`
nodes, not `ObjectGrid`, and have no save path. The card's
dashboard-table pin therefore has no subject: there is no editable
dashboard grid to pin. A bare `data-table` that a host hands `editable`
still stages edits and draws its bar; that is the table primitive, which
no in-repo grid host reaches.
- So every grid that renders editable through `ObjectGrid` selects a
cell first, and no in-repo host passes `cellSelection={false}`.
- **The card's second Read-first question** (a child list inside a
parent form saved together, objectstack-ai#35590): no in-repo host draws such a list
through an editable `ObjectGrid`. The form's line items are the
`GridField` widget, which this PR does not touch, and no in-repo host
passes `cellSelection={false}` or its own `onBatchSave`. So no
saved-together list loses its staging here.
- **A React host's `onBatchSave`**: a host that passes `onBatchSave`
alone on an editable `ObjectGrid` now has it bypassed (each cell writes
through `onRowSave` or the grid's own `dataSource.update`). No in-repo
host passes it. The changeset carries a FROM → TO row for it and
`ObjectGridComponentProps.onBatchSave` is marked `@deprecated`.

## Tests

- New: `packages/spec/src/ui/object-grid-single-click-edit.pin.test.ts`
(tombstone at both channels for `true` / `false`, `editable` control,
the narrowed describe, the conversion's delete and its controls, the
step-18 wiring), `object-grid-single-click-edit-retirement.test.ts`
(tree-scoped absence, `repo` project),
`ui/packages/plugin-grid/src/__tests__/authoredGridPerCellSave-36270.test.tsx`
(an authored editable node saves one cell with no Save All; read-only
and host-`false` controls), and the earlier
`ObjectView.perCellSave-36270.test.tsx`.
- Migrated to the enforced contract:
`ObjectGrid.keyboardNavigation-11068.test.tsx` (editable grids read the
select-first pattern and `false` no longer turns it off; a host
`cellSelection={false}` control keeps the old roving-focus reading),
`ObjectGrid.cellSelection-35684.test.tsx`,
`rowContextMenu-28434.test.tsx`, the types slot/round-6 tests, the
ObjectView relay test.
- 25 plugin-grid inline-edit files that pin the staged path now pass
`cellSelection={false}` and no longer author `singleClickEdit`; two that
passed `cellSelection={x || undefined}` pass `cellSelection={x}` (under
the new default `undefined` means select-first).
- `retired-key-removal-version.pin.test.ts` joins the new conversion.

## Acceptance notes

- Select-first only where a grid renders editable, per the ruling;
read-only grids keep click-to-open (pinned by the controls above).
- `Clause-②: no (narrowing)`: the house spelling for a retirement; the
seat re-amended the claim to it (7077058264).
- Census of authored `singleClickEdit` in this repository's examples,
hotcrm and gallery: zero, so the conversion is for stored rows and
outside authors.
- `check-governed-merges --pr 36357`: NOT governed (0 of 60 paths),
1,355 changed lines, under the 3,000 human-merge threshold.
- With objectstack-ai#36332 (seat delta review 7077725274): once both land, a touch
never edits in place on any editable grid. The one exception is a host
that passes `cellSelection={false}`, which keeps the staged
click-to-edit, so there a touch edits in place. Whichever of the two
lands second re-runs overlap-check against the other's head.
- objectstack-ai#35827 (retire `onBatchSave`) is unblocked by this: no authored or
ObjectView grid reaches the batch save any more; only a host's explicit
`cellSelection={false}` does.

## Verification

Two-minute check: author `{ "type": "object-grid", "properties": {
"objectName": "<any>", "editable": true } }` on a page; click a cell (it
is selected, nothing opens), press Enter, type, press Enter: the value
saves at once and no "Save All" bar appears. Add `"singleClickEdit":
true`: the page refuses it with the prescription.

Files to read first, by risk:
`ui/packages/plugin-grid/src/ObjectGrid.tsx` (two hunks),
`packages/spec/src/ui/component.zod.ts`,
`packages/spec/src/conversions/entries/18/object-grid-single-click-edit-removed.ts`,
`ui/packages/types/src/zod/objectql.zod.ts`.

<details><summary>Local runs (final head 493b6a0)</summary>

Final head `493b6a01` = `2bd02429` plus a merge of main `0b2118f4` after
objectstack-ai#36478 landed (`719e8674`: main's side of
`scripts/sdui-manifest.record.json`, and `component.mdx` regenerated
with main's new `mobileMaxVisible` describe), then the regenerated
manifest record (`493b6a01`, one `sha256` line). No rebase.

- Dogfood battery on head 493b6a0: os-verify-lock `VERDICT command-exit
0` · `Test Files 485 passed | 3 skipped (488) · Tests 4108 passed | 68
skipped (4176)`, no failures.
- Derived gate families on 493b6a0: 132 run, 0 NOT-MEASURED, every exit
0. `check-sdui-manifest` intact; `check-regen-pending` clear.
- `overlap-check` on 493b6a0: clean against main `43916f3a` and every
open PR sharing files.
- CI at 493b6a0: 61 success, 9 skipped, 0 failed.

Runs at 2bd0242:

Final head `2bd02429` = a merge of `67fe4551` and main `dda5e74f`, made
after the merge queue dropped the PR on a conflict in the generated
`content/docs/references/ui/component.mdx`. The merge's only own change
is that file, regenerated (main's new `showStar` describe). The code
auto-merged, and `check-regen-pending` reports every deferred artifact
current.

- Dogfood battery on 2bd0242 (superseded by the run on 493b6a0 above):
os-verify-lock `VERDICT command-exit 0` · `Test Files 485 passed | 3
skipped (488) · Tests 4108 passed | 68 skipped (4176)`, no failures.
- Derived gate families on 2bd0242: 132 run, 0 NOT-MEASURED, every exit
0.
- `overlap-check` on 2bd0242: clean against main `70194ffc`; the known
conflict with draft objectstack-ai#36478 on `scripts/sdui-manifest.record.json`
stands.

Runs at 67fe455:

Final head `67fe4551` = `4e94a273` plus the S4 changeset fix (the touch
sentence, and one comment's wording). That commit changes only the
changeset and that comment.

- Dogfood battery on head 67fe455 (`pnpm --filter @objectstack/dogfood
test`, closure built under the lock): os-verify-lock `VERDICT
command-exit 0` · `Test Files 485 passed | 3 skipped (488) · Tests 4108
passed | 68 skipped (4176)`, no failures.
- Derived gate families on 67fe455: 132 derived; `--ran` reconciles 132
run, 0 NOT-MEASURED, every exit 0.
- `overlap-check` on 67fe455: clean against main; one conflict with
draft objectstack-ai#36478 in `scripts/sdui-manifest.record.json` (the regenerated
manifest record both PRs carry): whichever lands second merges main and
regenerates it.

`4e94a273` = the review rework (`3894ea44`: TSDoc and comments,
`onBatchSave` `@deprecated`, changeset rows, docs) plus a merge of main
after objectstack-ai#36332 landed (no rebase, no conflicts).

- Dogfood battery on 4e94a27 (superseded by the run on 67fe455 above)
(`pnpm --filter @objectstack/dogfood test`, closure built under the
lock): os-verify-lock `VERDICT command-exit 0` · `Test Files 485 passed
| 3 skipped (488) · Tests 4108 passed | 68 skipped (4176)`, no failures.
- Derived gate families on 4e94a27: 132 derived; `--ran` reconciles 132
run, 0 NOT-MEASURED, every exit 0 (also 132/132 exit 0 on `3894ea44`
before the merge).
- After the merge: `@object-ui/plugin-grid` `Test Files 305 passed ·
Tests 2705 passed`; `@object-ui/plugin-view` `Test Files 67 passed ·
Tests 732 passed`. `type-check` for `@object-ui/types` and
`@object-ui/plugin-grid` exit 0 on `3894ea44`.
- `overlap-check --exclude-pr=36357` on 4e94a27: clean against main and
the eight open PRs sharing files (objectstack-ai#36439, objectstack-ai#36438, objectstack-ai#36435, objectstack-ai#36411,
objectstack-ai#36392, objectstack-ai#36351, objectstack-ai#36343, objectstack-ai#36316). objectstack-ai#36332 is merged and is in this head.

Earlier runs (head 579f99a; suites on 1c2a16b):

- `@object-ui/plugin-grid` whole package: `Test Files 298 passed | 3
failed (301) · Tests 2676 passed | 6 failed`; the 6 (keyboardNavigation
×4, cellSelection ×1, rowContextMenu ×1) were fixed and those three
files re-run green (8 + 28 + 18).
- `@object-ui/plugin-view` whole package: `Test Files 67 passed (67) ·
Tests 732 passed (732)`. `@object-ui/types`: `Test Files 389 passed ·
Tests 10498 passed`.
- `type-check` for `@object-ui/types`, `@object-ui/plugin-grid`,
`@object-ui/plugin-view`: exit 0.
- `@objectstack/spec` test under the verify lock: 1 failed of 27,924
(`retired-key-removal-version.pin`, the JOIN row this PR then added;
that file re-run 63 passed). `test:repo`: `Test Files 93 passed · Tests
1564 passed`.
- Derived gate families (`dispatch-gates --commands`): 132 derived;
`--ran` reconciles 132 run, 0 NOT-MEASURED. Six first read exit 3 on a
stale spec dist and `check:generated` exit 1 on the same stamp; after
`pnpm --filter @objectstack/spec build` all seven re-ran exit 0.
`check-plugin-teardown-shape --self-test` needed its pinned fixture
commit fetched into the shallow clone, then exit 0.
- `node scripts/gen-sdui-manifest-node.mjs` under the lock, then
`gen-sdui-reference.mjs`; `check-doc-component-types.mjs` green.
- `overlap-check --exclude-pr=36357`: clean against main and the six
open PRs sharing files (objectstack-ai#36392, objectstack-ai#36380, objectstack-ai#36351, objectstack-ai#36343, objectstack-ai#36332, objectstack-ai#36316).
- Earlier dogfood battery on 1c2a16b (superseded by the run on 4e94a27
above): `Test Files 484 passed | 3 skipped (487) · Tests 4107 passed |
68 skipped (4175)`. The one commit after it (579f99a) touches two docs
snippets only.
- `pnpm --dir ui check:doc-snippets` after a scoped build: 544 of 544
blocks judged, 0 failed (the Lint UI red on 1c2a16b was the new
staged-model snippet missing its import, fixed in 579f99a).

</details>

<details><summary>Ablation (`scripts/ablation-replace.mjs`, restored to
the HEAD blob, `git diff HEAD` empty)</summary>

- `cellSelectionProp ?? inlineEditable` → `cellSelectionProp` (the
base's behaviour): 3 failed of 6 — the object-view `table.editable` and
named-view `inlineEdit` per-cell saves and the authored-node per-cell
save; the three controls (read-only object-view, read-only node, host
`false`) stay green.

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jSHfkSrXZxbdWoQxnW)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QsR2jSHfkSrXZxbdWoQxnW

<!-- signed: repo:objectstack#7 · zhuangjianguo ·
session_01QsR2jSHfkSrXZxbdWoQxnW -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
…enu, and a lane statistic (objectstack-ai#36411)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbCxiFE11rsKwyNffJZKYqJs)_

repo:objectstack#7 · zhuangjianguo · session_01QsR2jRKaa4gJCNNF5QMd8t

Fixes objectstack-ai#36370

Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: carried by objectstack-ai#36422

Claim: 7076741092

## 维护者速读

- 改了什么:看板视图的「视图设置」换成看板自己的一套——分列字段(只列单选/单选按钮字段)、显示哪几列(「5 /
7」,可拖动排序、可隐藏)、卡片上显示的字段(拖动排序、隐藏、「+ 添加字段」)、「显示字段名」「隐藏空字段」两个开关、列底统计(无 / 计数
/ 数字字段求和);表格的「显示的列 / 分组 / 行高 / 行颜色」在看板上不再出现。每列表头加「+」(新建并预填该列的值,空列另有「+
新建」行)和「⋯」(折叠这一列、隐藏这一列)。
- 规则:除折叠外,所有改动沿用 objectstack-ai#35955 的草稿规则——立即生效、出现「放弃 /
保存」、保存前不写任何东西;「保存到这个视图」「另存为我的视图」都带上看板设置。折叠只记在本浏览器,按「用户 : 对象 :
视图」分开(localStorage 键 `objectui:kanban-lanes-collapsed:<用户 id>:<对象>:<视图
id>`)。隐藏一列沿用 objectstack-ai#28211 `lanes` 的含义:这一列的卡片移到「未分类」,菜单和「显示哪几列」页都写明这一点。
- 协议:`KanbanConfig` 加三个可选键:`summary`(新的 `KanbanLaneSummary`,只收
`{type:'none'}` / `{type:'count'}` / `{type:'sum', field}`,`sum`
必须写字段;优先于 `summarizeField`)、`showFieldLabels`、`hideEmptyFields`(两者缺省为
true,即现在的卡片),均无 spec 默认值,旧视图不变;L2 看 schema 面。lint 检查
`kanban.summary.field`(字段名、以及求和字段的类型;是 / 否字段不能求和,和设置面板一致)。另修 Console
一直丢掉 `kanban.lanes` 的转发(objectstack-ai#28211),并让 Studio 预览(plugin-view)也转发三个新键(即
objectstack-ai#36426 要的转发,由座位关闭该卡)。
- 未做:列底求和现在只算已加载的卡片(列未加载完时写明「仅已加载的卡片」),整列求和、平均 / 最小 / 最大要等服务端按列聚合,另立
objectstack-ai#36520;查找 / 人员 / 主从 / 树形字段分列另立 objectstack-ai#36430(卡片验收里「换成商机负责人」这一条随它走,本 PR
用另一个单选字段「审批状态」验收);卡片底部图标开关另立 objectstack-ai#36423;新增列选项、卡片布局、Studio 设计器、手机看板不在本卡范围。

## What changes

**1. The board's own 视图设置 (`plugin-list`).** `ViewSettingsPopover` takes
a `kanban` prop (`ViewSettingsKanban`); `ListView` builds it on a board,
and the panel then draws, in place of the table's columns, Group, Row
height and Row colour:

| Row | What it writes |
|---|---|
| 分列字段 (lane field) | `groupByField`, from the object's `select` and
`radio` fields, and drops `lanes` with it |
| 显示哪几列 `5 / 7` | `lanes`: hide, show (at the end), drag to reorder,
「显示全部」; the last shown lane has no eye; `undefined` when the list is
every option in its own order |
| 卡片上显示的字段 | `columns`: drag, hide in place, 「+ 添加字段」 adds at the end |
| 显示字段名 / 隐藏空字段 | `showFieldLabels` / `hideEmptyFields`: `false` when
turned off, absent when on |
| 列底统计 | `summary`: none, count, or the sum of a field the aggregate
table's `sum` row accepts (a number or currency; no percent, formula or
yes / no field); None over a view with `summarizeField` writes `{ type:
'none' }` |

`ListView` gains `onKanbanChange(patch)` (`null` in a patch means the
key leaves the block) and `laneCollapseKey`. The phone settings sheet
shares `ViewSettingsContent`, so it shows the same board rows.
`FieldList` gains `hiddenTitle` and `typeIcons` so the lanes list reads
「隐藏的列」, draws no field-type icon, and carries the line
「隐藏的列里的卡片会显示在「未分类」。」

**Lane fields left out.** A lookup, user, master-detail or tree field
draws no sensible lanes yet: the board keys a lane on the stored value,
and an expanded reference is an object (measured live: `[object Object]`
lanes). A boolean has no options to title its lanes. So the picker
offers `select` and `radio` only, and objectstack-ai#36430 carries the reference
lanes. An authored lookup `groupByField` draws wrong today,
independently of this PR.

**Hiding a lane.** `lanes` keeps its objectstack-ai#28211 meaning: it picks lanes, not
records, so the cards of a hidden lane show under 「未分类」. The 「⋯」 item
reads 「隐藏这一列」 with 「这一列的卡片会移到「未分类」」 under it, and the lanes level says
the same.

**2. Lane header 「+」 and 「⋯」 (`plugin-kanban`).** `ObjectKanban` takes
the host's `laneMenu` request (`KanbanLaneMenuRequest`: `collapseKey`,
`onHideLane`, `onCreateInLane`), relayed to `KanbanImpl` over a
package-private context (the `KanbanColumnSummary` pattern; never a node
key). Without it no header draws either control. 「+」 reports its lane;
an empty lane also gets a 「+ 新建」 row. 「⋯」 holds 折叠这一列 / 展开这一列 and 隐藏这一列;
the `Uncategorized` lane offers collapse only. Collapse is kept per
browser under `objectui:kanban-lanes-collapsed:<collapseKey>`, written
only after a user toggle; `ListView` passes `<user id>:<object>:<view>`,
the view named by the host's `laneCollapseKey` (the Console passes the
view's id), else the schema's `id`, else `-`; a signed-out reader is
`-`. A collapsed lane's heading opens it again, and an open lane keeps
its bare title. `ListView` wires create as `onEdit({ [laneField]: value
})`, the seeded-record create the calendar already uses
(objectui#12291), and hide as unticking the lane (at least one lane
stays).

**3. The lane statistic and the card toggles (`plugin-kanban`).**
`summary` draws at each lane's foot (`[data-kanban-lane-statistic]`, 「计数
2」, 「合计 · 金额 ¥40」) and replaces the `summarizeField` header total; `{
type: 'none' }` draws neither. `laneStatistic(cards, field, type)`
counts or sums. `count` is the lane's own count, the server's where the
board pages the lane, and a windowed count reads `+`. **`sum` totals the
cards the lane has loaded, not every record of the lane**: a windowed
lane's sum says so, 「合计 · 金额 · 仅已加载的卡片」
(`data-kanban-lane-statistic-partial`), rather than a `+` on a sum, and
the `summary` docblock and `.describe()` say the same. **Why no
push-down here:** the board has no lane aggregate read today, and adding
one (one grouped `sum` over the view's filter, answering every lane) is
the next stage. Per the maintainer's ruling of 13:52Z
(「还没开工的不应该开工啊,分多个阶段的只做完当前阶段」) and seat 7's ruling on L2 S3, this PR
ships the current stage only and objectstack-ai#36520 carries the server lane
statistic: the whole-lane sum, then average, minimum and maximum. Those
three are not admitted by the schema meanwhile: over the loaded cards of
a windowed lane they would be wrong with no honest marker.
`showFieldLabels: false` draws card values without their names
(`KanbanCardDisplayContext`); `hideEmptyFields: false` keeps an empty
field's line with a dash. Without the keys, boards draw as before.

**4. The draft (`app-shell`).** The board's changes are a list-draft
part: `ListDraft.kanban` holds only the changed keys (`nextKanbanDraft`
drops a key changed back to the view's own as the board draws it,
`kanbanViewOptions`, so an auto-detected lane field picked back is no
change; `null` = removed). `objectViewListRenderer` lays it over the
view's block (`layKanbanDraft`) and wires `onKanbanChange`; `ObjectView`
hands it to 「保存到这个视图」 and 「另存为我的视图」 as `display.kanban`, and Discard
drops it. On a board whose view declares no `kanban` block (or one
without `groupByField`), the lane field is auto-detected, so the draft
holds no lane; `kanbanDraftToSave` lays the lane the board draws under
the draft, so a saved block carries the `groupByField`
`KanbanConfigSchema` requires whenever the board draws one (a view
naming no lane on an object with no detectable lifecycle field draws no
lanes, and a save there is refused by the server as before) (found in
the L2 of 7258985; red without the fix on both save paths, pinned).
`ListDraftActions` lists the part as 「看板设置」.

**5. In-surface fixes: both producers relay the board block.**
`kanbanViewOptions` (Console) relayed the lane field, title, card fields
and `summarizeField` but never `lanes`, so a Console board drew every
option whatever the view declared (objectstack-ai#28211). It now relays `lanes` (a
non-empty array) and the three new keys, each only when declared.
`plugin-view`'s `ObjectView#generateViewSchema` (Studio preview, SDUI
`object-view`) relays `summary`, `showFieldLabels` and `hideEmptyFields`
the same way, so `summary: { type: 'none' }` hides the header total
there too. This is the relay objectstack-ai#36426 asks for; objectstack-ai#36426 holds no claim
naming this branch, so the seat closes it.

**6. Lint (`@objectstack/lint`).** `validate-list-view-field-refs` walks
`kanban.summary.field` as a field reference (`error`, the
`columns[].summary.field` level: a stale name draws nothing, so the
statistic the author asked for is gone without a word), and refuses,
under `list-view-summary-field-type-refused` at `kanban.summary`, a
`sum` over a field the aggregate table's `sum` row refuses **and over a
`boolean` or `toggle` field**, which the table admits but the board does
not add (the picker leaves them out the same way). `os explain` names
the position.

**7. Spec widening (`@objectstack/spec`).** `KanbanConfigSchema` gains
`summary: KanbanLaneSummarySchema.optional()`, `showFieldLabels:
z.boolean().optional()`, `hideEmptyFields: z.boolean().optional()`, no
defaults. `KanbanLaneSummarySchema` is a discriminated union of `none`,
`count` and `sum` with a required non-empty `field` (exports
`KanbanLaneSummary` and `KanbanLaneSummaryParsed`). Regenerated:
`authorable-surface/ui.json`, `api-surface`, `export-origins`, the
strictness ledger,
`content/docs/references/{ui/view,api/protocol,data/object,index}.mdx`.
`variant-docs.json` gains the union's row (`generated-reference-only`;
the teaching is objectstack-ai#36422). Liveness: the `kanban` row of
`liveness/view.json` names each key's read points on both producers.

## Seat rulings this PR follows

Both from seat 7 (`domain:objectstack` seat 7, thread session
`session_01QsR2jTeURPvEm465RcoYEC`), in the objectstack-ai#36370 card thread at
2026-11-22T11:19Z, answering this PR's two questions:

- **A (lane fields):** 「the lane-field picker offers only option-backed
fields (select and radio, plus boolean only if it draws sensibly). Say
in the body that lookup, user, master_detail and tree lanes are out, and
I will file a card for them: distinct-value lanes, FK bucketing, FK lane
queries and FK writes on drag. Also say that an authored lookup
groupByField draws wrong today, independent of this PR.」 The card is
objectstack-ai#36430 (seat 7, 11:24Z). The card's acceptance line 「把分列字段换成『商机负责人』」
names a user field, so it moves to objectstack-ai#36430; the live run below switches
to the other select field, 审批状态.
- **B (hiding a lane):** 「keep objectstack-ai#28211's meaning of lanes in this PR,
because changing a published key's meaning is the maintainer's call. In
the body, say plainly that hiding a lane moves its cards into 未分类, and
use a menu label and help line that tell the truth about it.」

Also followed: seat 7 on L2 S3 (2026-11-22T16:41Z): carrier, no
push-down in this PR, current stage only; objectstack-ai#36520 filed.

## Left out (stated)

- **The whole-lane sum, and average, minimum, maximum lane statistics**:
wait for a server lane read, objectstack-ai#36520 (above).
- **Lookup, user, master-detail and tree lane fields**: objectstack-ai#36430.
- **Card footer icons toggle**: no per-board data (no per-card comment
or attachment count, no stage-entered timestamp). objectstack-ai#36423.

## Tests

- `plugin-kanban/src/ObjectKanban.laneMenu-36370.test.tsx` (4): no
controls without `laneMenu`; 「+」 and the empty-lane row report their
lane, an open lane's heading is no disclosure; 「Hide column」 reports its
lane, `Uncategorized` offers collapse only; collapse persists under the
host key, reopens from the heading, another key is unaffected.
- `plugin-kanban/src/ObjectKanban.laneStatistic-36370.test.tsx` (7):
count, sum (in place of the header total), none (also over
`summarizeField`), a partial sum worded as the loaded cards' with its
CONTROL, the two toggles and their defaults; `laneStatistic` units.
- `plugin-list/src/__tests__/ViewSettingsPopover.kanban-36370.test.tsx`
(6) and `ListView.kanbanSettings-36370.test.tsx` (3): the board rows and
none of the table's; the lane field picker offers select and radio only;
the statistic offers number and currency sums and no percent, formula or
boolean; lanes hide/show/keep-last with the 「Hidden columns」 heading and
no type icon; card fields hide/add; toggles and statistic writes; the
collapse key per reader, object and view; the zh pack names every row.
- `plugin-view/src/__tests__/ObjectView.harness.test.tsx` (+1): the
three keys reach the generated board node when declared, none when not.
- `app-shell/src/views/kanbanDraft-36370.test.ts` (7) and
`ObjectView.kanbanSaveAs-36370.test.tsx` (3; the first red without the
save-as fix, the other two red without `kanbanDraftToSave`: 「另存为我的视图」
and 「保存到这个视图」 on a board with no `kanban` block store `groupByField`):
the draft keeps changed keys only; lay with `null`; Save lays the draft
into a body `ListViewSchema` accepts; 「另存为我的视图」 on a package board
writes nothing before Save and stores the board's changes; the
`kanbanViewOptions` relay and its omissions.
- `packages/spec/src/ui/kanban-config-lane-summary.test.ts` (4) and
`packages/lint` (+5 cases): the schema takes none, count and a field's
sum and refuses avg/min/max, a fieldless sum and a stray key; lint's
stale-field row, the sum-type verdict, and a sum over a `boolean` and a
`toggle` refused at `kanban.summary`.
- After the L2 of 7258985 (this head): `@objectstack/lint`
`validate-list-view-field-refs.test.ts` 199 / 199; the 32 app-shell
files naming kanban, the draft, personal views, save-as, shared-view
save, the footer calculation draft, the stored row or view options, 269
/ 269; `@objectstack/spec` `src/ui` 185 / 6568; `check:generated` all 14
up to date; eslint on the moved files 0 errors.
- Suites on the earlier head: `plugin-kanban` 83 files / 546 tests,
`plugin-list` 186 / 2027, `plugin-view` 66 / 730, `@object-ui/i18n` 106
/ 1978, `@objectstack/lint` 225 / 9431, `@objectstack/spec` 964 / 29475,
and the app-shell test files naming kanban, the list draft, personal
views or the relay; type-check of `plugin-kanban`, `plugin-list`,
`plugin-view`, `i18n`, `app-shell` and `lint` exit 0. `dispatch-gates
--ran`: 121 derived, 121 run, 0 NOT MEASURED. `overlap-check`: merges
cleanly with main; objectstack-ai#36435, objectstack-ai#36437 and objectstack-ai#36316 meet it only on generated
counts and the de quote-pair pin, which the second to land regenerates.

## Verification (live)

**Head `9f8726f1ec` is a merge of `main` (`65ce7983`) on top of
`16a019dc05`, with no code change.** It resolves the de quote-pair pin
to 127 (main's 125 plus this PR's two spans) and regenerates the
deferred references and `authorable-surface/ui.json`. The test and live
readings below stand from `16a019dc05`. On the merged tree,
`ObjectView.kanbanSaveAs-36370`, `kanbanDraft-36370`, plugin-view
`ObjectView.harness` and `de-quote-pairing-3876` were rerun (4 files,
139 tests, all green), `check:generated` reports all 14 artifacts up to
date, and `overlap-check` is clean.

**Head `dd9e0bb782` is a second merge of `main` (`84853fd1`), with no
code change.** It clears the runner-shutdown cancel on `9f8726f1`'s Type
Check · workspace. The merge was textually clean. `view.mdx` and
`object.mdx` were regenerated, and `check:generated` is clean. On the
merged tree, vitest over `i18n`, `plugin-kanban`,
`ObjectView.kanbanSaveAs-36370` and `objectViewOptions` passed (190
files, 2527 tests). `overlap-check` is clean against main and open PRs.

Local backend (`objectstack dev --seed-admin --fresh`) and the Console
in zh (CNY), signed in as the seeded administrator, at the code of
16a019d. Two boards: the CRM example's pipeline (a view the read-only
CRM package ships) and a **self-built app** made through the
administrator's own doors (`POST /api/v1/packages` for package
`com.qa.board36370`, then `PUT /api/v1/meta/object/qab_task`, `PUT
/api/v1/meta/view/qab_task.board` and `PUT /api/v1/meta/app/qab_app`
into it, five records by `POST /api/v1/data/qab_task`; lane field 阶段 =
待办 / 进行中 / 评审 / 完成, card fields 名称 / 工时 / 备注, 备注 empty on three cards).

**Screenshots are not inline.** GitHub has no API that uploads an image
into a PR body (the `user-attachments` upload is the browser's only),
and AGENTS.md's 「Delete temporary artifacts — screenshots…」 rule keeps
them out of the branch. They are in the project folder `issue-36370/`
under the names given below; the seat weighs this against the card's 「PR
正文附视图设置和列菜单的截图」.

Writes are read off the browser's network log. The only writes not
listed are the reader's recent-items rows (`sys_user_preference`,
written when a page opens, before any change).

CRM pipeline (first run):

- 视图设置 shows 分列字段 阶段, 显示哪几列 5 / 5, the card fields, both toggles and
列底统计; no 显示的列, 分组, 行高 or 行颜色. The lane field picker offers 阶段 and 审批状态
(both select). The statistic offers 无, 计数, 合计 · 金额 and 合计 · 产品合计.
(`settings.png`, `settings-lane-field.png`, `settings-summary.png`)
- On the package view: hiding 输单, turning 显示字段名 off and picking 计数 apply
at once (4 lanes plus 未分类, no `dt`, 计数 1 / 2 / 1 / 7 / 1) with **no
write**; 放弃 restores every lane, label and the header total with no
write. Save offers 另存为我的视图 alone. (`settings-lanes.png`,
`board-sum-nolabels.png`)
- 另存为我的视图: one `POST sys_personal_view`; the new view opens with the
changes and keeps them after a reload. **This run found the path dropped
the board part**; fixed in `ObjectView#handleSaveAsMyView` and pinned.
(`board-saved-reload.png`)
- On that own view: 合计 · 金额 at each foot; 保存到这个视图 writes one `PATCH
sys_personal_view`, kept after a reload. (`save-menu-own.png`)
- 「⋯」 on 需求确认 offers 折叠这一列 and 隐藏这一列 with its 未分类 line; collapse is
stored under `objectui:kanban-lanes-collapsed:<user
id>:crm_opportunity:<view id>` and holds after a reload.
(`lane-menu.png`, `board-collapsed.png`)
- 「+」 on 方案报价 opens 新建商机 with 阶段 = 方案报价. (`lane-create.png`)
- **This run also found the statistic offering a sum of the two percent
fields**; the picker now asks the aggregate table's `sum` row, as lint
does.

CRM pipeline (supplement for the acceptance lines the first run did not
walk):

- **Lane field swap, then 放弃.** 分列字段 → 审批状态: the board re-lanes at once
to 待审批 / 已批准 / 已驳回 / 已撤回 / 未分类 (all 12 opportunities in 未分类, none has an
approval status), 放弃 / 保存 appear, **no write**. 放弃: back to 初步接洽 / 需求确认
/ 方案报价 / 赢单 / 输单, the bar gone, no write. (`sup-lane-field-picker.png`,
`sup-relane-approval.png`) The card's line names 商机负责人, a user field,
which ruling A moves to objectstack-ai#36430.
- **Drag a lane to the front.** In 显示哪几列, dragging 方案报价 onto the first
row (a mouse drag) orders the list 方案报价 / 初步接洽 / 需求确认 / 赢单 / 输单 and the
board follows in that order, with 放弃 / 保存 and no write.
(`sup-lanes-order.png`, `sup-board-reordered.png`) The pipeline has no
谈判 stage, so the lane is 方案报价.
- **隐藏空字段.** With 审批状态 added as a card field (empty on every card):
隐藏空字段 on, 36 field rows and no dash; turned off, 48 rows, the 12 new
ones each 「—」; no write. (`sup-hide-empty-on.png`,
`sup-hide-empty-off.png`)
- **Another browser.** With 需求确认 collapsed in one browser, a second
browser context signed in as the same reader (its own local storage)
draws 需求确认 open with its two cards and holds no collapse key.
(`sup-other-browser.png`)

Self-built app (`com.qa.board36370`), administrator:

- The board draws 待办 / 进行中 / 评审 / 完成 with 7 field rows (empty 备注 takes
none). 视图设置 shows the same board rows; the statistic offers 无 / 计数 / 合计
· 工时. (`self-board.png`, `self-settings.png`)
- 合计 · 工时 picked and 隐藏空字段 turned off: 10 rows, three 「—」, feet 合计 · 工时
8 / 8 / 2 / 1. 隐藏空字段 back on and 评审 dragged to the front: 7 rows, lanes
评审 / 待办 / 进行中 / 完成, feet follow. No write. (`self-empty-off.png`,
`self-changed.png`)
- **保存到这个视图 as an administrator**: Save offers 保存到这个视图 and 另存为我的视图; the
confirmation reads 「保存到这个视图?所有用「任务看板」的人都会看到这些改动。」; confirming writes
`PUT /api/v1/meta/view/qab_task.board?mode=draft` with `kanban: {
groupByField: 'phase', columns: [...], summary: { type: 'sum', field:
'hours' }, lanes: ['review','todo','doing','done'] }` (no
`hideEmptyFields`: it was turned back to the view's own) and `POST
…/publish`. After a reload the board draws 评审 first with the 合计 · 工时
feet and no draft bar. (`self-save-menu.png`, `self-save-confirm.png`,
`self-after-reload.png`)

NOT MEASURED live: the partial-sum wording (no lane here holds more than
it loaded; pinned in the unit test), and the Studio preview relay
(pinned in plugin-view). The board with no `kanban` block was measured
in tests only (both save paths), not live.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- signed: repo:objectstack#7 · zhuangjianguo ·
session_01QsR2jRKaa4gJCNNF5QMd8t -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue protocol:system protocol:ui size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retire the server-side column state key (columnState) from view metadata

3 participants