Skip to content

feat(approvals): review screen + cleaner inbox (no raw record id)#74

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/approvals-detail
Jun 2, 2026
Merged

feat(approvals): review screen + cleaner inbox (no raw record id)#74
xuyushun441-sys merged 1 commit into
mainfrom
feat/approvals-detail

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

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:

  • Inbox cards drop the raw record_id — show the object label, are tappable (chevron) to a review screen, and keep quick approve/reject.
  • New 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 you can review before deciding, then approve/reject there.
  • Extracted 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 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)

  • ✅ Inbox shows "Crm Opportunity" (object label) instead of Mt0ictKwxdVx229R, with a chevron → tap opens the review screen.
  • ✅ Review screen renders the target record: "SERVER ITEM" / "Wayne Enterprise License — $1.2M renewal" + Name / Description / Status.
  • ✅ Approve from the detail screen → PATCH status=approved end-to-end.
  • ✅ New useApproval / useApprovalTarget / ApprovalTargetCard tests; tsc + eslint clean; full suite green (1176).

Follow-up to #73.

🤖 Generated with Claude Code

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>
@xuyushun441-sys xuyushun441-sys merged commit bd28b78 into main Jun 2, 2026
1 of 4 checks passed
@xuyushun441-sys xuyushun441-sys deleted the feat/approvals-detail branch June 2, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants