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
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… and their notes follow the new currency (objectstack-ai#37284)

repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

Fixes objectstack-ai#36412

Clause-②: yes (widening)
Metadata-protocol: none

## 维护者速读

-
用户可见变化:在报价、订单、发票里选产品带出价格后,如果在同一次编辑中改了币种,价格不会被改动或清空,下方会说明这笔价格是按哪个币种带入的、记录现在是哪个币种;没带入的价格提示会跟着换成新币种;改成与产品价格相同的币种时,提示保留、价格仍空,并提示重新选取即可带入。
- 为什么做:这是「选产品不跨币种抄价格」那张卡里最后一项(「保留金额并提示」及其 B 方案),替多币种单据的使用者补上改币种后的说明。
- 出错会怎样:只影响价格下方的提示文字,不写入、不清除任何金额;手动输入的金额不显示提示;可以直接撤回这一个合并。
- 要你做什么:无。

## What changes

The ruling item on this card (comment 7118795825, 「保留金额并提示」) and its
branch B (comment 7158109013), on both hosts: the line-item grid
(`GridFieldWidget`) and the record form (`LookupField` with the declared
pairs). Scope is bounded by ADR-0144 D2: new records, records with no
saved lines, lines staged in the same edit, and declared pairs on the
record's own amounts. Items 1–4 landed in objectstack-ai#36918. With this PR the
card's last open item is done.

- **Point 1: a currency change in the same edit never changes or clears
a filled amount.** Measured first. This already holds on `main`
(`057cedfa9b6`): nothing writes an amount when the code changes. The new
pins were run against main's source files, and every amount assertion
passed there; the only failures were the note lines that come after them
(see Tests). Pinned either way, on both hosts. This PR adds no write.
- **Point 2: an amount a pick copied gets a note once the currencies
differ.** `judgePickWrites` now records each amount it copies as
`CopiedAutofill` (`target`, `source`, `value`, `under`: the code the
target was in at the write). The plan gains the optional `copied`,
absent when there is none. Each host keeps these beside the withheld
values of the same pick. When drawing, it shows "Unit Price was copied
as $100.00, but the record is now in EUR. Enter Unit Price in EUR if it
should change." only when all of these hold (`copiedAutofillNow`): the
field still holds that pick, the target still holds the copied value,
and the code the target is in now is known and differs from `under`. A
currency change back ends the note.
- **Point 3: a withheld note already shown refreshes to the record's new
currency.** `withheldAutofillNow` judges each shown withheld item again
with `crossCurrencyRefusal`, using the picked amount's own currency (its
`from`) against the target's currency as it is now. The note follows the
new code, and its reason too: a code cleared reads "no currency is
chosen".
- **Point 4: a hand-typed amount gets no note.** Only a pick records a
copied amount, and the note needs the target to still hold the copied
value. So an amount typed by hand, or typed over a copied one, says
nothing.
- **Branch B.** When the record's currency turns to the picked amount's
own, the re-judgement copies nothing. The item takes the new reason
`nowSameCurrency`, the note stays and the cell stays empty: "Unit Price
was not filled when it was picked. The record is now in USD: pick again
to fill $100.00." A pick again fills it (pinned as the control on the
record form). When the target still holds an earlier value (`held`), the
sentence says to clear the field, then pick again
(`lookup.autofillNowSameCurrencyHeld`, round 3).
- "Now" on each host is the same context the pick used, with no picked
row. On the grid that is `gridAutofillCurrency` on the current line,
with `columnCurrencies` (a header-following line) or `columnFields` (the
line's own code). On the record form it is `currencyFor` on the live
record, followed parent included. So a code written later in the edit is
read exactly as a pick would read it.
- i18n: three sentences, `lookup.autofillNowSameCurrency`,
`lookup.autofillNowSameCurrencyHeld` and `lookup.autofillCopiedUnder`,
in all 11 packs (zh-Hant generated by `gen:zh-hant`) and in
`FIELD_DEFAULTS`.
- One changeset, `.changeset/36412-currency-change-notes.md`:
`@object-ui/fields` and `@object-ui/i18n`, both `patch`. The objectstack-ai#36918
changeset is left untouched. `@object-ui/plugin-form` changes in its
test file only, which is not published.

## Clause-② rework: route (a), `copied` optional

At the seat's rework the first declaration, `Clause-②: no`, did not
hold. Route (a) is taken; no route (b), nothing here needs `copied` to
be required. `LookupAutofillPlan.copied` is now optional (`copied?:
CopiedAutofill[]`). `judgePickWrites` leaves it out when the pick copied
no amount under a judged currency, and every in-package reader treats
absent as none (`LookupField`'s two `noteWithheld` calls,
`GridFieldWidget`'s pick, `planLookupAutofill`'s pass-through). A plan
built without `copied` is still a plan, so nothing is narrowed. The
published `@object-ui/fields` surface widens:
- new exports `withheldAutofillNow`, `copiedAutofillNow`,
`copiedAutofillMessage` and the type `CopiedAutofill`;
- the optional member `LookupAutofillPlan.copied`;
- the `WithheldAutofill.reason` union gains `nowSameCurrency`, so code
that switches over every reason gains one case.

The same declaration is in the changeset. `Metadata-protocol: none`
stands: no spec key, value or metadata type changes. A pin asserts that
a plan which copied no amount carries no `copied`.

## Tests

Round 3 (the seat's S1, N1, N2 and N4), all under `os-verify-lock`:
- Both pin files at `dd0ebf7f96`: Tests 71 passed (71). Two new pins
hold the held branch B case on each host (grid: header USD over a line
holding 80, then EUR; form: an `overwrite: true` pair over a typed 80 on
a EUR quote, then USD). Each asserts the exact clear-then-pick-again
sentence and that the earlier value stays. The grid branch B pin now
ends with the N4 control: a pick again fills 100 and no note remains.
- Ablation: the held arm in `withheldAutofillMessage` is deleted
(`ablation-replace --delete`, restored to the HEAD blob `848e5fd1844c`).
Tests 2 failed, 9 passed: exactly the two held pins fail. The non-held
branch B pins on both hosts stay green, so their wording is unchanged.
- The three-package run at `dd0ebf7f96` failed one test,
`all-locales-key-parity` "placeholders match en in every pack": the
first zh-Hans text of the new key named `{{field}}` three times against
en's two, and zh-Hant was generated from it. Fixed in `315c0d8fef`. At
that head, `packages/i18n/` gives Test Files 111 passed, Tests 2028
passed, 13 skipped. Only locale strings changed between the two heads;
fields and plugin-form were green at `dd0ebf7f96` (685 of 687 files
passed, 1 skipped, and the one failure was that i18n test). `type-check`
of the three packages exits 0 at `315c0d8fef`.

Round 2 (the Clause-② rework), head `a602513471`, all under
`os-verify-lock`: the same three-package run gives Test Files 686
passed, 1 skipped (687), and Tests 9840 passed, 21 skipped (9861),
`VERDICT command-exit 0`. `type-check` of the three packages exits 0.
Ablations of the reworked lines, each restored to the HEAD blob
`e96dadd3fbba`:
- `copied` always present (`return copiedAmounts.length > 0 ? { ...plan,
copied: copiedAmounts } : plan;` becomes `return { ...plan, copied:
copiedAmounts };`): Tests 1 failed, 8 passed. The absent-means-none pin
fails.
- No copied note, re-run on the new head: Tests 3 failed, 6 passed. The
copied note fails on both hosts, plus the pure pin.

Round 1 readings follow. Tests on head `482148532`, all under
`os-verify-lock`: `pnpm --dir ui exec vitest run --maxWorkers=2
packages/fields/ packages/plugin-form/ packages/i18n/` gives Test Files
686 passed, 1 skipped (687), and Tests 9840 passed, 21 skipped (9861),
`VERDICT command-exit 0`. `type-check` of `@object-ui/fields`,
`@object-ui/plugin-form` and `@object-ui/i18n` exits 0, after the
closure build. Both pin files are in the `tsconfig.test.json` program
(`--listFiles`: 1 hit each).

<details><summary>New pins, the point 1 measurement, and
ablations</summary>

- `ObjectForm.lookupAutofill-28245.test.tsx`, new describe "a same-edit
currency change keeps amounts and says so", 4 tests through
`ObjectForm`. (1) A USD quote picks a $100 product. Changed to EUR, it
keeps 100 and shows the copied note with its exact text. Control: before
the change there is no note, and changing back to USD ends it. (2) A JPY
quote's withheld note names GBP and no longer JPY after the code becomes
GBP, and the price stays empty. (3) Branch B: a EUR quote's withheld
note reads exactly "Unit Price was not filled when it was picked. The
record is now in USD: pick again to fill $100.00." once the code becomes
USD, and the price stays empty. Control: the pick again fills 100 and no
note remains. (4) A typed 55 gets no note through a currency change, and
neither does 55 typed over a copied 100.
- `GridField.lookupAutofill-28245.test.tsx`, new describe of the same
name, 5 tests. The same four cases through `GridField`, with the header
currency handed in as `columnCurrencies` and changed by a rerender, for
a product priced in EUR. One more is pure: `withheldAutofillNow` follows
the currency now, `nowSameCurrency` applies when it matches, and with no
currency known the item is returned unchanged; `copiedAutofillNow` names
a differing code only while the target holds the copied value. The
objectstack-ai#36412 declared-pairs pin now also asserts `copied` (the price is
recorded under the code the same pick wrote).
- **Point 1 measured on main's code.** The five source files were
restored to `057cedfa9b6` in the tree only, the `-t ruling` pins were
run, and the files were restored with `git checkout HEAD` (`git diff
HEAD` empty afterwards). Result: 7 failed, 2 passed. The two hand-typed
pins passed. Both copied-amount pins failed on the note line after their
amount assertion (ObjectForm line 745, GridField line 641): the amount
kept its value through the currency change on main. The refresh and
branch B pins failed on their note text, and the pure pin failed on the
missing export. Point 1 has no implementing line to ablate: nothing
writes an amount on a currency change, before or after this PR.
- Ablations on the committed tree with `scripts/ablation-replace.mjs`
(`lookupAutofill.ts`; vitest aliases `@object-ui/*` to `src`, so no
`dist` sits between mutation and run), `-t ruling`, each restored to the
HEAD blob `18535d11faef`:
- ` if (!now) return item;` becomes ` return item;` (no refresh): Tests
5 failed, 4 passed. Refresh and branch B on both hosts, plus the pure
pin.
- ` return to && to !== item.under ? to : undefined;` becomes ` return
undefined;` (no copied note): Tests 3 failed, 6 passed. Copied note on
both hosts, plus the pure pin.
- ` if (!sameValue(current, item.value) || !now) return undefined;`
becomes ` if (!now) return undefined;` (a typed-over amount keeps the
note): Tests 3 failed, 6 passed. Hand-typed on both hosts, plus the pure
pin.

</details>

## Acceptance notes

- Clause-②: `yes (widening)` (see the rework section above). The diff
touches no `packages/spec/**` and no metadata. `git grep` finds
`LookupAutofillPlan` only inside `ui/packages/fields`.
- Branch B over a filled target (round 3, the seat's S1): a withheld
value that carries `held` (a pick over a target that still holds an
earlier value) now gets its own branch B sentence,
`lookup.autofillNowSameCurrencyHeld`: "Unit Price was not filled when it
was picked and still holds its earlier value. The record is now in USD:
clear Unit Price, then pick again to fill $100.00." For a declared pair
without `overwrite`, picking the same record again does not replace a
value that record did not fill (the spec's overwrite rule), so the
sentence says to clear the field first. Re-pick behaviour is unchanged.
- A copied amount whose record's currency becomes unset or unreadable
gets no note (no current code to name). Only a known, different code is
named, as the ruling's example reads.
- N9 (record-page editor re-renders): not measured. The new work per
render is one re-judgement per shown note, and nothing runs when no pick
left a note.

## Verification

<details><summary>Gates</summary>

- Round 3: `dispatch-gates --commands` derived the same 41 at
`315c0d8fef`. All 41 ran with exit 0, including the ui `scripts/` family
(172 files passed, 2 skipped; 5130 tests passed). `--ran`: 41 derived,
41 run, 0 NOT-MEASURED, 0 UNRUN. ui `check:i18n-keys`,
`check:i18n-drift`, `check:i18n-dead-keys` and
`check:new-line-citations` exit 0 (run at `dd0ebf7f96`; the later commit
changes two locale strings, and key parity is pinned by the i18n suite
above). Size: 19 files, +582/-38 (620 changed lines); with objectstack-ai#36918's 714
the card totals 1,334, under 3,000.
- Round 2: `dispatch-gates --commands` derived the same 41 at
`a602513471`. All 41 ran with exit 0, including the ui `scripts/` family
(172 files passed, 2 skipped; 5130 tests passed). `--ran`: 41 derived,
41 run, 0 NOT-MEASURED, 0 UNRUN.
- Round 1: `dispatch-gates --commands` (no paths, change set from the
merge base) derived 41 commands at `482148532`. All 41 ran with exit 0.
`pnpm --dir ui exec vitest run scripts/` ran under the lock with
`--maxWorkers=2`: Test Files 172 passed, 2 skipped, and Tests 5130
passed, 2 skipped. `dispatch-gates --ran` with exit codes recorded: 41
derived, 41 run, 0 NOT-MEASURED, 0 UNRUN, exit 0.
- ui `check:i18n-keys`, `check:i18n-drift`, `check:i18n-dead-keys` and
`check:new-line-citations`: exit 0, with 0 new citations.
- `overlap-check` before each push: VERDICT clean, exit 0. Re-read after
`git fetch` against `origin/main` `622f3985fe` and 5 PR heads that share
files (objectstack-ai#37282, objectstack-ai#37249, objectstack-ai#37226, objectstack-ai#37210, objectstack-ai#37166): clean. `--pr=37264`
named explicitly: merges cleanly.

</details>

Read first, by risk: (1) `judgeCopy`, `withheldAutofillNow` and
`copiedAutofillNow` in `lookupAutofill.ts`; (2) the note block at the
end of `LookupField.tsx` (`pickStands`, `currencyNow`); (3) the per-row
note block in `GridFieldWidget.tsx` (`lineCurrencyNow`).

Two-minute check: `pnpm --dir ui exec vitest run
packages/plugin-form/src/ObjectForm.lookupAutofill-28245.test.tsx -t
ruling` passes 4 tests. In them, a USD quote picks a $100 product,
changes its currency to EUR, keeps 100, and shows "Unit Price was copied
as $100.00, but the record is now in EUR."

https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…or Setup > Packages (objectstack-ai#37166)

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

## 维护者速读

- 管理员和开发者打开 Studio
不再看到软件包卡片页:有上次用过的软件包就直接进它;没有的话,能打开设置软件包列表的人进那个列表,打不开的开发者进「全部元数据」;已安装应用「改了什么」挪到了设置里的软件包详情;「添加应用」菜单去掉了「用
AI 搭建」,「在 Studio 中新建」改名为「新建空白应用」,凡是开放了元数据编辑的环境都会出现。
- 这是 Studio 重构专题的「去掉 Studio 首页」一步:首页的入口大多已有去处,但软件包的「管理」和「全部软件包」要等 Studio
顶栏菜单那张卡(objectstack-ai#37139)补上,一步「新建应用」要等新建软件包对话框那张卡(objectstack-ai#37134);另有三个入口没能在真实环境走过,「添加应用」菜单这一轮的变化(去掉「用
AI 搭建」、改名「新建空白应用」)也没在真实环境走过,都只有自动测试覆盖。
-
维护者已裁定统一「已定制」的口径(objectstack-ai#37236),但设置里的软件包详情和本次更新说明里的一句话目前仍把标签页等排列调整算作「已定制」;改正由那张卡完成,本
PR 不妨碍它。
- 只有 Studio 权限、没有设置权限的开发者现在没有任何页面能新建软件包,因为新建入口只在设置里;这要等 Studio
顶栏菜单(objectstack-ai#37139)和新建软件包对话框(objectstack-ai#37134)两张卡落地。
- 如果出错,用户进 Studio 会落到软件包列表或「全部元数据」页,而不是首页;这次只改界面,不改数据,可以直接撤回。
  - 服务器没有报告用户权限时,这些「新建」入口按有权限处理,把人带到设置里的新建软件包;真正能否创建仍由服务器判断,席位建议保持这样。
- 本 PR 超过 3000 行(主要是删除旧首页和它的测试),请您按大 PR 流程审核后再合并。

## What changes

Epic objectstack-ai#36890 decision 9: the package-card page at bare `/studio`
(`BuilderLanding`) is removed. This PR finds a new home for every entry
it carried and deletes the page, the code only it used, and its tests.

Every Studio exit that names no package now makes one choice,
`studioEntryFallbackPath`: Setup → Packages
(`/apps/setup/component/developer/packages?face=admin`) for a principal
holding `setup.access` and `manage_platform_settings`, and
`/studio/~all/metadata` (the All metadata area) for one who may enter
Studio but not that page. The capability set is the one Studio's entry
gate read: app-shell now exports `StudioEntryPermissionsProvider` and
`useStudioEntryPermissions`, and the console's `RequireStudioAccess`
provides the set around the `/studio` subtree. Outside that provider the
set reads as holding nothing, so nobody is sent to a page they may not
open.

| Entry the home carried | Where it goes now |
|:---|:---|
| bare `/studio` | `StudioEntryRedirect` (in the lazy Studio chunk). It
opens the newest remembered package (the recent `package` entries
`StudioRoute` records) that `GET /api/v1/packages` still lists, else
`studioEntryFallbackPath`. If the list cannot be read, it opens the
newest remembered package, and Studio reports the failed read itself. |
| New package (`/studio?new=package`) | `SETUP_NEW_PACKAGE_PATH`: the
admin face with `?new=package`. It opens New Package on arrival and
drops the param with a replace. After create it lands in Studio on the
new package (objectstack-ai#36834). Callers: Home's no-agent chip, the `/ai`
no-assistant screen, the 「Add app」 menu and the no-apps screen, all
labelled 「New blank app」 / 「新建空白应用」 now (below); for an author who may
not open Setup → Packages each of them, like the bookmark, opens the All
metadata area instead (`useNewPackageDoorPath`, `newPackageDoorPath`).
An old `/studio?new=package` bookmark goes there for a holder of the
pair, and to the All metadata area for anyone else
(`studioNewPackageEntryPath`). One-step 新建应用 is objectstack-ai#37134. |
| `~all` / `~org` cards | Already in the left menu (objectstack-ai#36899). Nothing
more to do here. |
| Per-app "n customized, m switched off" and the "Customizations in this
environment" panel | `PackageCustomizationsPanel`, shown in a read-only
base's detail sheet on the admin face. It is not shown for an authored
package, a `.custom` pair or a kernel package. It has a summary line,
rows with tabs (adds Layouts), search, Show all, and 「Customize in
Studio」. **"Customized" now counts `counts.arrangements`.** This
delivers objectstack-ai#36833's requirement in the panel's new home; objectstack-ai#36833 was closed
as not planned (ruling 7125820739), so this PR does not close it. |
| Card Manage and the All packages link (development face) | Not this
card: the door is added by objectstack-ai#37139 (card note 7146329913). The
development face stays reachable by its address. |
| Recently viewed | Now Studio's entry itself: `/studio` opens the
newest remembered package. |
| 「包不存在」 → Studio home | The button follows `studioEntryFallbackPath`:
「Open the package list」 → Setup → Packages for a holder
(`engine.studio.notFound.packageList`), 「Open All metadata」 → the All
metadata area otherwise (new key `engine.studio.notFound.allMetadata`).
|
| `AppContent` fallbacks, `packagedActionsStudioPath` fallback with no
package named | `SETUP_PACKAGES_PATH`. |
| `studio:builder` (the `@objectstack/studio` app's 「应用构建」) | Forwards
to `/studio`. |
| 「Add app」 (sidebar app menu, and the no-apps screen's buttons) |
Maintainer rulings 7153161067 and 7153400210 on objectstack-ai#36908: 「Build with AI」
(to bare `/studio`) is removed, and `new-in-studio` is pushed for every
admitted viewer on a deployment that offers metadata authoring, whether
or not the build agent is served. It is relabelled under its existing
key `home.build.inStudio`: en "New blank app", zh-Hans 「新建空白应用」, zh-Hant
regenerated (「新建空白應用」), and the eight other packs translated anew, as
`check:i18n-drift` requires of an en change. Home's no-agent chip and
the `/ai` button read the same key; their inline `defaultValue` now
matches the en value (`check:i18n-keys`); the chip's condition and
target are unchanged. It stays inside `isAiStudioEnabled()`, because
with `features.aiStudio` false the runtime offers no metadata authoring;
a viewer `useMayAddApp` admits there gets the marketplace's two entries,
so the list is never empty for an admitted viewer. `SidebarAppMenu`
reads the list itself and draws neither 「Add app」 nor its separator for
an empty list. Home's 「Build an app」 chip and Home's 「Build with AI」
drawer button are untouched. |

Removed: `BuilderLanding.tsx`, its `BuilderLanding.*` test files,
`fetchInstalledPackageRow` (only the home's Manage called it) with its
pin, and the home's console frame in `StudioRoute` (header and command
palette). Two deleted suites still pinned code that stays, and those
halves moved (see Tests): the permission matrix's read-only hint copy,
and the three new-app door cases. `LandingCustomizationsPanel` and
`landingCustomizations-io` were renamed and rewritten as
`PackageCustomizationsPanel` and `packageCustomizationRows`.
`newAppDoor.ts`, `PackageFormDialog`'s `newApp` branch and the
`engine.studio.newApp.*` strings stay for objectstack-ai#37134; the branch keeps its
three cases, now mounted on `PackageFormDialog` itself.

**Strings.** The home's `engine.studio.landing.*` keys and
`engine.studio.landingHome` that ship in the released
`@object-ui/i18n@18.6.0` (71 in each of `en` and `zh`, measured against
the published tarball; 3 of them are still read by the Packages page)
stay, the other 68 no longer read. Removing a published key is a
narrowing, so this PR removes none. The four landing keys added after
18.6.0 and never released (`manage`, `manageTitle`, `allPackages`,
`allPackagesTitle`) are removed. `engine.packages.customizations.*`,
`engine.studio.notFound.packageList` and
`engine.studio.notFound.allMetadata` are added (38 keys per language).
The PR changes no existing value.

**Changesets.** `36908-remove-studio-home.md` (app-shell, console,
platform-objects) says what users see, in their words. The i18n note is
in its own `@object-ui/i18n`-only changeset,
`36908-studio-home-strings.md`. Both carry the two declaration lines.

Checklist: `studio-authoring.package-customization-counts-and-marks`
(rev 4) and `studio-authoring.org-scope-flows` (rev 5) are re-pointed.
The rev 4 note now says objectstack-ai#36833 was closed as not planned and this card
delivers its requirement; its `acceptance[2].verify` names
`PackageCustomizationsPanel.test.tsx` as the pin. Also re-pointed off
the removed home: `automation.setup-packaged-automation-board` (rev 15:
title, `steps[1]`, `acceptance[0]`; the packaged-actions bookmark with
no `?package=` opens Setup → Packages),
`studio-authoring.first-run-loop` (rev 16, `steps[1]`: 「Build an app」
opens the last package or Setup → Packages, the other chip reads 「New
blank app」), and the fixture lines of
`automation.packaged-flow-clone-contract` (rev 14),
`studio-authoring.held-edit-leave-guard` (rev 12) and
`ux-conventions.write-feedback` (rev 18), which made their scratch
package on the Studio landing.

Size at `54e4586e`: +2,306 / −5,217 across 101 files rename-aware
(+2,680 / −5,591 across 103 without renames), mostly deletions. Per
ruling 7145880574 on objectstack-ai#36890 this lands as one PR, reviewed by the
maintainer after L1.

**Overlaps** (overlap-check at `54e4586e`, against `origin/main`
`4fb03ebb`, exit 1 for objectstack-ai#37249 below): origin/main merges cleanly. This
round merged main six times: `cf77ecb9` (K 12) was clean, and `54e4586e`
(K 9, with objectstack-ai#37169) is resolved below. Resolved:
- objectstack-ai#37089 (landed as `886e9707`): conflicted in
`StudioDesignSurface.notFound-26708`; both sides added the same
`@object-ui/plugin-detail` import, main's comment kept. The same merge
brought objectstack-ai#37198's address-guard fixtures spelling the removed
`STUDIO_LANDING_PATH`; they are dropped here.
- objectstack-ai#37185 (landed as `ad604c10`): `PackageSwitcher.tsx` keeps this
branch's side (`fetchInstalledPackageRow` and `STUDIO_LANDING_PATH`,
which objectstack-ai#37185 moved onto the authenticated fetch, are deleted here); its
edits to the six test files this branch deletes were stub adaptations (a
`headers` field, a module-top import, the gate's fetch double) with no
subject left to pin. The new customizations read goes through
`packageCustomizations-io.ts`, already on the authenticated fetch;
`PackageCustomizationsPanel.test.tsx`'s stub now carries `headers: new
Headers()`.
- objectstack-ai#37204 (landed as `bd98dd12`): `StudioRoute.test.tsx` and
`StudioRoute.lazyBuilder-11798` keep this branch's removal of the
home-frame cases; `StudioRoute.metadataArea-28561` keeps this branch's
comment line and objectstack-ai#37204's `app-bar-product-home` test-id absence,
without the old-name check.

- objectstack-ai#37241 (landed as `fc216747`): `SidebarAppMenu.tsx` takes its
`AppMenuList` and keeps this branch's `offerAddApp` separator; its new
`SidebarDocsPortalMenu` gets the same rule (the 「Add app」 list read
there, nothing drawn for an empty list, `AddAppSubmenu entries={…}`),
pinned in its `SidebarAppMenu-36112` block (「New blank app」 and no
「Build with AI」 with the build agent served; a Studio-only author to
`~all`; the empty-list guard).
- objectstack-ai#37168 (landed as `1b91538b`): `PackageFormDialog.newAppStep-36748`
keeps this branch's host and adds objectstack-ai#37168's
`/studio/:packageId/metadata/*` route; `notFound-26708` keeps this
branch's provider and Setup / All metadata routes and adds objectstack-ai#37168's
metadata-area route (the removed home's `/studio` route stays out). Its
edits to the two `BuilderLanding.*` files this branch deletes were the
switched-off action's new address; that pin now lives at
`PackageCustomizationsPanel.test.tsx:188`, updated here to
`/studio/APP/metadata/object/opportunity?action=clone_opportunity`.

- objectstack-ai#37169 (landed as `4fb03ebb`; this PR is the second lander):
`BuilderLanding.orgScope-11553` stays deleted. objectstack-ai#37169 only moved the
removed home's ~org card to `/studio/~org/metadata/flow?source=runtime`,
and the org-scope entry is pinned by
`StudioDesignSurface.packageLessFlows-11553`, which objectstack-ai#37169 updated.
`notFound-26708` keeps this branch's `StudioEntryPermissionsProvider`
and Setup / All metadata routes, with objectstack-ai#37169's comment naming
`/automations` too. Nothing else conflicted. `AREA_DESIGNER_PAGE_TYPES`
and the removed `AreaHistoryRedirect` exemption came in untouched. The
18.6.0 studio key comparison was re-run against `4fb03ebb`: the branch
removes only the four never-released keys, adds 38 per language and
changes 0 values; all 71 released landing keys are present.

Still open; whichever lands second merges main and resolves:
- objectstack-ai#37249 (objectstack-ai#37227) conflicts in `HomePage.desktopNoApps-36732` and
`HomePage.noAgentsBuildChip-26614` (this branch's Studio-only chip
case). Beyond the text: its first case expects the no-apps doors
`[template, marketplace]` with the build agent served, and 「New blank
app」 now shows there too (ruling 7153400210), so the second lander keeps
`new-in-studio` first. Its HomePage filter of `build-with-ai` becomes a
no-op. It touches neither `home.build.inStudio`'s values nor the chip's
lines (measured by `git merge-tree` against its branch).
- objectstack-ai#37226, objectstack-ai#37215, objectstack-ai#37210, objectstack-ai#37165, objectstack-ai#37282 and objectstack-ai#37284 merge cleanly.

### Read first

1.
`ui/packages/app-shell/src/views/studio-design/StudioEntryRedirect.tsx`:
the whole `/studio` decision, and the two capability helpers. Risk:
where a non-administrator lands (the `studioEntryFallbackPath` pair),
now for the bookmark too.
2.
`ui/packages/app-shell/src/views/studio-design/PackageCustomizationsPanel.tsx`
and the mount in `PackagesPage.tsx` (`PackageDetailSheet`). Risk: the
gate `!authoring && !writable && !isKernel &&
!isCustomizationPackage(id)`.
3. `ui/apps/console/src/components/StudioRoute.tsx` with
`studioEntryPermissions.ts`: the index route and the capability set the
entry gate provides to Studio (`StudioEntryPermissionsProvider`), which
the not-found exit reads.

### Two-minute verification

As the seeded admin with nothing remembered, open `/_console/studio`.
Expected: you land on Setup → Packages
(`…/developer/packages?face=admin`). Open the ObjectStack Showcase row:
its detail shows "Customizations in this environment" with a Customize
in Studio link.

## Tests

New pins:
- `StudioEntryRedirect.test.tsx` (12 cases): the newest remembered
package the list still names opens; a package the list no longer names
is skipped; nothing remembered leads to Setup → Packages, read without a
list request; a Studio-only principal lands on `~all`; a failed list
read opens the newest remembered package; the old new-package bookmark
is forwarded for an administrator (CONTROL) and sends a Studio-only
principal to `~all`, never to Setup; both helpers read the same
capability pair.
- `StudioDesignSurface.notFound-26708`: the not-found button opens Setup
→ Packages for an administrator (CONTROL), and for a Studio-only
principal it reads 「Open All metadata」 and opens `~all`, never Setup.
The harness provides the entry gate's set through
`StudioEntryPermissionsProvider`.
- `PermissionMatrixEditor.readOnlyHintCopy-12171.test.ts`: the half of
the deleted `BuilderLanding.environmentOverlayCopy-12171` that covered
`perm.readOnly.artifact.hint`, which `PermissionMatrixEditor` still
draws. No table names the organization axis; lit control that it names
the environment overlay in every table; lit control that `t()` serves
the value the extractor read, for every declared locale.
- `PackageFormDialog.newAppStep-36748.test.tsx`: the three
`BuilderLanding.newAppDoor-36748` cases, moved onto `PackageFormDialog`
with `newApp={newAppStep(client, locale)}`, mounted as the home mounted
it (create mode, Studio on the new package after save): the dialog
worded for an app in zh; package POST, app draft, app publish, then the
Studio header names the app and 「‹ Back to app」 opens it; a taken app
name refuses the confirm and writes nothing.
- `PackageCustomizationsPanel.test.tsx`: the rows and counts, including
the **objectstack-ai#36833 arrangement-only case**; the empty and failed states (never
"0"); row and switched-off-action links; tabs, search and Show all; zh
words; and the moved rows and labels io.
- In the `PackagesPage` administration-face harness, two describes: "the
new-package deep link" (3 cases) and "a read-only base's customizations
in its detail" (6 cases: a code package draws the section with
arrangements counted; an authored package does not; the development face
does not; a read-only `.custom` pair draws none and sends no
customizations request; a kernel package's detail, opened directly
because the admin face lists none, draws none and sends no request;
CONTROL, the same direct render of a code package draws it and reads
once).
- Unreported capability set on the doors:
`HomePage.noAgentsBuildChip-26614` renders Home inside the real
`MePermissionsProvider` with an authenticated answer that carries no
`systemPermissions`; the chip opens Setup's New Package (the fail-open).
CONTROL, the same provider with a reported set holding `manage_metadata`
alone: the chip opens `/studio/~all/metadata`.
- Studio-only author on the doors outside Studio: `SidebarAppMenu-36112`
(「New blank app」 links to `/studio/~all/metadata`) and
`HomePage.noAgentsBuildChip-26614` (the chip navigates there, never to
Setup); `StudioEntryRedirect.test` holds `newPackageDoorPath` to the
same two answers.
- `SidebarAppMenu-36112` (the shared harness, new top-level describe):
with build and ask, the legacy build id, ask only, other agents only, or
no agent served, 「Add app」 offers `new-in-studio` ("New blank app", to
New Package), the template and the marketplace, and never 「Build with
AI」; never empty for an admitted viewer with authoring but no
marketplace, or a marketplace but no authoring; CONTROL, with neither
the viewer is not admitted; guard, an admitted viewer handed no entries
gets no 「Add app」 and no separator. `HomePage.desktopNoApps-36732`: the
no-apps doors are `[new-in-studio, template, marketplace]` with the
build agent served.
- Converted, not deleted: the StudioRoute gate, lazy-module,
recent-visit and access-notice pins; `studio:builder` registration (now
a forward); `setupMetadataRedirect`; `studioAddress` and its guard (the
guard no longer names the deleted `STUDIO_LANDING_PATH`); the Home,
sidebar 「Add app」 and `/ai` deep-link hrefs; the vocabulary census;
`consoleTopBar.height-12639`; `AppContent.setupMetadataStudio-28578`.

<details><summary>Local runs at this round's heads</summary>

**Rework 2, objectstack-ai#37169's merge, head `54e4586e`** (after merging
`origin/main` `4fb03ebb`, K 9, and `pnpm --filter
'@object-ui/console^...' build`, lock VERDICT command-exit 0):
- vitest over app-shell `views/studio-design`, `console/home`,
`console/ai`, `console/__tests__`, `layout/`, `hooks/`, `PackagesPage*`
and `PackageFormDialog*`, plus console `components/`: Test Files 826
passed (826); Tests 6948 passed; lock VERDICT command-exit 0.
- type-check `@object-ui/app-shell` (src + `tsconfig.test.json`) and
`@object-ui/console`: exit 0. eslint on the two touched test files: exit
0.
- Exit 0: check:test-source-alias, check:nul-bytes,
check:cross-package-test-inputs, `check-platform-checklist
--changed-from origin/main` (11 anchors, 0 lost), and under `ui/`
check:i18n-keys, check:i18n-drift, check:unreferenced-sources and the
three vi-mock gates.
- The full `check:platform-checklist` exits 1 on one finding, and
`origin/main` `4fb03ebb` fails the same way: `automation.json` anchors
`FlowItemMoreMenu.tsx#FlowItemMoreMenu`, which objectstack-ai#37169 removed. That is
main's to fix, not this PR's.

**Rework 2 (delta L1 S1, N4, N5), head `cf77ecb9`** (after merging
`origin/main` `4ed453dc`, K 12, clean, and `pnpm --filter
'@object-ui/app-shell^...' build`, lock VERDICT command-exit 0):
- vitest over `console/home`, `console/ai`, `RequireAiSurface`,
`AppContent.setupMetadataStudio-28578`, `setupMetadataRedirect.test`,
`PackageCustomizationsPanel.test`, `StudioEntryRedirect.test`,
`SidebarAppMenu-36112` and `hooks/`: Test Files 210 passed (210); Tests
1827 passed; lock VERDICT command-exit 0.
- Mutation through `scripts/ablation-replace.mjs`:
`useNewPackageDoorPath` made to fail closed
(`Array.isArray(systemPermissions) && hasCapabilities(…)`) →
`HomePage.noAgentsBuildChip-26614` 4 failed / 12: the new unreported
case, plus the three no-agent cases whose stub leaves
`systemPermissions` undefined; the reported-set control stayed green.
Restored to the HEAD blob, `git diff HEAD` empty.
- type-check `@object-ui/app-shell` (src + `tsconfig.test.json`): lock
VERDICT command-exit 0. eslint `--no-inline-config` on the 4 touched ui
files: exit 0.
- Exit 0: check:platform-checklist, `check-platform-checklist
--changed-from origin/main` (4 anchored files, 11 anchors, 0 lost),
check:test-source-alias, check:nul-bytes,
check:cross-package-test-inputs, check:issue-citations, and under `ui/`
check:i18n-keys, check:vi-mock-specifiers, check:vi-mock-inherit,
check:vi-mock-override-shape. `git grep -n "Studio landing"
docs/qa/platform-checklist/areas`: history entries only, plus
`studio-authoring.json:35` and `:2290`, already stale on main (the
studio-home button).
- overlap-check: exit 1, only for objectstack-ai#37249 and objectstack-ai#37169 (objectstack-ai#37169 has since
landed; see Overlaps).

**Third part (seat answers to N1 and N3, then objectstack-ai#37241's and objectstack-ai#37168's
merges), final head `1c7f29cc`:**
- After merging main with objectstack-ai#37241 and objectstack-ai#37168 (`2ae0823f`) and rebuilding
(VERDICT command-exit 0): `views/studio-design`, `layout/`,
`console/docs`, `console/home`, `console/ai`, `console/__tests__`,
`hooks/`, `PackagesPage*`, `PackageFormDialog*`,
`PermissionMatrixEditor*`, console `components/` and `pages/`,
`packages/i18n/src/__tests__`: Test Files 1162 passed (1162); Tests
10870 passed, 13 skipped; VERDICT command-exit 0. type-check
`@object-ui/i18n`, `@object-ui/app-shell`, `@object-ui/console`: VERDICT
command-exit 0. Exit 0 at this head: check:test-source-alias,
check:nul-bytes, check:cross-package-test-inputs, check:i18n-stale-fill,
check:keyed-text-bounds, check:platform-checklist,
check:issue-citations, check-changeset-no-major, check-empty-changeset,
check-adr-0087-registration, `check-platform-checklist --changed-from
origin/main`, and under `ui/` check:i18n-keys, check:i18n-drift,
check:unreferenced-sources, check:phantom-deps,
check:vi-mock-specifiers, check:vi-mock-inherit,
check:vi-mock-override-shape.
- After a fresh closure build (VERDICT command-exit 0): `layout/`,
`console/home`, `console/ai`, `RequireAiSurface`, `hooks/`,
`StudioEntryRedirect*`, `notFound-26708`, console `StudioRoute*`: Test
Files 376 passed (376); Tests 3153 passed; VERDICT command-exit 0.
- Mutation through `scripts/ablation-replace.mjs`:
`useNewPackageDoorPath` forced to the Setup path (`true ||
hasCapabilities(…)`) → 2 failed / 43, exactly the two Studio-only door
cases; restored to the HEAD blob, `git diff HEAD` empty.
- type-check `@object-ui/app-shell` and `@object-ui/console`: VERDICT
command-exit 0. eslint on the 7 touched files: 0 errors. Exit 0:
check:test-source-alias, check:nul-bytes,
check:cross-package-test-inputs, and under `ui/` check:i18n-keys,
check:i18n-drift, check:unreferenced-sources, check:phantom-deps,
check:vi-mock-specifiers, check:vi-mock-inherit,
check:vi-mock-override-shape.

**Second part of the round (the 「Add app」 rulings, then three main
merges), head `64e7071b`:**
- At `048a5a84` (rulings + first merge): `layout/`, `console/home`,
`console/ai`, `RequireAiSurface`, `hooks/`, `packages/i18n/src`,
`PackageCustomizationsPanel`, console `StudioRoute*`: Test Files 486
passed (486); Tests 5161 passed, 13 skipped; lock VERDICT command-exit
0.
- At `fe78cd2b` (after objectstack-ai#37185's merge), the overlap:
`views/studio-design`, `layout/`, `console/home`, `console/ai`,
`console/__tests__`, `PackagesPage*`, `PackageFormDialog*`,
`PermissionMatrixEditor*`, `sameServerFetch*` (objectstack-ai#37185's ratchet),
`apps/console/src/components`, `packages/i18n/src`: Test Files 1 failed,
888 passed (889); Tests 2 failed, 8291 passed. The failures were two
cases of `layout/__tests__/designModeMenuSave-36363`, a file this branch
does not touch; run alone it read 47 passed (47), and it passed again in
the run below, so it was load in the big run.
- At `45e4a5eb` (after objectstack-ai#37204's merge and a rebuild):
`apps/console/src/components`, `layout/`, `console/home`, `console/ai`,
`RequireAiSurface`, `packages/i18n/src/__tests__`: Test Files 436 passed
(436); Tests 4837 passed, 13 skipped; lock VERDICT command-exit 0. (A
first attempt at this run hit a 590 s cap before its verdict and is not
counted.)
- Mutation checks through `scripts/ablation-replace.mjs` (blob moved,
restored to the HEAD blob, `git diff HEAD` empty): the hook's entry key
back to `build-with-ai` → `SidebarAppMenu-36112` 7 failed / 32; the
empty-list guard removed (`offerAddApp = mayAddApp`) → 1 failed / 32,
the guard case.
- CI on `45e4a5eb` failed `Type Check UI` at `check:i18n-keys`: Home's
chip kept `defaultValue: 'New in Studio'` against the new en value.
Fixed at `64e7071b` with the chip's default and the eight packs
(`check:i18n-drift`); locally at `64e7071b`, exit 0: `check:i18n-keys`,
`check:i18n-drift`, and the job's other static steps
(`check:phantom-deps`, `check:self-import`,
`check:unreferenced-sources`, `check:doc-example-readers`,
`check:side-effects-array`, `check:spec-symbols`,
`check:icon-record-names`, `check:designer-field-key-parity`,
`check:action-forward-parity`, `check:esm-specifiers`,
`check:handler-key-reads`, `check:metadata-write-doors`,
`check:control-bytes`, `check:shell-escape-residue`,
`check:vi-mock-specifiers`, `check:vi-mock-inherit`,
`check:vi-mock-override-shape`, `check:test-path-roots`,
`check:prompt-keys`), plus `check:keyed-text-bounds` and
`check:i18n-stale-fill`. Vitest over `packages/i18n/src`,
`console/home`, `console/ai`, `RequireAiSurface`,
`SidebarAppMenu-36112`: Test Files 213 passed (213), Tests 2745 passed,
13 skipped, lock VERDICT command-exit 0.
- type-check at `45e4a5eb` after `pnpm --filter '@object-ui/console^...'
build` (VERDICT command-exit 0): `@object-ui/i18n`,
`@object-ui/app-shell` (src + `tsconfig.test.json`),
`@object-ui/console` passed, VERDICT command-exit 0. eslint
`--no-inline-config` on this part's 6 ui files: 0 errors.
- Gates at `45e4a5eb`, all 0: check:test-source-alias, check:nul-bytes,
check:cross-package-test-inputs, check:i18n-stale-fill,
check:keyed-text-bounds, check:platform-checklist,
check:issue-citations, check-changeset-no-major, check-empty-changeset,
check-adr-0087-registration, `check-platform-checklist --changed-from
origin/main` (11 anchors, 0 lost). `pnpm --filter @object-ui/i18n
gen:zh-hant` after the merges: every target already current.
- 18.6.0 studio-namespace comparison at `fe78cd2b`, unchanged: 71/71
published landing keys present in `en` and `zh`; 35 missing, all already
missing on main; 0 values changed vs main, 4 never-released keys
removed, 38 added.

**First part of the round (L1 and contract-review fixes):**

- Targeted vitest at `4121473e` (after the first main merge, K 26), one
locked run over `apps/console/src`, `packages/i18n/src`,
`views/studio-design`, `metadata-admin/PackagesPage*`,
`PackageFormDialog*`, `PermissionMatrixEditor*`,
`console/__tests__/AppContent*`, `console/home/__tests__/HomePage*` and
`layout/`: Test Files 1 failed, 1050 passed (1051); Tests 1 failed,
10456 passed, 13 skipped. The failure was the moved new-app pin's own
harness (it navigated to the bare package path, which only the console
route table expands); fixed at `4121473e` by landing on the package's
Studio home as the removed home did, then 3 passed (3).
- After the second main merge (`df4a65cb`) and the guard fix
(`329ddefc`), the overlap re-run under the lock: `views/studio-design`,
`apps/console/src/components`, `PackagesPage*`, `PackageFormDialog*`,
`PermissionMatrixEditor*`, `packages/i18n/src`, `consoleTopBar*`,
`AppContent*`: Test Files 594 passed (594); Tests 6016 passed, 13
skipped; lock VERDICT command-exit 0.
- Mutation checks, each through `scripts/ablation-replace.mjs` (anchor 1
→ 0, blob verified moved, restored to the HEAD blob with `git diff HEAD`
empty), at `4121473e`:
- 「组织」 written into the zh `perm.readOnly.artifact.hint`:
`PermissionMatrixEditor.readOnlyHintCopy-12171` 1 failed / 3 ("no table
names the organization axis").
- `!isKernel` removed from the detail gate (`PackagesPage.tsx:1271`): 1
failed / 6, the kernel case only.
- `!isCustomizationPackage(id)` removed: 1 failed / 6, the `.custom`
pair case only.
- The bookmark forward reverted to `SETUP_NEW_PACKAGE_PATH`:
`StudioEntryRedirect.test` 1 failed / 11, the Studio-only bookmark case.
- The not-found exit reverted to `SETUP_PACKAGES_PATH`: `notFound-26708`
1 failed / 14, the Studio-only case.
No dist leg was needed: these tests import app-shell by relative path,
and the ui vitest config aliases `@object-ui/i18n` to its `src`.
- type-check at `329ddefc` after `pnpm --filter '@object-ui/console^...'
build` (lock VERDICT command-exit 0): `@object-ui/i18n`,
`@object-ui/app-shell` (src and `tsconfig.test.json`, which lists all
six new or changed test files) and `@object-ui/console` passed, lock
VERDICT command-exit 0.
- eslint `--no-inline-config` on this round's 11 changed ui files: 0
errors, 15 warnings.
- Gates at `329ddefc`, exit captured before any pipe, all 0:
check:test-source-alias, check:nul-bytes,
check:cross-package-test-inputs, check:i18n-stale-fill,
check:keyed-text-bounds, check:platform-checklist,
`check-platform-checklist --changed-from origin/main` (11 anchors, 0
lost). At `4121473e`, also 0: check:issue-citations,
check:doc-authoring, check:gitlink-declared, check-changeset-no-major,
check-empty-changeset, check-adr-0087-registration (2 non-breaking
changesets), check-closing-keyword-parity,
check:changeset-gate-self-tests, and the edited
`ui/scripts/check-eager-closure-budget.mjs`'s tests (6 files, 305
passed). `check:i18n`: PREREQUISITE NOT MET locally (the CLI build
closure is not built); it reads the platform translation bundles, which
this round does not touch; its evidence is CI. `dispatch-gates --ran`:
57 of 74 derived families not run locally, declared; their evidence is
this head's check-runs.
- **i18n against the published `@object-ui/i18n@18.6.0`** (`npm pack`,
read by AST, nothing evaluated), on the merged tree: all 71 published
`engine.studio.landing*` keys are present in `en` and `zh`; 35 published
keys are missing at this head and all 35 are already missing on
`origin/main`; against `origin/main` this PR changes 0 values, removes
exactly the four never-released keys, and adds 38 per language
(`engine.packages.customizations.*`,
`engine.studio.notFound.packageList`,
`engine.studio.notFound.allMetadata`).
</details>

## Acceptance notes

- The environment-wide list the home drew across all installed apps (one
list, a total, grouped by app) is now shown per app only, in each
read-only base's detail in Setup → Packages.
- "Customized" now has two meanings. The Setup detail counts tab,
field-group and action-layout arrangements with overrides and
extensions; the All metadata header still draws `customizationTotal`
(overrides + extensions, `customizationMarks.ts:96-97`, drawn at
`DirectoryPage.tsx:246-249`), and the same total gates the list filters
in `ResourceListPage` and `useListOrderedNames`. Not aligned here:
adding arrangements to that total would stop the header equalling the
sum of its per-type tiles and change which lists offer the customized
filter. Not aligned here (seat answer A): follow-up card filed: objectstack-ai#37236.
objectstack-ai#37236 has since been ruled B (7158100447): 「已定制」 stays overrides +
extensions, and the Setup detail's count changes there to match. Until
it lands, the Setup detail counts arrangements as described here.
- The new-package doors outside Studio (Home's no-agent chip, the `/ai`
screen's door, 「Add app」's 「New blank app」 and with it the no-apps
screen) make the same choice as Studio's entry, through
`useNewPackageDoorPath` (seat answer to N1): Setup's New Package for a
holder of `setup.access` + `manage_platform_settings`, the All metadata
area for an author who may enter Studio but not open that page. They sit
outside the entry gate's provider, where `useStudioEntryPermissions`
holds nothing, so they read the session's own
`usePermissions().hasCapabilities`, which fails open on an unreported
set as the doors' own authoring gate does (the Setup app still refuses a
non-holder). That is the doors' doctrine, judged A in contract review
7162083002 ④: the door is only a link, and the server still refuses a
package create without `manage_metadata` (`package-routes.ts:102-106`).
Pinned by the unreported-set case in `HomePage.noAgentsBuildChip-26614`
(the real `MePermissionsProvider`, no `systemPermissions`, the chip
opens Setup's New Package; control: a reported set without the pair
opens `/studio/~all/metadata`).
- A Studio-only author (`studio.access` + `manage_metadata`, without the
Setup pair) has no screen that creates a package at this head: 「New
blank app」 opens All metadata, which has no New Package, where on main
the same door opened the dialog inside Studio. The server still admits
the create. This follows ruling N1 (a), and waits for objectstack-ai#37134 / objectstack-ai#37139.
- Two console test files pinned only the home's frame and are deleted:
`StudioRoute.landingI18n.test.tsx` (its header crumb) and
`StudioRoute.searchPalette-11863.test.tsx` (⌘K on the home; ⌘K inside
Studio is objectstack-ai#36900). The other StudioRoute pins now stub the entry.
- Duplicate pins named for deleted tests (AGENTS.md, ruling 6120820653):
the new-package deep link is pinned in the `PackagesPage` admin harness;
the customization counts, rows and labels in
`PackageCustomizationsPanel.test.tsx`; the org-scope entry by
`StudioDesignSurface.packageLessFlows-11553` and the menu pins from
objectstack-ai#36899; the permission hint copy and the new-app step moved, above. The
home's own layout, ordering, Duplicate form, recent cards and Manage
pins have no remaining surface to pin.
- Possibly orphaned now that the frame is gone, not removed here:
`AppHeader` `variant="studio"` and `CommandPalette` `scope="studio"`
(objectstack-ai#36900 may reuse the scope).
- 「Build with AI」 is gone from the 「Add app」 menu and the no-apps screen
(ruling 7153161067). Home's 「Build an app」 chip still targets bare
`/studio`, and Home's own 「Build with AI」 drawer button is untouched;
objectstack-ai#37227 / objectstack-ai#37249 removes both from Home.
- The kept-unread released studio keys stay as they are this round (the
seat made dropping them optional under the 19.0.0 ruling);
`home.buildWithAI` is still read by Home and is untouched.
- Recents are read local-first, and the server copy arrives after first
render (`RecentItemsProvider`). On a device with no local copy,
`/studio` falls back before that copy arrives; "opens the package you
were last in" holds on a device that already has it.
- The 68 published landing keys are kept and unread.
`check-i18n-dead-keys` (report-only, not in CI) will list them as
candidates, and a later change can decide to retire them.
- `docs/qa/platform-checklist/FOLLOW-UPS.md` still names
`BuilderLanding` in a dated follow-up entry; it is a log and was left as
written.

## Verification

Walked on a live stack at `a21c7b6f` (the previous head). Server: `pnpm
-C examples/app-showcase exec objectstack dev --seed-admin -p 4710` (CLI
and showcase closure built in a worktree). Console: this branch's
`ui/apps/console` under Vite on 4711, proxied to it. Signed in as the
seeded admin and driven with Playwright; key screens confirmed by
screenshot.

| Entry | Observed |
|:---|:---|
| `/studio`, nothing remembered | →
`/apps/com.objectstack.setup/component/developer/packages?face=admin` |
| `/studio?new=package` (old bookmark) | → same page, `new=package`
dropped, New Package dialog open |
| `/apps/setup/component/automation/packaged-actions` (no package) | →
Setup → Packages (admin face) |
| `/studio/no_such_pkg_36908` | 「Package not found…」 with 「Open the
package list」 → Setup → Packages |
| ObjectStack Showcase (code) row → detail | "Customizations in this
environment", "No changes in this environment yet", Customize in Studio
→ `/studio/com.example.showcase/data` |
| `/studio` after visiting that package | → back into
`/studio/com.example.showcase/data…` (remembered) |
| Sidebar app menu → 「Add app」 | New in Studio (the label at `a21c7b6f`;
「New blank app」 now) → `…packages?face=admin&new=package`; clicked, it
lands there with the dialog open |
| `/ai` (no assistant on this stack) | 「New in Studio」 (the label at
`a21c7b6f`; 「New blank app」 now) → `…packages?face=admin&new=package` |
| New Package dialog → Create package | →
`/studio/com.default.walk-pkg-36908/data` |
| That authored package's detail | no customizations section (count 0);
Open in Studio present |
| `/studio/~all/metadata` | renders the All Metadata Types area |

Not walked live, each pinned by unit tests:
- Home's 「New blank app」 chip (「New in Studio」 at `a21c7b6f`): its
condition does not hold on this seeded stack
(`HomePage.noAgentsBuildChip-26614`, `HomePage.desktopNoApps-36732`).
- A non-administrator's landings (bare `/studio`, the old bookmark and
the not-found button for a Studio-only principal): no such principal is
seeded (`StudioEntryRedirect.test.tsx`,
`StudioDesignSurface.notFound-26708`); their target `~all` renders
above.
- `studio:builder`: the `@objectstack/studio` app does not load on a
stock boot (`registerStudioComponents.builderLazy-11798`).

This round's changes were not walked live: the Studio-only exits, the
moved pins and the changesets change no administrator-visible entry
above; the 「Add app」 menu's new contents (no 「Build with AI」, 「New blank
app」 always) and the relabel are pinned in `SidebarAppMenu-36112` and
`HomePage.desktopNoApps-36732`.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYkEULEjF814KSPBLVC)_
<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYkkwuF6UuFtu85Yd5H -->

---------

Co-authored-by: Claude <noreply@anthropic.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 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