@devries-cameron20 / t3code Mirror · read-only / commits / e509db3a2f
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 00:45 UTC

fix(web): Tab reaches the add-project and new-project submit buttons (#32605)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Nov 10, 2026 at 08:16 UTC e509db3a2f21b8e291d05ef11789c6a4ff662e9c
2 files changed +16 -1
apps/web/src/components/CommandPalette.composition.browser.test.tsx
+16
@@ -56,6 +56,7 @@ vi.mock("../state/environments", async (original) => ({
56 serverConfig: {
57 environment: { platform: { os: "linux" }, capabilities: { projectCloneTracking: true } },
58 settings: { addProjectBaseDirectory: "/workspace/" },
59 + newProjectsRoot: "/workspace/",
60 },
61 },
62 ],
@@ -147,3 +148,18 @@ it("keeps the caret in place when an edit briefly makes the folder path not a pa
148 await userEvent.keyboard("w");
149 await expect.element(input()).toHaveValue("/wworkspace/project");
150 });
151 +
152 +it.each([
153 + { flow: "Git URL", value: "https://github.com/pingdotgg/t3code.git", submit: "Continue (Enter)" },
154 + { flow: "New project", value: "demo-tab-order", submit: /^Create \(/ },
155 +])("moves focus from the $flow input to its enabled submit button on Tab", async (step) => {
156 + await using _screen = await render(<CommandPalette>{null}</CommandPalette>);
157 + await act(() => openCommandPalette({ open: "add-project" }));
158 + await page.getByText(step.flow, { exact: true }).click();
159 + const input = page.getByRole("combobox");
160 + await input.fill(step.value);
161 + const submit = page.getByRole("button", { name: step.submit });
162 + await expect.element(submit).toBeEnabled();
163 + await userEvent.keyboard("{Tab}");
164 + await expect.element(submit).toHaveFocus();
165 +});
apps/web/src/components/CommandPaletteAddProject.tsx
-1
@@ -48,7 +48,6 @@ export function CommandPaletteSubmitButton(props: {
48 <Button
49 variant="outline"
50 size="xs"
51 - tabIndex={-1}
51 className="absolute inset-e-2.5 top-1/2 -translate-y-1/2"
52 aria-label={props.ariaLabel}
53 disabled={props.disabled}