Skip to content

feat(react): add a dialog presentation to ApprovalCard - #1618

Queued
blove wants to merge 1 commit into
mainfrom
blove/react-approval-dialog
Queued

blove wants to merge 1 commit into
mainfrom
blove/react-approval-dialog

Conversation

@blove

@blove blove commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

What

React ApprovalCard gets presentation="dialog", matching the dialog presentation of Angular's approval card.

<ApprovalCard
  presentation="dialog"
  title="Save the note?"
  onDismiss={decline}
  actions={[
    { id: 'approve', label: 'Save note', onSelect: approve },
    { id: 'decline', label: "Don't save", onSelect: decline },
  ]}
>
  <p>{reason}</p>
</ApprovalCard>
  • The same panel content opens as a native modal for as long as the card is mounted. The app still decides when it is pending: unmounting the card closes it and returns focus.
  • Escape calls the new onDismiss; without it Escape does nothing. The dialog never closes itself.
  • inline stays the default, so existing cards are unchanged.
  • In Chat's approval slot the composer placeholder and focus return keep working.

Angular's showEdit needs nothing new: React actions are an app-authored list, so an Edit action is one more entry.

Verification

  • npx nx run-many -t test,type-tests,lint -p react passes (8 new tests in approval-dialog.spec.tsx).
  • npx nx run-many -t build --projects=core,content,react and node scripts/react-parity/verify-packages.mjs pass.
  • node scripts/react-parity/inventory.mjs --check --drift warn passes.
  • Checked in a browser with a scratch page inside Chat: the modal opens centred over a scrim with focus on the first action, Escape reaches onDismiss, and after the card unmounts focus returns to the composer. No console errors.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
threadplane Ready Ready Preview Nov 16, 2026 6:22am UTC

Request Review

@blove
blove enabled auto-merge November 16, 2026 05:51
@blove
blove added this pull request to the merge queue Nov 16, 2026
Any commits made after this event will not be merged.

This branch was successfully deployed

1 active deployment
Preview – threadplane — 64472950 Deployed Nov 16, 2026 by vercel[bot]
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.

1 participant