Repository navigation
feat(plugin-grid): report an aggregate bulk handler's BulkActionResult per row - #35362
Conversation
…per row An execution: 'aggregate' bulk run now reads the handler's resolve value against the dispatched selection: moved rows, refused rows with their message, and rows named in neither list reported as not confirmed. A value carrying succeeded/failed that does not parse is one unreadable outcome. Drops the PLANNED marker from BulkActionResultSchema. Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
…tally Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): ⛔ 1 release-owned page(s) name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 174 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0fea33c6f14ebc1ca6a05494db69ffb4531a22a4 && git checkout 0fea33c6f14ebc1ca6a05494db69ffb4531a22a4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 35c6331094ad944ddce5d717ffc7015e53ae4796 2244a349ee3b9711bd94bc5a9b0a8886f4b4c7cd && git checkout -B drift-repro 35c6331094ad944ddce5d717ffc7015e53ae4796 && git merge --no-ff 2244a349ee3b9711bd94bc5a9b0a8886f4b4c7cd
node scripts/docs-audit/affected-docs.mjs --json 35c6331094ad944ddce5d717ffc7015e53ae4796
|
|
repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB Final head for review · area data-2 · 2026-11-19T06:47Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head
|
|
repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB Final head for review (post-merge, per L1-a ACCEPT 7001997180 condition 1) · area data-2 · 2026-11-19T07:23Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Inputs read: card #34269 (body and all 7 comments), PR #35362 (body, file list, net diff against ① Derived judgments
② Semver levelClause-②: yes — correct. The PR adds three keys to each published
Level: ③ Boundary flags
④ Design judgment
Attempts to break it, all held: a Implementing files. Findings:
No must-fix. S1 is open on this head and earns a delta review of its fix. Implemented-by: VERDICT: PASS |
…the reader by package Claude-Session: https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB Delta round on L2 contract review 7002682625 (PASS, S1 open). New head
No other change. Gates on
|
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Delta review of round 1, record 7002682625 on ① Derived judgments
② Semver levelClause-②: yes — unchanged and correct (three keys added to each published The new ③ Boundary flags
④ Design judgment
Search for any other place still teaching the retired rule, over
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB Landing · area data-2 · 2026-11-19T08:16Z
State: draft → ready + auto-merge (merge queue). #34269 closes on merge via |
Fixes #34269
Clause-②: yes
Metadata-protocol: none
维护者速读
execution: 'aggregate'的处理器若返回{ succeeded, failed }(BulkActionResult),结果面板按行报告:成功数、失败行及其原因、未确认的行;返回值带这两个成员却解析不了的,报「结果无法读取」,不再当全成功。@objectstack/spec/ui声明,但没有读取方。succeeded/failed表示别的东西(例如计数),会从「全成功」变成「无法读取」,已在 changeset 中声明;回滚即还原本 PR。ui/packages/plugin-grid/src/hooks/useBulkExecutor.ts(readAggregateResult与聚合分支)、ui/packages/plugin-grid/src/ObjectGrid.tsx(runBulkActionAggregate现在返回处理器的值)、ui/packages/plugin-grid/src/components/BulkActionDialog.tsx(两个新结果形态)。pnpm --dir ui exec vitest run packages/plugin-grid/src/__tests__/objectBulkActionDispatch.test.tsx -t "BulkActionResult per row",预期 5 个用例通过。What changes
execution: 'aggregate'dispatch only, the grid's bulk executor reads the handler's resolve value against the ids it dispatched (params._selectedIds) withreadAggregateResult, parsing it withBulkActionResultSchemafrom@objectstack/spec/ui:succeedednor afailedown member (nothing, a summary, a link, an array) keeps today's report: every row covered;BulkResult.aggregateUnreadable), never full success;failedtwice the first entry's message wins, and a selected id in neither list is not confirmed (BulkResult.aggregateUnconfirmed), never succeeded.aggregateRejectionreport. The per-row result sits beside it as two new optionalBulkResultmembers, never inside it.ObjectGrid'srunBulkActionAggregatereturnedvoid, so no resolve value ever reached the executor. It now returns the handler's own value, read one level below the action envelope withreadActionPayload(the reader every other consumer ofActionResult.datauses). Closing the dialog re-reads the grid after an unreadable run or one that left rows unconfirmed, as it already did after a rejection.message(and in the error CSV), with no Retry (an aggregate run has no per-row slice). Unconfirmed rows get aNot confirmed Ntally and their own list. An unreadable run gets its own one-outcome panel with no per-row count.@object-ui/i18npack:grid.bulk.resultNotConfirmed,grid.bulk.notConfirmedRecords,grid.bulk.aggregateUnreadable;zh-Hantregenerated fromzh-Hans;resultNotConfirmedlisted as a count tally besideresultFailed.[PLANNED — not enforced]marker and the "until the reader lands" sentences are removed fromBulkActionResultSchema's TSDoc and.describe(), and the reference pagecontent/docs/references/ui/bulk-action.mdxis regenerated (check:generated --fix). The prose restates seat ruling 6905490575 option A and adds the card's first-entry-wins rule; no schema shape changes.content/docs/ui/views.mdxdrops "a handler that cannot cover the whole selection must reject" and says how a per-row answer is reported.succeededorfailedmember in another form (counts, or only one of the two lists) moves from the success report to "unreadable".Tests
useBulkExecutor.test.ts, new top-level describe "an aggregate run reads its BulkActionResult per row": one pin per reader rule (moved count + failed rows, outside-selection dropped, duplicate once, both lists then failed, firstfailedentry wins, neither list then not confirmed), four unreadable shapes (counts,errorinstead ofmessage, one member only, numeric ids), and a CONTROL over five neither-member values (nothing, null, a summary, a link, an array) asserting today's exact report.objectBulkActionDispatch.test.tsx, new top-level describe "an aggregate run reports its BulkActionResult per row": through the realObjectGrid,ActionProviderandcreateServerActionHandlerover the/actionssuccess envelope: partial result listed per row with no Retry; not-confirmed row listed by name and kept out of the succeeded list; all-unconfirmed run re-reads the grid once on close; unparseable{ succeeded: 2, failed: 0 }shows the unreadable panel and no count; CONTROL: a handler returning nothing keeps "Succeeded 2 / 2".Acceptance notes
useBulkExecutor.ts,BulkActionDialog.tsx, the spec file and reference page, the locale packs, new test files and.changeset/. This PR also edits:ObjectGrid.tsx: without its one-linereturn readActionPayload(res.data)the reader would only ever seeundefinedin the running console. This is the card's own defect (the resolve value is dropped), so it is fixed here.describe(ruling record 6583487846).count-families-11445.test.ts: the new count key, listed besidegrid.bulk.resultFailed.content/docs/ui/views.mdx: it stated the rule this PR retires.docs/audits/2026-07-unknown-key-strictness-ledger.md, in thebulk-action.zod.tsrow, still saysBulkActionResultSchemais PLANNED with nothing reading it. It is an internal audit ledger and no gate reads it; left for the seat.runResolvedActionAsRest) and skills teaching (skills: teach an aggregate bulk handler to resolve with BulkActionResult (skills/objectstack-ui/rules/actions.md) #34268) are out of scope, as the card says.Verification
Local runs on head 8870567.
Tests, typecheck, gate families (head 8870567)
pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-grid/src/__tests__/useBulkExecutor.test.ts packages/plugin-grid/src/__tests__/objectBulkActionDispatch.test.tsx: Test Files 2 passed (2), Tests 72 passed (72), lock VERDICT command-exit 0.pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-grid/ packages/i18n/(head d18360f): plugin-grid all green; i18n had 2 failures, now fixed:grid.bulk.resultNotConfirmedwas missing from the count-tally list, andzh-Hantneeded regenerating. Re-run ofpackages/i18n/on 8870567: Test Files 104 passed (104), Tests 1956 passed, 13 skipped.pnpm --filter @object-ui/plugin-grid run type-check && pnpm --filter @object-ui/i18n run type-check: VERDICT command-exit 0 (tsconfig.test.jsoncompiles the tests).pnpm --filter @objectstack/spec buildexit 0;check:generatednamedcheck:docsstale (expected, describe changed),--fixregeneratedcontent/docs/references/ui/bulk-action.mdx, exit 0.node scripts/pm/dispatch-gates.mjs --commandson 8870567: 113 families, all run;--ranreconciliation: 110 run exit 0, 3 NOT-MEASURED (exit 3, PREREQUISITE NOT MET), 0 UNRUN.check-plugin-teardown-shape --self-test: shallow clone missing its pinned fixture commit; after fetching that commit, re-run exit 0 (checker-health only).check:skill-examples: client-react was not built; after building it, re-run exit 0 (345 prose examples type-check).check:dual-build-cjs-loads: NOT MEASURED, needs a whole-treepnpm build(35 packages without dist); CI runs it.node scripts/pm/overlap-check.mjsbefore each push: VERDICT clean exit 0 (shares only locale packs with fix(console): Notification Settings is read-only, with its reason, for a caller with no write grant #35313 and feat(security, create-objectstack): an AI-built app with its own capabilities and no connector plugins installs as an unmanaged copy #35261, both merge cleanly).Generated by Claude Code