Repository navigation
feat(console): the approvals inbox keeps a way back from a record, takes an optional Reject reason, and marks requests you submitted - #28415
Merged
Conversation
…an optional Reject reason, marks self-submitted requests - The row's record link hands the record page the list-row origin (state.from), so the page draws a link back to the inbox; the link's target app is unchanged. - The row and bulk Reject confirmations offer an optional comment, sent as the reject call's `comment`; empty sends what it always did. - A row the server flags viewer.is_submitter shows "You submitted this" beside the requester (not on the Submitted by me tab). Nothing is gated. Claude-Session: https://claude.ai/code/session_01L6bhgWckvpzUHJaGf595aP Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#4 · os-sales · session_01L6bhgWqjXeTcS3jtug46Dv 维护者速读
席位意见:ACCEPT。三项都沿用已有的契约:返回链接用列表行本来就传的 席位核对 — ACCEPT · domain:ui#4 · Head-sha
|
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sales · project thread
Part of #27520 (row 12 only: the approvals inbox; the card's other open rows stay on it)
Clause-②: yes (widening:
@object-ui/i18ngainsapprovalsInbox.submittedByYouin all ten locales; no accept set moves)Metadata-protocol: none
维护者速读
comment字段;留空时请求与原来完全一样。回滚即 revert 本 PR。ui/apps/console/src/pages/system/ApprovalsInboxPage.tsx(RecordCell的state、两个驳回框、SelfSubmittedBadge);ApprovalsInboxPage.recordBackLink-27520.test.tsx。pnpm --dir ui exec vitest run apps/console/src/pages/system/→ 35 个文件全绿;或在 showcase 里以管理员进 Account → Approvals,点记录链接,记录页左上出现「‹ Approvals Inbox」。What changes
Measured on
main75ecaf4abefore any code; all three observations of row 12 still held:main/apps/INBOX_APP/OBJECT/record/IDand carries no origin, soRecordDetailView's crumb row (which drawsstate.fromor a?from=trail) draws nothingstate.from = { pathname: INBOX_PATH_AND_SEARCH, label: INBOX_TITLE }, the same origin a list row hands it, so the page draws "‹ Approvals Inbox"{ actor_id }onlyapprovalsInbox.commentlabel, "Comment (optional)"). A non-empty, trimmed reason is sent ascomment, whichPOST /approvals/requests/:id/rejectalready accepts. Empty sends{ actor_id }as before. Closing a dialog clears itviewer.is_submitteris true shows "You submitted this" beside the requester (desktop row and phone card). Not repeated on the Submitted by me tab. It gates nothing: who may decide is unchangedNo server, spec or permission change. The reject reason needed no new field.
Tests
ApprovalsInboxPage.recordBackLink-27520.test.tsx(2): mounts the real inbox and, on the record route, the realRecordDetailView. Clicking the record link keeps the inbox-app href, and the record page draws a link named "Approvals Inbox" that returns to the inbox. Control: a record page reached directly draws none.ApprovalsInboxPage.rejectReasonSelfSubmitted-27520.test.tsx(7): the typed reason reachesapprovalsApi.rejecttrimmed ascomment; empty sends nocommentand a reopened dialog starts empty; the bulk reason goes on every selected request; the marker shows on the self-submitted row and card only; the marked row stays decidable; the Submitted by me tab does not repeat it; a row withoutviewer.is_submitteris not marked (the server flag decides, not a client id match).pnpm --dir ui exec vitest run apps/console/src/pages/system/at the fix: 35 files, 225 tests passed (lock VERDICT command-exit 0).Ablations (scripts/ablation-replace.mjs, each restored to blob == HEAD 46056de6)
state={linkState}decisionCommentreturns{}tab !== 'submitted'guard (desktop)submitter_id === user.idinstead ofviewer.is_submitterAcceptance notes
Verification
Local subset, measured at
9a6804d1(the fix commit); the later merge oforigin/main(f7ef4650) brought only two plugin-audit test files, none of which these gates or tests read.node scripts/pm/dispatch-gates.mjs --commands: 34 derived, all 34 run with exit 0;--ranreconcile: "34 derived, 34 run, 0 NOT-MEASURED (a DERIVED zero — all 34 recorded an exit code)". Includesnode scripts/check-sdui-manifest.mjs(exit 0) andpnpm --dir ui exec vitest run scripts/(169 files passed, 2 skipped; 4901 tests passed).pnpm --dir ui check:new-line-citations: 0 new citations, exit 0.ui/packages/i18n/src/locales/: 0 errors; the 13 warnings sit on unchanged lines ofApprovalsInboxPage.tsx.pnpm --dir ui exec vitest run packages/i18n/: 94 files passed, 1438 tests passed, 13 skipped.turbo run type-check --filter=@object-ui/console --filter=@object-ui/i18n: 72 of 72 tasks successful (lock VERDICT command-exit 0).git merge-tree --write-treeagainst the two open PRs that touch the same locale files (feat(spec,runtime): an organization-scoped manage_connector_connections capability gates the connector connection door (ADR-0143 D5) #28400, feat(plugin-detail)!: a tab row under the record header; an open panel face is the active tab #28394): clean. No open PR touchesApprovalsInboxPage*.RecordDetailViewon the real route instead.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgWckvpzUHJaGf595aP