feat(approvals): review screen + cleaner inbox (no raw record id)#74
Merged
Conversation
Address review feedback on the approvals inbox: you could approve from a bare list that showed a raw record id and gave no way to see what you were deciding on. - Inbox cards no longer show the raw record_id — they show the object label and are tappable (chevron) to a review screen; quick approve/reject remain. - New approval detail/review screen (app/approvals/[id].tsx): shows the request context (process / step / status / submitter comment / time) AND the business record under review — its title plus key fields (ApprovalTargetCard) — so the approver can review before deciding, then approve/reject from there. - Extract ApprovalActions (approve confirm + reject-reason dialog + toasts), shared by the inbox card and the detail screen so the decision flow is identical. - useApproval / useApprovalTarget hooks; decisions now invalidate the single request too; detail navigates back (or to the inbox when deep-linked). Verified in-browser (local 7.5.0): inbox shows "Crm Opportunity" instead of an id and links to the review screen, which renders the target record (title + Name/Description/Status) and approves end-to-end (status → approved). Adds useApproval/useApprovalTarget/ApprovalTargetCard tests; typecheck + lint clean; full suite green (1176). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Review feedback addressed
Approving from a bare list that showed a raw record id with no way to see what you were deciding on was wrong. Fixes:
record_id— show the object label, are tappable (chevron) to a review screen, and keep quick approve/reject.app/approvals/[id].tsx): shows the request context (process / step / status / submitter comment / time) and the business record under review — its title plus key fields (ApprovalTargetCard) — so you can review before deciding, then approve/reject there.ApprovalActions(approve confirm + reject-reason dialog + toasts), shared by the inbox card and the detail screen so the decision flow is identical.useApproval/useApprovalTargethooks; decisions now also invalidate the single request; detail navigates back (or to the inbox when deep-linked with no history).Verification (in-browser, local 7.5.0)
Mt0ictKwxdVx229R, with a chevron → tap opens the review screen.PATCH status=approvedend-to-end.useApproval/useApprovalTarget/ApprovalTargetCardtests;tsc+eslintclean; full suite green (1176).Follow-up to #73.
🤖 Generated with Claude Code