Repository navigation
feat(console): the approvals queue steps from request to request and opens the next one after a decision - #34624
Conversation
…opens the next one after a decision From the inbox's pending tab a request opens with the queue as the list shows it (filtered and sorted): the request page's top bar draws the existing counter and next / previous over it, and a toggle (default on, kept per reader) opens the next request once a decision takes the current one out of the reader's queue, back to the list when none is left. Claude-Session: https://claude.ai/code/session_01WGufzgwLxpT1AVJJAwAvyR Co-authored-by: Claude <noreply@anthropic.com>
… the changeset Claude-Session: https://claude.ai/code/session_01WGufzgwLxpT1AVJJAwAvyR Co-authored-by: Claude <noreply@anthropic.com>
…moves nothing Claude-Session: https://claude.ai/code/session_01WGufzgwLxpT1AVJJAwAvyR Co-authored-by: Claude <noreply@anthropic.com>
…witch pins Claude-Session: https://claude.ai/code/session_01WGufzgwLxpT1AVJJAwAvyR Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzgwLxpT1AVJJAwAvyR Co-authored-by: Claude <noreply@anthropic.com>
…ts memo depends on Claude-Session: https://claude.ai/code/session_01WGufzgwLxpT1AVJJAwAvyR Co-authored-by: Claude <noreply@anthropic.com>
…into claude/project-thread-2ojt62
Claude-Session: https://claude.ai/code/session_01WGufzgwLxpT1AVJJAwAvyR Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB 席位核对 · L1 (seat 3, L1-a) · 2026-11-17T04:42ZL1: REWORK The code, tests and Clause-② reading all hold. The one must-fix is paper only: one changed file is outside the claim's file surface. It needs no push. Once the seat posts the claim amendment, I re-read and post the ACCEPT on this same head. Must-fix (paper only, no code change)
Should-fixNone. Readings that hold
Notes (no action for this PR)
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB 席位核对 · L1 delta (seat 3, L1-a) · 2026-11-17T04:45ZL1: ACCEPT Delta read
The non-blocking notes of 6938584691 stay notes; no follow-up card is asked for by L1. A later push owes a delta read. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzg2evNa1V3zxrQq3KX Landing · 2026-11-17T04:46Z · area o3-A lands for the #34586 card thread
State: |
Requested by Yibo Wang · project thread
Fixes #34586
Clause-②: yes (widening) — one new export,
approvalQueueState, from@object-ui/app-shell(workspace-private:"private": true, not published; the console is its one consumer), and two newapprovalsInboxkeys in the@object-ui/i18nlocale packs (openNextAfterDecision,queueDone;TranslationKeysgrows); nothing removed or renamedMetadata-protocol: none
维护者速读
ui/packages/app-shell/src/views/approval-decision/approvalQueueAdvance.tsx(何时自动前进:请求在本页重新读取后状态离开 pending 或viewer.can_act变 false)、ui/apps/console/src/pages/system/ApprovalsInboxPage.tsx的openRequest、ui/packages/app-shell/src/views/RecordDetailView.tsx两处顶栏toggles。cd ui && pnpm exec vitest run apps/console/src/pages/system/ApprovalsInboxPage.queueStepper-34586.test.tsx packages/app-shell/src/views/approval-decision/approvalQueueAdvance-34586.test.tsx,预期 2 个文件 17 个用例全绿。What changes
The queue travels with the request. The inbox's
openRequestnow navigates, from the pending tab only, withapprovalQueueState({ pathname, label }, filteredRows ids): thefromshape every list hands a record page it opens (from.pathname,from.label,from.siblings) plus one marker key,approvalQueue: true. The rows arefilteredRows, the list exactly as it is drawn (search, process, object and status filters, and the sort). The "Submitted by me" and "All" tabs list requests the reader is not deciding, so they hand no queue.The counter and next / previous are the record page's own.
RecordDetailViewalready draws the counter, ↓ ↑ andj/koverfrom.siblings(useRecordPageReturninrecordDrawerStack.tsx), and its crumb already returns tofrom.pathnamebyfrom.label. Nothing new draws them; the inbox now feeds them. The visible face is the house counter1 / 3; the accessible name and tooltip aredetail.recordOfScope(1 of 3 in Approvals Inbox; zh-CN 「第 1 条,共 3 条」 isdetail.recordOf).Open next after deciding (
approval-decision/approvalQueueAdvance.tsx, new).useApprovalQueueAdvance(requestId, row)runs on asys_approval_requestpage (not in a pane) and watches the row the page shows. When the same request goes from "in the reader's queue" (status: 'pending'andviewer.can_acttrue; status alone when the row has noviewer) to out of it, and the switch is on, it replaces the page with the next request (the one after it, else the one before it) and drops the decided id fromfrom.siblings, so the counter reads1 of 2. With none left it replaces the page with the list and toastsapprovalsInbox.queueDone. The change is observed on the page's own re-read:ApprovalDecisionPanelalready announces the request changed after a declared action succeeds (notifyDataChanged), and the page re-reads it throughApprovalRecordReads. So an action that leaves the request waiting on the reader (request info, remind) moves nothing, and a request first shown already decided moves nothing.The switch, 「处理后打开下一条」, is drawn in the page's top bar after the counter, on the desktop and the phone bar, only on a page opened from the queue. Its value is a reader preference in the console's one preference store:
APPROVAL_QUEUE_OPEN_NEXT_PREFERENCE(workspacePreference.ts,userscope, on / off, default on, per browser, never metadata).Small reuse edits.
recordDrawerStack.tsxexportsreadFromSiblings(unchanged) and a newsiblingRecordStep(location, fromId, toId): the route, search and state the counter's ↓ ↑ already computed inline, extracted so the queue's step lands exactly where ↓ would. The counter's owngonow calls it; behaviour is unchanged.@object-ui/app-shellexportsapprovalQueueState.Strings.
approvalsInbox.openNextAfterDecisionandapprovalsInbox.queueDonein all 11 locales of@object-ui/i18n(the key-parity test needs all of them).File surface. One changed file sits outside claim 6936650853's list:
ui/packages/app-shell/src/index.ts(+3 lines, theapprovalQueueStateexport the console imports); the seat's claim amendment adds it.Not changed: approval permissions, rules and server endpoints; the decision bar's buttons (card #34361 owns their layout); the inbox's list rendering.
Tests
New files, named for the card:
ui/apps/console/src/pages/system/ApprovalsInboxPage.queueStepper-34586.test.tsx(6 tests) mounts the real inbox and the realRecordDetailViewunderApprovalRecordReads, as the fix(pm): stop --report presenting command-exit as one certified population #12484 harness does. Acceptance 1 (first of three opens as1 of 3 in Approvals Inbox, the crumb names the inbox, ↓ opens the second as2 of 3), the set follows a search, acceptance 2 (approve the first, land on the second as1 of 2; reject it, land on the third; approve the last, back on the inbox with the done toast), acceptance 3 (switch off, the page stays), acceptance 4 (direct link: no counter, no switch, a decision moves nothing), and a control that the "All" tab hands no queue. A decision is simulated as the panel's own after-decision step: the served row changes andnotifyDataChangedannounces it.ui/packages/app-shell/src/views/approval-decision/approvalQueueAdvance-34586.test.tsx(11 tests): the state reader (a list's unmarkedfromis not the queue),nextInQueue,inReaderQueue, and the hook over a route: advance with the set shrunk, countersign (can_actfalse while stillpending) advances, the last goes to the list with the toast, switch off stays and is kept for the next page, turning it back on after a decision moves nothing, request-info stays, an already-decided request stays, no queue state draws nothing.Runs, from
ui/, underscripts/pm/os-verify-lock.sh(shared box):Tests 6 passed (6)on36749a16(the file is unchanged since), app-shellTests 11 passed (11)on885cedbf;useRecordPageReturn,recordDrawerStack,workspacePreferenceor the inbox and decision panel, plus all ofpackages/i18n/:Test Files 214 passed | 2 failed | 1 skipped (217)on36749a16. Both reds were this branch's own and are fixed on885cedbf:zh-Hant.tsis generated fromzh-Hans.ts(pnpm --filter @object-ui/i18n gen:zh-hant, one word changed), and one new pin of mine asserted the wrong stored value. Re-run of those files plus the key-parity test:Test Files 3 passed (3),Tests 70 passed (70).Ablations (each through scripts/ablation-replace.mjs, restored to the HEAD blob with git diff HEAD empty)
tab === 'pending'replaced byfalseinopenRequest): console file4 failed | 2 passed; the two greens are acceptance 4 and the All-tab control, which pin the absence.!openNextdropped from the advance guard):2 failed | 14 passedacross both files (the two switch-off pins).!before.queuedremoved): app-shell1 failed | 10 passed(turning the switch back on after a decision it was off for moved the page).Acceptance notes
N / Mon every list-opened page; the sentence form is its accessible name and tooltip. Changing the visible face would change every record page, so it stays.requestPagePath, objectstack#32667). Stepping keeps the app segment of the page it steps from, as the counter's ↓ does on any list.workspacePreference.ts), not a server-side setting: the order asks for a client-side preference only.Verification
pnpm --filter @object-ui/app-shell type-check,@object-ui/i18n,@object-ui/console: all exit 0.npx eslinton every changed file from its package directory: 0 errors. New warnings: tworeact-refresh/only-export-componentsfor the two new non-component exports ofrecordDrawerStack.tsx(the file already exports 14 such). Areact-hooks/exhaustive-depsthe extraction first added is fixed indbe3c289; no other warning is on a changed line.node scripts/pm/dispatch-gates.mjs --commandsderived 41; all 41 exit 0, pluspnpm check:changeset-fixed(roster under.changeset/) exit 0;--ranreconciliation41 derived, 41 run, 0 NOT-MEASURED, 0 UNRUN. That sweep ran from36749a16while three later commits (a test split, the zh-Hant regeneration, the Clause-② line) landed; the three changeset gates were re-run on4288d50e(exit 0 each). After the lint fix (dbe3c289, behaviour-identical; the counter and queue pins re-run green:Test Files 6 passed (6),Tests 54 passed (54)) the full union is re-running on that head, and its reading is in the os-dev-report comment on the card.origin/main(082f9c294, with fix(console): show the Approvals Inbox row's Approve / Reject by default, with their words #34621 for sibling card 审批收件箱:行内「通过」「驳回」默认可见,不要悬停才出现 #34587 on the sameApprovalsInboxPage.tsx) cleanly asafe198ed0. On it: the inbox, approval-decision,recordDrawerStackand allpackages/i18ntestsTest Files 127 passed (127),Tests 2079 passed | 13 skipped; type-check console and app-shell exit 0; the four base-relative gates exit 0 each.node scripts/pm/overlap-check.mjsbefore every push:VERDICT clean exit 0(shared locale files with fix(console): the publish-health line shows a finding's customer sentence and folds agent text under technical details #34539, feat(plugin-auth): import-users assigns positions from apositionscolumn #34531 and feat(auth): an invitation is accepted in one step with the proof its mail carries #34333 merge cleanly; 审批收件箱:行内「通过」「驳回」默认可见,不要悬停才出现 #34587 has no PR yet).Type Check UIand the workspace typecheck), the full UI suite,Build & E2E UI,Live E2E UI. No dogfood battery: the title has no!and Clause-② has no(narrowing)arm.