Skip to content

feat(approvals): display contract v2 — no raw identifiers anywhere#1737

Merged
os-zhuang merged 1 commit into
mainfrom
feat-approvals-display-contract-v2
Jun 11, 2026
Merged

feat(approvals): display contract v2 — no raw identifiers anywhere#1737
os-zhuang merged 1 commit into
mainfrom
feat-approvals-display-contract-v2

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #1728 after a business-UX pass on the revamped inbox: three surfaces still leaked raw identifiers. The enrichment pass now guarantees a client never has to render an id:

  • payload_display — lookup/master_detail foreign keys in the record snapshot resolve to the referenced record's display title (via the field's schema reference, batched one query per referenced object). Account: dpOfPMy7cbeEL1jkAccount: Fabrikam.
  • pending_approver_names — user-id entries in pending_approvers resolve via sys_user (id or email); role:<r> literals pass through, already readable.
  • object_label — the target object's schema label (e.g. "Project" for showcase_project).
  • actor_name on listActions rows — the audit timeline never shows an id.

Test plan

  • plugin-approvals: 46 tests (3 new: payload lookup resolution + object_label, approver name map, actor_name on actions) ✅
  • E2E against showcase: pending rows return payload_display: {account: "Contoso"}, pending_approver_names, object_label: "Project"; Console drawer renders Fabrikam/Northwind/Contoso instead of foreign keys ✅

🤖 Generated with Claude Code

A business reviewer of the revamped inbox still met raw ids in three
places: lookup foreign keys inside the payload summary (e.g. an account
shown as dpOfPMy7cbeEL1jk), user-id approvers in the waiting-on chips,
and actor ids in the audit timeline. Extend the enrichment pass:

- payload_display — lookup/master_detail fields in the snapshot resolve
  to the referenced record's display title (schema `reference`, batched
  one query per referenced object).
- pending_approver_names — user-id approvers resolve via sys_user
  (id or email); role:<r> literals stay as-is, already readable.
- object_label — the target object's schema label rides the row.
- listActions rows carry actor_name so the timeline never shows an id.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 11, 2026 4:09pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant