fix(web): use themed confirmation dialogs - #5624
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new themed confirmation dialog system with state management and queue handling, replaces the existing Electron IPC-based confirmation flow, and changes user-facing UI behavior across multiple components. The scope and architectural changes warrant human review despite good test coverage. You can customize Macroscope's approvability policy. Learn more. |
d144c50 to
c99087a
Compare
212b3ff to
01be733
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 01be733. Configure here.
01be733 to
bdac288
Compare
|
This was much needed, but was thinking of making dangerous btns red (e.g confirm deletion, etc) |
bdac288 to
2e4424a
Compare
|
Thanks for the suggestion. I adapted the confirmation API so intent is explicit instead of inferred from message text: deletion, worktree/project removal, checkpoint revert, settings reset, and SIGKILL now render the red destructive action; update/install, archive, and informational confirmations keep the normal primary action. This is in |

Summary
Rebased onto the newest
upstream/main(1a003e383ac6) and addressed the review feedback. The shared themed confirmation coordinator now carries an explicit confirmation intent: destructive actions render the existing T3 destructive/red button variant, while normal confirmations keep the standard primary button.Deletion, worktree removal, project removal, checkpoint revert, settings reset, and SIGKILL confirmations are destructive. Archive, update/install, and informational confirmations remain normal. Native macOS context menus remain unchanged.
Verification
vp run --filter @t3tools/web typecheckvp run --filter @t3tools/desktop typecheckvp fmt --checkgit diff --checkvp i; both still fail before test execution because of the repository's runner/configuration bootstrap errors (zero test bodies run)Scope
Mobile native alerts, CLI prompts, Electron message/error boxes, and native macOS context-menu behavior remain unchanged. The renderer confirmation path fails closed when no themed host is mounted.
Model/harness: gpt-5.6-luna via Codex.
Note
Medium Risk
Changes how destructive actions (updates, SIGKILL, deletes via LocalApi) are confirmed; fail-closed behavior when no host is mounted could block actions in edge cases.
Overview
Replaces native browser and Electron confirmation flows with a shared in-app
AlertDialogso destructive prompts match the rest of the UI on web and desktop.A new
confirmDialogcoordinator queues requests, handles close transitions, and exposesConfirmDialogHostfrom the root route.LocalApi.dialogs.confirmnow goes throughrequestConfirmDialogwhen a host is mounted; if none is registered it returnsfalseinstead of callingwindow.confirmor the desktop bridge.The Electron
confirmIPC path is removed (ElectronDialog.confirm,CONFIRM_CHANNEL, preloadconfirm, andDesktopBridge.confirmin contracts). Call sites that usedwindow.confirm(update install, SIGKILL in diagnostics/telemetry) nowawait ensureLocalApi().dialogs.confirm, with pending-state guards to avoid double submissions.Reviewed by Cursor Bugbot for commit 01be733. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Replace native
window.confirmwith themed in-app confirmation dialogsconfirmDialogcoordinator module (confirmDialog.ts) with a pub/sub state machine that serializes confirmation requests, supports adestructivevisual variant, and resolves pending dialogs when the host unmounts.AlertDialogdriven by the coordinator state and handles confirm/cancel/close lifecycle callbacks.LocalApi.dialogs.confirmto route exclusively through the coordinator, returningfalsewhen no host is registered, and removes the previouswindow.confirmand desktop bridge fallback paths.confirmIPC handler,ElectronDialog.confirm,CONFIRM_CHANNEL, anddesktopBridge.confirmfrom the desktop layer entirely.{ variant: 'destructive' }todialogs.confirmfor consistent styling.window.desktopBridge.confirmis permanently removed; any external caller relying on it will receive no response.Macroscope summarized 2e4424a.