Repository navigation
feat(spec): list views offer Hide Fields by default — userActions.hideFields defaults to true - #29083
Conversation
A list view now offers the Hide Fields control unless it declares
`userActions: { hideFields: false }`. The spec default moves from false to
true, the ListView read becomes `ua?.hideFields !== false`, and the change
is recorded in the default-change ledger. Where the reader's choice is kept
(their own list state, or session-only on a system view with no columns)
is unchanged.
Claude-Session: https://claude.ai/code/session_01ADHkmRSwH9oAqN1JrZZVoR
Co-authored-by: Claude <noreply@anthropic.com>
…elds (#28912) Claude-Session: https://claude.ai/code/session_01ADHkmRSwH9oAqN1JrZZVoR Co-authored-by: Claude <noreply@anthropic.com>
…lds (#28912) Claude-Session: https://claude.ai/code/session_01ADHkmRSwH9oAqN1JrZZVoR Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 168 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 90ce645ceece900dbdc139dadc91dfb5c22b260e && git checkout 90ce645ceece900dbdc139dadc91dfb5c22b260e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d1f3ac05038cffc28b9f8bcbe2116afe1b5f1a2e 5e1742ee6760b057f0dbdbcb87f3e8a78fae0393 && git checkout -B drift-repro d1f3ac05038cffc28b9f8bcbe2116afe1b5f1a2e && git merge --no-ff 5e1742ee6760b057f0dbdbcb87f3e8a78fae0393
node scripts/docs-audit/affected-docs.mjs --json d1f3ac05038cffc28b9f8bcbe2116afe1b5f1a2e |
Adds `list-view-hide-fields-default-on` so `os migrate meta` and the upgrade guide carry the flip, points the ledger row, the schema comment and the changeset at it, and corrects the stale "hideFields default OFF" comment in ui core's normalize-list-view. Claude-Session: https://claude.ai/code/session_01ADHkmRSwH9oAqN1JrZZVoR Co-authored-by: Claude <noreply@anthropic.com>
…28912) Claude-Session: https://claude.ai/code/session_01ADHkmRSwH9oAqN1JrZZVoR Co-authored-by: Claude <noreply@anthropic.com>
|
domain:spec#1 · os-steve · session_01ADHkmPi25XXKx92Xmg4viS Head-sha: 维护者速读
席位意见:可落地,等契约复审。 席位核对 — ACCEPT ·
|
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract-review-claim: Taken on the lane's Generated by Claude Code |
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract reviewServed-tier: Inputs read: card #28912 body and all four comments (the ruling confirmation ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix found. Two should-fixes above plus the stale PR body (③). Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:spec#1 · os-steve · session_01ADHkmPi25XXKx92Xmg4viS Landing note · 2026-11-02T08:15Z · head Contract review PASS 6572308637 on this head. Check-runs: 59 success, 11 skipped, 0 failed. The seat removes
|
Requested by Steve · project thread
Fixes #28912
Clause-②: yes (widening)
Metadata-protocol: semantic
维护者速读
userActions: { hideFields: false }才会关掉。spec 默认值、列表渲染器的读取、默认值变更台账三处同步。packages/spec/src/ui/view.zod.ts(hideFields 默认值与上方注释)、ui/packages/plugin-list/src/ListView.tsx(showHideFields一行)、packages/spec/scripts/lib/default-changes.ts(台账新行)。cd ui && pnpm exec vitest run packages/plugin-list/src/__tests__/ListView.test.tsx -t "Hide fields",预期全部通过,其中含「未声明时显示」「声明 false 时不显示」两条新用例。What changes
packages/spec/src/ui/view.zod.ts:UserActionsConfigSchema.hideFieldsgoes from.default(false)to.default(true). The describe and the block comment above the schema now say why (maintainer ruling on List views: readers can hide and show columns by default — flip the userActions.hideFields default, so a generated app has the control without having to declare it #28912) and where the reader's choice is kept.ui/packages/plugin-list/src/ListView.tsx:showHideFields: ua?.hideFields !== false(was=== true), and the comment above it changes with it.packages/spec/scripts/lib/default-changes.ts: the protocol-18 rowui/UserActionsConfig:hideFields,falsetotrue, with the reason a build prints.content/docs/references/ui/{view,page}.mdx(the default column and describe) andpackages/spec/authorable-defaults/ui.json(one fingerprint line)..changeset/28912-hide-fields-default-on.md:@objectstack/specand@object-ui/plugin-list, minor.persistHiddenFieldsand the objectui#10694 session-only rule inobjectViewListRenderer.tsx, and the record-details component'shideFields(astring[]).Tests
Forced edits (they pinned the old default):
packages/spec/src/ui/view.test.ts"should apply default values":hideFieldsnow expectstrue.packages/spec/src/ui/view.test.tsthe defaults-asymmetry pin: renamed to "pins the group-ON / hideFields-ON / rowColor-OFF defaults" and expectstrue.ui/packages/plugin-list/src/__tests__/ListView.test.tsx"should keep the legacy show* flags working": a legacyshowHideFields: trueis now indistinguishable from silence, so the fold is pinned byshowHideFields: false(control absent).New:
view.test.ts"hideFields defaults ON (maintainer ruling)": absent parses totrue(schema and throughListViewSchema), explicitfalsestaysfalse, nouserActionsblock materialises none.ListView.test.tsx: the control is drawn whenuserActionsomitshideFields, and not drawn forhideFields: false.Acceptance notes
main135054e withListView.tsxatmain's=== trueread):ObjectView.emptyColumnsNoProjection-10694.test.tsxandObjectView.userListState-12418.test.tsx, 43/43 passed. They drive the real ListView Display popover and its Hide Fields checkbox: the column goes; on a view that declarescolumnsand on a saved view the choice is stored on the user's own list state and re-applied after a remount, and the view is not written; on a system view with nocolumnsit is session-only and nothing is stored; another user sees the defaults. So the control works end to end and the flip does not spread a broken control.InterfaceListPage.tsxkeeps its closed-by-default toolbar (hideFields: userActions.hideFields === true, likefilter,rowHeight,group). A pageinterfaceConfig.userActionsblock that omits the key parses totrue, but that page still draws the control only for an explicittrue. The ledger reason and the changeset say so.ui/packages/core/src/utils/normalize-list-view.tsaround line 400 still says "hideFields/rowColor default OFF" in a comment. It is outside this card's file surface, so it is left for the seat.editInline,pageSize, nav-groupexpanded) each carry one; see the report's open question.Verification
Spec and plugin-list suites ran at d9c8c4e; the only later commit (5e51cfd) rewords the ledger reason and the changeset, touching no source or test. Gates and the app-shell set ran at 5e51cfd.
Spec, consumers, generated artifacts
pnpm --filter @objectstack/spec check:generated: 14/14 artifacts up to date (aftergen:docs).pnpm --filter @objectstack/spec test: Test Files 789 passed, Tests 23328 passed, 1 todo.cd ui && pnpm exec vitest run packages/plugin-list: Test Files 179 passed, Tests 1729 passed.cd ui && pnpm exec vitest run the 34 app-shell files that read hideFields, hiddenFields or userActions: Test Files 34 passed, Tests 344 passed (head 5e51cfd). The full app-shell suite (2065 files) is left to CI's Test UI shards; a local full run was stopped after 64 minutes.check-empty-changesetexit 0;check-adr-0087-registrationexit 0 (non-breaking, no disposition owed);check-changeset-no-major --eventon this body exit 0 (LEVEL AXIS readsyes (widening)+semantic).pnpm --filter @objectstack/spec typecheckexit 0.@object-ui/plugin-list type-checkNOT MEASURED locally (the ui package closure is unbuilt in this container); CI's Type Check UI carries it.dispatch-gates --ranon head 5e51cfd: 108 derived, 108 run, 0 NOT-MEASURED, 0 UNRUN, every exit 0.Generated by Claude Code