Repository navigation
fix(list): "Add group field" asks which field, and offers only fields that can group (#36204) - #36223
Conversation
…t, and asks when there is none The Group editors used to add the first column, usually the record's name, so every record became its own group. Now the first single select or radio in the reader's column order is added at once (a shown column before a hidden one); with none, the field dropdown opens and nothing is grouped until a pick. The dropdown lists the fields that suit grouping first. GroupingEditor gains the optional pickAddField prop; ViewSettingsField carries the declared type. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgXeD1yUYqBJm8uzRrP
…-aumcb5 # Conflicts: # docs/qa/platform-checklist/areas/records-forms.json
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-22T03:01Z. The brief handed to the isolated declaration-face reviewer for PR #36223, owed by Contract review brief — PR #36223 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4 席位核对 — ACCEPT (L1-b)Head-sha: 0d8fc77 · read 2026-11-22T03:04Z · first read · claim 7072735866 · seat declaration L2 runs in parallel; the seat lands on this ACCEPT plus that PASS 维护者速读列表上点「添加分组字段」时,以前直接按第一列分组,通常是名称列,结果一条记录一组,没法用。现在它按列顺序找第一个单选或单选按钮字段(比如状态)直接分组;视图里没有这类字段时,就打开字段下拉框,等用户选了再分组,关掉下拉框什么都不改。下拉框把适合分组的字段排在前面(单选、人员、关联记录、勾选、日期),其他字段排后面,仍然可以选。分组仍然只进列表草稿,出现「放弃」「保存」,不会写服务器。对开发者的变化只是新增几个可选属性和一个导出函数,不传新属性时组件行为和以前完全一样。 Must-fixNone. Should-fixNone. Nits (no change needed to land)
Checked
OwedSeat declaration L2 (parallel). |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: Inputs read: card #36204 body (rewritten 2026-11-22) and its four comments (triage 7071100814, dispatch 7072599281, claim 7072735866, rewrite note 7072750584); PR #36223 body and file list; net diff ① Derived judgmentsAccept set against the card body. WRONG: the PR implements the superseded first version of the card. The claim (02:10:37Z) described version 1: default to the first single select, group-friendly types first. The coordinator rewrote the card one minute later (7072750584, 02:11:40Z). The note says this is now void: 「默认取第一个单选或状态字段」「适合分组的类型排前面、名称仍可选」, and it asks a dev who started on version 1 to adjust. The head still ships version 1.
Public surface:
② Semver level
③ Boundary flags
Findings:
Implemented-by: VERDICT: FAIL |
|
repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4 席位核对 — ACCEPT WITHDRAWN (L1-b)Head-sha: 0d8fc77 · read 2026-11-22T03:06Z · withdraws ACCEPT 7073310792 on this head 维护者速读我上一条 ACCEPT 作废,这个版本不能合。我审的是卡片第一版,那一版会自动选第一个单选字段直接分组;卡片之后按维护者的话改了:不带默认值、先让人选,下拉只列单选、状态、勾选、人员、关联记录,对象里没有这类字段时按钮不可点并说明原因。这个头没有按新要求做,声明 L2 也已判 FAIL。开发线程正在返工,变绿后我按卡片当前正文再读一遍。 WhyI read 7073310792 against the brief the seat relayed, which described the first card body: default to the first single select. The card body was rewritten at 02:11:40Z on the maintainer's words. This head defaults to a pick and lists every type, so it does not meet the current body, items 1–3. The declaration L2 FAILed it the same way. OwedA delta read against the current card body (#36204) once the rework is green. |
"Add group field" adds no level by itself: the field dropdown opens and the list is grouped once a field is picked there; closing it without a pick writes nothing. The dropdown offers only single select or radio, tick, person and linked-record fields, single-valued. With none, the button is disabled and says why; until the object's field types are read it is disabled without a reason, and with no definition at all every column is offered as before. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgXeD1yUYqBJm8uzRrP
The group dropdown's extra fields now follow the Filter panel's tiers: business fields, then system fields such as the owner. Created by and updated by are offered only when the view shows them as a column, so an object without a person or choice field of its own still says it has nothing to group by. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgXeD1yUYqBJm8uzRrP
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-22T04:11Z. The delta brief handed to the isolated declaration-face reviewer for PR #36223 ( Contract review brief — PR #36223 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4 席位核对 — delta ACCEPT (L1-b)Head-sha: 953c8cb · read 2026-11-22T04:13Z · prior: ACCEPT 7073310792 withdrawn by 7073329852 (it followed the first card body) · delta 0d8fc77..953c8cb (4e90470, 953c8cb) · judged against the CURRENT #36204 body (issue updated 03:05:41Z; rewrite note 7072750584, claim amend 7073321855) 维护者速读这一版按改写后的卡片做了。点「添加分组字段」不再自动选字段,也不会立刻分组:先打开下拉框,选了才分组;不选直接关掉,列表不变,也不发请求。下拉框只列单选或状态、勾选、人员、关联记录这几类字段,文本、数字、日期、多选都不列。视图里的列排在前面,其次是对象里其他可分组的字段,业务字段在系统字段之前。对象里一个可分组的字段都没有时,按钮变灰,并显示「没有可以用来分组的字段」。已经按别的字段分组的视图照常显示,也可以换字段或删掉这一级。分组仍然只进草稿,会出现「放弃」「保存」。HotCRM 的「客户」列表也试过,结果一样。 Must-fixNone. Should-fixNone. Nits (no change needed to land)
The two questions the seat asked
Checked against the current card body
Checked (mechanics)
OwedThe seat's declaration L2 delta, running in parallel. |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: What I read: the card #36204 body (rewritten) and all five of its comments (triage 7071100814, dispatch 7072599281, claim 7072735866, rewrite note 7072750584, claim amend 7073321855); the PR #36223 body, file list and every comment on it (brief 7073289471, L1-b ACCEPT 7073310792, the FAIL record 7073316679, the L1-b withdrawal 7073329852, delta brief 7074033032); the net diff Delta against 7073316679. All eight of its findings are closed.
① Derived judgmentsAccept set, against the current card body:
Public surface:
② Semver level
Clause-②: yes (widening) — RIGHT. The PR body and the changeset both read it line-initially, and the surface listed matches the diff: optional props and one new key, nothing removed or renamed. ③ Boundary flagsThe dev's small calls (PR body, "Small calls made in this thread"):
No Card 没有核对的:
Card 验收, "PR 正文附点「添加分组字段」后的截图": should-fix (S2). The body names the screenshots under a local SQL push-down (Prime Directive 5): no finding. Nothing new materialises ids and nothing joins in the app. The change filters and orders field metadata the client already holds, and the grouped read still goes to the server's grouped query as before. Findings:
Implemented-by: VERDICT: PASS |
The View settings menu labelled grouping levels from the columns only, so a field the Group level now offers beyond them (the record owner, an object field the view does not show) read as its machine name on the menu's Group row and on its level. The host hands the popover the same label function the toolbar editor uses. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgXeD1yUYqBJm8uzRrP
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-22T04:45Z. Delta brief for the declaration-face reviewer on PR #36223 ( |
|
repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4 席位核对 — delta ACCEPT (L1-b)Head-sha: 89c8290 · read 2026-11-22T04:47Z · prior delta ACCEPT 7074055354 @953c8cbf · delta 953c8cb..89c8290, one commit (the L2's S1) · card #36204 unchanged since 03:05:41Z 维护者速读这次只修了一个显示问题。在「视图设置」里选一个不在列表列里的字段来分组,比如「记录负责人」时,分组那一行和这一级以前显示的是内部字段名(owner_id),现在显示字段的中文名。行为和上一版审过的一样,没有新的风险。 Must-fixNone. Should-fixNone. NitsNone. Checked
OwedThe seat's declaration L2 delta, which runs in parallel. |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: This is a delta round on top of the PASS record on 953c8cb. That record found two should-fixes (S1, S2) and four nits (N1–N4). What I read this round:
The rest of the net diff is unchanged since 953c8cb, so every judgment in the earlier record still stands. ① Derived judgments
Public surface. ② Semver level
Clause-②: yes (widening) — RIGHT, unchanged. The one prop this commit adds is module-internal, so the declared surface still matches what the diff publishes. ③ Boundary flags
Findings:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat landing · 2026-11-22T04:48Z · #36204, 添加分组, built to the card's current body (rewrite note 7072750584, claim amend 7073321855). "Add group field" has no default: the dropdown opens and only a pick groups the list. Escape writes nothing, and no request goes out before a pick. The dropdown offers only single-valued select, radio, boolean, toggle, user, lookup, master_detail and tree fields: the columns first in column order, then the object's other groupable fields, business before system. created_by and updated_by appear only when shown as columns. With nothing to offer, the button is disabled and says why (new key Reviews:
Gates on this head (
The seat readies this PR and arms auto-merge in the same step. The PR carries |
…sole build (objectstack-ai#36288) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X6okWxYPWAsooBsJoAhnT1u)_ Fixes objectstack-ai#35280 Clause-②: no Metadata-protocol: none ## 维护者速读 - 控制台用户打开「帮助 → 关于」时,先看到 ObjectStack 版本号(如 18.5.0),再看到原有的控制台构建号;以前只有构建号。 - 属于控制台体验修缮:管理员和支持人员查版本、做升级核对时不必再去调接口。 - 若读取失败,版本一行会用文字说明「未知版本」,不会留空;改动只在对话框内,可直接撤回。 - 无。 ## What changes Help → About now opens on an **ObjectStack version** row, then the existing **Console build** row. - The version is the `version` the discovery document answers, shown verbatim (an operator's `OS_RUNTIME_VERSION` stamp included, per ruling A on objectstack-ai#34774). It is read through the shell's adapter (`useAdapter().getDiscovery()`), which returns the document the adapter's `connect()` already holds from the console's one shared discovery read (`getSharedDiscovery`). Opening the dialog sends no new request, and no second version source is added. - While the read is in flight the row shows `common.loading`. When discovery cannot be read (the adapter answers `null`) or names no version, the row says so in words: "Unknown version (the server did not report one)". The field is never empty. - New keys `help.aboutVersion` and `help.aboutVersionUnknown` in all eleven packs (zh-Hant regenerated with `gen:zh-hant`). `help.aboutDescription` now names both rows. - `AboutDialog.tsx`'s module doc no longer says the shell has no request that reads the runtime version. - The bug-report and feature-request templates' Version hint now points at "the ObjectStack version shown under About". - No server, `packages/spec` or discovery-shape change. No props or exports change. Files to read first, by risk: 1. `ui/packages/app-shell/src/layout/AboutDialog.tsx`: the `useRuntimeVersion` hook (the read, the `undefined`/`null`/string states) and the two `dl` rows. 2. `ui/packages/app-shell/src/layout/__tests__/AppHeader.aboutBuild-12970.test.tsx`: the new top-level describe. 3. `ui/packages/i18n/src/locales/en.ts`: the three `help.about*` lines (the other ten packs mirror them). Two-minute check: run `pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/AppHeader.aboutBuild-12970.test.tsx`. You should see 15 tests pass. Or open Help → About in a running console: the first row is "ObjectStack version" with the same value as `GET /api/v1/discovery`, and "Console build" is the second row. ## Tests The new pins are a top-level describe in the existing About harness, `AppHeader.aboutBuild-12970.test.tsx`. They are not in a sibling file because AGENTS.md puts a new pin into a component's existing shared harness (ruling record 6583487846). The new cases check: - Discovery answering `18.5.0`, and a stamped `18.6.0-rc.2+deploy.41`, fills the first row with exactly that text. The `dt` order is version then build, and the build row still shows its sha. - Discovery that cannot be read (`null`), that names no version, or that names an empty version shows `help.aboutVersionUnknown`, never an empty field. - While the read is pending the row shows `common.loading`. <details><summary>Local runs at head 3298438, under the shared verify lock</summary> - The pin file: Test Files 1 passed (1), Tests 15 passed (15). - `pnpm --dir ui exec vitest run packages/i18n/`: Test Files 105 passed (105), Tests 1962 passed, 13 skipped. This covers the key-parity suites. - `pnpm --filter @object-ui/i18n type-check` exit 0. `pnpm --filter @object-ui/app-shell type-check` exit 0 (both `tsc` programs, including `tsconfig.test.json`). </details> <details><summary>Ablation, one mutation per leg, each landed and restored on disk by scripts/ablation-replace.mjs</summary> Each mutation was restored and checked: blob equals HEAD 0aabb59 and `git diff HEAD` is empty. | Mutation | Pin file result | |---|---| | read: `setVersion(discoveryVersion(discovery))` becomes `setVersion(null)` | 2 failed, 13 passed | | fallback: `help.aboutVersionUnknown` becomes `common.loading` | 3 failed, 12 passed | | loading: loading text becomes `null` | 1 failed, 14 passed | | order: build row moved above the version row | 2 failed, 13 passed | </details> ## Acceptance notes - The discovery read reuses the adapter the help menu already holds. Nothing in the shell kept the parsed discovery document in React state: `useDiscovery` in `@object-ui/react` reads `SchemaRendererContext`, which the console header does not sit under. `adapter.getDiscovery()` is the existing holder. - `.github/ISSUE_TEMPLATE/**` is not a governed surface: it has no row in `GOVERNED_SURFACES`, which holds only `.github/workflows/**`. The wording change is in this PR. - No `content/docs/frontend` page or package README names the About dialog, so no docs page changes. - Not measured locally: - `pnpm check:type-check-debt`: exit 3, PREREQUISITE NOT MET. Its closure build never got the verify lock (queue-timeout). - `pnpm --dir ui exec vitest run scripts/`: lock queue-timeout, exit 99. This diff touches no `ui/scripts/` file. - CI's Test UI and the type-check lanes run both of these. ## Verification <details><summary>Local gate subset (derived by dispatch-gates --commands from this diff)</summary> - 46 of the 48 derived commands, plus `pnpm check:changeset-fixed`, exited 0. This includes `check:adr-0087-registration --base origin/main`, `check-empty-changeset`, `check-changeset-no-major`, `check:nul-bytes`, `check:cross-package-test-inputs`, `check:published-files`, `check:type-check-coverage` and `check:undeclared-dep-imports`. - Two commands were not measured, both listed above. - `ui` `check:new-line-citations`: 0 new citations. - `overlap-check`: VERDICT clean (main and objectstack-ai#36234 / objectstack-ai#36223, which share the locale files, merge cleanly). </details> Session: session_01FEkQ5oK4fFfnLADcipbEeT · dispatched by repo:objectstack#4 area a4-H. --------- Co-authored-by: Claude <noreply@anthropic.com>
…he Chinese stream says 动态 (objectstack-ai#36317) repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XTRdLmK9YYgMSCJ7NH2PuUY)_ Fixes objectstack-ai#36148 Clause-②: no Metadata-protocol: none Ruling-ref: 7074372050 ## 维护者速读 - 记录页「动态」里的筛选从「全部 · 活动 · 讨论 · 变更」改为「全部 · 事件 · 讨论 · 变更」,英文 Events;中文的空状态改为「暂无动态」,旧标题、无权限、加载失败和筛选读屏标签都改说「动态」。 - 按你 04:45 选的 A(「A 改叫「事件」」)执行;每个筛选装什么不变,「变更」仍只放带前后值的字段变更(objectstack-ai#30074 裁定 C)。 - 出错时最坏是某个语言的筛选或空状态字眼不对,不影响数据;只改语言包的值和一处英文兜底,可直接撤回。 - 无 ## What changes - `detail.streamActivity` (the stream's events chip): zh-Hans and zh-Hant 「事件」, en `Events`, and each other pack's own word for events: de `Ereignisse`, es `Eventos`, fr `Événements`, ja `イベント`, ko `이벤트`, pt-BR `Eventos`, ru `События`, ar `الأحداث`. The row reads 「全部 · 事件 · 讨论 · 变更」. What the chip holds is unchanged (ruling 6649643659 on objectstack-ai#30074, option C). - zh-Hans and zh-Hant only, the rest of the stream takes the tab's word: `detail.noActivity` 「暂无动态」 / 「暫無動態」 (the panel's one empty state, drawn under every chip), `detail.activity` 「动态」 / 「動態」 (now equal to `detail.timeline`, as in the other nine packs), `detail.activityAccessDenied`, `detail.activityLoadFailed` and `detail.filterActivity` say 动态. The other packs keep those four values. - `RecordActivityTimeline.tsx`: the events chip's in-code English fallback follows the pack (`'Events'`); comments naming the chip row updated there and in `recordTimelineStream.ts`. - Values only: no key added, renamed or removed. zh-Hant matches what `gen:zh-hant` writes (the generator left the pack unchanged after the edit). Read first, by risk: 1. `ui/packages/i18n/src/locales/zh-Hans.ts` — the six `detail` values. 2. `ui/packages/i18n/src/locales/en.ts` — `streamActivity: 'Events'`. 3. `ui/packages/i18n/src/__tests__/timelineFilterWording-36148.test.ts` — the new pins. Two-minute verification: `pnpm --dir ui exec vitest run packages/i18n/src/__tests__/timelineFilterWording-36148.test.ts` from the repo root; expect 16 passed. ## Tests - New `timelineFilterWording-36148.test.ts` (i18n): in zh-Hans and zh-Hant no string the stream draws (title, chips, empty, access-denied, load-failed, filter label) says 活动 / 活動, and the chip, empty state and title read 事件 / 暂无动态 / 动态; en names the chip Events; in every pack the events chip differs from the tab word, the stream title and the field-history chip. - Old pins updated to the ruled words: `ActivityTimeline.i18n.test.tsx` (zh empty state), `ActivityTimeline.remainingLiterals.i18n.test.tsx` (zh card title, whole zh card text, chip group label), `detail-landmark-aria-i18n-4645.test.tsx` (zh landmark name). - Ablation (one-off, not kept): zh-Hans `streamActivity` set back to 「活动」 on disk after the commit: 2 failed / 14 passed ("no string the stream draws says 活动", "the chip reads 事件 …"); restored with `git checkout HEAD --`, 16 passed. ## Acceptance notes - Done-when, measured live: hotcrm (18.6.0 server, `pnpm dev` on a fresh database) with this branch's Console source (Vite, `DEV_PROXY_TARGET` to the hotcrm server), a zh-CN browser, admin user, a seeded lead. The record tab row reads 「线索 · 客户 · 活动 · 活动参与者 · 任务 · 营销活动成员 2 · 动态 2」 and the stream heads 「动态 (2)」. Every 活动 on the page is one of hotcrm's own labels (the `crm_event` tab and nav entry, 活动参与者, 营销活动成员, 销售活动). On this page the 动态 tab is a slotted page's `record:chatter`, which since objectstack-ai#36221 lists the system history alone, so no chip row draws there; the chips and empty state are pinned by the tests above rather than by this page. - Out of the claim's declared surface (locale packs): `ui/packages/plugin-detail/src/RecordActivityTimeline.tsx` (the en fallback, named by the ruling), `ui/packages/plugin-detail/src/recordTimelineStream.ts` (comments only) and three plugin-detail pin tests. None is a seat-1 hot file. - Out of the claim's declared surface, added at `dd26af31`: `ui/packages/components/src/renderers/layout/containers.tsx`, `KNOWN_LABEL_DICT` `Activity` 「活动」/「活動」 → 「动态」/「動態」, with `@object-ui/components` in the changeset. Why: it is the page-tab strip's own copy of the label, read ahead of the pack, so without it an authored `Activity` tab kept 活动 and `page-tabs-builtin-label-i18n-4645.test.tsx` went red on `12a825da` (Test UI 4/16). Ruling 7074372050 item 3 sets an authored `Activity` tab to 动态, the same word as `detail.timeline`. Claim amended on objectstack-ai#36148 for this file and `RecordActivityTimeline.tsx`. - Residual (stated, not a defect): in zh an `Activity` tab and the `Activity stream` tab both read 动态. Both draw on one strip only when a page author writes both labels. Measured: the synthesized record page writes only `Activity stream` (`buildDefaultPageSchema.ts:1094`); no authored `Activity` page tab in `examples/**` or hotcrm (the `'Activity'` hits are an object label and a nav group). The equality is the ruling's choice (item 3). - Not changed, measured: `useDetailTranslation.ts` has no `detail.streamActivity` default, so there is no second English fallback for the chip. ## Verification Readings at head `12a825da`, taken under `scripts/pm/os-verify-lock.sh` (shared box). <details><summary>Packages (green)</summary> - `pnpm --dir ui exec vitest run packages/i18n/`: Test Files 106 passed (106); Tests 1978 passed, 13 skipped. - `pnpm --dir ui exec vitest run packages/plugin-detail/` before the pin updates: 4 failed in the two `ActivityTimeline` i18n files (old zh strings), 405 files passed; after the updates those two files: 20 passed (20). - `pnpm --filter @object-ui/i18n run type-check` (both projects): exit 0. `eslint` on the 10 touched TS files: 0 errors (one pre-existing `react-refresh` warning at `RecordActivityTimeline.tsx:263`, an untouched line). - `node ui/packages/i18n/scripts/gen-zh-hant.mjs`: no file changed. </details> <details><summary>Derived gates</summary> - `node scripts/pm/dispatch-gates.mjs --commands` derived 41 commands for this diff; all 41 ran and exited 0, among them `check:nul-bytes`, `check:published-files`, `check:cross-package-test-inputs`, `check:test-source-alias`, `check:type-check-coverage`, `check:type-check-debt` (0 entries re-measured, none above its number), `check-sdui-manifest`, `check-adr-0087-registration --base origin/main`, `check-empty-changeset --base origin/main`, `check-changeset-no-major --base origin/main` and `pnpm --dir ui exec vitest run scripts/` (Test Files 172 passed, 2 skipped; Tests 5122 passed, 2 skipped). - `--ran` reconciliation: 41 derived, 41 run, 0 NOT-MEASURED, 0 UNRUN, every line carrying its exit code. - `node scripts/pm/overlap-check.mjs --branch=claude/project-thread-r2g68m`: VERDICT clean against origin/main and the three open PRs that share the locale files (objectstack-ai#36295, objectstack-ai#36288, objectstack-ai#36223). - Type-check lanes, `check:i18n` (its prerequisite is the CLI build closure; this diff touches no `translations/*.generated.ts`) and the repo-wide lint are CI's. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5oHi42qJhgAop8CaLs)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FEkQ5oHi42qJhgAop8CaLs --------- Co-authored-by: Claude <noreply@anthropic.com>
…the default list toolbar (objectstack-ai#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 objectstack-ai#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 objectstack-ai#36343 (shares `ListView.tsx`), merges cleanly. Earlier run: clean against objectstack-ai#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>
Requested by Sales · project thread
Fixes #36204
Clause-②: yes (widening) —
@object-ui/components'sGroupingEditorgains the optional propsaskFieldOnAdd,fieldOptionsLoadingandfieldLabel, and itslabelsthe optionalnoFields;@object-ui/i18ngainslist.noGroupableFieldsin every locale (zh-Hant regenerated); nothing removed or renamed.@object-ui/plugin-list's package exports are unchanged.Metadata-protocol: none
维护者速读
What changes
The card was rewritten after this PR's first version (rewrite note 7072750584, claim amend 7073321855): the first version's "default to the first single select" and "suitable types first, others still selectable" are both gone. In both Group editors (the wide toolbar's Group panel and the 视图设置 menu's Group level):
isGroupableField):select,radio,boolean,toggle,user,lookup,master_detail,tree, and notmultiple: true. Order: the view's columns in the reader's column order (schema.columnState.order), then the object's other fields of those types the reader may read and the definition does not hide, business fields before system ones (the Filter panel's tiers).aria-describedbyon the reason 「没有可以用来分组的字段」 / "No field here can group the list".onGroupingChangeto the host'slistDraft.patchand the URL, as before.Not changed, per the card: the group display, kanban, date grouping. A view already grouped by another kind of field keeps its level, shown under the field's label (
fieldLabel), and the level can still be changed or removed.Code:
@object-ui/componentsGroupingEditor:askFieldOnAdd(the pending row, testidgrouping-field-pending),fieldOptionsLoading,labels.noFields(disabled button +grouping-no-fields),fieldLabel. Without them the editor behaves as before.@object-ui/plugin-listListView: onegroupOptionslist and onegroupFieldLabelfor both editors;ViewSettingsPopovertakesgroupOptions/groupOptionsLoadingfrom it (groupFieldOptionsandisGroupableFieldare module helpers, not package exports).allFieldscarriestypeandmultiplefrom the definition.records-forms.grid-personalizationrev 11 (after feat(console): keep list column widths, row height and tab order in this browser only #36133's rev 10): steps[3] says the dropdown opens without grouping, lists only groupable fields, and Status is picked there.Small calls made in this thread (Sales 22:19:27Z rule)
getObjectSchema, or the read failed), no type is known and every column is offered, as before. Both pinned.statustype; a status is aselect.radiocounts as a single select.master_detailandtreebesidelookup; "tick" includestogglebesideboolean.RestServer.normalizeConfigstill castscrud/metadata/batch/routesinstead of parsing them —batch.maxBatchSizebounds and three declared enums never execute #11984).Verification
ui/packages/components/src/__tests__/grouping-editor-add-default-36204.test.tsx(11): the click writes nothing and opens the dropdown; a pick writes the level; second level; Escape writes nothing;noFieldsdisabled + described; loading disabled without a reason; enabled when options arrive;fieldLabel; three CONTROLs without the new props.ui/packages/plugin-list/src/__tests__/ListView.groupAddDefault-36204.test.tsx(16), both editors: the click writes nothing, the dropdown is Industry, Owner, Stage, VIP, Parent account, Record owner (no name, text, date, number, multi-select, hidden field, unshown created-by), a pick writes the level with nocreate/update/delete; Escape; no groupable field → disabled + reason; second level; column order; created-by as a column is offered; a view grouped by name shows "Customer name" and can change; loading → disabled without reason, enabled once the definition answers; CONTROL with no definition offers every column; View settings labels a non-column pick (Record owner) on its level and on the menu's Group row; the helper functions.main'sgrouping-editor.tsx,ListView.tsxandViewSettingsPopover.tsxswapped in, 22 of these 26 fail; the other four include the three editor CONTROLs. The View settings label pin added at89c82900fails with that commit's one-line host change reverted.ListView.harness(Console list view: the personal "Group" picker offers formula fields, and picking one turns the whole list into a "数据加载失败" error page (the server refuses a formula group key since #29304) #32631: fields typed, CONTROL re-reads the level options after the pick),ListView.onGroupingChange-11860(stub answersgetObjectSchema; the add picks from the dropdown),ListView.fieldListRead-11984(the Group list offersStatus/Secret Statusonly; the full-read control probes Group with the select),ObjectView.listUrlState-11860(no definition there, so every column,prioritypicked).vitest runpackages/plugin-list, componentsgrouping*+list-builders*, app-shellObjectView.listUrlState-11860, packages/i18n: 293 files, 4039 passed / 13 skipped.tsc --noEmitandtsconfig.test.json: components, plugin-list, app-shell, i18n, exit 0. ESLint on changed files: 0 errors.check-platform-checklist.mjs: OK. Changeset checks: OK.Evidence (1440×900 @2x, zh-CN, light and dark;
/mnt/project-files/build-seat1/36204/, index in itsREADME.md)Console from this branch's
ui/; every non-GET request recorded in the page.com.demo.kehu), 「全部客户」 (客户名称, 所属行业, 负责人, 电话):v2-1440-{light,dark}-kehu-all-1-after-add-dropdown.png— the click opens the dropdown (所属行业, 负责人), list not grouped, no request.-2-list-grouped.png— after picking 所属行业: 4 groups of 3, 「放弃」「保存」; the only request is the grouped readPOST /api/v1/data/kehu_customer/query.v2-…-kehu-contact-1-after-add-dropdown.png(负责人, then the non-column 所属行业),-2-closed-no-pick.png(Escape: no level, no 「放弃」「保存」, no request).v2-…-kehu-visit-*— dropdown 负责人 only.ownership: 'org', no owner; only text, textarea, number, date, multi-select):v2-…-kehu-note-nofield-0-group-panel.png— disabled, 「没有可以用来分组的字段」, a click does nothing.main6090c83) 客户 → 全部客户:v2-…-hotcrm-accounts-1-after-add-dropdown.png— 行业, 类型, 健康度, 商务能力, 付款周期, 销售区域, 母公司, 是否活跃, 审批状态, 来源线索, 客户分层, 客户细分, 客户负责人; no write, not grouped.-2-list-grouped.png— grouped by 行业, 「放弃」「保存」; only the grouped read.before-*shots showmain(one click groups by 客户名称, 12 groups of one).v1/holds this PR's superseded first version.Since the first reads (L1-b ACCEPT 7073310792, L2 FAIL 7073316679)
The rework answers the L2's four must-fixes (default, filter, disabled state, rewrite note) and its should-fixes (untyped-field rule + test, checklist, changeset, body). Nits: the plugin-list members are out of Clause-② (not package-public); the harness CONTROL re-checks the level options after the pick. Heads:
4e90470e(rework),953c8cbf(record owner offered, provenance only as a column; L1-b delta ACCEPT 7074055354, declaration L2 delta PASS 7074084200),89c82900(L2 S1:ListViewhandsgroupFieldLabeltoViewSettingsPopover, which labels the menu's Group row and the level with it, so a non-column pick no longer reads asowner_id/industry; pinned; browser: 「联系方式」 pick 所属行业, the row reads 「分组 所属行业」,v2-1440-{light,dark}-kehu-contact-3-menu-row-noncolumn.png. L2 N4: the changeset headline isfix(list)like the title).Overlap
mainmerged after #36133 (0d8fc77b): the one conflict wasrecords-forms.grid-personalization, resolved by keeping #36133's steps[2] and rev 10 row; this PR's row is rev 11.Human Minimum
packages/specholds no runtime logic. (Not touched.)pnpm lintpasses (changed files: 0 errors).main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgXeD1yUYqBJm8uzRrP