Repository navigation
fix(plugin-list): the sort picker leaves out a field the object marks hidden, as the filter list does - #30384
Conversation
…ject marks hidden Claude-Session: https://claude.ai/code/session_01Utp6CY1ikAq74XRbNdsyUC Co-authored-by: Claude <noreply@anthropic.com>
… hidden, as the filter list does Claude-Session: https://claude.ai/code/session_01Utp6CY1ikAq74XRbNdsyUC Co-authored-by: Claude <noreply@anthropic.com>
… left Claude-Session: https://claude.ai/code/session_01Utp6CY1ikAq74XRbNdsyUC Co-authored-by: Claude <noreply@anthropic.com>
|
domain:ui#2 · os-bill · session_01Utp6Cb5R6JDdfyvtj3dPR2 Waits-on: main-red #30367
|
|
domain:ui#2 · os-bill · session_01Utp6Cb5R6JDdfyvtj3dPR2 维护者速读
席位核对 — ACCEPT · domain:ui#2 · head
|
|
domain:ui#2 · os-bill · session_01Utp6Cb5R6JDdfyvtj3dPR2 Landing held: the seat session's auto-mode classifier refused the relay landing |
Requested by Bill · project thread
domain:ui#2 · os-bill · session_01Utp6Cb5R6JDdfyvtj3dPR2
维护者速读
hidden: true的字段(队列、未翻译的 Search Index、组织等系统列),与「筛选」面板的字段列表同一条规则;视图或已存排序本来就按这类字段排的,那一行照旧显示,标为不可选、可删除。ui/packages/plugin-list/src/ListView.tsx(新的isDeclaredHidden与sortFields循环开头的offered判定)。pnpm --dir ui exec vitest run packages/plugin-list/src/__tests__/ListView.sortRemovableOnly-11943.test.tsx,预期 6 个用例全绿,其中hidden:一条钉住隐藏字段只在当前排序点名时以不可选形式出现。Fixes #30037
Clause-②: no
Metadata-protocol: none
What changes
ui/packages/plugin-list/src/ListView.tsx, one rule shared by three field lists:isDeclaredHidden(defs, field), a module-level predicate besidecanReadField: the object definition marks the fieldhidden: true. The Filter panel's list (filterFields) and the hide-fields lists' addable fields (addableFields) already asked this question inline; both now call the predicate, unchanged in behaviour.sortFields) asks it too. A field is offered only when the user may read it and the definition does not mark it hidden. A hidden field the current sort already names is kept by the existing in-use exception, listed removable only (disabled), exactly as an unreadable field is: its row shows its label and can be removed, no other row and no "Add sort" can choose it. A hidden lookup (the platform'sorganization_id) no longer raises the relational hint under the rows, since the picker never offered it; a visible lookup still does.objectDef, which the loop now reads.What is persisted and requested is unchanged: a hidden field is sortable on the server, so a stored sort naming one keeps being sent and saved (the #6455 persist boundary filters platform-refused entries only).
Acceptance
The card's list, verbatim, each item pinned:
Pinned by
ListView.sortRemovableOnly-11943.test.tsx:FIELD_DEFSgains a hiddensearch_index("Search Index", standing in for__searchandqueue), so every case's exact option list now asserts it is absent; the newhidden:case declares it first and sorts by it, and asserts it is listed disabled, its row shows it, "Add sort" skips it, the new row offers it only as unavailable, and removing its row drops it from the list.Read on this head, no gap found, nothing changed in them:
allFields, built from the view's declaredcolumnsonly. A hidden field appears there only when the view's author declares it as a column, and then the grid draws it (effectiveFieldsdrops unreadable and user-hidden columns, not definition-hidden ones), so listing it is consistent with the grid.addableFieldsalready leaves out a definition-hidden field; it now asks the shared predicate.GroupingEditor fieldOptions) and Row color select: both readallFields, the same declared-columns list as above.Item 1's pins, plus
ListView.sortFieldRead-11943.test.tsx(new top-leveldescribe): a hidden lookup is not offered and raises no relational hint, while the same lookup unhidden raises it.Acceptance notes
The card's "To check while here" names two Studio lists. Both live in
ui/packages/app-shell/**, outside this order's file surface, so they were read, not measured in a running Studio and not changed:ObjectFieldInspector, thefieldOptionsit handsCelPredicateField): every entry of the object draft's field list except the field itself, with no hidden check. Whether the draft carries the injectedqueue/__searchcolumns was not measured here. A formula may legitimately read some hidden columns (queue,owner), so this is an implementer's judgement, not a mechanical copy of this rule.ObjectValidationsPanel, thecross_fieldcheckbox list): every field of the list it is handed. The panel already readshidden(its new-rule default skips hidden fields) but the checkbox list does not filter on it.Tests
Red first, on
origin/maincode with the new pins (ListView.tsxrestored to its base, commit91cec45d): Test Files 2 failed (2), Tests 6 failed, 6 passed (12). Each failure reads "Search Index" listed (the exact option lists) or the relational hint drawn for the hidden lookup.Verification
All readings on objectstack-ai/objectstack. Final head
26c80600(after mergingorigin/mainatfdad1786); the full-package run was onc3b69a91, before the merge, whose six incoming commits touch noui/path.Tests
pnpm --dir ui exec vitest run --maxWorkers=2onListView.sortRemovableOnly-11943,ListView.sortFieldRead-11943,ListView.filterFieldList-11810,ListView.fieldListRead-11984: Test Files 4 passed (4), Tests 50 passed (50); lock VERDICT command-exit 0.ListView.tsx(the wholeplugin-listpackage, 145 files import it):pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-list/onc3b69a91: Test Files 189 passed (189), Tests 1813 passed (1813); lock VERDICT command-exit 0.pnpm exec turbo run type-check --filter=@object-ui/plugin-list(tsc --noEmit && tsc -p tsconfig.test.json), final head: Tasks 53 successful, 53 total. The first run, before26c80600, was red on TS6133 (an unuseddefbinding this PR left inaddableFields), fixed by that commit.pnpm --filter @object-ui/plugin-list lintexit 0 (0 errors), and root eslint--no-inline-configon the three touched files exit 0.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon26c80600derived 35 commands; all 35 run, each exit 0 (among themnode scripts/check-sdui-manifest.mjsandpnpm --dir ui exec vitest run scripts/: Test Files 170 passed, 2 skipped (172); Tests 4985 passed, 2 skipped).--ranreconciliation: 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN. Alsopnpm check:changeset-fixedexit 0,pnpm --dir ui check:new-line-citations0 new citations,node scripts/check-nul-bytes.mjsexit 0.Generated by Claude Code