Skip to content

fix(console): a per-record bulk flow action counts a record paused at a screen as waiting for input, and every paused screen opens in turn - #37084

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-36931-bulk-flow-paused-rows
Nov 24, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-36931-bulk-flow-paused-rows

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Fixes #36931

Clause-②: yes
Metadata-protocol: none

What is widened: the published @object-ui/types gains one optional member, ActionResult.paused. Nothing existing is narrowed.

维护者速读

  • 列表页勾选多条记录批量执行带界面的流程动作时,停在界面等待填写的记录不再算作“成功”:结果框单独显示“等待输入 N”并列出这些记录,每条记录的填写界面依次弹出,关掉一个就出现下一个,不再只剩最后一条。
  • 承接上一张“批量流程被拒绝的记录算成功”的修复,补上同一批量入口里“流程暂停等输入”的另一半。
  • 出错时用户最多看到计数或界面弹出顺序不对,不会写错数据;改动只在界面一侧,可以直接撤回。
  • 无

What changes

A per-record bulk type: 'flow' action read a run that paused at a screen as succeeded, and the console held one paused run at a time, so every paused record but the last lost its screen.

  • @object-ui/types: ActionResult.paused?: { runId: string }, optional, beside console: a per-record bulk flow action counts runs the flow refused (status "refused") as succeeded, and shows only one of the refusal messages #36915's refusal.
  • flowLaunch.ts: settled() (the one exit both launch doors pass) now sets the hand-off verdict for both hand-off arms: refusal on a refused run (unchanged), paused: { runId } on a run paused at a screen. withRefusal became withHandOffVerdict.
  • useScreenFlowQueue.ts (new, app-shell): the paused runs a host shows, one after another. Each entry has its own key; FlowRunner is keyed by it, and settle(key) drops that entry alone, so a result screen's record link (close first, complete after) never drops the next run.
  • useConsoleActionRuntime.tsx and RecordDetailView.tsx: the single screenFlow state is replaced by the queue. A paused launch enqueues; closing or completing the shown run settles it and shows the next.
  • ObjectGrid.tsx: runBulkActionRecord returns { paused: true } on res.paused, beside the existing { refusal } verdict. handleBulkDialogClose treats a run with paused records like one with successes: closing the result clears the selection and re-reads the grid, so a run in which every record paused (0 succeeded) no longer leaves the grid stale and the selection armed for a second run.
  • useBulkExecutor.ts: BulkResult.paused lists { id } in selection order, except that a failed record whose retry() pauses is appended last (the doc comment says so); succeeded + failed + refused.length + paused.length === total. BulkProgress.paused keeps the processed counter adding up. A paused row is not in errors, the error CSV or Retry (a re-run would start a second run). A failed row whose retry pauses moves to paused. A run with paused rows invalidates related counts (steps before the screen may have written).
  • i18n: two keys, grid.bulk.resultPaused and grid.bulk.pausedRecords, added to all eleven locale files (ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans, zh-Hant). zh-Hant is what gen:zh-hant writes (it reported the pack already current). resultPaused is listed as count-neutral (tally) beside resultRefused.
  • One changeset lists every package the diff touches: @object-ui/types, @object-ui/plugin-grid, @object-ui/app-shell and @object-ui/i18n.
  • BulkActionDialog.tsx: "Succeeded 1 / 3 · Waiting for input 2", and a list of the waiting records under "These records are waiting for input. Their screens open one after another:". The helper that names a listed record is renamed refusedRecordName to listedRecordName: it names refused, waiting, unconfirmed and failed records.

Shape chosen for "every paused row's screen can be reached": one after another. The console queues every paused run; the flow runner shows the first, and closing or completing it shows the next. No signal on the dispatch is needed for that (it holds for every host, and a single pause behaves as before). Order: the screens open in the order the runs come back from the engine (the order the per-record dispatches finish), which can differ from the dialog's list, which is in selection order. This PR states that order rather than reorder the queue: opening in selection order would need the console's queue to know the grid's selection, which it does not see. The typed verdict reuses #36915's mechanism: the ActionResult member beside refusal, the BulkRecordVerdict beside { refusal }, and the BulkResult category beside refused.

Read first, by risk:

  1. ui/packages/app-shell/src/hooks/useScreenFlowQueue.ts and the two FlowRunner mounts: the key and settle-by-key.
  2. ui/packages/plugin-grid/src/hooks/useBulkExecutor.ts: the paused count moved out of succeeded, and the retry path.
  3. ui/packages/app-shell/src/utils/flowLaunch.ts: withHandOffVerdict.

Tests

New pins:

  • app-shell/src/hooks/__tests__/useConsoleActionRuntime.bulkPausedScreens-36931.test.tsx: the real ObjectGrid bulk path inside the real ConsoleActionRuntimeProvider (real runner, flow handler, launchConsoleFlow, FlowRunner). Three rows, two pause: "Succeeded 1 / 3", "Waiting for input 2", Ann and Cy listed; both screens reached one after another, none left after the last. Control: one paused row.
  • plugin-grid/src/__tests__/objectBulkActionDispatch.test.tsx, describe "a per-record bulk flow that pauses some records at a screen": the dialog reading, no Retry, no error list; control with no pause.
  • plugin-grid/src/__tests__/useBulkExecutor.test.ts, describe "a paused per-record dispatch is counted apart": repro, refused and paused in one run, control, retry that pauses.
  • app-shell/src/views/RecordDetailView.refusedLaunch-9973.test.tsx, describe "the record page shows every paused run in turn".
  • plugin-grid/src/__tests__/objectBulkActionDispatch.test.tsx, same describe, "closing an all-paused run clears the selection and re-reads the grid": three of three paused read "Succeeded 0 / 3"; Done re-reads the grid, the selection bar goes and the header checkbox is unchecked.
  • app-shell/src/hooks/__tests__/useConsoleActionRuntime.bulkPausedScreens-36931.test.tsx, describe "a queued run stays on screen when the run before it completes after its dialog closed": two queued runs whose screens are result screens with a record link; following the first one's link closes it and shows the second; the first run's resume is held and released afterwards, its completion arrives (a refresh), and the second screen is still shown. This pins settle-by-key.
  • Seven existing pins of a paused launch result now also expect paused: { runId: 'run-1' }; their runner assertions are unchanged.
Rework readings (head 35b5495: the all-paused close, the settle-by-key pin, nits)
  • vitest run packages/plugin-grid/: 311 files, 2773 tests passed. vitest run packages/app-shell/: 2432 files passed, 1 skipped (23009 tests passed, 9 skipped). type-check exit 0 for @object-ui/plugin-grid and @object-ui/app-shell (dependency closure built first).
  • S1 ablation, through ablation-replace: the close condition result.succeeded > 0 || (result.paused?.length ?? 0) > 0 cut back to result.succeeded > 0. 1 failed of 35 in objectBulkActionDispatch.test.tsx, the all-paused pin ("expected 1 to be greater than 1": no re-read on close). Restored: blob equals HEAD, git diff HEAD empty.
  • S2 ablation, through ablation-replace: settle made to drop the head (q.slice(1)) instead of the entry under its key. 1 failed of 10 across the end-to-end file and the record-page file, the new pin ("expected null to be 'Confirm Cy'": the first run's late completion dropped the second run). Every other queue pin stayed green, which is the gap this pin closes. Restored: blob equals HEAD, git diff HEAD empty.
  • dispatch-gates --commands at 35b5495 (its tree warned stale: 4 derivation files changed on origin/main since): 42 derived; 41 exit 0; check:type-check-debt NOT MEASURED (local 420 s timeout); --ran reconciliation: 42 accounted, 0 unrun. overlap-check.mjs: merges cleanly with origin/main and with the two open PRs that share files.
Test readings, ablations and local gates (head 08c9d61, origin/main 159113f merged in)
  • Final head: packages/i18n/ 110 files passed (2026 tests, 13 skipped); vitest run scripts/ 172 files passed, 2 skipped (5130 tests); the five pin files 101 passed. check-i18n-call-site-keys.mjs exit 0.
  • Pre-merge head c9281ef: packages/plugin-grid/ + packages/types/ 701 files, 13284 tests passed; 187 app-shell consumer files passed after the seven pin updates. type-check exit 0 for @object-ui/types, @object-ui/plugin-grid, @object-ui/app-shell.
  • Red on main (source restored from the base, tests kept, plugin-grid rebuilt): 7 failed, including "Unable to find ... Succeeded 1 / 3" in both the grid and the end-to-end pin.
  • A1, the paused category: the grid's if (res.paused) return { paused: true }; replaced through ablation-replace, plugin-grid rebuilt, ablation-dist-preflight saw the marker in 2 built files. 3 failed (both end-to-end pins and the grid repro). Restored: blob equals HEAD, rebuilt, preflight --absent over 155 files, tree clean.
  • A2, reachability: the queue's enqueue made last-write-wins. 1 failed at the end-to-end pin's second screen ("expected null not to be null"); the single-pause control stayed green. Restored: blob equals HEAD, git diff HEAD empty.
  • dispatch-gates --commands: 39 derived; 37 exit 0 locally (incl. vitest run scripts/); check:query-options-erasure and check:type-check-debt hit the local 300 s timeout and are NOT MEASURED locally. overlap-check.mjs: clean against origin/main, no open PR shares a file.

Acceptance notes

  • File surface: the i18n packs and count-families-11445.test.ts were added to the claim's surface by the seat after the dev stopped at that breach (claim comment 7139427891, amended).
  • @object-ui/app-shell is a private package; it is still listed in the changeset, as sibling changesets do.
  • check:query-options-erasure and check:type-check-debt hit the local 300 s timeout: NOT MEASURED locally; CI's required jobs run both.
  • The BulkResult.refused doc comment (from console: a per-record bulk flow action counts runs the flow refused (status "refused") as succeeded, and shows only one of the refusal messages #36915) also said "in selection order" while its retry arm appends, and its sum left out paused; it is corrected in the same edit as paused's, prose only.
  • The screens of paused records open over the bulk dialog while the run continues, as a single paused record's screen already did.

Verification

Two-minute check: pnpm --dir ui exec vitest run packages/app-shell/src/hooks/__tests__/useConsoleActionRuntime.bulkPausedScreens-36931.test.tsx. Expect 3 passed: "Succeeded 1 / 3 · Waiting for input 2" with both screens reached in turn, the one-pause control, and the second screen still shown after the first run completes behind its record link.


Generated by Claude Code

Seat note: the first PR-body guards run on this head failed reading the board (exit 3, not a finding on this body; comment 7142495950); this edit re-runs it.

@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#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Flake judgement · 2026-11-24T19:42Z · PR-body guards failed on head 08c9d61fe83e707f6f726d50da82e01a1c4b4ece (run 45467391972, job 138705835373) with exit 3: the guard could not read the board ("a board that could not be read is not a clean board"), not a finding on this PR's body. The head has not moved since. Re-running the failed job once through the relay; a second failure is read as real.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 08c9d61fe83e707f6f726d50da82e01a1c4b4ece
Local-runs: none

① Derived judgments

Read from the net diff origin/main...08c9d61fe83e707f6f726d50da82e01a1c4b4ece (31 files), card #36931 and all 5 comments, and PR #37084's body and file list. The diff changes these accept-sets and public surfaces:

  1. @object-ui/types ActionResult.paused?: { runId: string } (ui/packages/types/src/ui-action.ts, published, 18.6.0). This is a new optional member beside console: a per-record bulk flow action counts runs the flow refused (status "refused") as succeeded, and shows only one of the refusal messages #36915's refusal. A handler may now write one more key, and a reader may see one more key. No value accepted today is refused, and no existing member changes type or meaning. Its doc says when it is set (only beside success: true and handedOff: true) and that runId is '' when the engine sent none. Judged right: a widening.
  2. What the console's flow launch now returns (app-shell/src/utils/flowLaunch.ts). withRefusal became withHandOffVerdict. Every launch that pauses at a screen now carries paused, including a single-record click, not only bulk runs. This changes runtime output, not a type. The emitter is in @object-ui/app-shell, which is private: true. The seven in-repo pins that compared a paused result with toEqual were updated, and their runner assertions are unchanged. ActionRunner reads only success and handedOff (core ActionRunner.ts:2329-2346), so a hop or onSuccess behaves as before. Judged right: additive, with no published consumer to break.
  3. BulkResult.paused?, the new BulkRowPause, BulkProgress.paused: number (required), and BulkRecordVerdict changed from an interface to a two-arm union (plugin-grid/src/hooks/useBulkExecutor.ts). If these were public, two would matter. A required member on BulkProgress would narrow what a caller may construct. A union cannot be extends-ed, as the interface could. None of them is exported: plugin-grid/src/index.tsx exports BulkActionBar, useBulkActionItems, CHANGE_OWNER_BULK_ACTION, resolveBulkActions and the types BulkActionBarProps, BulkActionItems, LegacyBulkActionItem, ActionLabelResolver and NamedActionDef, and none of those reaches the executor's types. Their only consumers are ObjectGrid.tsx and BulkActionDialog.tsx, both in the same package. Judged right: the package's own internals, with no published accept-set change. The documented invariant succeeded + failed + refused.length + paused.length === total holds on the run path and on both retry arms.
  4. ObjectGrid per-record bulk behaviour (plugin-grid/src/ObjectGrid.tsx:2936). res.paused now resolves { paused: true }, so the row is counted as waiting, not as succeeded. This is published runtime behaviour. It is reachable only when a handler sets the new optional member, and a third-party handler that never sets it sees no change. Judged right. One side effect of this behaviour is not contract-level; it is graded in the L1 notes as should-fix S1.
  5. @object-ui/i18n: two keys, grid.bulk.resultPaused and grid.bulk.pausedRecords, in every locale pack file under ui/packages/i18n/src/locales/. There are eleven: ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans and zh-Hant. None is missing either key. The PR's word "ten" either undercounts by one or leaves out zh-Hant because it is generated. Either way, nothing is missing. The exported TranslationKeys = typeof en (declared as const) gains two members. That is additive, as every key addition is. resultPaused is registered as count-neutral in count-families-11445.test.ts, beside resultRefused, which has the same shape (a label followed by {{count}}, with no plural form). Judged right.
  6. useScreenFlowQueue, QueuedScreenFlow, ScreenFlowQueue are new, and both FlowRunner mounts are now keyed per queued run. All of this is in the private @object-ui/app-shell, so there is no published surface. Judged right.

The card's acceptance asks two things:

  • It reuses console: a per-record bulk flow action counts runs the flow refused (status "refused") as succeeded, and shows only one of the refusal messages #36915's typed signal and adds a BulkResult category beside refused. Met: the ActionResult member sits beside refusal, BulkRecordVerdict gains an arm, and BulkResult.paused sits beside refused. No second mechanism is added.
  • A three-row bulk run in which two rows pause is pinned. Met by useConsoleActionRuntime.bulkPausedScreens-36931.test.tsx, which asserts "Succeeded 1 / 3", "Waiting for input 2", that Ann and Cy are listed, that both screens are reached in turn, and that none is left after the last. It has a one-pause control. The PR states the shape it chose ("one after another"), as the card asks.

② Semver level

  • Changeset: .changeset/36931-bulk-flow-paused-rows.md names '@object-ui/types', '@object-ui/plugin-grid', '@object-ui/app-shell' and '@object-ui/i18n', all at patch. Those are exactly the four packages the diff moves. app-shell is private, and listing it follows the sibling fix(console): a per-record bulk flow action counts a refused record as refused, with its own message, and stacks no notice #36961 (.changeset/36915-bulk-flow-refused-count.md, also at the root .changeset/, whose config names the @object-ui/* packages).
  • Clause-②: yes: correct. The diff widens a published surface (ActionResult.paused) and narrows nothing. The PR body says "What is widened … Nothing existing is narrowed", and the changeset body says the same. No arm is written, and an absent arm reads as yes with no direction. That is legal (clause2-line.mjs CLAUSE2_ARMS: "The arm is OPTIONAL"). yes (widening) would only say the same thing explicitly.
  • Metadata-protocol: none: correct. ActionResult is a runtime TypeScript interface. It is not an authorable metadata key, value or type, so no metadata author can write anything new or different.
  • Level patch: correct. AGENTS.md (Post-Task Checklist step 3) says "the level follows the kind alone … none takes patch; a non-protocol change, widening or breaking, ships patch". The older line in the clause2-line.mjs docblock, "yes / yes (widening) … both take at least minor", predates ruling A, and AGENTS.md overrides it. That docblock is outside this diff and is not a finding here.
  • Line form: both declarations stand alone at column 0 in the PR body and in the changeset body. They are not quoted, bulleted or backticked. CLAUSE2_KEY_LINE and METADATA_PROTOCOL_KEY_LINE therefore read them as declared with the values yes and none; this was read from the parser source and not executed. Check Changeset on this head is success (both runs, the second at 19:47:07Z).

③ Boundary flags

  • Dev flags and open_questions:
  • NOT MEASURED locally: three gates were flagged. CI ran each of them on this head, and each passed:
    • check:query-options-erasure: the Lint · scoped · query-options erasure job is success.
    • check:type-check-debt: the Type Check · debt ledger job is success.
    • check-i18n-en-drift (blocked report): ci.yml:4038, in the Type Check UI job, which is success. That job also runs check:i18n-keys, the key gate that the missing keys had turned red before the amendment.
  • Check-runs on this head: every completed required job is success. That covers Lint UI, Type Check UI, Test UI (all 16 shards), Build & E2E UI, Live E2E UI, every Lint and Type Check job, Check Changeset, the Governed Surface Queue Guard and Check PR Size. The rest are skipped as opt-in or queue-only. The first PR-body guards run (job 138705835373) failed with exit 3 while reading the board. That was infrastructure, judged so in PR comment 7142495950. Its re-run, job 138727094309, is success.
  • Disclosed behaviour: the PR says that screens of paused records open over the bulk dialog while the run continues. A single paused record already behaved this way, so the diff adds no new boundary.
  • SQL push-down: n/a. The diff materialises no ids and adds no in-app join. The per-record fan-out over the client-side selection already existed, and the executor only sorts ids it already holds into one more category.

Implemented-by: claude/issue-36931-bulk-flow-paused-rows
Reviewed-by: fresh subagent of session_01QSeKYpEsWWE9Y5YtSsDgqZ

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — REWORK · L1 · head 08c9d61fe83e707f6f726d50da82e01a1c4b4ece · 2026-11-24T19:56Z

Card #36931. Beside the contract review at this head (declaration face, TIER_DEFAULT): PASS, no must-fix, no should-fix.

Delivered and correct, read against the code: the queue keys each paused run and settle(key) drops only that entry; both FlowRunner mounts remount per run; succeeded + failed + refused + paused === total holds per batch and after a retry that pauses; paused rows stay out of Retry and the error CSV; related counts are invalidated when a row paused; both new keys are in all eleven locale files. The PR-body guards failure was the board read (exit 3); its re-run passed.

S1 (should-fix) — a run in which EVERY row pauses keeps the selection and does not refresh the grid. ui/packages/plugin-grid/src/ObjectGrid.tsx, handleBulkDialogClose: it resets the selection and bumps refreshKey only on succeeded > 0 (or an aggregate refusal). Before this PR the same run read "Succeeded 3 / 3" and did both, so this is a regression for the common all-paused case: the grid stays stale after steps before the screen may have written (the reason the executor invalidates counts), and the armed selection invites the second run the PR denies Retry to avoid. Fix: treat result.paused.length > 0 like a success in that handler (reset the selection and refresh). Pin it: an all-paused run closes with the selection cleared and the grid re-read; ablate the new condition.
S2 (should-fix) — settle-by-key has no pin. The PR's reason for keying settle is the record-link path (close first, complete later), but a regression to "settle drops the head" passes every current test. Add one pin: two queued runs, the first a result screen dismissed through its record link; the second screen still opens. Ablate settle to drop the head; the pin goes red.

Nits, fix while there (prose and ordering only): N1 screens open in dispatch-finish order while the dialog lists selection order — say so in the PR body or open them in selection order; N2 a row moved to paused by retry is appended though BulkResult.paused is documented as selection order (useBulkExecutor.ts, the retry arm) — insert in order or fix the doc comment; N3 refusedRecordName now also names paused rows (BulkActionDialog.tsx) — rename; N4 the PR body says "ten packs", eleven locale files carry the keys.

… and re-reads the grid

A per-record bulk flow run in which every record paused at a screen
counted no success, so closing its result kept the selection and skipped
the refresh, although the steps before each screen may have written and
the armed selection invited a second run. It now resets and re-reads like
a run with successes.

Pins settle-by-key in the console's screen-flow queue: a result screen
dismissed through its record link completes after its dialog closed, and
the next queued run stays on screen.

Renames the dialog's refusedRecordName to listedRecordName, and the
BulkResult refused/paused docs say a record moved there by retry() is
appended last.

Claude-Session: https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 35b5495d1749c59d46782611afe00c7b6dfbfe25
Local-runs: none

① Derived judgments

This is a delta review. The prior record is comment 7142823840 (head 08c9d61fe83e, PASS, no findings), and the seat's L1 REWORK is comment 7142835139. Read from git diff 08c9d61fe83e 35b5495d1749 (one commit, 5 files), the PR body at this head, and the head's check-runs. The six judgments of the prior record stand unchanged. The delta touches only these paths:

  1. plugin-grid/src/ObjectGrid.tsx, handleBulkDialogClose. The close condition is now result.succeeded > 0 || (result.paused?.length ?? 0) > 0, so closing the result of a run in which every record paused clears the selection and bumps refreshKey. This is the seat's S1. handleBulkDialogClose is a local function of the component. Its props and exported types (ObjectGridComponentProps and the other names re-exported by src/index.tsx) are not touched. Before this PR, the same all-paused run read "Succeeded 3 / 3" and took this same branch, so the change restores the published pre-PR close behaviour for that case. It adds no new behaviour. Judged right: no accept-set or public surface changes.
  2. plugin-grid/src/components/BulkActionDialog.tsx. The helper refusedRecordName is renamed to listedRecordName (the seat's N3), and its comment is rewritten. It is a const inside the component body, so it cannot be exported. git grep at this head finds no reference to the old name. The rendered text and every data-testid are unchanged. Judged right: internal only.
  3. plugin-grid/src/hooks/useBulkExecutor.ts, the doc comments on BulkResult.refused and BulkResult.paused (the seat's N2). These are prose-only edits; no type changes.
    • The refused sum now reads succeeded + failed + refused.length + paused.length === total, which matches the sum on paused.
    • Both comments now say that the list is in selection order except for a failed record whose retry() is refused (or pauses), which is appended last.
    • Read against the code at this head, both comments are accurate. The retry arms build [...(prev.refused ?? []).filter(r => r.id !== rowId), { id: rowId, message }] and [...(prev.paused ?? []).filter(p => p.id !== rowId), { id: rowId }], so a retried record is appended last. The run path pushes each batch in selection order.
    • BulkResult is still not exported from plugin-grid's published entry src/index.tsx, as the prior record found, so the corrected comments describe internal types. Judged right: the comments now describe the code, and no surface moves.
  4. Tests. The delta changes two test files:
    • objectBulkActionDispatch.test.tsx adds the all-paused close pin: "Succeeded 0 / 3", Done re-reads the grid, and the selection bar and header checkbox clear.
    • useConsoleActionRuntime.bulkPausedScreens-36931.test.tsx adds the settle-by-key pin: two queued result screens, and the first is dismissed through its record_link. This is the seat's S2.
    • Neither file is published.

Published surfaces the delta does not touch:

  • No file under ui/packages/types/ changes, so the published @object-ui/types is exactly what the prior record judged: one optional member, ActionResult.paused.
  • No file under ui/packages/i18n/ changes, so the @object-ui/i18n key set is unchanged: grid.bulk.resultPaused and grid.bulk.pausedRecords in all eleven locale files.
  • Plugin-grid's published entry src/index.tsx is unchanged.

PR body, "Acceptance notes" at this head. Its five bullets are accurate:

  • the File surface amendment;
  • the private app-shell package listed in the changeset;
  • the two gates NOT MEASURED locally, which CI ran;
  • the refused doc comment correction, described as prose only, which matches item 3;
  • screens opening over the dialog.

The "What changes" section now describes the all-paused close (handleBulkDialogClose), the listedRecordName rename, and the retry append order, and it counts eleven locale files. That last point is the seat's N4. N1, the order in which screens open, is now stated as dispatch-finish order with its reason.

② Semver level

  • Changeset. .changeset/36931-bulk-flow-paused-rows.md is unchanged by the delta. It still lists '@object-ui/types', '@object-ui/plugin-grid', '@object-ui/app-shell' and '@object-ui/i18n', each at patch. The delta's paths belong to plugin-grid and app-shell, which are already listed, so no package is added.
  • Clause-②: yes. Still correct. The only published widening is still ActionResult.paused, and the delta narrows nothing. The changeset body's description is still accurate: paused records counted apart, no Retry, and the queued screens.
  • Metadata-protocol: none. Still correct. The delta touches no authorable metadata.
  • Level patch. Still correct under AGENTS.md (Post-Task Checklist step 3): a non-protocol change ships patch.
  • Line form. Both declaration lines stand alone at column 0, in the PR body and in the changeset. Check Changeset on this head is success (job 138806050174).

③ Boundary flags

  • The seat's REWORK items. S1, S2 and N1 through N4 are all addressed in the delta or in the PR body, as listed above. The PR body's rework readings report an ablation for each of S1 and S2 that turned exactly its new pin red. Those runs are the dev's, not this review's.
  • NOT MEASURED locally. The dev's local check:type-check-debt timed out. CI's Type Check · debt ledger job is success. So are Lint · scoped · query-options erasure, Type Check UI, Lint UI, Test UI (all 16 shards), Build & E2E UI and Live E2E UI. PR-body guards is success on both runs, the latest at 21:55Z.
  • Disclosed behaviour. The new close behaviour has an all-paused run re-read the grid and drop the selection. It brings back what the same run did before this PR, and the PR body states it.
  • SQL push-down. Not applicable. The delta adds no id materialisation and no in-app join. The re-read on close goes through the existing refreshKey path.

No must-fix, no should-fix.

Implemented-by: claude/issue-36931-bulk-flow-paused-rows
Reviewed-by: fresh subagent of session_01QSeKYpEsWWE9Y5YtSsDgqZ

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head 35b5495d1749c59d46782611afe00c7b6dfbfe25 · 2026-11-24T22:04Z

Delta L1 for card #36931 over the REWORK at 08c9d61fe8 (7142835139), beside the delta contract review at this head (7145761454, TIER_DEFAULT, declaration face): PASS, no findings.

  • S1: closed. handleBulkDialogClose treats a run with paused records like one with successes: an all-paused run clears the selection and re-reads the grid. Pinned in objectBulkActionDispatch.test.tsx; ablating the new condition turns only that pin red (no re-read on close); restored blob-equal.
  • S2: closed. A new describe in useConsoleActionRuntime.bulkPausedScreens-36931.test.tsx pins settle-by-key through the real console runtime: two queued result screens; following the first's record link shows the second, and the first run's late completion leaves it up. Ablating settle to drop the head turns only that pin red; restored.
  • N1–N4: done. The PR body states the screen order (engine answer order, not selection order); the BulkResult.paused and sibling refused doc comments say a retried record is appended last and the refused sum includes paused; refusedRecordName → listedRecordName; the body names all eleven locale files.
  • Dev report. The developer's report comment on Console bulk action: a per-record flow that pauses at a screen is counted as succeeded, and only the last paused row's screen opens #36931 was refused by a permission check and is not posted; its content is summarised here: plugin-grid 2773 tests and app-shell 23009 tests pass at this head, both type-checks exit 0, overlap-check clean. check:type-check-debt was not measured locally (timeout); CI's debt-ledger job is green.
  • Gates. Check-runs at this head: every completed run success or expected skip, 0 failed.
  • Landing K: 20 since the merge base — over the bound: the seat merges main first (a merge-only head move keeps this ACCEPT) and lands it when green.
  • No must-fix, no should-fix.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Landing · 2026-11-24T22:27Z · head 337a1aff65f84f6116428e31feff415d7ec6e65e is a merge of main (9c5fb3efdf) into the ACCEPTed 35b5495d17 (delta L1 7145777055, delta contract review 7145761454); its tree equals the automatic merge of its parents, so no file of the PR moved and both records stand. Check-runs at this head: 45 success, 13 expected skip, 0 failed. Not governed; the seat readies it and arms auto-merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 24, 2026 22:28
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 1f3e9f6 Nov 24, 2026
59 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36931-bulk-flow-paused-rows branch November 24, 2026 22:50
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…oval (objectstack-ai#37128)

Fixes objectstack-ai#36911
Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户在列表页和记录页的关联页签里,对正在审批且被锁定的记录打开行菜单时,不再看到「编辑」,「删除」照旧保留。
- 属于记录页关联列表体验的修补,替用户省掉「点了编辑才被告知已锁定」这一步。
- 出错的话,最坏是锁定行的「编辑」仍然出现,点了会和以前一样弹出拒绝提示;改动可以直接撤回。
- 无

## What changes

The grid's row menu (`@object-ui/plugin-grid`) now follows the approval
lock the grid's select-first cells already read. Both the list page and
a record page's related tab (the related list's enlarged face, which
renders `object-grid`) draw this menu, so both change together.

- **The read.** It reuses the existing `useRowApprovalLocks` hook (`POST
/api/v1/approvals/records/:object/locks`), which is not exported, and
its rule `resolveApprovalLock`. Nothing is copied. The read is made once
for the rows on screen, when a row's actions are first reached for: the
existing `onActionsDemand` channel (pointer or focus on the actions
cell, the "⋮" opening, the row context menu, the page bar's single-row
menu). It is never made on first paint (the objectstack#35795 posture).
The hook now also runs on a grid whose rows offer Edit, not only on a
select-first grid. It still reads nothing until it is asked.
- **The verdict.** A row whose lock read answered `locked: true` offers
no Edit. That matches the record page, which draws no Edit on an
approval-locked record (objectstack#35593). Delete stays for a record
held by its own approval, because the server lets such a record be
deleted and cancels its request (objectstack-ai#13568). The batch read answers only
for that case. A line held because its master is held refuses delete
too, so if objectstack-ai#37041 makes the read report such lines, the read must tell
the two apart before this menu uses it.
- **Hidden, not disabled.** Hidden follows the record page
(objectstack#35593) and the row menu's own record-verdict posture
(objectstack-ai#4296). The disabled-with-reason alternative was not taken.
- **Only an answered lock counts.** The row is handed to the hook
without its `approval_status` column, so the column does not stand in
for a read. In each of these cases the menu stays as it was: a 501 (no
approvals service), a `null` entry (a row the reader cannot read), a
failed read, or a read not yet asked. The select-first cells keep their
column fallback unchanged.

Files: `ui/packages/plugin-grid/src/ObjectGrid.tsx` (hook gate and
`demandRowActions`),
`ui/packages/plugin-grid/src/objectGridActionsColumn.tsx` (Edit verdict
and demand wiring), and the new test
`ui/packages/plugin-grid/src/__tests__/rowMenuApprovalLock-36911.test.tsx`.
`RowActionMenu.tsx` and `useRowApprovalLocks.ts` are unchanged.

### The reading this card asked for (served state)

Tree: objectstack-ai/objectstack at 8e4ac50 (re-read at 1e96009).

- **Declared per-row predicates** (`userActions.edit` / `delete`
`visibleWhen` / `disabledWhen`): already served, and already followed by
both related-list faces.
- **The master's approval lock on its master-detail lines:** already
followed. The record page withholds New, Edit and Delete on those lists
(`withDetailWritesWithheld`, objectstack#35599 ruling A).
- **The row's own approval lock:** served by the batch door. Before this
PR the list page's row menu read none of it; the lock reached only the
cells. This PR makes the row menu follow it.
- **Package-hook refusals** (the HotCRM measured case): nothing serves
them. The seat ruled for no Feature card. An app that wants the row menu
to know declares the rule on the child object's `userActions`
predicates. The toast from objectstack-ai#36885 covers refusals after the fact.

## Tests

- New file `rowMenuApprovalLock-36911.test.tsx`, 7 pins. Five come from
the first round: a locked row offers no Edit and keeps Delete, while its
unlocked sibling keeps Edit; no lock read before a row's actions are
reached for, then one read for the page and none on repeat; a 501 over
an `approval_status: pending` row leaves the menu as it was; a `null`
entry leaves Edit; a failed or not-yet-asked read leaves Edit. Two were
added in fix round 1. **List page:** on the list page, a row's actions
come from the single-row selection bar (`SelectionBar.tsx`), not a ⋮
column. With the locked row selected, the bar offers no Edit and still
offers Delete; with its unlocked sibling selected, the bar offers Edit,
which is the control. The bar already read the lock before this round,
because it resolves its actions from the same `rowActionMenuProps` and
asks through the same `onActionsDemand` on mount. No wiring was added;
only the pin is new. **Read in flight:** the lock answer is held, the ⋮
menu is opened and Edit shows; the answer is released and Edit leaves
the open menu while Delete stays. Result at 4c64a0a: 7/7 passed.
- Ablation, run once and not kept: `canEdit && rowOps?.update !== false
&& !approvalLockAnswered(row),` was replaced by `canEdit &&
rowOps?.update !== false,` through `scripts/ablation-replace.mjs`. The
mutation was confirmed on disk (anchor count 1 to 0, blob 2c0f37e to
dc3f8dc5). The first pin turned red as predicted (Tests 1 failed, 4
passed). After the restore, the blob matched HEAD and `git diff HEAD`
was empty. In fix round 1, the same ablation was run at 4c64a0a (blob
c420482 to 2f180f3e) and turned 3 pins red: the ⋮ pin, the list-page
bar pin and the in-flight pin (Tests 3 failed, 4 passed; the bar pin
received `{ edit: true, delete: true }`). A second ablation changed
`approvalLocks.isLocked(rowRecordId(row), null)` to
`approvalLocks.isLocked(rowRecordId(row), row)`, which lets the
`approval_status` column stand in (blob c420482 to be48f357). It turned
the 501-over-pending-column pin red (Tests 1 failed, 6 passed; received
`{ edit: false, delete: true }`). Both restores were confirmed: blob ==
HEAD and `git diff HEAD` empty.

- Stale fixtures fixed in this PR. Two existing explain-engine fakes
(`rowRecordCrudVerdict.test.tsx`,
`inlineEditRecordVerdict-27365.test.tsx`) answered every URL as the
explain engine. Once reaching a row's actions also read the lock door,
they counted that read as an explain call: 19 tests red on the first
full run. Each fake now answers the lock door "unlocked" and leaves it
out of its call count. Their assertions are unchanged.

Fix round 1 readings, at head `4c64a0a1`: the full plugin-grid suite
gave `Test Files 312 passed (312) · Tests 2773 passed (2773)`, VERDICT
command-exit 0. `pnpm --dir ui exec vitest run scripts/` gave 172 passed
and 2 skipped files, 5130 passed and 2 skipped tests, exit 0. The 39
derived gate families all exited 0. One of them,
`check:type-check-debt`, first hit a queue timeout (exit 3, not
measured) and then exited 0 on a re-run. Reconciliation with `--ran`
gave 39 derived, 39 run, 0 NOT-MEASURED. overlap-check exited 0 and
merges cleanly with origin/main and with objectstack-ai#37084.

The readings below are from the first round, at head `d4f56f4a` (which
includes a merge of `origin/main` at 9d70768), unless a line says
otherwise.

<details><summary>Full plugin-grid suite: 312/312 files, 2771/2771
tests</summary>

`cd ui && pnpm exec vitest run --maxWorkers=2 packages/plugin-grid/`
under os-verify-lock: `Test Files 312 passed (312) · Tests 2771 passed
(2771)`, VERDICT command-exit 0. The earlier run before the fixture fix,
at 2f9deb3, was `2 failed | 310 passed` files, with the 19 tests named
above.
</details>

<details><summary>Type-check and the ui scripts suite</summary>

- `pnpm exec turbo run type-check --concurrency=2
--filter=@object-ui/plugin-grid` at abbeea2: 54/54 tasks, plugin-grid a
cache miss (`tsc --noEmit && tsc -p tsconfig.test.json`), VERDICT
command-exit 0. `tsc --listFilesOnly` confirms that `tsconfig.test.json`
compiles all three changed test files.
- At d4f56f4: `pnpm run type-check` in `ui/packages/plugin-grid`, exit
0. Declared narrowing: this ran without the lock, because the lock was
held by a dogfood run past two 540-second budgets and `tsc --noEmit`
writes nothing. The dependency type-checks are left to CI.
- After building the seven `@objectstack` packages as Test UI does:
`pnpm --dir ui exec vitest run --maxWorkers=2 scripts/` gave `Test Files
172 passed | 2 skipped (174) · Tests 5130 passed | 2 skipped`, VERDICT
command-exit 0.
</details>

<details><summary>Derived gate families: 39 of 39 exit 0</summary>

`node scripts/pm/dispatch-gates.mjs --commands` on this diff derived 39
commands, and every one exited 0 at d4f56f4. `pnpm
check:changeset-fixed` was also run (exit 0), because its roster sits
under `.changeset`. Reconciliation with `--ran` gave: `39 derived, 39
run, 0 NOT-MEASURED, 0 UNRUN (a DERIVED zero — all 39 recorded an exit
code)`. `pnpm check:type-check-debt` exited 3 once on the first pass, at
2f9deb3, and was not measured then; both of its later runs exited 0.
</details>

<details><summary>overlap-check before each push</summary>

Every run exited 0. The last one, at d4f56f4: `merges cleanly` with
origin/main 9d70768, with objectstack-ai#37084, and with objectstack-ai#37079 (both also edit
`ObjectGrid.tsx`).
</details>

## Acceptance notes

- **Not covered: the compact related-list face and the phone gallery.**
The compact face is the `components` data-table
(`DataTableBuiltinRowActionItem`). Neither can reach the grid's lock
hook without a new dependency or export. No card is filed for this, per
the seat's ruling. On those surfaces Edit on a locked row stays until it
is refused, and the objectstack-ai#36885 toast explains the refusal.
- **Detail lines read "not locked".** The batch lock door reports detail
lines of a locked master as not locked until objectstack-ai#37041 lands. Its
single-record sibling reports them as locked. On a record page those
lines are already withheld (objectstack#35599), but on a detail object's
own list page their Edit stays until objectstack-ai#37041.
- **Edit is not held inert while the read is on the wire.** A click that
lands before the answer opens the form as before, and the server's
refusal is shown by the existing toast. The in-flight pin above fixes
this behaviour.
- **Note only: every row locked.** When every row on screen is locked
and Delete is not offered (a predicate or a grant withholds it), the ⋮
column is not drawn. The record-grained verdict already behaves this
way.
- **Deliberate: 501 with a pending column.** On a 501, a row whose
`approval_status` column reads pending is read-only in its cells (the
cells use the column fallback), while its menu still offers Edit (the
menu uses answered locks only).
- **Possible follow-up, inherited: stale answers.** Lock answers can go
stale while the grid stays mounted. The hook drops them only when the
object's data is invalidated.
- **Pre-existing: other edit paths.** Staged click-to-edit and the bulk
Change owner action do not read the lock.

## Verification

Read first (riskiest first):
1. `ui/packages/plugin-grid/src/objectGridActionsColumn.tsx`:
`approvalLockAnswered` and the `canEdit` expression in
`rowCrudVerdicts`, the one verdict both the column's draw decision and
every menu read.
2. `ui/packages/plugin-grid/src/ObjectGrid.tsx`: the
`useRowApprovalLocks` gate and `demandRowActions`, which together decide
when the read is made.
3.
`ui/packages/plugin-grid/src/__tests__/rowMenuApprovalLock-36911.test.tsx`.

Two-minute check: `cd ui && pnpm exec vitest run
packages/plugin-grid/src/__tests__/rowMenuApprovalLock-36911.test.tsx`.
Expect 7 passed.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYmRepQK9DkZeU7F53D)_

<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYmRepQK9DkZeU7F53D -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
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 bulk action: a per-record flow that pauses at a screen is counted as succeeded, and only the last paused row's screen opens

2 participants