Repository navigation
Closed
Closed
Copy link
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- On Linux, remove the saved Chat: New entries from keybindings.json while T3 Code is running.
- Open Settings → Keybindings.
- Search for Chat: New.
- Change Ctrl+Shift+O to F8 and save.
Expected behavior
Chat: New shows Ctrl+N and F8.
Actual behavior
Chat: New shows only F8, and Ctrl+N is no longer assigned.
Impact
Minor bug or occasional failure. This happens when a user edits one of a command’s multiple built-in shortcuts while the command has no saved keybindings.
Version or commit
main at fcf50973f3. The cause is at apps/server/src/keybindings.ts:672.
Environment
Linux x64 boat.dev default machine, a fresh checkout.
Logs or stack traces
Edit shortcut for Chat: New: Ctrl+NAutomated repro
Fails in 2 of 2 runs on main: apply the patch with git apply, then run the command.
diff --git a/scripts/scenarios/editing-default-shortcut-keeps-the-other.e2e.ts b/scripts/scenarios/editing-default-shortcut-keeps-the-other.e2e.ts
new file mode 100644
index 0000000000..f2c75d5c34
--- /dev/null
+++ b/scripts/scenarios/editing-default-shortcut-keeps-the-other.e2e.ts
@@ -0,0 +1,59 @@
+import { expect } from "e2e";
+import * as Effect from "effect/Effect";
+import * as FileSystem from "effect/FileSystem";
+
+import { T3_HOME } from "../e2e.config.ts";
+import { runPromise, test, WEB } from "./t3.ts";
+
+test(
+ "Editing one inherited shortcut keeps the other shortcut for the same command",
+ WEB,
+ async ({ t3, app, screen }) => {
+ await t3.project("inherited-shortcuts");
+ const keybindingsPath = `${T3_HOME}/userdata/keybindings.json`;
+ const original = await runPromise(
+ Effect.flatMap(FileSystem.FileSystem, (fs) => fs.readFileString(keybindingsPath)),
+ );
+
+ try {
+ await runPromise(
+ Effect.flatMap(FileSystem.FileSystem, (fs) =>
+ fs.writeFileString(
+ keybindingsPath,
+ '[{ "key": "enter", "command": "commandPalette.toggle", "when": "!rightPanelOpen" }]\n',
+ ),
+ ),
+ );
+ await t3.open("/settings/keybindings");
+ const search = screen.getByLabel("Search keybindings");
+ await search.fill("Command Palette");
+ await screen
+ .getByRole("button", "Edit shortcut for Command Palette: Toggle: Enter")
+ .waitFor();
+
+ await search.fill("Chat: New");
+ const unchanged = screen.getByRole("button", "Edit shortcut for Chat: New: Ctrl+N", {
+ exact: true,
+ });
+ await unchanged.waitFor();
+ await screen.getByRole("button", "Edit shortcut for Chat: New: Ctrl+Shift+O").tap();
+ await screen.getByRole("textbox", "Keybinding for Chat: New", { exact: true }).press("F8");
+ await screen.getByRole("button", "Save", { exact: true }).tap();
+ await screen
+ .getByRole("button", "Edit shortcut for Chat: New: F8", { exact: true })
+ .waitFor();
+
+ try {
+ await expect(unchanged).toBeVisible();
+ } finally {
+ await app.screenshot("chat-new-shortcuts-after-edit");
+ }
+ } finally {
+ await runPromise(
+ Effect.flatMap(FileSystem.FileSystem, (fs) =>
+ fs.writeFileString(keybindingsPath, original),
+ ),
+ );
+ }
+ },
+);pnpm scenarios:prove scripts/scenarios/editing-default-shortcut-keeps-the-other.e2e.ts --base mainWorkaround
No response
Metadata
Metadata
Assignees
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.


Activity