Skip to content

fix(web): update dialog closes when clicking outside it - #37838

Open
RealDoc06 wants to merge 1 commit into
pingdotgg:mainfrom
RealDoc06:fix/update-dialog-outside-click
Open

RealDoc06 wants to merge 1 commit into
pingdotgg:mainfrom
RealDoc06:fix/update-dialog-outside-click

Conversation

@RealDoc06

@RealDoc06 RealDoc06 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The update confirmation ("Update N machines?" from the sidebar, and "Switch to Stable/Nightly" from Settings) stays open when you click outside it. Every other popup in the app closes on an outside click.

To reproduce: with a provider or app update available, click the sidebar update button, then click the dimmed backdrop.

Change

Both dialogs used Base UI's AlertDialog, which never dismisses on outside press by design. They now use the regular Dialog wrapper with no close button, so they look the same and close on an outside click, Escape, or Cancel.

  • They keep role="alertdialog", so screen readers still announce them as confirmations, and the shortcut guard from fix(web): app shortcuts wait while a confirmation dialog is open #27157 still keeps app shortcuts from firing behind them.
  • Closing while a track switch is checking is still blocked by the existing onOpenChange guard.
  • The track-switch loading/failure text gets wrap-anywhere, which AlertDialogDescription used to provide, so a long registry error can't widen the popup.
  • Below the sm breakpoint the header is left-aligned instead of centered, matching the left-aligned machine table.

Scope

A small fix for an obvious bug: one popup behaves differently from the rest of the app. No issue filed.

Verification

  • SidebarUpdatePill.browser.test.tsx: the pointer-cancel case is now it.each over Cancel and an outside press, and asserts the alertdialog is open before closing it. The outside-press row fails on main (dialog still open) and passes here. File passes 6/6. vp run check:changed passes.
  • Manual, web dev build: the outside click does nothing on main and closes the dialog on this branch. The popup renders role="alertdialog".
  • Not checked: the desktop (Electron) build and the Settings track-switch flow by hand. The track switch only exists with the desktop bridge, and goes through the same DialogPopup path the test covers.
Before After
before after

Council review

Rounds: 2

Delegate Round 1 Round 2
Claude Opus 8/10 8.5/10
Muse Wonder 8/10 9/10

Created with Claude Opus 5.5 in Claude Code (via T3 Code). Council reviews by Claude Opus 5.5 and Muse Wonder 1.0.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 17, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at d33a641

Macroscope's review found this PR approvable — Update dialogs now support outside-click dismissal while retaining explicit confirmation before updates run. The change is limited to dialog interaction and presentation, without changing update execution or saved settings.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The track-switch and update-everything dialogs now use standard Dialog components while retaining alert-dialog semantics. The update-everything browser test covers closing by Cancel and outside press, and verifies focus does not return to the update button.

Changes: Update dialogs

Layer / File(s) Summary
Track-switch dialog conversion
apps/web/src/components/settings/UpdateTrackSwitchDialog.tsx
The release-loading dialog uses Dialog components with role="alertdialog" and no close button. The description adds wrap-anywhere; the Cancel action remains.
Update-everything dialog and focus test
apps/web/src/components/sidebar/UpdateEverythingDialog.tsx, apps/web/src/components/sidebar/SidebarUpdatePill.browser.test.tsx
The dialog uses Dialog components and retains its content and button behavior. The browser test covers closing with Cancel or an outside press and verifies focus does not return to the update button.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#26288: Adds the fleet track-switch flow and confirmation dialog that this PR updates. Suggested labels: bugfix

Suggested reviewers: t3dotgg

Merge Risk: Minimal · up to 1df60

The update dialogs now close when users click outside them, as intended. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the update confirmation dialogs now close on outside click. It is a conventional commit with the fix(web) scope. It matches the changeset, which swaps AlertDialog for …
Description check Passed The description follows the template sections: Problem, Change, Scope, and Verification. Problem gives the behavior and reproduction steps. Change explains the switch from AlertDialog to Dialog and th…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the update confirmation dialogs now close on outside click. It is a conventional commit with the fix(web) scope. It matches the changeset, which swaps AlertDialog for Dialog so the popups dismiss on outside press.

Full details: Description check

Explanation

The description follows the template sections: Problem, Change, Scope, and Verification. Problem gives the behavior and reproduction steps. Change explains the switch from AlertDialog to Dialog and the related adjustments. Scope explains why no issue is linked. Verification lists the tests run, the manual checks, and what was not checked. Before and after images are included. The template's trailing agent-attribution line is present. The description has a Council review table that the template does not require, but this does not make it incomplete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d33a641b51804e012ff06dbd3bb9efd712cc37c3 and 1df6054.

Files selected for processing: 2

  • apps/web/src/components/settings/UpdateTrackSwitchDialog.tsx
  • apps/web/src/components/sidebar/UpdateEverythingDialog.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@RealDoc06
RealDoc06 force-pushed the fix/update-dialog-outside-click branch from d33a641 to 1df6054 Compare November 18, 2026 02:31
@maria-rcks

maria-rcks commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

verified head 1df605446ed3b51003d1b4da0edf24af9288c25e against github/main at 373ec12be6 on linux, using the real dev web app, repo Playwright, and /usr/bin/google-chrome. no source changes were needed.

created a project pointing at the real checkout and ran Codex gpt-6.1-sol through the composer. configured the installed npm Codex binary through provider settings so the app detected its real registry update, then opened the sidebar's "update 1 machine?" confirmation.

  • main: clicking the backdrop leaves the confirmation open.
  • pr: the same outside click closes it. cancel, reopening, inside clicks, and keyboard-open/escape dismissal also work. keyboard dismissal restores focus; pointer cancellation does not refocus the update pill.
  • the dialog retains role="alertdialog", and the new-thread shortcut stays blocked behind it.
  • the narrow web layout renders the confirmation above the sidebar and dismisses on an outside click.
  • a second real Codex turn completed after dismissal: "provider still works after dialog dismissal."
  • vp run check:changed 055b44919eeb5d6a59b934fea1cdd34de10c91fe passed through blacksmith-check, including all six sidebar browser tests, affected typechecks, lint, format, knip, and react compiler checks. existing github checks are green.

before, after the outside click on main:

main confirmation remains open after outside click

after, after the outside click on the pr:

pr confirmation closes after outside click

pr outside-click interaction with the real Codex conversation

Not verified

  • the desktop-only stable/nightly track-switch flow, including its checking guard and registry failure text, needs a real Electron client. no desktop bridge was mocked.
  • native ios/android clients and macos/windows behavior were not exercised on this linux vm.
  • actual provider installation, application installation/restart, and multi-machine update execution were not run. this pass exercised confirmation and dismissal with a real available update.

This branch has not been deployed

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

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants