authorgravatar for 62337003+Bil0000@users.noreply.github.comBilal Bakr <62337003+Bil0000@users.noreply.github.com> 2026-09-15 03:00:28+03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-14 21:00:28-03:00
log014016a62344ab03dbccdb73c3c1861bc4f7e349
treeb81d147843211ae0e19e8f6b9738d5f05719467b
parent9a49d6d5a656254d7079d463aa6ead5d62f4a3e6
signature Signed by PGP key B5690EEEBB952194

fix(web): make copy PR link discoverable in keybindings (#11826)


3 files changed, 11 insertions(+), 8 deletions(-)

apps/web/src/components/settings/KeybindingsSettings.logic.test.ts+9-6
...@@ -37,12 +37,15 @@ describe("KeybindingsSettings.logic", () => {...@@ -37,12 +37,15 @@ describe("KeybindingsSettings.logic", () => {
37 });37 });
38 }38 }
39 });39 });
40 it("finds the existing URL shortcut in Settings", () => {40 it.each(["pu", "pull request", "copy link", "thread id"])(
41 const rows = buildKeybindingRows(DEFAULT_RESOLVED_KEYBINDINGS, "PR URL");41 "finds the copy link shortcut with %s",
42 expect(rows).toEqual([42 (query) => {
43 expect.objectContaining({ command: "thread.copyReference", key: "mod+shift+c" }),43 const rows = buildKeybindingRows(DEFAULT_RESOLVED_KEYBINDINGS, query);
44 ]);44 expect(rows).toContainEqual(
45 });45 expect.objectContaining({ command: "thread.copyReference", key: "mod+shift+c" }),
46 );
47 },
48 );
46 it("builds searchable rows with readable key and when values", () => {49 it("builds searchable rows with readable key and when values", () => {
47 const rows = buildKeybindingRows(50 const rows = buildKeybindingRows(
48 [51 [
apps/web/src/components/settings/KeybindingsSettings.logic.ts+1-1
...@@ -276,7 +276,7 @@ export function buildKeybindingCommandOptions(...@@ -276,7 +276,7 @@ export function buildKeybindingCommandOptions(
276}276}
277277
278export function commandLabel(command: KeybindingCommand): string {278export function commandLabel(command: KeybindingCommand): string {
279 if (command === "thread.copyReference") return "Thread: Copy PR URL or Thread ID";279 if (command === "thread.copyReference") return "Pull Request: Copy Link or Thread ID";
280 const raw = String(command);280 const raw = String(command);
281 if (raw.startsWith("script.") && raw.endsWith(".run")) {281 if (raw.startsWith("script.") && raw.endsWith(".run")) {
282 return `Run Script: ${titleCaseCommandSegment(raw.slice("script.".length, -".run".length))}`;282 return `Run Script: ${titleCaseCommandSegment(raw.slice("script.".length, -".run".length))}`;
docs/user/keybindings.md+1-1
...@@ -25,7 +25,7 @@ in Settings....@@ -25,7 +25,7 @@ in Settings.
2525
26With a PR open in the right panel or on the Pull Requests page, use `mod+shift+c`26With a PR open in the right panel or on the Pull Requests page, use `mod+shift+c`
27to copy its URL and `mod+shift+k` to copy its number with a `#` prefix.27to copy its URL and `mod+shift+k` to copy its number with a `#` prefix.
28Both shortcuts can be changed in Settings. Search for “Copy PR URL or Thread ID”28Both shortcuts can be changed in Settings. Search for “Copy Link or Thread ID”
29or “Copy Number”. They copy the selected PR and leave terminal input alone.29or “Copy Number”. They copy the selected PR and leave terminal input alone.
3030
31## Edit the configuration file31## Edit the configuration file