@devries-cameron20 / t3code-1 / commits / 4e59b06b84
Fork 0

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

test(web): keep pull request menu items private (#10016)

Julius Marminge committed Sep 5, 2026 at 00:27 UTC 4e59b06b84fdfa36f78b4fc9079dff88b4ff3dc4
2 files changed +2 -9
apps/web/src/components/pullRequest/pullRequestLinkContextMenu.test.ts
+1 -8
@@ -1,15 +1,8 @@
1 import { describe, expect, it } from "vite-plus/test";
2
3 -import { openOnHostLabel, pullRequestLinkContextMenuItems } from "./pullRequestLinkContextMenu";
3 +import { openOnHostLabel } from "./pullRequestLinkContextMenu";
4
5 describe("pull request link context menu", () => {
6 - it("offers the copy first and the host's own page after it", () => {
7 - expect(pullRequestLinkContextMenuItems("Open on GitHub")).toEqual([
8 - { id: "copy-link", label: "Copy link", icon: "copy" },
9 - { id: "open-external", label: "Open on GitHub" },
10 - ]);
11 - });
12 -
6 it("names every host it knows, and says nothing false about one it does not", () => {
7 expect(openOnHostLabel("github")).toBe("Open on GitHub");
8 expect(openOnHostLabel("gitlab")).toBe("Open on GitLab");
apps/web/src/components/pullRequest/pullRequestLinkContextMenu.ts
+1 -1
@@ -19,7 +19,7 @@ export const openOnHostLabel = (provider: string): string =>
19 OPEN_ON_HOST_LABELS[provider] ?? "Open on host";
20
21 /** Copy first: it is the reason to right-click a number rather than click it. */
22 -export function pullRequestLinkContextMenuItems(
22 +function pullRequestLinkContextMenuItems(
23 openLabel: string,
24 ): readonly ContextMenuItem<PullRequestLinkContextMenuAction>[] {
25 return [