From a8d490f60c0625bd8a4138ad4f6687cb5dc83212 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Wed, 8 Apr 2026 17:12:57 -0400 Subject: [PATCH 1/2] fix(desktop): restore focus to new workspace modal after alt-tab The Dialog defaulted to non-modal mode, so Radix did not trap focus. When alt-tabbing away and back, focus landed on the window body instead of returning to the modal. Enabling `modal` on both workspace dialog variants activates Radix's built-in focus trap. --- .../renderer/components/NewWorkspaceModal/NewWorkspaceModal.tsx | 2 +- .../DashboardNewWorkspaceModal/DashboardNewWorkspaceModal.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/renderer/components/NewWorkspaceModal/NewWorkspaceModal.tsx b/apps/desktop/src/renderer/components/NewWorkspaceModal/NewWorkspaceModal.tsx index 3734601c58e..542546dd9df 100644 --- a/apps/desktop/src/renderer/components/NewWorkspaceModal/NewWorkspaceModal.tsx +++ b/apps/desktop/src/renderer/components/NewWorkspaceModal/NewWorkspaceModal.tsx @@ -73,7 +73,7 @@ export function NewWorkspaceModal() { - !open && closeModal()}> + !open && closeModal()}> New Workspace Create a new workspace diff --git a/apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/DashboardNewWorkspaceModal.tsx b/apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/DashboardNewWorkspaceModal.tsx index 12bf45f75db..f0a39bf8ca5 100644 --- a/apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/DashboardNewWorkspaceModal.tsx +++ b/apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/DashboardNewWorkspaceModal.tsx @@ -20,7 +20,7 @@ export function DashboardNewWorkspaceModal() { return ( - !open && closeModal()}> + !open && closeModal()}> New Workspace From bdf35f2deeeef039e5e992dde3cfbdfa4dd53769 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Thu, 9 Apr 2026 09:38:23 -0400 Subject: [PATCH 2/2] fix(desktop): prevent DashboardNewWorkspaceModal dismiss on alt-tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add onFocusOutside prevention to match NewWorkspaceModal — without it, modal mode causes Radix to dismiss the dialog when focus moves outside on alt-tab, which is a regression. --- .../DashboardNewWorkspaceModal/DashboardNewWorkspaceModal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/DashboardNewWorkspaceModal.tsx b/apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/DashboardNewWorkspaceModal.tsx index f0a39bf8ca5..e9a281265a8 100644 --- a/apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/DashboardNewWorkspaceModal.tsx +++ b/apps/desktop/src/renderer/routes/_authenticated/components/DashboardNewWorkspaceModal/DashboardNewWorkspaceModal.tsx @@ -29,6 +29,7 @@ export function DashboardNewWorkspaceModal() { e.preventDefault()} className="bg-popover text-popover-foreground sm:max-w-[560px] max-h-[min(70vh,600px)] !top-[calc(50%-min(35vh,300px))] !-translate-y-0 flex flex-col overflow-hidden p-0" >