Repository navigation
Commit 8c5a81e
fix(plugin-list): Refresh alone no longer draws the Display entry in the default list toolbar (#36339)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XURgXCZHcjPoyo5g9cMEATi)_
Fixes #36002
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 列表默认工具栏里,看板、日历这类视图如果除了刷新外没有别的显示选项,就不再出现一个点开只有底栏的空「显示」入口;宽工具栏的刷新按钮照旧。
- 属于「列表页重做」专题:两行工具栏按「刷新去掉」落地后剩下的收尾。
- 出错时最坏是这类视图少了「显示」入口,而它本来就没有可用的选项;改动小,可整体撤回。
- 无。
## What changes
- `ui/packages/plugin-list/src/ListView.tsx`: `displayOffered` no longer
ORs `toolbarFlags.showRefresh`. The default (Display) toolbar has no
Refresh since the two-row toolbar landed, neither on the bar nor in the
panel (`viewSettingsElement` is handed no refresh prop), so the key was
the only reason a non-grid view with every other Display control off
drew a Display entry that opened onto just the footer. The stale Refresh
comment ("in the Display form it sits in the panel's footer") now says
Refresh is wide-form only.
- `packages/spec/src/ui/view.zod.ts`: the `userActions.refresh` describe
says the toggle governs only the wide toolbar's Refresh
(`compactToolbar: false`) and changes nothing in the default toolbar.
Description text only: key, type and default unchanged; no retirement
(card item 2, first branch, per the claim).
- `packages/spec/src/ui/view.form.ts`: the form hint for
`userActions.refresh` mirrors the new describe. Required, not chosen:
`src/ui/view-form-composite-children.test.ts` pins every `userActions`
hint equal to the schema description it replaces, and went red without
it.
- Regenerated, never hand-edited:
`content/docs/references/ui/{view,page}.mdx` (`check:generated --fix`,
which named only `check:docs` stale) and
`packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts`
(`node scripts/check-i18n-bundles.mjs --write
--filter=platform-objects`; the other ten locales keep their
hand-written translations, no source-hash entries exist for this leaf).
- Pin: a new top-level block `ListView.refreshOnlyDisplay-36002` in the
shared `ListView.harness.test.tsx` (the harness rule: a ListView pin
that needs no `vi.mock` joins that file). A kanban view with Group, Row
height and Hide fields off and `refresh` at its default draws no
`toolbar-display-trigger`; CONTROLS: `compactToolbar: false` still draws
`refresh-button`, and the same view with Row height on draws the Display
entry.
- Changeset `.changeset/36002-refresh-display-panel.md`: patch for
`@object-ui/plugin-list`, `@objectstack/spec`,
`@objectstack/platform-objects`.
Read first, by risk:
1. `ui/packages/plugin-list/src/ListView.tsx`, the `displayOffered`
hunk: the one behaviour change.
2. `packages/spec/src/ui/view.zod.ts`, the `refresh` describe: a
published-schema text face (contract review on record before landing).
3. `ui/packages/plugin-list/src/__tests__/ListView.harness.test.tsx`,
the new block at the end.
## Tests
Final head: `75244b315e1d79c1455fbd2d343e00be5fbcbf8b` (declared by the
resuming thread; no commit added after the handover).
- CI at `75244b31`: all 70 check-runs completed, each `success` or
`skipped` (Test Core 10/10 shards, Test UI 16/16 shards, Type Check UI,
Lint UI, Build & E2E UI, Live E2E UI, Lint & Repo Gates, TypeScript Type
Check, Check Changeset, Spec property liveness, Governed Surface Queue
Guard, PR-body guards).
<details><summary>Local readings (all under
scripts/pm/os-verify-lock.sh)</summary>
- Final-head union at `75244b31`, after building the
`@objectstack/platform-objects...` and `@object-ui/plugin-list^...`
closures (VERDICT command-exit 0): `pnpm --filter @objectstack/spec
test` Test Files 869 passed (869), Tests 27877 passed, 1 todo (27878);
`pnpm --filter @objectstack/platform-objects test` Test Files 125 passed
(125), Tests 2126 passed (2126); harness file
`ListView.harness.test.tsx` Test Files 1 passed (1), Tests 127 passed
(127). Each VERDICT command-exit 0.
- Harness file `ListView.harness.test.tsx`: Test Files 1 passed (1),
Tests 127 passed (127) at fa1bd43 (the fix commit).
- `pnpm --filter @object-ui/plugin-list test`: Test Files 183 passed
(183), Tests 1998 passed (1998) at d6ea716 (later commits touch no
`ui/` file).
- `pnpm --filter @object-ui/plugin-list type-check`: exit 0 at d6ea716.
- `pnpm --filter @objectstack/spec typecheck`: exit 0 at d6ea716.
- `pnpm --filter @objectstack/spec test` at d6ea716: 1 failed
(`view-form-composite-children.test.ts`, the hint pin), fixed by
e680c59; that file then 20 passed (20).
- `pnpm --dir ui exec vitest run scripts/`: 172 passed, 2 skipped (174
files) at d6ea716.
</details>
<details><summary>Ablation (one-shot, not kept)</summary>
Committed fix first, then `node scripts/ablation-replace.mjs` put `||
toolbarFlags.showRefresh` back into `displayOffered` (anchor x1 -> x0,
blob d73fea0 -> bdd2b94ef1ae). With `-t refreshOnlyDisplay-36002`:
the pin went red (`the default toolbar draws no Display entry when
Refresh was its only option` failed), both CONTROLS stayed green; 1
failed / 2 passed. Restore: blob == HEAD (d73fea0), `git diff HEAD`
empty; re-run 3 passed. The test imports `../ListView` (source), so no
dist rebuild was in the path.
</details>
## Acceptance notes
- Card acceptance 1 ("A view whose only display option was Refresh no
longer opens an empty Display panel in the default toolbar"): pinned by
the new block, ablation red without the fix. Only non-grid views can
reach it: the grid always offers Display (`currentView === 'grid'`, its
columns).
- Card acceptance 2 ("The key's describe matches what it does"):
describe, form hint and generated references now say wide-toolbar only.
- Skills/docs measured for text claiming `userActions.refresh` governs
the default toolbar: zero hits in `skills/**`, `content/docs/**`
(outside `references/` and `releases/`) and `ui/**/*.md`; control term
`userActions.editInline` hits
`content/docs/frontend/plugins/plugin-view.mdx`. No stale text to name.
- Noted, not filed: the ten translated locales of the
`userActions.refresh` form hint still carry only the first sentence
(still true, now less precise than English). Translation is a
translator's edit, outside this card.
- Noted, not filed: the spec describe of `compactToolbar` ("Collapse
Group/Color/Density/Hide-fields into a single View settings popover")
does not say that collapsing is the renderer default
(`schema.compactToolbar !== false`) nor that Refresh is dropped;
observation only.
- File surface beyond the first claim:
`packages/spec/src/ui/view.form.ts` and the regenerated
`en.metadata-forms.generated.ts`, both forced by the hint pin above; the
seat amends the claim.
- Overlap: `node scripts/pm/overlap-check.mjs` re-run at `75244b31`:
VERDICT clean against `origin/main` b3bcfef and #36343 (shares
`ListView.tsx`), merges cleanly. Earlier run: clean against #36223
(since merged).
## Verification
Two-minute check: `cd ui && pnpm exec vitest run
packages/plugin-list/src/__tests__/ListView.harness.test.tsx -t
refreshOnlyDisplay-36002` shows 3 passed. In the Console, a kanban list
view with `userActions: { group: false, rowHeight: false, hideFields:
false }` shows no Display button beside the view name; set
`compactToolbar: false` and the Refresh button appears on the bar.
<details><summary>Gates</summary>
- `node scripts/pm/dispatch-gates.mjs --commands` on the final diff: 119
commands; all run locally; `--ran` reconciliation "119 derived
famil(ies) accounted for — 119 run, 0 NOT-MEASURED".
- Exit 0: 115. Exit 3 (PREREQUISITE NOT MET, NOT MEASURED locally, CI
measures): `node scripts/check-plugin-teardown-shape.mjs --self-test`
(shallow clone cannot reach its pinned fixture commit), `pnpm
check:dual-build-cjs-loads` (whole-tree dist absent), `pnpm
check:type-check-debt` (re-measure needs the whole build), `pnpm
--filter @objectstack/spec run check:skill-examples` (client-react dist
absent).
- `pnpm --filter @objectstack/spec check:generated`: all 14 generated
artifacts up to date; `node scripts/check-i18n-bundles.mjs`: OK, all
bundles in sync.
- `node scripts/pm/dispatch-gates.mjs --tier` re-derived at `75244b31`
by the resuming thread: no path-derived mandate (default tier).
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- signed: repo:objectstack#7 · zhuangjianguo ·
session_01QsR2jRPEaXTds3tgVP5XEY -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 3faabd2 commit 8c5a81e
8 files changed
Lines changed: 104 additions & 12 deletions
File tree
- .changeset
- content/docs/references/ui
- packages
- platform-objects/src/apps/translations
- spec/src/ui
- ui/packages/plugin-list/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1096 | 1096 | | |
1097 | 1097 | | |
1098 | 1098 | | |
1099 | | - | |
| 1099 | + | |
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
| |||
1484 | 1484 | | |
1485 | 1485 | | |
1486 | 1486 | | |
1487 | | - | |
| 1487 | + | |
1488 | 1488 | | |
1489 | 1489 | | |
1490 | 1490 | | |
| |||
1669 | 1669 | | |
1670 | 1670 | | |
1671 | 1671 | | |
1672 | | - | |
| 1672 | + | |
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1307 | 1307 | | |
1308 | 1308 | | |
1309 | 1309 | | |
1310 | | - | |
| 1310 | + | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | 1313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1968 | 1968 | | |
1969 | 1969 | | |
1970 | 1970 | | |
1971 | | - | |
| 1971 | + | |
1972 | 1972 | | |
1973 | 1973 | | |
1974 | 1974 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7062 | 7062 | | |
7063 | 7063 | | |
7064 | 7064 | | |
7065 | | - | |
| 7065 | + | |
| 7066 | + | |
| 7067 | + | |
7066 | 7068 | | |
7067 | 7069 | | |
7068 | | - | |
| 7070 | + | |
7069 | 7071 | | |
7070 | 7072 | | |
7071 | 7073 | | |
| |||
7854 | 7856 | | |
7855 | 7857 | | |
7856 | 7858 | | |
7857 | | - | |
7858 | | - | |
7859 | | - | |
| 7859 | + | |
| 7860 | + | |
| 7861 | + | |
7860 | 7862 | | |
7861 | 7863 | | |
7862 | 7864 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3591 | 3591 | | |
3592 | 3592 | | |
3593 | 3593 | | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
| 3653 | + | |
| 3654 | + | |
| 3655 | + | |
| 3656 | + | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
0 commit comments