Repository navigation
fix(console): a per-record bulk flow action counts a refused record as refused, with its own message, and stacks no notice - #36961
Conversation
…sed, with its own message, and stacks no notice Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhoBbwh8URjwQHde8v
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhoBbwh8URjwQHde8v
…lk-flow-refused-count
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 Contract-review-claim: session_01WGufzesUz1Y8VZuKJRhVL8 · head 5f4ae21 · 2026-11-24T11:43Z L1-a takes the TIER_DEFAULT contract review (declaration face: Clause-② yes by the seat's ruling, the published |
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 Contract review — PR #36961 (card #36915)Served-tier: Inputs read: card #36915 body and all five comments (triage 7127583168, claim 7127674243, round-1 dev report 7127788380, claim amendment 7127866157 ruling ① Derived judgments
② Semver level
③ Boundary flags
Findings
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 席位核对 — REWORK · repo:objectstack#3 · head 5f4ae21 · 2026-11-24T11:51ZL1 read of #36961 (card #36915, p1) at What holds. S-1 (should-fix, from the contract review, confirmed). The new published jsdoc on Nits (no fix owed).
Mechanical. All-checks: 45 success · 13 expected skips · 0 failed · 0 pending. Floor checks are green, REWORK on S-1. The delta is a contract-review delta on the fix plus the L1 face on a green head. |
… too Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhoBbwh8URjwQHde8v
…lk-flow-refused-count
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 Contract review — PR #36961 (card #36915), deltaServed-tier: This record is the delta from the previous round's record, which judged head 5f4ae21 at PASS with one should-fix (S-1) and two nits. The head moved by two commits on the first-parent line:
Inputs read this round:
Everything the previous record judged right still stands on this head. The net diff is now 26 files: the earlier 25 plus ① Derived judgments
② Semver level
③ Boundary flags
Findings
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 席位核对 — ACCEPT · repo:objectstack#3 · head cad0a54 · 2026-11-24T12:27ZDelta read of #36961 (card #36915, p1) on REWORK 7130654394, at
Mechanical. All-checks: 47 success · 15 expected skips · 0 failed · 0 pending. Every open finding is a nit. ACCEPT, ordinary queue landing. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzhoBbwh8URjwQHde8v Landing · 2026-11-24T12:28Z · area ux-B · head
|
Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufzhoBbwh8URjwQHde8v
Fixes #36915
Clause-②: yes (seat ruling: the published
@object-ui/typesActionResultgains a member; L1-a owes a lane-keep L2 review)Metadata-protocol: none
What is widened: the published
@object-ui/typesgains two optional members,ActionResult.refusalandActionContext.reportsRefusal. Nothing existing is narrowed.维护者速读
What changes
The per-record bulk path lost the verdict in two places. The refused arm of the flow launch answered
{ success: true, silent: true, handedOff: true }with no text, andObjectGrid'srunBulkActionRecordthrew only onsuccess: false. Every refused record therefore counted as succeeded. Meanwhile each row's flow handler opened the one sharedFlowRefusalNotice, and the last write won.@object-ui/types:ActionResult.refusal?: { message: string }andActionContext.reportsRefusal?: boolean, both optional.ActionContextand not on the action: an action is authored metadata, and a runtime-only key there would widen the authoring face.ActionContextis a runtime data bag, never authored or stored. It is passed for exactly one dispatch throughActionRunner.execute's existingcallContextargument.flowLaunch.ts:settled()is the one exit both launch doors (action and trigger) pass through. A run that endedrefusednow also getsresult.refusal = { message }. The member is set there and not injudgeFlowLaunchbecauseflowResponse.tsstays read-only under open PR fix(runtime,service-print,console): the print door answers on a hosted kernel, and an absent service reads as a localized line #36845.useConsoleActionRuntime.tsx:flowDispatchopens the notice only whencontext.reportsRefusal !== true. The row menu sets no flag, so its Close-only notice is unchanged.RecordDetailView.tsx: the record page mounts its ownActionProvider, which replaces the console's for anything under it, and that provider has its own flow handler. The handler gets the samecontext?.reportsRefusal !== trueguard. So a list embedded on a record page, running a per-record bulk flow, opens no stacked notice either. These two handlers are the only places that openFlowRefusalNotice(from a grep ofsetFlowRefusal,FlowRefusalNoticeandlaunchConsoleFlowunderui/); both are now guarded.ObjectGrid.tsx:runBulkActionRecorddispatches throughrunner.execute(action, { reportsRefusal: true }). Onres.refusalit resolves with a typed verdict,{ refusal: { message } }.useBulkExecutor.ts:BulkResult.refusedlists{ id, message }in selection order, andsucceeded + failed + refused.length === total. Refused records are kept out oferrors, the error CSV and the Retry list. They were deliberate answers, and re-running one gets the same answer.refusedand the retry is not counted as a success.BulkProgressgains arefusedcount, so the processed counter keeps adding up during a run.BulkActionDialog.tsx: the result reads "Succeeded 1 / 3 · Refused 2". A refused-records list shows each record's name with its own sentence, and offers no Retry button.grid.bulk.resultRefusedandgrid.bulk.refusedRecords, added to all ten packs. zh-Hant was regenerated withgen:zh-hant.resultRefusedis listed as count-neutral (tally) besideresultNotConfirmed.@object-ui/types,@object-ui/plugin-grid,@object-ui/app-shelland@object-ui/i18n.Out of scope: a per-record bulk flow whose run pauses at a screen has the same shape: the row counts as succeeded, and only the last row's screen opens. Triage has it on mailbox #36743, comment 7127841220. Follow-up: none from this PR.
Read first, by risk:
ui/packages/plugin-grid/src/ObjectGrid.tsx,runBulkActionRecord. It now callsrunner.executewith acallContext, so the provider'sloading/resultstate no longer changes for each row of a bulk run. The grid reads neither value.ui/packages/plugin-grid/src/hooks/useBulkExecutor.ts. A refused record's dispatch resolves, and its count is then moved out ofsucceeded. Also read the retry path.ui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsxandui/packages/app-shell/src/views/RecordDetailView.tsx. The notice condition in each flow handler.Tests
Tests on final head
cad0a54043c(origin/main merged in at02127147117):pnpm --dir ui exec vitest runover the record-page flow suites (RecordDetailView.refusedLaunch-9973,flowDoneSuccessMessage-12274,flowActionSuccessMessage-12234,flowActionDoor-12037,flowDroppedFields-33009,banCompanion-30205,confirmRuntimeParity-5835,paramRuntimeParity-6431,modalDispatch),useConsoleActionRuntime.refusedLaunch-9973,objectBulkActionDispatchanduseBulkExecutor. Result: Test Files 12 passed (12), Tests 131 passed.type-checkpassed for@object-ui/app-shell. On the round-2 head5f4ae21d567(origin/main merged in at49c6bf3d513),pnpm --dir ui exec vitest runoverpackages/types/,packages/plugin-grid/,packages/i18n/and 106 consumer files (app-shell flow, refusal, bulk and action-runtime suites; the core ActionRunner and actionKeys pins; plugin-list and plugin-view grid harnesses). Result: Test Files 915 passed (915), Tests 16444 passed, 13 skipped. Type-check passed (type-check) for@object-ui/types,@object-ui/plugin-grid,@object-ui/app-shelland@object-ui/i18n.New pins:
plugin-grid/src/__tests__/objectBulkActionDispatch.test.tsx, describe "a per-record bulk flow that refuses some records". It runs the real ObjectGrid and ActionProvider with a flow handler.reportsRefusal: true.plugin-grid/src/__tests__/useBulkExecutor.test.ts, describe "a refused per-record dispatch is counted apart". It covers the repro at executor level, a single refused record, the no-refusal control, and a failed row whose retry comes back refused.app-shell/src/hooks/__tests__/useConsoleActionRuntime.refusedLaunch-9973.test.tsx, describe "a dispatch that reports refusals itself opens no notice".app-shell/src/views/RecordDetailView.refusedLaunch-9973.test.tsx, describe "record-page flow handler honours reportsRefusal".refusal: { message }; their notice assertions are unchanged.Ablations: each restored by ablation-replace (blob equals HEAD, git diff HEAD empty)
runBulkActionRecord:if (res.refusal) return …replaced by a marker. The grid describe went red, 2 failed ("Unable to find … Succeeded 1 / 3" and "Succeeded 0 / 1").flowLaunch.ts:return withRefusal(launch)replaced byreturn launch.refusedLaunch-9973went red, 4 failed.flowDispatch: thereportsRefusalcondition removed. 2 failed: the card-repro and single-record no-notice pins. The row-menu control stayed green.RecordDetailView's flow handler, removed. 1 failed (the flag pin), 5 passed, the control among them.Acceptance notes
@object-ui/app-shellhas 2405 test files. Locally I narrowed it to the 106 files that read the changed modules (flowLaunch,useConsoleActionRuntime,FlowRefusalNotice,ActionResult, the bulk executor and dialog). CI'sTest UIruns the whole package.check:query-options-erasureandcheck:type-check-debt. CI's required jobs run both.@object-ui/app-shellis a private package; it is still listed in the changeset, as sibling changesets do.runner.executedirectly. A host-supplied customexecuteon the action context, and that context'sloading/resultstate, is therefore skipped for bulk runs. The only customexecutein the repo,RelatedList's enlarged grid, declares nobulkActions, so nothing reaches this path today.Verification
Two-minute check:
pnpm --dir ui exec vitest run packages/plugin-grid/src/__tests__/objectBulkActionDispatch.test.tsx -t 'objectstack#36915'. Expect 2 passed: the card's repro reading "Succeeded 1 / 3 · Refused 2" with both sentences, and the single refused record.Local derived gates (dispatch-gates --commands at b4cc27b, reconciled with --ran: 42 derived, 42 run)
40 exited 0, including check:adr-0087-registration, check:changeset-no-major, check:empty-changeset, check:published-files, check:nul-bytes, check:type-check-coverage, check:test-source-alias, check:cross-package-test-inputs and
pnpm --dir ui exec vitest run scripts/(172 files passed). The other 2 timed out at 300 s (exit 124) and are NOT MEASURED: check:query-options-erasure and check:type-check-debt.pnpm check:new-line-citationsunderui/reported 0 new citations.https://claude.ai/code/session_01WGufzhoBbwh8URjwQHde8v
🤖 Generated with Claude Code