Repository navigation
fix(app-shell,react,plugin-detail): fold an override-only admin's approval levers into one menu and draw Recall once - #26053
Conversation
…to one menu and draw Recall once For a viewer who holds no approver slot but may override, the record page's approval bar becomes one status line (pending, waiting on whom), the levers without an override arm as buttons, and one marked menu with every lever the override flag admits. The approver's bar is unchanged. The record page now tells the DetailView approval band that it draws the declared Recall itself (new optional InlineEditContext member approvalRecallDrawnByHost), and the band keeps its lock badge only. Claude-Session: https://claude.ai/code/session_014N3u93mMkVGhq6DBKXqx4J Co-authored-by: Claude <noreply@anthropic.com>
…change Claude-Session: https://claude.ai/code/session_014N3u93mMkVGhq6DBKXqx4J Co-authored-by: Claude <noreply@anthropic.com>
…ws one The band's Recall now steps aside when the decision bar reports that it draws the request's declared approval_recall, rather than whenever the bar is mounted. Before the request definition loads, or on a backend that sends no viewer block (every declared gate fails closed), the bar draws no Recall and the band stays the submitter's lever. DeclaredActionsBar reports the declared actions it draws through the new optional onDrawnActionsChange; folded levers report through a visibility probe while their menu is closed, and the override menu appears only once a folded lever is shown. Claude-Session: https://claude.ai/code/session_014N3u93mMkVGhq6DBKXqx4J Co-authored-by: Claude <noreply@anthropic.com>
…-udq66w # Conflicts: # scripts/sdui-manifest.record.json
Claude-Session: https://claude.ai/code/session_014N3u93mMkVGhq6DBKXqx4J Co-authored-by: Claude <noreply@anthropic.com>
… draws it (#25877) Claude-Session: https://claude.ai/code/session_014N3u93mMkVGhq6DBKXqx4J Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewServed-tier: ① Derived judgments
② Semver levelThe changeset ③ Boundary flags
Implemented-by: VERDICT: PASS |
席位核对 · ACCEPT · seat
|
Claude-Session: https://claude.ai/code/session_014N3u93mMkVGhq6DBKXqx4J Co-authored-by: Claude <noreply@anthropic.com>
…erged tree (#25877) Claude-Session: https://claude.ai/code/session_014N3u93mMkVGhq6DBKXqx4J Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewServed-tier: ① Derived judgments
② Semver levelThe changeset ③ Boundary flags
Implemented-by: VERDICT: PASS |
|
Why I don't read it as this PR's failure:
The one Generated by Claude Code |
|
Seat |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 40353296650 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steve · project thread
Fixes #25877
Clause-②: yes (widening)
Metadata-protocol: none
The
Clause-②arm is the claim's ruling: one optional member is added to the exportedInlineEditContextvalue (and toInlineEditProvider's props) of@object-ui/react, which widens its public type surface and narrows nothing. The member is optional so that every existing host keeps its behaviour: absent meansfalse, and then the DetailView approval band draws its own Recall exactly as before. A host sets it only when it draws the request's declared Recall itself.What changes
Placement only. Who may override, what an override records, the override notice each lever shows and the request each lever sends are unchanged.
viewer.can_act: false,viewer.can_override: true): the approval bar above the title is now one line: a Pending badge with "Waiting on" and the pending approvers by name, the levers with no override arm as buttons (Reply, for the submitter), and one amber "Admin override" menu holding every lever the override flag admits (Override Approve, Override Reject, Override Reassign, and Recall, whose gate ORs the flag in too). The folded set is read off each action's ownvisiblegate (actionAdmittedByOverride), not off a name list. The submitter's own Recall stays the plain Recall inside the menu; a non-submitter admin sees Override Recall, as before.foldOverridesfolds nothing for a viewer who can act).DeclaredActionsBarreports which declared actions it actually draws (new optionalonDrawnActionsChange, after the capability gate and each action'svisibleverdict; folded levers report through a visibility probe while their menu is closed). While it drawsapproval_recall, the record page setsapprovalRecallDrawnByHost, and the DetailView approval band (@object-ui/plugin-detail) keeps its lock badge and tally only. Read off what the bar draws, not off whether it is mounted: before the request definition loads, or on a backend that sends noviewerblock (every declared gate fails closed), the bar draws no Recall and the band stays the submitter's lever.scripts/sdui-manifest.record.jsonre-recorded on the merged tree (node scripts/gen-sdui-manifest-node.mjs);sdui.manifest.jsonitself is byte-identical.Files:
ui/packages/app-shell/src/views/DeclaredActionsBar.tsx,ui/packages/app-shell/src/views/RecordDetailView.tsx,ui/packages/react/src/context/InlineEditContext.tsx,ui/packages/plugin-detail/src/DetailView.tsx(seat 2's package, held by this card with seat 2's knowledge), tests beside each, root changeset (patch for@object-ui/app-shell,@object-ui/react,@object-ui/plugin-detail).Verification
All on head
df86fb71(main39a78b15merged in):The 101 files are every
RecordDetailView.*,RecordApprovalsPanel.*andDeclaredActionsBar.*test in app-shell, everyDetailView.*test in plugin-detail, and theInlineEditContext/resolveApprovalLocktests in react. They includeRecordDetailView.recordOpenRequests-12701, whose control case ("every approvals consumer still shows its state") is what moved the signal from "bar mounted" to "bar draws Recall". New tests:app-shell/src/views/__tests__/DeclaredActionsBar.foldOverrides-25877.test.tsx(8): the fold, the status line, Reply stays a button, menu order and labels, a folded lever still dispatches with its override notice, the approver's bar unchanged, no change withoutfoldOverrides, the drawn-actions report (menu closed, approver set, unmount), no empty menu.plugin-detail/src/__tests__/DetailView.approvalRecallHostDrawn-25877.test.tsx(3): signal on, absent, and toggled.RecordDetailView.approvalRecallGate.test.tsx(+3, page to band seam): the signal is true while the bar draws Recall, false on a backend with noviewerblock, false with no approvals API.RecordDetailView.approvalDeclaredActions.test.tsx: the override-admin case now opens the menu to find its three levers.The first type-check run on the merged tree failed once in
metadata-admin/useMonacoFallback.ts(configureBundledMonacomissing from aplugin-editordist built before #25993 merged); afterpnpm --filter '@object-ui/app-shell^...' buildall three packages pass. That file is not in this diff.Reverse verification, each mutation through
scripts/ablation-replace.mjswith its on-disk proof and a byte-identical restore toHEAD(tests resolve@object-ui/*to source, so no rebuild leg):approvalRecallDrawnByHostterm from the Recall conditionDetailView.approvalRecallHostDrawn-25877false && foldOverrides …)DeclaredActionsBar.foldOverrides-25877approvalRecallDrawnByHost={false}&&to||)Gates:
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 46 commands for this diff (10 paths vs merge base39a78b15); every one exited 0 on the merged tree, includingcheck-sdui-manifest.mjsafter the re-record.--ranreconciliation: "46 derived famil(ies) accounted for — 46 run, 0 NOT-MEASURED". After the last commit (changeset wording only) the changeset-reading gates were re-run and exited 0.Acceptance notes
page:header; the seat's claim records this reading.approvalsInbox.statusPending,approvalsInbox.waitingOn,approvalsInbox.approverNameSeparator,approvalsInbox.viaOverrideChipfor the menu's name), so in zh-CN it reads 「待审批」 + 「等待以下审批人」 + names rather than the card's literal 「审批中 · 等待 X」. A dedicated sentence key would touchui/packages/i18nin ten locales, outside this card's file surface. carrier: none.preventDefaulton select), the same shape as the page header's overflow items inPageHeaderActions.ui/packages/app-shellhas about 1700 test files; locally only the files named after the touched components ran (listed under Verification). The full package is CITest Core's.Generated by Claude Code