@devries-cameron20 / t3code-1 / commits / b3a1334950
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): right-panel launcher letters work while a closed menu stays mounted (#18132)

Co-authored-by: macodev00 <macodev00@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>

maco committed Oct 19, 2026 at 22:25 UTC b3a13349505e4797860dda86cc1cc21413dc9f08
2 files changed +42 -11
apps/web/src/components/RightPanelTabs.keyboard.browser.test.tsx
+30 -2
@@ -137,6 +137,28 @@ describe("right panel new-tab shortcut", () => {
137 },
138 );
139
140 + it("opens Files while a closed popup remains mounted", async () => {
141 + await renderPanel();
142 + const popup = document.createElement("div");
143 + popup.dataset.slot = "menu-popup";
144 + popup.dataset.closed = "";
145 + container.append(popup);
146 +
147 + expect((await press("f")).defaultPrevented).toBe(true);
148 + expect(addFiles).toHaveBeenCalledOnce();
149 + });
150 +
151 + it("opens the add-surface menu while a closed popup remains mounted", async () => {
152 + await renderPanel();
153 + const popup = document.createElement("div");
154 + popup.dataset.slot = "menu-popup";
155 + popup.dataset.closed = "";
156 + container.append(popup);
157 +
158 + expect((await press("t", { metaKey: true })).defaultPrevented).toBe(true);
159 + expect(document.querySelector('[role="menu"]:not([data-closed])')).not.toBeNull();
160 + });
161 +
162 it("leaves the shortcut alone while the mounted panel is closed", async () => {
163 await renderPanel({ open: false });
164 expect((await press("t", { metaKey: true })).defaultPrevented).toBe(false);
@@ -197,8 +219,14 @@ describe("right panel new-tab shortcut", () => {
219 const dialog = document.createElement("div");
220 dialog.dataset.slot = "dialog-popup";
221 container.append(dialog);
200 - expect((await press("t", { metaKey: true })).defaultPrevented).toBe(false);
201 - expect(document.querySelector('[role="menu"]')).toBeNull();
222 + for (const state of ["data-open", "data-ending-style"]) {
223 + dialog.setAttribute(state, "");
224 + expect((await press("f")).defaultPrevented, state).toBe(false);
225 + expect(addFiles, state).not.toHaveBeenCalled();
226 + expect((await press("t", { metaKey: true })).defaultPrevented, state).toBe(false);
227 + expect(document.querySelector('[role="menu"]'), state).toBeNull();
228 + dialog.removeAttribute(state);
229 + }
230 });
231
232 it("supports arrow keys with an existing tab in sheet mode and clears the menu on close", async () => {
apps/web/src/components/RightPanelTabs.tsx
+12 -9
@@ -174,16 +174,19 @@ const SURFACE_DISABLED_REASONS = {
174 device: "Devices are only available from a thread.",
175 } as const;
176
177 +// Closed keepMounted popups must stop blocking shortcuts once their exit transition ends.
178 const LAUNCHER_SHORTCUT_BLOCKING_LAYERS = [
178 - '[data-slot="dialog-popup"]',
179 - '[data-slot="alert-dialog-popup"]',
180 - '[data-slot="command-dialog-popup"]',
181 - '[data-slot="menu-popup"]',
182 - '[data-slot="select-popup"]',
183 - '[data-slot="popover-popup"]',
184 - '[data-slot="combobox-popup"]',
185 - '[data-slot="autocomplete-popup"]',
186 -].join(",");
179 + "dialog-popup",
180 + "alert-dialog-popup",
181 + "command-dialog-popup",
182 + "menu-popup",
183 + "select-popup",
184 + "popover-popup",
185 + "combobox-popup",
186 + "autocomplete-popup",
187 +]
188 + .map((slot) => `[data-slot="${slot}"]:is([data-open],[data-ending-style])`)
189 + .join(",");
190
191 const SURFACE_UNAVAILABLE_HINTS = {
192 browser: "Only available in the desktop app.",