Repository navigation
Commit 10cbfac
fix(plugin-grid): a bulk action's result lists each refused record by its title (#27996)
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg4i9JiKjEjwtuVzd4gKy9hB)_
## 维护者速读
- 改了什么:列表批量操作的结果面板里,每条被拒绝的记录现在按记录标题列出(如「Grace Hopper: 已在该活动中」),不再只显示记录
ID。
- 为什么改:#27380 第 1 行要求「列出每一条拒绝,并带上它的记录」;实测当前 main 上计数已按每行的真实回答统计(被拒的行进
Failed),缺的只是记录的名字。
- 风险与回滚:只改结果面板一处标签的文字来源,计数、重试、错误 CSV 都不变;回滚即还原 BulkActionDialog.tsx 一处。
- 先看:`ui/packages/plugin-grid/src/components/BulkActionDialog.tsx` 的
`refusedRecordName`;测试 `bulkResultPerRecord-27380.test.tsx`。
- 两分钟验证:`pnpm --dir ui exec vitest run
packages/plugin-grid/src/__tests__/bulkResultPerRecord-27380.test.tsx`,预期
3 个用例全绿。
- 需要你做的:无,席位落地。
Fixes #27380
Clause-②: no
Metadata-protocol: none
## What changes
`BulkActionDialog`'s result panel lists each refusal under the record it
refused. The label used to be the record's raw id; it is now the
record's title, resolved by the same `affectedRecordName` the confirm
step already uses to list the affected records (the declared
`nameField`, or the resolver's `Record #ID` floor). An entry that is not
a record of the run (a row with no id, a batch the server answered with
a count only) keeps its id. Counts, Retry and the error CSV are
unchanged.
This PR takes row 1 of #27380. Rows 2, 3 and 4 are carded by the seat:
row 2 is #27999 (Blocked-by #27907, which holds the file it needs), rows
3 and 4 are #28000 and #28001 (spec and server changes). With every row
owned, this PR closes the card.
## Tests
`ui/packages/plugin-grid/src/__tests__/bulkResultPerRecord-27380.test.tsx`
drives the real `ObjectGrid`, a real `ActionProvider` and the real
`createServerActionHandler` over a transport that answers per record
(HotCRM's "Add to Campaign" shape, three leads, two refused with a 400):
- the counts follow each record's own answer (`Succeeded 1 / 3 · Failed
2`): already true on `main`, pinned so it stays true;
- every refusal is listed under its record, by the record's title;
- a clean run reports `Succeeded 3 / 3` and no refusal list.
## Acceptance notes
- Row 1, measured on `main` 5f6dc96 through the chain above: a record
whose dispatch is refused already counts as failed and is listed; the
card's "Succeeded 2 / 2 whatever each row did" did not reproduce for a
refusal the server answers with a 4xx. A handler that answers 200 for a
record it did nothing to is a success by the `/actions` door's contract
(a handler that refuses throws, which the door answers 400), so that
half needs no platform change.
- Row 1's "shows only the last refusal" did not reproduce either: the
per-record path lists every refusal (three records, two refusals, both
listed).
## Verification
Head `17fa19bc` (`main` merged in). Local subset only; every family CI
runs is read from this PR's check-runs.
- `pnpm --dir ui exec vitest run packages/plugin-grid/`: lock VERDICT
command-exit 0, Test Files 261 passed (261), Tests 2289 passed (2289).
- `pnpm --filter @object-ui/plugin-grid run type-check`: lock VERDICT
command-exit 0.
- Ablation (fix committed first, mutation through
`scripts/ablation-replace.mjs`): the result label put back to the raw
id, anchor 1 to 0 on disk, `lists every refusal, each under the record
it refused, by that record's title` fails (expected `Grace Hopper`,
received `lead_2:`), 1 failed and 2 passed; restored, blob equals HEAD
and `git diff HEAD` empty.
- `node scripts/pm/dispatch-gates.mjs --ran`: 34 derived, 34 run, 0
NOT-MEASURED, 0 UNRUN.
- `node scripts/check-new-cross-file-line-citations.mjs` (from `ui/`): 0
new citations.
<details><summary>Derived gate families (34), each command and its exit
code</summary>
```text
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-sdui-manifest.mjs :: exit 0
node scripts/check-sdui-manifest.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --dir ui exec vitest run scripts/ :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-changeset-deadline-census :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
```
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Utp6CZM489wSkBwix6Gjde)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 3a09125 commit 10cbfac
3 files changed
Lines changed: 172 additions & 1 deletion
File tree
- .changeset
- ui/packages/plugin-grid/src
- __tests__
- components
| 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 | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
391 | 399 | | |
392 | 400 | | |
393 | 401 | | |
| |||
571 | 579 | | |
572 | 580 | | |
573 | 581 | | |
574 | | - | |
| 582 | + | |
575 | 583 | | |
576 | 584 | | |
577 | 585 | | |
| |||
0 commit comments