Skip to content

fix(console): a per-record bulk flow action counts a refused record as refused, with its own message, and stacks no notice - #36961

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-36915-bulk-flow-refused-count
Nov 24, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-36915-bulk-flow-refused-count

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufzhoBbwh8URjwQHde8v

Fixes #36915

Clause-②: yes (seat ruling: the published @object-ui/types ActionResult gains a member; L1-a owes a lane-keep L2 review)
Metadata-protocol: none

What is widened: the published @object-ui/types gains two optional members, ActionResult.refusal and ActionContext.reportsRefusal. Nothing existing is narrowed.

维护者速读

  • 列表页勾选多条记录批量执行流程动作时,被流程拒绝的记录不再算作“成功”:结果框单独显示“被拒绝 N”,每条记录配它自己的拒绝原因,也不再叠出第二个只说一条原因的弹窗;从行菜单执行时的拒绝提示保持原样。
  • 修的是客户报告的批量加入营销活动场景:三条选中、两条因退订被拒,结果却显示全部成功。
  • 出错时用户最多看到计数或原因展示不对,不会写错数据;改动只在界面一侧,可以直接撤回。
  • 无

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, and ObjectGrid's runBulkActionRecord threw only on success: false. Every refused record therefore counted as succeeded. Meanwhile each row's flow handler opened the one shared FlowRefusalNotice, and the last write won.

  • @object-ui/types: ActionResult.refusal?: { message: string } and ActionContext.reportsRefusal?: boolean, both optional.
    • Why the signal is on ActionContext and not on the action: an action is authored metadata, and a runtime-only key there would widen the authoring face. ActionContext is a runtime data bag, never authored or stored. It is passed for exactly one dispatch through ActionRunner.execute's existing callContext argument.
  • flowLaunch.ts: settled() is the one exit both launch doors (action and trigger) pass through. A run that ended refused now also gets result.refusal = { message }. The member is set there and not in judgeFlowLaunch because flowResponse.ts stays 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: flowDispatch opens the notice only when context.reportsRefusal !== true. The row menu sets no flag, so its Close-only notice is unchanged.
  • RecordDetailView.tsx: the record page mounts its own ActionProvider, which replaces the console's for anything under it, and that provider has its own flow handler. The handler gets the same context?.reportsRefusal !== true guard. 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 open FlowRefusalNotice (from a grep of setFlowRefusal, FlowRefusalNotice and launchConsoleFlow under ui/); both are now guarded.
  • ObjectGrid.tsx: runBulkActionRecord dispatches through runner.execute(action, { reportsRefusal: true }). On res.refusal it resolves with a typed verdict, { refusal: { message } }.
  • useBulkExecutor.ts:
    • Decision: a refused record is a third category, not a failed row. BulkResult.refused lists { id, message } in selection order, and succeeded + failed + refused.length === total. Refused records are kept out of errors, the error CSV and the Retry list. They were deliberate answers, and re-running one gets the same answer.
    • Retry: failed rows keep their existing Retry. If a failed row is retried and the action now refuses it, the row moves to refused and the retry is not counted as a success.
    • BulkProgress gains a refused count, 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.
  • i18n: two keys, grid.bulk.resultRefused and grid.bulk.refusedRecords, added to all ten packs. zh-Hant was regenerated with gen:zh-hant. resultRefused is listed as count-neutral (tally) beside resultNotConfirmed.
  • One changeset lists every package the diff touches: @object-ui/types, @object-ui/plugin-grid, @object-ui/app-shell and @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:

  1. ui/packages/plugin-grid/src/ObjectGrid.tsx, runBulkActionRecord. It now calls runner.execute with a callContext, so the provider's loading/result state no longer changes for each row of a bulk run. The grid reads neither value.
  2. ui/packages/plugin-grid/src/hooks/useBulkExecutor.ts. A refused record's dispatch resolves, and its count is then moved out of succeeded. Also read the retry path.
  3. ui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsx and ui/packages/app-shell/src/views/RecordDetailView.tsx. The notice condition in each flow handler.

Tests

Tests on final head cad0a54043c (origin/main merged in at 02127147117): pnpm --dir ui exec vitest run over 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, objectBulkActionDispatch and useBulkExecutor. Result: Test Files 12 passed (12), Tests 131 passed. type-check passed for @object-ui/app-shell. On the round-2 head 5f4ae21d567 (origin/main merged in at 49c6bf3d513), pnpm --dir ui exec vitest run over packages/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-shell and @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.
    • The card's repro: 3 rows, 2 refused with different sentences. The dialog shows "Succeeded 1 / 3" and "Refused 2", each refused row with its own sentence, no error inspector and no Retry, and every dispatch carried reportsRefusal: true.
    • A single refused row.
  • 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".
    • With the flag: 2 refused and 1 completed open no dialog, and each result carries its own sentence. One refused record also opens no dialog.
    • Control: the row-menu dispatch without the flag still opens the notice.
  • app-shell/src/views/RecordDetailView.refusedLaunch-9973.test.tsx, describe "record-page flow handler honours reportsRefusal".
    • With the flag: no dialog, and the result carries the sentence.
    • Control: without the flag, the notice opens.
  • Four existing pins of the refused launch result now also expect refusal: { message }; their notice assertions are unchanged.
Ablations: each restored by ablation-replace (blob equals HEAD, git diff HEAD empty)
  • A1, the hand-off in 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").
  • A2, the refusal member in flowLaunch.ts: return withRefusal(launch) replaced by return launch. refusedLaunch-9973 went red, 4 failed.
  • A3, the no-notice signal in flowDispatch: the reportsRefusal condition removed. 2 failed: the card-repro and single-record no-notice pins. The row-menu control stayed green.
  • A4, the same guard in RecordDetailView's flow handler, removed. 1 failed (the flag pin), 5 passed, the control among them.

Acceptance notes

  • @object-ui/app-shell has 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's Test UI runs the whole package.
  • Two derived gates hit my local 300 s timeout and are NOT MEASURED locally: check:query-options-erasure and check:type-check-debt. CI's required jobs run both.
  • @object-ui/app-shell is a private package; it is still listed in the changeset, as sibling changesets do.
  • The per-record bulk dispatch now calls runner.execute directly. A host-supplied custom execute on the action context, and that context's loading/result state, is therefore skipped for bulk runs. The only custom execute in the repo, RelatedList's enlarged grid, declares no bulkActions, 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-citations under ui/ reported 0 new citations.

https://claude.ai/code/session_01WGufzhoBbwh8URjwQHde8v

🤖 Generated with Claude Code

@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 24, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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 @object-ui/types ActionResult / ActionContext widening) and the L1 read of this head. Not governed; the verdicts go to the area for an ordinary landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

Contract review — PR #36961 (card #36915)

Served-tier: TIER_DEFAULT
Head-sha: 5f4ae21d5670dcc5a6e1e2b5f98b2c62c0e46213
Local-runs: none

Inputs read: card #36915 body and all five comments (triage 7127583168, claim 7127674243, round-1 dev report 7127788380, claim amendment 7127866157 ruling Clause-②: yes on route A, dev report 7130418813); the PR body; the 25-file net diff origin/main...pr-36961; the 58 check-runs on the head. Every check-run that ran concluded success (Test UI 16/16, Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Lint & Repo Gates, TypeScript Type Check, Test Core, Dogfood Regression Gate, Governed Surface Queue Guard, Check Changeset, PR-body guards, Type Check · debt ledger, Lint · scoped · query-options erasure). The rest were skipped by their path selectors or are opt-in. Code outside the diff was read, not reviewed.

① Derived judgments

  • @object-ui/types ActionResult.refusal?: { message: string } (ui-action.ts:1364): right. The member is optional and ActionResult is a closed interface, so no existing producer can already set a refusal of another shape: an object literal doing so was an excess-property error before this change. No implementer has to change, and a consumer that never reads the member sees nothing new. The four existing pins that toEqual the refused launch result were updated to expect the member. Their notice assertions are unchanged, so the pins are not weakened.
  • @object-ui/types ActionContext.reportsRefusal?: boolean (ui-action.ts:1237): right as a type. It is optional and sits under the existing [key: string]: any index signature, so it is already assignable and nobody has to change. Putting the signal on the per-dispatch ActionContext instead of on the authored ActionDef keeps the authoring surface unchanged, which is the right side of the line. The jsdoc promises more than this PR delivers, though: see S-1.
  • One exit, both doors (flowLaunch.ts:308, withRefusal at :318): right. launchConsoleFlow returns through settled() on the action door and on the trigger door. Its only other return, the action-door !answered case, is a dispatch refused before any fetch, which carries no judgement and so has no refusal follow-up to attach. flowResponse.ts stays read-only, as the claim requires (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).
  • Row-menu path unchanged (useConsoleActionRuntime.tsx:825): right. The notice opens unless context?.reportsRefusal === true. The row menu dispatches through ActionProvider.execute with no callContext, so the flag is unset and the notice opens exactly as before. The PR's ablation A3 pins this both ways (the control stays green), and so do the new refusedLaunch-9973 pins. Outside the runtime, the console's second flow-handler copy does not honour the flag: see S-1.
  • Grid hand-off (ObjectGrid.tsx:2883, :2896): right. runner.execute(action, { reportsRefusal: true }) goes through scopedTo (read, not reviewed), which shares every handler and merges the flag into the context for this one dispatch. The call context names no objectName, so objectFields/objectActions are not dropped. The provider's loading/result state no longer moves per row, and no useAction() consumer in ui/packages reads either value. The one routed execute override is bypassed too: see N-2.
  • Executor counts (useBulkExecutor.ts:523, :547): right, and nothing is counted twice. executeBulkBatch (read, not reviewed) calls perRow once per id, and a refusal verdict exists only on a fulfilled perRow. So the refused ids of a batch are a subset of that batch's succeeded count, and outcome.succeeded - batchRefused.length cannot go negative. Refused ids are kept out of outcome.errors, and therefore out of errors, the error CSV (downloadErrors reads result.errors only) and the Retry buttons (rendered per errors entry). The filter runs over this batch's validIds alone, so an id is not counted again in a later batch. succeeded + failed + refused.length === total holds for a per-record run, and BulkProgress.refused keeps the processed counter and the progress bar adding up during the run.
  • Retry that comes back refused (useBulkExecutor.ts:665, :675): right. The row leaves errors, failed goes down by one, and the row is added to refused (de-duplicated by id). The retry returns false, so succeeded is not touched. It reuses the existing Math.max(0, failed - 1) shape of the success path. The dialog disables the row's button while its retry is in flight, and the pin "retry() of a failed record that comes back refused" asserts succeeded: 0, failed: 0, errors: [] and the single refused entry.
  • Dialog (BulkActionDialog.tsx): right. Refused ids are removed from succeededRows, so the landed.length === result.succeeded cross-check still holds. The header icon turns amber when anything was refused. The refused list offers no Retry. handleBulkDialogClose keeps its succeeded > 0 rule, so an all-refused run keeps the selection and does not refresh, which is correct for a run that wrote nothing. The empty-sentence edge case is N-1.
  • Internal type narrowing, not declared in the PR body: BulkExecutorOptions.runAction goes from Promise<unknown> to Promise<BulkRecordVerdict | void>, and BulkProgress gains a required refused. Neither useBulkExecutor, BulkExecutorOptions, BulkProgress, BulkResult nor BulkActionDialog is exported from @object-ui/plugin-grid's src/index.tsx, and the package's exports map has only . and ./style.css. The narrowing is therefore internal, the PR body's "Nothing existing is narrowed" holds for the published surface, and no (narrowing) arm is owed.
  • i18n: right. grid.bulk.resultRefused and grid.bulk.refusedRecords are present in all 11 locale files (ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans, zh-Hant). The PR body's "ten packs" plus the regenerated zh-Hant is the same 11. resultRefused is registered as count-neutral in count-families-11445.test.ts, beside resultNotConfirmed, and every pack writes it in the same "label · N" tally form as its siblings, so no plural family is owed. The plural-heavy locales hold up: ru Отклонено {{count}} is the neuter impersonal form (like Не подтверждено) and reads for every n, and ar مرفوض {{count}} follows غير مؤكد {{count}}/فشل {{count}}. The es/fr/pt-BR plural adjectives follow the precedent their own packs set with Non confirmés/Não confirmados.

② Semver level

  • The changeset .changeset/36915-bulk-flow-refused-count.md lists @object-ui/types, @object-ui/plugin-grid, @object-ui/app-shell and @object-ui/i18n at patch. Those are exactly the four packages the diff moves. @object-ui/app-shell is private: true, and the PR body says it is listed anyway, as sibling changesets do. Check Changeset is green.
  • Clause-②: yes is right, and so is the line's form. The published @object-ui/types gains two optional members, which widens the public surface. That matches seat ruling 7127866157 and is the declaration face this review is owed for. No arm is written, which is allowed ("at most one arm"). (narrowing) would be wrong, because nothing published is narrowed.
  • Metadata-protocol: none is right. Both members are runtime types, and no metadata author can write either one. Under AGENTS.md Post-Task Checklist step 3, none takes patch, and a non-protocol widening also ships patch, so patch is the right level for @object-ui/types. Both declaration lines are line-initial in both the PR body and the changeset body.

③ Boundary flags

  • Dev open_questions: the final report 7130418813 has none. The round-1 question (widen the surface: A/B/C) was answered by the seat's amendment 7127866157 (route A), and the diff follows route A.
  • Dev-declared narrowings:
    • The local app-shell run was narrowed to 106 files. CI's Test UI (16/16 shards) ran the whole package and is green.
    • check:query-options-erasure and check:type-check-debt were not measured locally. CI's Lint · scoped · query-options erasure and Type Check · debt ledger are green on this head.
    • Build Core was skipped by its path selector, which is correct for a ui/-only diff.
    • All of these narrowings are answered.
  • Files against the amended claim: 23 of the 25 paths are named by amendment 7127866157 (its files, their tests, the i18n packs and the parity pin, one changeset). The other two are RecordDetailView.flowDoneSuccessMessage-12274.test.tsx and RecordDetailView.refusedLaunch-9973.test.tsx. Each changes one toEqual to add refusal: { message }, which is the flowLaunch.ts output seen through the second host. They are tests of a claimed file and would go red without the change, so they are accepted. flowResponse.ts and ActionRunner.ts are untouched, as the claim requires.
  • Out of scope: the paused-screen sibling is routed to mailbox pm:mailbox — triage#1 · os-warren #36743 (comment 7127841220) and is named in the PR body. Accepted.
  • SQL push-down (Prime Directive 5): no finding. The diff is client-side counting and rendering of per-record answers. The per-record fan-out (N action calls) is the existing contract the card names, and the diff adds no id materialisation and no in-app join.
  • Author: the PR's user.login is objectstack-fleet[bot], so no separate author note is owed.

Findings

  • S-1 · should-fix: the console's second flow handler does not honour reportsRefusal, but the published jsdoc promises that it does.
    • ActionContext.reportsRefusal (ui-action.ts:1226-1237) promises that with the flag set "a handler opens no refusal surface of its own". The console has two copies of the flow handler that share launchConsoleFlow. Only useConsoleActionRuntime.tsx:825 gained the condition. RecordDetailView.tsx:2329 still calls setFlowRefusal on every refusal follow-up, whatever the flag says.
    • RecordDetailView's ActionProvider replaces the console runtime's provider for everything on a record page. A record page can embed a list-view component: ComponentPropsMap['list-view'] spreads ListViewSchema.shape, which includes bulkActions. So a per-record bulk flow run from such a list reaches this handler.
    • There the count is right, because settled() sets refusal for both hosts. But the card's second symptom comes back: one last-write-wins FlowRefusalNotice is stacked on the result dialog.
    • Fix: either add the same context?.reportsRefusal !== true condition, with a pin, in RecordDetailView's handler, which needs a claim amendment because that file is outside the amended surface; or file a follow-up card now and narrow the jsdoc to the hosts that honour the flag until it lands.
  • N-1 · nit: a refusal with an empty sentence renders as a bare "Name:".
    • The refused list (BulkActionDialog.tsx:698) renders Name: {message}. When the producer sent no refusalMessage, which the types' jsdoc allows (''), the line reads as a record name followed by nothing. FlowRefusalNotice handles the same case by falling back to its title.
    • The spec already refuses outcome: 'refused' without a message at authoring time, so this is cosmetic.
  • N-2 · nit: the grid's bulk dispatch now bypasses any execute override on the action context.
    • runBulkActionRecord now calls useAction().runner directly, so a routed execute on the action context is bypassed for bulk dispatches. The one such override in the repo is RelatedList's enlargedGridActions (RelatedList.tsx:3997-4011). Today it is unreachable, because that grid's schema carries no bulkActions.
    • The PR body's read-first item 1 names the loading/result change but not this one. It is worth one sentence there or in the runBulkActionRecord comment, so that a later routed context knows bulk dispatches skip it.

Implemented-by: claude/issue-36915-bulk-flow-refused-count
Reviewed-by: session_01WGufzesUz1Y8VZuKJRhVL8

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — REWORK · repo:objectstack#3 · head 5f4ae21 · 2026-11-24T11:51Z

L1 read of #36961 (card #36915, p1) at 5f4ae21d5670dcc5a6e1e2b5f98b2c62c0e46213. The TIER_DEFAULT contract review on this head is 7130631135: PASS, with one should-fix (S-1) and nits N-1 and N-2. NOT governed (0 of 25 paths), 505 changed lines. l1-face is clean.

What holds. withRefusal in flowLaunch.ts settled() sets ActionResult.refusal at the one exit that both launch doors return through. The grid's runBulkActionRecord dispatches through runner.execute(…, { reportsRefusal: true }) and resolves a BulkRecordVerdict on a refusal. useBulkExecutor moves refused ids out of the batch's succeeded count, limited to the current batch (perRow runs once per id, and a refusal can only come back on a resolved call). So succeeded + failed + refused.length === total, refused rows stay out of errors (no CSV, no Retry), and a retried failed row that comes back refused moves to refused. The dialog draws "Succeeded 1 / 3 · Refused 2" with each row's own sentence. The console runtime's notice now skips only when reportsRefusal === true, so the row menu is unchanged; ablation A3 and the control pin show it. Both published @object-ui/types members are optional, so Clause-②: yes with no arm and patch are right. The changeset names the four packages the diff moves.

S-1 (should-fix, from the contract review, confirmed). The new published jsdoc on ActionContext.reportsRefusal says a handler that sees the flag opens no refusal surface. Only useConsoleActionRuntime.tsx honours it. The record page's own flow handler (RecordDetailView.tsx ~2329, the judged.followUp?.kind === 'refusal' branch) still calls setFlowRefusal unconditionally, and its ActionProvider replaces the console's under a record page. A list-view embedded on a record page with bulkActions and a per-record flow action takes that path. The count is right there, because settled() serves both hosts, but the card's second symptom comes back: one notice, showing the last record's sentence, stacked on the result dialog. Preferred fix: give RecordDetailView's branch the same context?.reportsRefusal !== true condition, plus a pin (a scoped dispatch with the flag opens no notice, and the control without it still does). That needs a claim amendment, since RecordDetailView.tsx is outside the amended surface; its two test files are already in the diff. The alternative is to narrow the jsdoc to the console runtime and file a follow-up card. The in-PR fix is a three-line change on the same seam, so I prefer it.

Nits (no fix owed).

  • N-1. A refusal with an empty sentence shows as "Name:" with nothing after it in the dialog. FlowRefusalNotice falls back to its title in that case. The spec already refuses a refused end without a message.
  • N-2. The bulk dispatch now calls runner.execute directly, so a custom execute on the action context, and its loading / result state, is skipped. The only custom one in the repo (RelatedList's enlarged grid) has no bulkActions, so it is unreachable today. One sentence in the body would cover it.
  • N-3 (L1). The running line shows · N failed but no refused count. The progress bar does include refused, and the result line names it.

Mechanical. All-checks: 45 success · 13 expected skips · 0 failed · 0 pending. Floor checks are green, mergeable_state is clean, and Fixes #36915 delivers the card once S-1 is in.

REWORK on S-1. The delta is a contract-review delta on the fix plus the L1 face on a green head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

Contract review — PR #36961 (card #36915), delta

Served-tier: TIER_DEFAULT
Head-sha: cad0a54043caf1f4a1e26e33a6042bb82abfb6f1
Local-runs: none

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:

  • c530f38, the S-1 fix: RecordDetailView.tsx and its refusedLaunch-9973 test.
  • cad0a54, a merge of main 0212714. git show --cc on it is empty.

Inputs read this round:

  • claim amendment 7130688471, which adds ui/packages/app-shell/src/views/RecordDetailView.tsx to the surface;
  • dev delta report 7131370268;
  • the updated PR body;
  • the fix commit's diff;
  • the merge's effect on this PR's paths;
  • the check-runs on the head: 47 success, 15 skipped, 0 failed.

Everything the previous record judged right still stands on this head. The net diff is now 26 files: the earlier 25 plus RecordDetailView.tsx.

① Derived judgments

  • RecordDetailView.tsx flowHandler (now (action, context?: ActionContext); guard at :2332): right. It is the same judged.followUp?.kind === 'refusal' && context?.reportsRefusal !== true condition as useConsoleActionRuntime.tsx:825. ActionContext comes from @object-ui/core, which re-exports the @object-ui/types type (ActionRunner.ts:72), so the published member is typed on this path as well. The handler's useCallback deps are unaffected, because context is a call argument and not a closure value.

  • The call context really reaches the handler (read, not reviewed):

    • ActionProvider registers the handlers prop on its runner unwrapped (r.registerHandler(name, handler)).
    • ActionRunner.execute(action, callContext) runs on scopedTo(callContext), a one-shot runner whose this.context is the merged context.
    • Both runner paths that reach a flow handler pass this.context as the second argument: the registered-handler branch (ActionRunner.ts:1881) and executeFlow (:2841).
    • So runBulkActionRecord's { reportsRefusal: true } arrives as the handler's context on both console hosts.
  • The pin proves the flag reaches the handler:

    • The new describe in RecordDetailView.refusedLaunch-9973.test.tsx mounts the real RecordDetailView. It builds a real ActionRunner from the props the page hands its ActionProvider (context, toast handler and the page's own handlers), then dispatches through runner.execute(ACTION, callContext).
    • With { reportsRefusal: true }, the test expects no dialog, no sentence in the document, and a result carrying refusal: { message }. Without the flag, the control expects the Close-only notice with the sentence.
    • The two cases differ only in the call context, and the dev's ablation A4 (guard removed: the flag pin red, the control green) confirms the pin depends on the guard.
  • No other unguarded refusal opener in ui/: verified. A grep of ui/ for setFlowRefusal(, FlowRefusalNotice, kind === 'refusal' and followUp?.kind, excluding tests and CHANGELOGs, finds only:

    • the notice component itself (FlowRefusalNotice.tsx);
    • withRefusal in flowLaunch.ts;
    • the two opener sites, useConsoleActionRuntime.tsx:825-826 and RecordDetailView.tsx:2332-2333, both guarded now.

    A second grep for flow handler registrations (flow: …Handler, registerHandler('flow') finds the same two hosts, useConsoleActionRuntime.tsx:982 and RecordDetailView.tsx:6353, and no third. The dev's claim holds.

  • Nothing new in the fix commit beyond the guard, the typed second parameter, its comment and the two pins. The fix keeps to the amended surface (7130688471), and flowResponse.ts and ActionRunner.ts are still untouched.

  • The merge, read only where it touches this PR's paths: main changed 11 of them, all locale files. Each gains one unrelated key, action.serviceUnavailable (objectstack#36840), and en.ts also gains its comment. No grid.bulk.* key moved, so the two keys this PR adds keep 11-locale parity. The merge changed no other PR path.

② Semver level

  • Unchanged and still right. The changeset lists @object-ui/types, @object-ui/plugin-grid, @object-ui/app-shell and @object-ui/i18n at patch. The new file is in @object-ui/app-shell, which is already listed, so no package was added.
  • Clause-②: yes and Metadata-protocol: none stand, line-initial in the PR body and the changeset. Amendment 7130688471 keeps 7127866157's Clause-②: yes. The fix widens nothing further published.

③ Boundary flags

  • Dev open_questions: none in report 7131370268.
  • Dev-declared narrowings: this round's local run was 12 files (131 tests). CI's Test UI covers the whole package and the head has 0 failed check-runs. The gates the dev re-ran locally all exited 0, and the 42 derived gate families are answered by CI on this head.
  • Files outside the claim: none. RecordDetailView.tsx was added by amendment 7130688471, and its test was already accepted in the previous record.
  • SQL push-down (Prime Directive 5): no finding. The delta is one client-side condition and a test.
  • Author: the PR's user.login is still objectstack-fleet[bot].

Findings

  • S-1: closed. The record page's flow handler now honours reportsRefusal with the same guard as the console runtime. The runner passes the call context as the handler's second argument on this path. The new flag pin and its control prove the flag reaches the handler and gates the notice, and both handlers that can open FlowRefusalNotice are guarded. The published jsdoc's promise now holds for every console host.
  • N-1 · nit: a refusal with an empty sentence renders as a bare "Name:".
    • The refused list (BulkActionDialog.tsx:698) renders Name: {message}. When the producer sent no refusalMessage, which the types' jsdoc allows (''), the line reads as a record name followed by nothing. FlowRefusalNotice handles the same case by falling back to its title.
    • The spec already refuses outcome: 'refused' without a message at authoring time, so this is cosmetic.
  • N-2 · nit: the grid's bulk dispatch now bypasses any execute override on the action context.
    • runBulkActionRecord now calls useAction().runner directly, so a routed execute on the action context is bypassed for bulk dispatches. The one such override in the repo is RelatedList's enlargedGridActions (RelatedList.tsx:3997-4011). Today it is unreachable, because that grid's schema carries no bulkActions.
    • The PR body's read-first item 1 names the loading/result change but not this one. It is worth one sentence there or in the runBulkActionRecord comment, so that a later routed context knows bulk dispatches skip it.
    • This round, the PR body's Acceptance notes carry that sentence.

No must-fix, no should-fix.

Implemented-by: claude/issue-36915-bulk-flow-refused-count
Reviewed-by: session_01WGufzesUz1Y8VZuKJRhVL8

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8

席位核对 — ACCEPT · repo:objectstack#3 · head cad0a54 · 2026-11-24T12:27Z

Delta read of #36961 (card #36915, p1) on REWORK 7130654394, at cad0a54043caf1f4a1e26e33a6042bb82abfb6f1. The contract-review delta record on this head reads PASS, No must-fix, no should-fix.

  • S-1: closed. c530f381f5 (inside claim amendment 7130688471) gives RecordDetailView's flowHandler the call context as its second argument. It guards setFlowRefusal with context?.reportsRefusal !== true, as the console runtime's copy does. The runner hands the merged call context to a flow handler on both paths, the registered-handler branch and executeFlow. The new pin mounts the real RecordDetailView and dispatches through a real runner's execute(ACTION, callContext). With the flag, no dialog opens and the result carries refusal. Without it (the control), the notice opens. Ablation A4 reds the flag pin and leaves the control green.
  • No third opener. A grep of ui/ (non-test) finds only these two refusal openers and these two flow handler hosts, and both are guarded now. The published jsdoc on ActionContext.reportsRefusal is now true.
  • Merge cad0a54043. It merges main 0212714 cleanly (git show --cc is empty). On this PR's paths it adds one unrelated key, action.serviceUnavailable, to the 11 locales. The two grid.bulk.* keys still match in all 11.
  • The changeset is unchanged: the new file is in @object-ui/app-shell, which is already listed at patch.
  • N-1 and N-3 stay nits. N-2 is now one sentence in the body's Acceptance notes.

Mechanical. All-checks: 47 success · 15 expected skips · 0 failed · 0 pending. l1-face is clean and mergeable_state is clean. NOT governed, 543 changed lines on the card's one PR.

Every open finding is a nit. ACCEPT, ordinary queue landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzhoBbwh8URjwQHde8v

Landing · 2026-11-24T12:28Z · area ux-B · head cad0a54043caf1f4a1e26e33a6042bb82abfb6f1

  • L1: delta ACCEPT 7131475458 (L1-a, on this head). Round 2 REWORK 7130654394 S-1 (the record page's handler opened the notice regardless of reportsRefusal) is closed. Only nits N-1 to N-3 remain, and none has a user-visible defect.
  • Contract review: Clause-② yes (the published @object-ui/types ActionResult gains refusal, and ActionContext gains reportsRefusal). PASS 7130631135, delta PASS 7131463454 ("No must-fix, no should-fix.").
  • check-governed-merges.mjs --pr 36961: NOT governed, 543 changed lines. This is the card's only PR, so the card total is 543, under the per-card 3,000.
  • landing-k.mjs --pr 36961: CAN'T ANSWER on this UI-only PR (no Test Core shard ran). Merge-base reading: 3 commits behind main, under 15.
  • Checks on this head: 47 success / 15 skipped / 0 failing; mergeable_state clean.
  • Action: ready for review + auto-merge through the merge queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

console: a per-record bulk flow action counts runs the flow refused (status "refused") as succeeded, and shows only one of the refusal messages

2 participants