From cb42b60849d81ff58976200baa6b89dc5df99fb7 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Fri, 14 Aug 2026 02:29:45 -0700 Subject: [PATCH] fix(linear): label Start workspace and add Open on Linear (#14492) * fix(linear): label Start workspace and add Open on Linear The issue page header used three unlabeled icons. Match the GitHub issue header: copy stays quiet, Open on Linear is an external-link control, and Start workspace is a labeled primary button. * Address PR review feedback (#14492) - Make the header source contract ignore Start workspace formatting --- .../src/components/LinearIssueWorkspace.tsx | 48 +++++++++---------- .../linear-issue-workspace-header.test.ts | 30 ++++++++++++ src/renderer/src/i18n/locales/en.json | 1 + src/renderer/src/i18n/locales/es.json | 1 + src/renderer/src/i18n/locales/ja.json | 1 + src/renderer/src/i18n/locales/ko.json | 1 + src/renderer/src/i18n/locales/zh.json | 1 + 7 files changed, 58 insertions(+), 25 deletions(-) create mode 100644 src/renderer/src/components/linear-issue-workspace-header.test.ts diff --git a/src/renderer/src/components/LinearIssueWorkspace.tsx b/src/renderer/src/components/LinearIssueWorkspace.tsx index 7c92ca1d618..bf1e4b6e36e 100644 --- a/src/renderer/src/components/LinearIssueWorkspace.tsx +++ b/src/renderer/src/components/LinearIssueWorkspace.tsx @@ -10,10 +10,11 @@ import { ChevronLeft, ChevronRight, Clipboard, + Copy, + ExternalLink, FolderKanban, FolderOpen, GitBranch, - Link, LoaderCircle, Plus, RefreshCw, @@ -782,6 +783,7 @@ export default function LinearIssueWorkspace({ @@ -800,19 +802,20 @@ export default function LinearIssueWorkspace({ - {translate('auto.components.LinearIssueWorkspace.30c1242f3a', 'Copy identifier')} + {translate('auto.components.LinearIssueWorkspace.openOnLinear', 'Open on Linear')} {attachedWorkspace ? ( @@ -858,24 +861,19 @@ export default function LinearIssueWorkspace({ ) : ( - - - - - - {translate('auto.components.LinearIssueWorkspace.e1e0a9bca9', 'Start workspace')} - - + )} {variant === 'sheet' ? ( diff --git a/src/renderer/src/components/linear-issue-workspace-header.test.ts b/src/renderer/src/components/linear-issue-workspace-header.test.ts new file mode 100644 index 00000000000..a8d52b64166 --- /dev/null +++ b/src/renderer/src/components/linear-issue-workspace-header.test.ts @@ -0,0 +1,30 @@ +import { readFileSync } from 'node:fs' +import { join } from 'node:path' +import { describe, expect, it } from 'vitest' + +const source = readFileSync(join(__dirname, 'LinearIssueWorkspace.tsx'), 'utf8') + +function headerSource(): string { + const start = source.indexOf('
') + expect(header).toContain('') + expect(header).toContain("'Start workspace'") + expect(header).toContain("'Start workspace from issue'") + expect(header).not.toContain("'Copy issue identifier'") + expect(header).toMatch(/size="sm"[\s\S]*onClick=\{handleOpenOrUseIssue\}/) + expect(header).not.toMatch(/size="icon-sm"\s+onClick=\{handleOpenOrUseIssue\}/) + }) +}) diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index f973a673607..f432f0d6d2f 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -1361,6 +1361,7 @@ "519c3587f3": "Add to project", "openAttachedWorkspace": "Open workspace attached to issue", "openWorkspace": "Open workspace", + "openOnLinear": "Open on Linear", "moreWorkspaceActions": "More issue workspace actions", "startNewWorkspace": "Start new workspace", "workspaceSection": "Workspace", diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index eab7cec26b4..9017ea7a993 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -1242,6 +1242,7 @@ "519c3587f3": "Agregar al proyecto", "openAttachedWorkspace": "Abrir el espacio de trabajo vinculado al issue", "openWorkspace": "Abrir espacio de trabajo", + "openOnLinear": "Abrir en Linear", "moreWorkspaceActions": "Más acciones del espacio de trabajo del issue", "startNewWorkspace": "Iniciar un espacio de trabajo nuevo", "workspaceSection": "Espacio de trabajo", diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index fa1b3cdc0a8..45d7617a316 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -1242,6 +1242,7 @@ "519c3587f3": "プロジェクトに追加", "openAttachedWorkspace": "Issue にリンクされたワークスペースを開く", "openWorkspace": "ワークスペースを開く", + "openOnLinear": "Linear で開く", "moreWorkspaceActions": "Issue ワークスペースのその他の操作", "startNewWorkspace": "新規ワークスペースを開始", "workspaceSection": "ワークスペース", diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index 923e5b18f7a..4ccb7e77a74 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -1242,6 +1242,7 @@ "519c3587f3": "프로젝트에 추가", "openAttachedWorkspace": "이슈에 연결된 워크스페이스 열기", "openWorkspace": "워크스페이스 열기", + "openOnLinear": "Linear에서 열기", "moreWorkspaceActions": "이슈 워크스페이스 작업 더 보기", "startNewWorkspace": "새 워크스페이스 시작", "workspaceSection": "워크스페이스", diff --git a/src/renderer/src/i18n/locales/zh.json b/src/renderer/src/i18n/locales/zh.json index 3672212492d..0d252546813 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -1242,6 +1242,7 @@ "519c3587f3": "添加到项目", "openAttachedWorkspace": "打开关联到议题的工作区", "openWorkspace": "打开工作区", + "openOnLinear": "在 Linear 中打开", "moreWorkspaceActions": "更多议题工作区操作", "startNewWorkspace": "启动新工作区", "workspaceSection": "工作区",