Repository navigation
Commit c23eafa
fix(plugin-list): offer the In a queue filter only where the platform provisions the storage (#30528)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuXpPPZiBKyj1HzrdQ6La3ZH)_
domain:ui#6 · os-sales · session_01L6bhgUR8Nu4M7tbtgES7q2
Fixes #30372
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:外部(联邦)对象的列表不再显示「在队列中」筛选;普通的 `ownership: user` 对象照旧显示。
- 为什么改:外部对象虽然被注入了平台的 `queue` 列,但表结构归远端数据库,该列没有存储,任何一行都不可能进入队列,这个筛选只是噪音。
- 风险与回滚:风险低,只多了一个前置判断,读的是 spec 已有的 `platformProvisionsStorage`;回滚即还原
`ListView.tsx` 中那一行。
- 先看:`ui/packages/plugin-list/src/ListView.tsx` 的
`objectHasOwnershipQueue`(新增首行判断),再看同目录测试文件末尾新增的 describe 块。
- 两分钟验证:`pnpm --dir ui exec vitest run
packages/plugin-list/src/__tests__/ListView.queueSittingFilter-25769.test.tsx`,预期
15 个测试全部通过。
- 需要你做的:无,席位落地。
## What changes
- `objectHasOwnershipQueue` (plugin-list `ListView.tsx`) now also
requires `platformProvisionsStorage(objectDef)` from
`@objectstack/spec/data`. On an ADR-0015 `external` object the remote
database owns the schema, so the injected `queue` column has no storage
and no row can ever sit in a queue (assignment rules skip such objects
through `carriesQueueColumn` already). The toggle `queueFilterOffered`
therefore stays hidden there.
- The import joins the module's existing static `@objectstack/spec/data`
import (`resolveInjectedSystemColumns`, `resolveSearchFieldResolution`),
so it opens no new subpath in the Console's eager closure.
`check:eager-closure` is CI's (Build and E2E UI); not measured locally.
- No `packages/**` change: per the server seat's measurement on the
card, `/meta/object/...` already serves the `external` block, so the
console can read the signal.
## Tests
Three pins as a new top-level `describe` in the existing harness
`ListView.queueSittingFilter-25769.test.tsx`:
- `objectHasOwnershipQueue` is false on an external object carrying the
injected column, in map and array `fields` form;
- a mounted list of an external object with the injected `queue` column
and `hasAnyQueue: true` renders no toggle;
- an ordinary `ownership: 'user'` object still renders it.
The external fixture is spec-shaped (`datasource: 'legacy_erp'`,
`external: { remoteName, writable: false }`).
## Acceptance notes
- The fix covers every federated object, not only read-only ones: the
injected column is unprovisioned on all of them (server seat's reading
on the card).
## Verification
All readings at head `9a22376034`, worktree on `origin/main`
`a1d0b1ee9e`.
<details><summary>Positive control (ablation of the new guard)</summary>
Fix committed first; `node scripts/ablation-replace.mjs --delete` on the
anchor `if (!platformProvisionsStorage(objectDef)) return false;`
(anchor 1 to 0, blob 24b6311 to 1945b6c6c1e4). plugin-list resolves
to `src` through the ui vitest alias, so no build is between the edit
and the run.
- Mutated: `Tests 2 failed | 13 passed (15)`; the two external pins red,
the ordinary-object pin green.
- Restored: blob equals HEAD (24b6311), `git diff HEAD` empty;
`Tests 15 passed (15)`.
- A first attempt never acquired the verification lock (`queue-timeout
(exit 99)`), restored by the tool, and counts as not run.
</details>
<details><summary>Package tests and type-check</summary>
- `pnpm --filter '@object-ui/plugin-list^...' build`: lock VERDICT
command-exit 0.
- `pnpm --dir ui exec vitest run packages/plugin-list/`: `Test Files 189
passed (189)`, `Tests 1816 passed (1816)`, exit 0.
- `pnpm --filter @object-ui/plugin-list type-check` (`tsc --noEmit &&
tsc -p tsconfig.test.json`): exit 0.
</details>
<details><summary>Derived gates</summary>
`node scripts/pm/dispatch-gates.mjs --ran`: 35 derived families
accounted for, 35 run, 0 NOT-MEASURED (all with an exit code recorded,
all 0). Includes `pnpm --dir ui exec vitest run scripts/` (`Tests 4985
passed | 2 skipped`). Also run: `pnpm check:changeset-fixed` exit 0
(roster under `.changeset`), `pnpm check:new-line-citations` 0 new
citations.
Type-check lanes and repo-wide families are CI's.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgUR8Nu4M7tbtgES7q2
<!-- signed: domain:ui#6 · os-sales · session_01L6bhgUR8Nu4M7tbtgES7q2
-->
Co-authored-by: Claude <noreply@anthropic.com>1 parent 35a8f08 commit c23eafa
3 files changed
Lines changed: 48 additions & 3 deletions
File tree
- .changeset
- 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
999 | 999 | | |
1000 | 1000 | | |
1001 | 1001 | | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
1002 | 1009 | | |
1003 | 1010 | | |
| 1011 | + | |
1004 | 1012 | | |
1005 | 1013 | | |
1006 | 1014 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | | - | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | | - | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
0 commit comments