Skip to content

fix(console): a partly failed bulk approve names each failed row with its reason - #37282

Merged
os-zhuang merged 7 commits into
mainfrom
claude/issue-36855-bulk-approve-reasons
Nov 25, 2026
Merged

os-zhuang merged 7 commits into
mainfrom
claude/issue-36855-bulk-approve-reasons

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW
Fixes #36855
Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no page under skills/ or content/docs/ names the Approval Center's bulk-failure string or teaches overriding it

维护者速读

  • 审批中心里批量通过或驳回时,若部分失败,审批人现在能看到每条失败记录及其失败原因;失败太多时点“查看全部”可在弹窗里看到每一条。
  • 替“批量处理审批的审批人”解决:以前只列出记录名,不说为什么失败,无从下手。
  • 只改提示文案和一个只读弹窗,不改审批结果;出错最多是提示不完整,可直接撤回本改动。旧的一条提示文案退役(随 19.0.0 大版本):自行改写过它的部署,改写不再生效。
  • 无

What changes

runBulk in ui/apps/console/src/pages/system/ApprovalsInboxPage.tsx caught each failure with a bare catch and kept only the record title. Now each failure keeps { id, title, reason }, where reason is humanizeError(err, tr('actionFailed', 'Action failed')): the same reader the single-row Approve and Reject use. It returns the server's userMessage (via declaredUserMessage) when the refusal carries one, else the page's localized line for the refusal (not allowed, already decided, no longer exists), else the error's own text (approvalsApi.call always sets one as CODE: message, so a 500 reads APPROVAL_APPROVE_FAILED: plus the server's text). The generic Action failed is reached only by an error with no message.

The partial-failure toast is now titled "N succeeded, M failed" and its description lists the first three failed rows, one per line, as "title: reason". The toast stays until dismissed (duration: Infinity, close button), whatever the count. When more than three fail, it carries a "Show all (M)" action. The action closes over that run's own list: it puts that list into the dialog and opens it, so a toast still on screen after a later run shows its own rows. The dialog lists every failed row with its reason. The page dismisses its failure toasts on unmount, because their action opens a dialog that lives in the page. The dialog is rendered outside the bulk bar, so it survives the selection being cleared. The console had no existing overflow pattern for a bulk toast. The nearest ones (AppManagementPage bulk toggle, the Studio save bar) put all lines into one toast with no cap, which is what this card asks to avoid. So I used a toast action plus an AlertDialog, built from components the page already imports.

Locale packs (ui/packages/i18n/src/locales/*.ts, all 11): approvalsInbox.bulkPartial is replaced by bulkPartialSummary, bulkFailureLine, bulkFailuresShowAll, bulkFailuresTitle, bulkFailuresBody and close. Key parity holds. zh-Hant.ts is regenerated from zh-Hans (gen:zh-hant). bulkFailureLine is added to the untranslated-identity allowlist as a format string (holes and a colon), the same as listConditions.chips.pattern.

Read first, by risk:

  1. ApprovalsInboxPage.tsx, the runBulk hunk: the reason reader and the overflow branch of the toast options.
  2. ApprovalsInboxPage.tsx, the new AlertDialog after the bulk action bar.
  3. ApprovalsInboxPage.inlineActionsVisible-34587.test.tsx: the stub translator now interpolates {{name}} holes. No existing assertion in that file used a hole.

Two-minute check: cd ui && pnpm exec vitest run apps/console/src/pages/system/ApprovalsInboxPage.inlineActionsVisible-34587.test.tsx should report 10 passed. The four cases under "a partly failed bulk approve says why each row failed" are the new pins.

Tests

New top-level describe in the shared inbox harness file ApprovalsInboxPage.inlineActionsVisible-34587.test.tsx, beside the #36463 refusal pin:

  • one refused row out of two: the toast reads 1 succeeded, 1 failed, and its description is Bulk Invoice 2: followed by the server's marked userMessage, with no overflow action;
  • CONTROL: all three rows succeed, so there is one success toast, no error toast and no failure list;
  • six rows with five failures (mixed marked userMessage and 409 already-decided): the toast lists the first three with reasons, its action reads Show all (5) and the toast is sticky. Clicking the action opens the dialog, and every one of the five rows appears with its own reason. The succeeding row does not appear.
  • two runs on one page, first with five failures, then clean: the first toast's Show all (5) still opens Not decided: 5 with rows 1 to 5. This is the L1 repro; it read Not decided: 0 and an empty list before.

Ablation through scripts/ablation-replace.mjs: the reason was replaced with ''. The mutation landed (anchor 1 to 0, blob d21c8808ce8e to 8724dfc2388a). Two pins went red (expected 'Bulk Invoice 2: ' to be 'Bulk Invoice 2: ...', Tests 2 failed / 7 passed). The file was restored, blob equal to HEAD and git diff HEAD empty.

Second ablation (own-run list), on head e1ea082. Two held mutations through scripts/ablation-replace.mjs put back the shared-state design: the action's setBulkFailures(failures); became void failures;, and setBulkFailures(failures); was written at the end of every run. Both landed (blob a729e1db98b7 to 7cfb74cd2d70 to c783de858825). The two-run pin went red, with the dialog reading Not decided: 0, which is the L1 repro (Tests 1 failed / 9 passed). Restored with --restore: blob equal to the HEAD blob a729e1db98b7, git diff HEAD empty.

Removed translation keys

approvalsInbox.bulkPartial (@object-ui/i18n, released in 18.6.0) is retired from all eleven packs it shipped in: ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans and zh-Hant. This follows the 19.0.0 key-retirement ruling (7153171432 / 7153326968). It is BREAKING only for a host that overrides that key: the override is no longer shown. The changeset carries the ADR-0087 disposition not-required (no-migration-prescription).

No reader is left. On head 935499b, git grep for bulkPartial (excluding bulkPartialSummary) across ui packages apps examples skills gave exit 1, no hits. Every dynamic approvalsInbox. + key construction is a wrapper: five definitions in four files (the console page's tr, RecordApprovalsPanel, two in ApprovalDecisionPanel, ApprovalActionTimeline). None of them is called with a non-literal key (git grep exit 1). The release tag @object-ui/i18n@18.6.0 carries the key in all 11 packs.

Acceptance notes

  • humanizeError's last fallback is err.message || fallback. A refusal with no userMessage and no recognised code or status therefore shows the error's own message, exactly as the single-row Approve does today. That keeps one reader, as the card asks. It is not narrowed here.
  • The bulk Reject path shares runBulk, so it gets the same feedback.

Verification

Code and test runs were on head 935499b. Head b646804 adds only the changeset declaration; its gates are listed below.

Tests
  • cd ui && pnpm exec vitest run apps/console/src/pages/system/ApprovalsInboxPage packages/i18n/src/__tests__/{untranslated-identity-4376,zh-hant-generated,all-locales-key-parity,en-zh-key-parity}.test.ts: Test Files 25 passed (25), Tests 185 passed (185).
  • An earlier run of the whole i18n package plus the inbox files, on aafd923: 130 of 132 files passed. The 2 failures (zh-Hant stale, bulkFailureLine identity) were fixed in 935499b and re-run green.
  • pnpm --filter @object-ui/console type-check and pnpm --filter @object-ui/i18n type-check: exit 0. The console tsconfig includes src, so the test file is compiled.
Derived gates
  • dispatch-gates --commands derived 41 families. 40 exited 0.
  • pnpm --dir ui exec vitest run scripts/ first hit a lock queue-timeout (exit 99, never ran). The re-run on 935499b exited 0: Test Files 172 passed, 2 skipped.
  • --ran reconciliation: 41 derived, 41 run, 0 NOT-MEASURED, 0 UNRUN.
  • The derivation on the final head is identical to the first one.
  • Head b646804 / c98f1ce (changeset declaration only): the derivation is unchanged at 41 families. The 40 non-vitest families were re-run and 39 exited 0. check:type-check-debt first exited 3: PREREQUISITE NOT MET, because its closure build lost the lock queue to this PR's own dogfood run. Re-run under the lock it exited 0 (130/133 type-checked, 0 re-measured above record). check-adr-0087-registration (1 declared-breaking changeset, disposition not-required (no-migration-prescription)), check-changeset-no-major, check-empty-changeset and check:nul-bytes were re-run on c98f1ce and exited 0. pnpm --dir ui exec vitest run scripts/ was not re-run after the changeset-only commits; its reading is from 935499b.
Round 3 (L1 S1/S2, head bc98914)
  • S1: the toast's "Show all" action now closes over its own run's list (setBulkFailures(failures) runs in onClick, not at the end of every run). The page dismisses its sticky failure toasts on unmount.
  • N2 taken: every partial-failure toast stays until dismissed, not only an overflowing one.
  • N6 taken in this body. N1, N3, N4 and N5 were not taken; N1 sits in the declaration text, which this round leaves untouched.
  • S2: the changeset now names the error's own text as the last fallback.
  • ApprovalsInboxPage.inlineActionsVisible-34587.test.tsx: Tests 10 passed (10). All inbox files (apps/console/src/pages/system/ApprovalsInboxPage, with the console type-check first): Test Files 21 passed (21), Tests 120 passed (120). Type-check exit 0.
  • Derived gates on bc98914: 41 derived, 41 run, all exit 0. vitest run scripts/ and check:type-check-debt ran under the lock. --ran gives 0 NOT-MEASURED, 0 UNRUN.
  • overlap-check: VERDICT clean exit 0 before the push.
  • Dogfood on bc98914: VERDICT command-exit 0, Test Files 487 passed | 3 skipped (490), Tests 4128 passed | 68 skipped (4196).
Dogfood battery (owed by the narrowing arm)
  • The @objectstack/dogfood^... closure was built, then pnpm --filter @objectstack/dogfood test ran under the lock on head b646804. VERDICT command-exit 0. Test Files 487 passed, 3 skipped (490). Tests 4128 passed, 68 skipped (4196).
  • The final head c98f1ce differs from that head only by one line in the changeset.

Generated by Claude Code

@github-actions github-actions Bot added size/m 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 25, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c98f1ce6255f5585fc851b9de038f7316ea796dc
Local-runs: probe — the brief asked for the pins and ablations to be re-run, so a throwaway worktree at the head ran the inbox pin file, three ablations, the four i18n pins, check-adr-0087-registration and one stale-toast probe; worktree removed
Scope: .changeset/36855-bulk-approve-failure-reasons.md, ui/apps/console/src/pages/system/ApprovalsInboxPage.tsx, ui/apps/console/src/pages/system/ApprovalsInboxPage.inlineActionsVisible-34587.test.tsx, ui/packages/i18n/src/tests/untranslated-identity-4376.test.ts, ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts + ui/apps/console/src/services/approvalsApi.ts, ui/packages/react/src/utils/error-message.ts, packages/rest/src/approvals-routes.ts, ui/packages/app-shell/src/chrome/ConsoleToaster.tsx, ui/packages/components/src/ui/alert-dialog.tsx, ui/packages/i18n/src/provider.tsx, packages/spec/src/system/translation.zod.ts, scripts/check-adr-0087-registration.mjs, the four approvalsInbox.${key} wrapper files in app-shell, tag @object-ui/i18n@18.6.0 (read in the cited code, outside the diff)

Face: narrowing (record-recognisers --template --paths refused the fifteen paths as deciding no face and pointed at the changeset's Clause-②: yes (narrowing) line; --face narrowing maps to this tier).

① Derived judgments

  • The retired key has no reader at head. git grep bulkPartial over the whole tree at the head (not only ui packages apps examples skills) finds the word only in this PR's changeset, apart from bulkPartialSummary. No test key list, docs page or skill names it.
  • Dynamic construction: approvalsInbox.${key} is built in five wrappers across four files (the console page's tr, RecordApprovalsPanel, two in ApprovalDecisionPanel, ApprovalActionTimeline). Every call of them passes a string literal; the one multi-line call (needsDecisionInputs) is literal too. No bulk${…} or ${…}Partial composition, no keyPrefix, no whole-namespace read (t('approvalsInbox'), returnObjects). The test-side constructions iterate their own lists, which do not hold the key.
  • The key was released. Tag @object-ui/i18n@18.6.0 (package version 18.6.0) carries approvalsInbox.bulkPartial in all eleven packs, and so does the npm tarball i18n-18.6.0.tgz (dist/locales/*.js, eleven files).
  • The removal is exactly one key. chore(release)!: enter Changesets pre mode (next) so 19.0.0 opens; retire the 18.6.0 i18n keys no code reads #37230's released-keys-removed.mjs, run against the tag, reports 67 keys absent on origin/main and 68 at this head; the one added entry is approvalsInbox.bulkPartial with the eleven locales the changeset lists.
  • The six new keys (bulkPartialSummary, bulkFailureLine, bulkFailuresShowAll, bulkFailuresTitle, bulkFailuresBody, close) are in all eleven packs with their holes intact. zh-Hant matches the generator (pin green).
  • Pins at head: the inbox pin file gives 9 passed; the four i18n pins give 66 passed.
  • Ablations reproduce. reason: '' (blob d21c8808ce8e to 8724dfc2388a, the dev's pair) turns two pins red with expected 'Bulk Invoice 2: ' to be 'Bulk Invoice 2: …'. The dialog list cut to the first three turns the third pin red (length of 5 but got 3). Dropping ko's bulkFailuresBody and the allowlist line turns key parity and the identity pin red. Files restored to d21c8808ce8e.
  • Check-runs on the head: 47 success, 15 skipped, 0 failed, including Check Changeset, Type Check UI, Lint UI, Build & E2E UI, Test UI 1 to 16, Dogfood Regression Gate and Governed Surface Queue Guard.
  • K = 7 against origin/main 4ed453dc211; merge base 057cedfa9b6. git merge-tree --write-tree is clean (tree edf5c3c5a52). Main's seven commits touch no locale pack and no file under the console's pages/system.
  • Locale overlap: feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166, feat(studio): open Studio's dashboards and reports in the app's edit state; × returns to the list #37226 and feat(ai): get_record_context joins the service-ai platform tool group, with its chat label (ADR-0160 row 9) #37210 each touch the same eleven pack files, in other namespaces. A pairwise git merge-tree of this head with each of them, and with feat(studio): the flow designer opens full-screen on its metadata address; no flow rail (#36903) #37169, is clean.
  • b6468047c5..c98f1ce625 is one added changeset line (Skills-docs:), so the dogfood reading at b6468047c5 stands for the code; CI's Dogfood Regression Gate also passed at this head.

② Semver level

③ Boundary flags

  • Dev flag, the surface grew into untranslated-identity-4376.test.ts: it is a locale-pack test, inside the claim's "their tests". Accepted.
  • Dev flag, humanizeError falls through to the error's own text: answered under S2 and N3.
  • Dev flag, vitest run scripts/ not re-run after the changeset-only commits: CI's Test UI passed at this head.
  • SQL push-down: not applicable, no data path in the diff.
  • No open_questions entry.

④ Design judgment

  • The narrowing takes away one string that nothing reads. A host override of it stops showing; nothing else changes for that host. That part holds.
  • Reason safety: bulk uses the same humanizeError(err, tr('actionFailed', …)) call as the single-row Approve and Reject, so the two cannot differ. A marked userMessage is shown as written; 403, 404 and 409 get the page's fixed lines. The fall-through is not generic, see S2 and N3.
  • Dialog: Radix AlertDialog, so focus is trapped, lands on Close, and Escape closes. It is rendered outside the bulk bar and outside any tab condition. escapeValue: false, so titles and reasons are not double-escaped; React escapes them.
  • S1 (should-fix) — The sticky toast's "Show all" opens whatever the latest run left, not the run the toast reports. onClick only calls setBulkFailuresOpen(true), and every runBulk overwrites bulkFailures (with [] on a clean run). Probe, run at head: a run with 5 failures, then a clean run of 2 with the first toast still up, then the first toast's "Show all (5)". The dialog reads "Not decided: 0" with an empty list (PROBE items=0 title=Not decided: 0). After a second partial failure it lists the wrong rows. The toaster is app-wide and the toast has duration: Infinity, so it also outlives the page; there the action does nothing. Fix direction: have the action carry its own run's list (setBulkFailures(failures) in onClick), and dismiss the toast by id when the next run starts and on unmount. Add a pin for two runs.
  • S2 (should-fix) — The changeset says each reason is the userMessage, else the page's line, "else a generic "Action failed"". The code returns err.message || fallback, and approvalsApi.call always sets a message (${code}: ${msg}). So a 500 shows APPROVAL_APPROVE_FAILED: plus up to 500 characters of the server's exception text (approvals-routes.ts:632), a dropped connection shows Failed to fetch, and "Action failed" is in practice never reached. The PR body's "What changes" and Acceptance notes say this correctly; the changeset, which ships, does not. Fix: name the error's own text in that sentence.
  • N1 — The ADR-0087 marker says a host "has nothing to rewrite", while the last line tells it to "move its wording to approvalsInbox.bulkPartialSummary". The category stands; chore(release)!: enter Changesets pre mode (next) so 19.0.0 opens; retire the 18.6.0 i18n keys no code reads #37230's wording ("nothing for objectstack migrate meta to rewrite") is the exact one.
  • N2 — With one to three failures the toast keeps the 4-second default and has no action. Three rows with reasons cannot be read in that time, and the reasons cannot be reopened, though the state holds them.
  • N3 — humanizeError's unrecognised branch shows raw CODE: text, and its 429 and 501 lines speak of reminders and recall. This is the single-row behaviour today and outside the card; a bulk run now repeats it per row. It deserves its own card.
  • N4 — The pins drive bulk Approve only. Bulk Reject shares runBulk and is not pinned; the unrecognised-error branch is not pinned either.
  • N5 — The dialog opens from a toast button that sonner removes on click, so on close focus returns to the page body. The list scroller has no tabindex, so keyboard scrolling depends on the browser.
  • N6 — The PR body counts four wrappers; there are five definitions in four files. The zero holds.

Two findings are open, S1 and S2. Each needs a head change and a delta review; this record does not clear the head.

Implemented-by: claude/issue-36855-bulk-approve-reasons
Reviewed-by: session_01QSeKYpEsWWE9Y5YtSsDgqZ

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — REWORK · L1 · head c98f1ce6255f5585fc851b9de038f7316ea796dc · 2026-11-25T12:52Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

Final green head for the delta L1 and same-head contract review (2026-11-25T14:35Z): bc989143b42947b3bff569dd54394c4d35f1b83f.

  • Checks at this head: 47 success, 15 skipped (all 15 expected per check-expected-skips, exit 0), 0 failed, 0 pending. mergeable_state: clean.
  • Size: 15 files, +349 / −21; Fixes #36855. Clause-②: yes (narrowing): approvalsInbox.bulkPartial is retired, listed under "Removed translation keys". Metadata-protocol: none.
  • This round (L1 REWORK at c98f1ce6):
    • S1: each sticky toast's "Show all (M)" now closes over its own run's failure list: setBulkFailures(failures) runs in onClick, not at the end of each run. A later run cannot empty or replace what an earlier toast shows. The page dismisses its sticky failure toasts on unmount. The new pin is the seat's repro: two runs on one page, the first with 5 failures and the second clean, then the first toast's "Show all (5)" opens "Not decided: 5" listing rows 1–5. Ablation (the onClick capture removed and the run-end write restored) gives 1 failed / 9 passed, with the dialog reading "Not decided: 0". Restored to the HEAD blob.
    • S2: the changeset and the PR body now say the last fallback is the error's own text (CODE: message, e.g. APPROVAL_APPROVE_FAILED: plus the server text), with "Action failed" only for an error with no text.
    • N2 and N6 taken; N1, N3, N4 and N5 not taken. The declaration and the Removed translation keys section are unchanged.
  • Evidence: console type-check exit 0. ApprovalsInboxPage tests: 21 files, 120 tests passed. 41 of 41 derived gates exit 0. The dogfood battery at this head: 487 passed / 3 skipped, 0 failed.
  • Overlap: overlap-check VERDICT clean.
  • Landing: this is a narrowing, so it needs the maintainer's approval or enqueue after the seat's same-head contract review. The zone does not land it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head bc989143b42947b3bff569dd54394c4d35f1b83f · 2026-11-25T14:51Z

  • Delta L1 on card 审批中心批量审批:失败的行只列记录名,不说为什么失败 #36855 after the REWORK at c98f1ce6255f5585fc851b9de038f7316ea796dc. The delta is two commits and three files (+79/-28): the changeset, the page and its pin file. The eleven locale packs and the allowlist line did not move. The PR is 15 files, +349/-21, draft, Fixes #36855.
  • S1: closed. The toast's "Show all" now carries its own run's list: setBulkFailures(failures) runs inside onClick, and no run writes the dialog's list any more. failures is a per-run local, so nothing a later run does can reach it. The new pin is the repro: 5 failures, a clean run, then the first toast's "Show all (5)" lists rows 1 to 5 under "Not decided: 5".
  • Ablation re-run by the seat: the capture removed and the run-end write put back (blob a729e1db98b7 to c783de858825, the dev's pair). The pin file gives 1 failed / 9 passed, and the dialog reads "Not decided: 0". Restored to a729e1db98b7.
  • Unmount: the page keeps the ids of the toasts it raised and dismisses them when it unmounts. Probe at head: the raised toast's id is dismissed on unmount. The id set cannot grow past one entry per partial-failure run, and dismissing an id that is already gone does nothing in sonner 2.0.8.
  • The dev did not take "dismiss on the next run". That is sound: with each action holding its own list, an older toast stays correct, and the pin needs it on screen.
  • S2: closed. Changeset sentences read against the code: "else the error's own text as the console's approvals client reports it (CODE: message ...)" and "The generic "Action failed" shows only for an error that carries no text at all" match humanizeError and approvalsApi.call. "It stays until dismissed" and "every failed row of that run ... even after a later bulk run" match the page. The PR body says the same.
  • Prior N2, taken and pinned: every partial-failure toast now has duration: Infinity and a close button, whatever the count. The one-row pin asserts duration is Infinity with no action; the five-row pin asserts the same with the action. The changeset states it. Prior N6 is taken in the PR body.
  • Narrowing declaration, unchanged and still right. The PR body and the changeset both read Clause-②: yes (narrowing) and Metadata-protocol: none through readClause2Line. The BREAKING line, the "Removed translation keys" list and the ADR-0087 marker not-required (no-migration-prescription) are byte-identical to the prior head.
  • Removed keys, measured again. The PR's locale diff removes one line per pack, bulkPartial, in all eleven packs. released-keys-removed.mjs (now on main) against tag @object-ui/i18n@18.6.0: main 76, this head merged with main 77; the one added entry is approvalsInbox.bulkPartial with the eleven locales the changeset lists.
  • chore(release)!: enter Changesets pre mode (next) so 19.0.0 opens; retire the 18.6.0 i18n keys no code reads #37230 merged, so main is in Changesets pre mode and the 19.0.0 line is open. The prior caveat on "retired in 19.0.0" is closed.
  • Pins at head: 10 passed (inbox file), 66 passed (four i18n pins). On the merge with current main the same five files give 76 passed, and check-adr-0087-registration exits 0.
  • Check-runs on the head: 47 success, 15 skipped (all expected), 0 failed, 0 pending. l1-face reads every mechanical item ok; its one flag is the dogfood item, answered next.
  • Dogfood: the trusted os-dev report 7164781165 on the card pins dogfood_battery to bc989143b4: command exit 0, Test Files 487 passed and 3 skipped of 490, Tests 4128 passed and 68 skipped, no failures. CI's Dogfood Regression Gate is also green at this head.
  • K = 19 against main 1a628673d26; merge base 057cedfa9b6; git merge-tree is clean (tree ef24c4d7caa). Main now touches the eleven packs too (feat(ai): get_record_context joins the service-ai platform tool group, with its chat label (ADR-0160 row 9) #37210, feat(studio): open Studio's dashboards and reports in the app's edit state; × returns to the list #37226), in other namespaces.
  • 维护者速读 in the PR body: its three statements hold at this head. It does not say the toast now stays until closed; the seat's hand-off brief adds that. Its fourth line reads 「无」; the hand-off brief asks for the approval.
  • N1 closed by the seat — the card's claim 7159898636 read Clause-②: no while the PR body and changeset read yes (narrowing). The seat edited that claim in place through the relay. Only its Clause-②: line changed, read-back identical, and readClause2Line now returns declared / yes / narrowing.
  • N2 — A bulk run that ends after the page is left still raises its toast. Probe at head: unmount during the run, then the run ends with 6 failures. The toast is raised sticky with "Show all (6)", nothing dismisses it, and the action opens nothing. The changeset's "dismissed when the Approval Center is left" holds only for toasts already on screen. A follow-up card should skip the action when the page is gone.
  • N3 — The unmount dismissal has no pin. The seat's probe passes; a later edit could drop the effect unseen.
  • N4 — The PR body's "Dogfood battery" block and the opening line of "Verification" still name the older heads c98f1ce625 and 935499b5e. The "Round 3" block has the readings for this head.
  • Not taken, still nits from the prior L1: its N1 (the ADR-0087 marker's "nothing to rewrite" wording), N3 (the raw fall-through of humanizeError; the seat owes triage a card), N4 (bulk Reject not pinned) and N5 (focus after the dialog closes).
  • Contract review at this head is the ## Contract review record posted beside this one: PASS at CONTRACT_REVIEW_TIER.

No must-fix, no should-fix.

  • Landing: handed to the maintainer (narrowing). The PR stays draft with pm:awaiting-merge. After approval the seat lands it; K = 19 (≥ 15), so main is merged first, followed by a merge-only delta read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: bc989143b42947b3bff569dd54394c4d35f1b83f
Local-runs: probe — the brief asked for the pins and the S1 ablation to be re-run, so a throwaway worktree at the head ran the inbox pin file and the four i18n pins, the S1 ablation, two unmount probes, the same five files and check-adr-0087-registration on the merge with main, and released-keys-removed.mjs; worktree removed
Scope: .changeset/36855-bulk-approve-failure-reasons.md, ui/apps/console/src/pages/system/ApprovalsInboxPage.tsx, ui/apps/console/src/pages/system/ApprovalsInboxPage.inlineActionsVisible-34587.test.tsx, ui/packages/i18n/src/tests/untranslated-identity-4376.test.ts, ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts + ui/apps/console/src/services/approvalsApi.ts, ui/packages/react/src/utils/error-message.ts, ui/packages/app-shell/src/chrome/ConsoleToaster.tsx, sonner 2.0.8 dist/index.mjs, scripts/pm/clause2-line.mjs, scripts/check-adr-0087-registration.mjs, ui/packages/i18n/scripts/released-keys-removed.mjs and .changeset/pre.json on main, tag @object-ui/i18n@18.6.0 (read in the cited code, outside the diff)

Face: narrowing (record-recognisers --template --paths refused the fifteen paths as deciding no face and pointed at the changeset's Clause-②: line, which carries the (narrowing) arm; --face narrowing maps to this tier). This is a full review of the new head. It builds on the record at c98f1ce6255f5585fc851b9de038f7316ea796dc, whose two open findings (S1, S2) are closed below.

① Derived judgments

  • Delta: c98f1ce625..bc989143b4 is two commits and three files (+79/-28): the changeset, the page and its pin file. The eleven locale packs and the allowlist line are byte-identical to the prior head, so the prior record's readings on key parity, the six new keys and the zero readers of the retired key stand.
  • The removal is still exactly one key. The PR's locale diff removes one line per pack, bulkPartial, in all eleven packs. released-keys-removed.mjs against the tag reports 76 on origin/main and 77 on this head merged with main; the one added entry is approvalsInbox.bulkPartial with ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans and zh-Hant, the list the changeset carries.
  • Declaration lines through readClause2Line and readMetadataProtocolLine: the PR body and the changeset both read yes with the narrowing arm, and none.
  • Pins at head: the inbox pin file gives 10 passed; the four i18n pins give 66 passed.
  • S1 ablation reproduces. With the onClick capture removed and the run-end write restored (blob a729e1db98b7 to c783de858825, the dev's pair) the two-run pin goes red: 1 failed / 9 passed, the dialog reading "Not decided: 0". Restored to a729e1db98b7.
  • Probe A at head: a raised partial-failure toast is dismissed by id when the page unmounts. Probe B: a run that ends after unmount raises its toast with nothing to dismiss it (N2).
  • Check-runs on the head: 47 success, 15 skipped (all expected), 0 failed, 0 pending, including Check Changeset, Lint & Repo Gates, TypeScript Type Check, Type Check UI, Lint UI, Dogfood Regression Gate and Governed Surface Queue Guard.
  • Dogfood battery on this head: the trusted os-dev report 7164781165 pins it to bc989143b4, command exit 0, Test Files 487 passed and 3 skipped of 490, Tests 4128 passed and 68 skipped, no failures.
  • K = 19 against origin/main 1a628673d26; merge base 057cedfa9b6. git merge-tree --write-tree is clean (tree ef24c4d7caa). Main now touches the eleven packs (feat(ai): get_record_context joins the service-ai platform tool group, with its chat label (ADR-0160 row 9) #37210, feat(studio): open Studio's dashboards and reports in the app's edit state; × returns to the list #37226) in other namespaces. On the merged tree the five pin files give 76 passed and check-adr-0087-registration exits 0 with this one declared-breaking changeset.

② Semver level

③ Boundary flags

  • Dev flag, "dismiss on the next run" not taken: answered in ④. The closure is the stronger fix and the pin needs the first toast on screen.
  • Dev out-of-scope finding, the raw fall-through of humanizeError and its 429 and 501 lines: outside 审批中心批量审批:失败的行只列记录名,不说为什么失败 #36855, carried by the seat to triage as a card.
  • CI on the new head was "not awaited" in the report; the check-runs above are read at the head.
  • SQL push-down: not applicable, no data path in the diff.
  • open_questions is empty. The PR author is objectstack-fleet[bot].

④ Design judgment

  • The narrowing itself is unchanged from the prior head: one string that nothing reads is taken away. A host override of it stops showing; nothing else changes for that host. It holds.
  • S1: closed. runBulk builds failures as a per-run local. The toast's onClick is the only writer of the dialog's list and writes that local, then opens the dialog. No run writes the list at its end any more, so a later run, clean or not, cannot empty or replace what an earlier toast opens. The closure holds nothing that can go stale: the two state setters are stable, and the array is never mutated after the toast is raised. The pin is the prior repro and goes red under ablation.
  • Unmount. The page keeps a ref set of the ids of the toasts it raised. Close and swipe call onDismiss, which drops the id. A click on the action removes the toast in sonner without calling onDismiss, so that id stays in the set; the set is bounded by the number of partial-failure runs on one page visit, and dismissing a gone id on unmount does nothing. The cleanup effect has no dependencies, so it runs only at unmount; under StrictMode's extra pass the set is empty. No leak.
  • onDismiss reads toastId before the const is assigned only if sonner called it inside toast.error, which it does not; it fires from the close button, a swipe or a later dismiss. When toast.error returns nothing (the test's stub) the id is not tracked.
  • S2: closed. The changeset now says: the userMessage, else the page's line, else "the error's own text as the console's approvals client reports it (CODE: message ...)", and "Action failed" only for an error with no text. That is what humanizeError and approvalsApi.call do. The PR body agrees.
  • Prior N2, taken: duration: Infinity and the close button apply to every partial-failure toast, not only an overflowing one. It is intended (the reasons need reading time), stated in the changeset, and pinned in both the one-row and the five-row case. Success toasts and single-row toasts are untouched.
  • N1 — The card's newest Claim: comment (7159898636) reads Clause-②: no; the PR body and the changeset read yes (narrowing). The gates read the body and the changeset, so the head is judged on the right line. The claim is corrected on the card before the hand-off. No head change.
  • N2 — A run still in flight when the page is left ends after the cleanup has run. Probe: the toast is raised sticky with "Show all (6)", nothing dismisses it, and its action opens nothing. The first three rows and their reasons still show. The changeset's "dismissed when the Approval Center is left" is exact only for toasts already raised. It needs a run long enough to leave during; a follow-up card should raise that toast without the action.
  • N3 — The unmount dismissal is not pinned.
  • N4 — Stale sentences in the PR body: the "Dogfood battery" block and the first line of "Verification" name older heads. The "Round 3" block is right.
  • Not taken, still nits from the prior record: its N1 (the ADR-0087 marker says a host "has nothing to rewrite" while the last line tells it where to move its wording), N3, N4 (bulk Reject and the unrecognised-error branch are not pinned) and N5 (focus after the dialog closes).

No must-fix, no should-fix.

Nothing above needs a head change. This record clears the head.

Implemented-by: claude/issue-36855-bulk-approve-reasons
Reviewed-by: session_01QSeKYpEsWWE9Y5YtSsDgqZ

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

维护者速读

  • 用户能看到什么变化:审批中心批量通过或驳回时若部分失败,提示改为「N 条成功,M 条失败」,并逐条列出前三条失败记录和各自的原因;这条提示会一直留到手动关闭;失败超过三条时,点「查看全部」可在弹窗里看到这一次操作的每一条。
  • 为什么做:以前只列出记录名,不说为什么失败,批量处理的审批人无从下手(卡 审批中心批量审批:失败的行只列记录名,不说为什么失败 #36855)。
  • 出错会怎样:只改提示和一个只读弹窗,不改审批结果;最坏是提示不完整,可直接回退本改动。旧的一条提示文案(approvalsInbox.bulkPartial)随 19.0.0 退役,自行改写过它的部署,改写不再生效,这是唯一的破坏性变化。
  • 要你做什么:请批准本 PR。这是一项收窄申报,需要你批准后由席位落地。依据是契约审核记录 PR comment 7165940291(PASS,Head-sha bc989143b42947b3bff569dd54394c4d35f1b83f)。

Approval request at 2026-11-25T14:52Z. Seat opinion: approve. The change is small and stays inside the Approval Center page and the eleven locale packs. Both findings of the last round are closed at this head: a toast's "Show all" lists its own run's failures (pinned, and the pin goes red when the fix is removed), and the changeset now describes the fallback text correctly. The one retired key has no reader, it is the only released key this PR removes, and it is declared with its eleven locales. Checks at the head are 47 success, 15 expected skips and 0 failed; the full dogfood battery passed on this head; the merge with current main is clean (K = 19). Four nits stay open and need no head change. The one worth a follow-up card: a bulk run that ends after the page is left still raises its toast, and that toast's "Show all" opens nothing.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 25, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 25, 2026 16:37
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 8695703 Nov 25, 2026
68 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-36855-bulk-approve-reasons branch November 25, 2026 17:07
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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/m 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.

审批中心批量审批:失败的行只列记录名,不说为什么失败

3 participants