Repository navigation
feat(approvals): the approval request page shows the whole business record - #34631
Conversation
…ecord The request page (sys_approval_request_detail) drops its Details/Timeline tabs: header, highlights, then record:approval_decision, last. The panel now draws, below the decision bar, every readable field of the request's snapshot in the target object's default record page sections, marks a field changed after submission with its current value (one findOne of the record), the record's child tables read-only with current rows, and a right rail of approval progress, attachments and activity (the request's thread, read through the page's adapter on a read verdict). RecordSnapshotSummary and snapshotSummaryPlan retire; the record approvals panel and the request page share ApprovalActionTimeline. New approvalsInbox.* keys in all eleven @object-ui/i18n packs. The servedPageSummary 12483/12534 console pins are rewritten to the full record. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhGHzMtixGDQoMmtqq
📓 Docs Drift CheckThis PR changes 2 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 173 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 23e4529aef545a48f1d1ed29ea7a5dc838271e7c && git checkout 23e4529aef545a48f1d1ed29ea7a5dc838271e7c
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d57d6eedbb940257cc4d7604a26f407841f65bc7 5539896777e2a43bb628746738ebd2b96707c9d3 && git checkout -B drift-repro d57d6eedbb940257cc4d7604a26f407841f65bc7 && git merge --no-ff 5539896777e2a43bb628746738ebd2b96707c9d3
node scripts/docs-audit/affected-docs.mjs --json d57d6eedbb940257cc4d7604a26f407841f65bc7
|
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhGHzMtixGDQoMmtqq
The field/settledWhen row cited RecordSnapshotSummary.tsx#FieldFace, which this change deletes; the request page's FieldFace in SubmittedRecord.tsx now judges the predicate. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhGHzMtixGDQoMmtqq
… the findOne double's arity Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhGHzMtixGDQoMmtqq
… keys Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhGHzMtixGDQoMmtqq
openPathObjectReaders-12811 counts every reader of useMetadata().objects. The approval request page's SubmittedRecord reads the list to find the record's owned child objects; it is not on an app object-list open path, so its row is kind 'off'. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhGHzMtixGDQoMmtqq
…-lqqtq3 # Conflicts: # ui/packages/app-shell/src/views/approval-decision/ApprovalDecisionPanel.tsx
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB 席位核对 · L1 (seat 3, L1-a) · 2026-11-17T06:00ZL1: ACCEPT Tier H by size ( Must-fixNone. Should-fixNone. Readings that hold
CI67 check-runs on this exact head (the merge Notes
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG 席位记录 · 2026-11-17T06:01ZHead-sha: 维护者速读(终稿)
席位意见:建议批准。行数大主要是删掉旧的六行摘要及其测试(−1516 行)。 席位核对
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44028768870 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufzhGHzMtixGDQoMmtqq
Fixes #34588
Clause-②: yes (widening — new @object-ui/i18n locale keys only; no metadata or schema accept set)
Metadata-protocol: none
维护者速读
ui/packages/app-shell/src/views/approval-decision/SubmittedRecord.tsx的文件头(规则),再看ApprovalDecisionPanel.tsx的布局。What changes
The request page (
packages/plugins/plugin-approvals/src/sys-approval-request.page.ts):page:header→record:highlights→record:approval_decision, with nopage:tabs. The Details tab (the request's own fields) and the Timeline tab (thesys_approval_actionrelated list) are gone. Their content is now inside the decision panel. No node type or prop was added:record:approval_decisionkeeps its empty strict props row, so every part of the layout lives in the panel.The decision panel (
ui/packages/app-shell/src/views/approval-decision/):SubmittedRecord.tsx+ puresubmittedRecordPlan.ts):payloadsnapshot that the reader may read, in the sections of the target object's default record page (deriveRecordDetailSectionswith field groups resolved), each through the record page's own cell, withpayload_displaynames for references.hidden: truefields, framework columns, and fields the reader may not read. Field-level security is unchanged. The service redacts per reader, and both rows also passwithoutDeniedFields.findOne(object, id)(no params) reads the current record. A field whose current value differs is marked Changed (已改动) with its current value.valuesDiffertreats empty values as equivalent, numbers by value, dates by instant, references by id (stored or expanded), and lists as sets.master_detailchildren andrelatedList: 'primary'tables (deriveRelatedLists), each a plugin-detailRelatedListwith no New, Add, edit or row action. They show CURRENT rows, with a note saying so, because the snapshot keeps the record's own row only. They are drawn only once the record reads.approval-progress/ApprovalActionTimeline.tsx, whichRecordApprovalsPanelnow shares, so the two timelines cannot drift.useRecordContext().dataSource, which the console routes toGET /approvals/requests/:id/actions). It is read only on a read verdict forsys_approval_action, as the Timeline related list was.RecordSnapshotSummary.tsx,snapshotSummaryPlan.tsand its test (the six-row cut and the amount lead).Copy: seven new
approvalsInbox.*keys in all eleven@object-ui/i18npacks:snapshotChanged,snapshotCurrentValue,snapshotOpenRecord,snapshotCurrentUnreadable,snapshotChildCurrent,progressTitle,attachmentsTitle.Why this route, not embedding the business record page: the record page is a live, editable surface with its own approval bar (#34361) and header actions. Embedding it would put editing and a second decision bar on the request page, and it would show current values, not the evidence the approver is asked to decide on. The snapshot-faithful card keeps the submitted values primary and marks the drift. The seat accepted this route on the card thread.
Not done (card 不做): no editing; no change to snapshot storage. Child tables show current values, marked as such.
Tests
submittedRecordPlan.test.ts(plan and comparison rules) andApprovalDecisionPanel.fullRecord-34588.test.tsx. The second covers acceptance 1–3 on a 14-field record with groups, a denied field, amaster_detailchild, a changed field, rail order, child tables read-only, thefindOnecall shape, and an unreadable CONTROL.ApprovalDecisionPanel.test.tsx(directory-read counts now exclude the one thread read; the pending CONTROL expects that read),ApprovalDecisionPanel.stepLine-12491.test.tsx(decisions on top, then line above tally inside the progress card), andApprovalDecisionPanel.decidedSnapshot-27502.test.tsx(testids).RecordApprovalsPaneltests are unchanged and green.sys-approval-request-page.test.ts: the body order is header, highlights, decision, with a new "has no tabs" test. The step_label timeline-column test is retired along with the tab.Console pins rewritten (seat-widened surface:
approvalRequestsDataSource.servedPage*.test.tsx)The "Card line" column cites the card's 要做的 items. Item 1 is 「请求页在审批条下方直接显示该业务记录的完整内容:全部可读字段按对象的分组排列、子表(相关列表,只读)、附件」. Item 2 is 「提交后被改过的字段在旁边标出「已改动」并能看到当前值」. Item 4 is 「字段级权限照旧」.
approvalRequestsDataSource.servedPageSummary-12483.test.tsxcomponents[1]isrecord:approval_decision(page with tabs)record:approval_decision; nopage:tabscontacttakes no row, and its raw id is never printedcontactis drawn as the record page draws it (the lookup cell's unresolved-reference face)[data-summary-lead]) and is not repeated as a rowamountis an ordinary field, drawn once, through the currency facename, account, cost_center, region, status, issued_oninternal_scorestays outinternal_scoredrawn and the last row is cutinternal_scoredrawn, nothing cut (11 rows)cost_centerandamount; neither value anywherelead.key === 'amount'amountis drawninvoicepath on the transporthost.findOne('invoice', 'inv_1'), no params;amountmarked Changed with its current value; an expanded same-id account is not a change; still noinvoicepath on the transportinvoice, no summaryrecord-snapshot-summarytestidsubmitted-recordtestid, same assertionstotal_amounta row inside the six (cost center removed to make room)total_amountan ordinary field (no row cut, so cost center stays)amountfieldapprovalRequestsDataSource.servedPageSummaryAmount-12534.test.tsx: the whole file pinned which roll-up takes the lead. With no lead, every row below is retired by item 1.total_amountleads; the rows are six without ittotal_amountis an ordinary field; all ten fields,sumandcountroll-ups alike, in declared ordertotalleadstotalis an ordinary fieldtotal_amount,approved_amountleadstotal_amountis not drawn;approved_amountstill issumline_counta rowline_countrow)sumovernumberunit_priceleadsunit_priceis an ordinary fieldshowcase_expense_lineis drawn read-only, with the current-rows note and its rowsNot edited, and green:
approvalRequestsDataSource.decisionPage.test.tsx(including :341, where the timeline reads the actions route and neverhost.find) andapprovalRequestsDataSource.servedPageMemberPermissions-13324.test.tsx(including the no-ApprovalRecordReadscontrol, which sends no actions GET). Both were red mid-change. The cause was fixed in source, not in the pins: the thread read now goes through the page's adapter and is gated on the read verdict.Acceptance notes
fullRecord-34588acceptance 1, console 12483/12534.)fullRecord-34588acceptance 2, console 12483 "read once".)fullRecord-34588rail order.)Verification
Run on this head (9f91de6; the tree is identical to the gated working tree):
pnpm exec vitest run apps/console/src/services/approvalRequestsDataSource apps/console/src/pages/system/ApprovalsInboxPage(fromui/): 31 files, 219/219 pass, exit 0.pnpm exec vitest run packages/app-shell/src/views/approval-decision packages/app-shell/src/views/RecordApprovalsPanel(fromui/): 16 files, 116/116 pass, exit 0.vitest runonpackages/plugins/plugin-approvals/src/sys-approval-request-page.test.tsandsys-approval-request-title.integration.test.ts: 24/24 pass, exit 0.tsc --noEmit:@object-ui/app-shellexit 0,@object-ui/i18nexit 0,@objectstack/plugin-approvalsexit 0.eslinton the changed ui files: exit 0, with 0 errors and 7 warnings. The warnings are in moved code:no-explicit-anyonimport.meta, and react-refresh on a hook export.node scripts/pm/overlap-check.mjs: VERDICT clean (merges cleanly with origin/main, feat(console): the approvals queue steps from request to request and opens the next one after a decision #34624 and feat(console): phone app menu bar with pinned entries, and a starred full menu behind More #34628), exit 0.node scripts/check-platform-checklist.mjs --changed-from origin/main: exit 0.dispatch-gates --commandsbattery (72 commands) runs under the verify lock. Its exit codes, reconciled with--ran, are posted in the os-dev-report comment on 审批请求页:直接显示完整的业务记录,不止「提交时的内容」里的 6 个字段 #34588.Before / after readings
page:tabs(Details, Timeline). The decision panel draws "As submitted" with the amount lead and at most six rows (12483: rowsname, account, cost_center, region, status, issued_on), and never reads the target record.contactthrough the lookup face. OnefindOne('invoice','inv_1'), and a changedamountcarries the Changed mark with its current value (13,250) beside the submitted 12,500. 12534 draws theshowcase_expense_linechild table read-only from current rows. The rail order is progress, attachments, activity (fullRecord-34588).🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzhGHzMtixGDQoMmtqq