From 262d44ce8dd40fc77e6f63117ed2bdbad1671283 Mon Sep 17 00:00:00 2001 From: Dax Date: Fri, 6 Nov 2026 21:49:46 -0500 Subject: [PATCH] fix(site): link the chrome extension in the browse install and mark the cli as optional (#62494) --- .../src/component/site/download-sections.tsx | 20 ++++++++++++++++++- .../site/src/component/site/extension-data.ts | 4 ++-- .../src/component/site/extension-page.tsx | 2 +- services/site/src/i18n/content/ar.ts | 2 +- services/site/src/i18n/content/br.ts | 2 +- services/site/src/i18n/content/da.ts | 2 +- services/site/src/i18n/content/de.ts | 2 +- services/site/src/i18n/content/es.ts | 2 +- services/site/src/i18n/content/fr.ts | 2 +- services/site/src/i18n/content/it.ts | 2 +- services/site/src/i18n/content/ja.ts | 2 +- services/site/src/i18n/content/ko.ts | 2 +- services/site/src/i18n/content/no.ts | 2 +- services/site/src/i18n/content/pl.ts | 2 +- services/site/src/i18n/content/ru.ts | 2 +- services/site/src/i18n/content/th.ts | 2 +- services/site/src/i18n/content/tr.ts | 2 +- services/site/src/i18n/content/uk.ts | 2 +- services/site/src/i18n/content/zh.ts | 2 +- services/site/src/i18n/content/zht.ts | 2 +- services/site/src/lib/product-markdown.ts | 4 +++- 21 files changed, 42 insertions(+), 22 deletions(-) diff --git a/services/site/src/component/site/download-sections.tsx b/services/site/src/component/site/download-sections.tsx index 9f9b1356526..0ceb90f7457 100644 --- a/services/site/src/component/site/download-sections.tsx +++ b/services/site/src/component/site/download-sections.tsx @@ -371,6 +371,8 @@ export function ExtensionDownload(props: { lead: string command?: string commands?: { method: string; command: string }[] + /** Where the lead's [bracketed] words link to. */ + store?: string }) { const i18n = useI18n() const state = useCopy() @@ -380,7 +382,23 @@ export function ExtensionDownload(props: {
-

{props.lead}

+

+ + {(part) => + part.startsWith("[") && part.endsWith("]") ? ( + + {(href) => ( + + {part.slice(1, -1)} + + )} + + ) : ( + part + ) + } + +

{(commands) => (
    diff --git a/services/site/src/component/site/extension-data.ts b/services/site/src/component/site/extension-data.ts index e2a57b2de8c..6747f442654 100644 --- a/services/site/src/component/site/extension-data.ts +++ b/services/site/src/component/site/extension-data.ts @@ -51,10 +51,10 @@ export const extensionPages: readonly Extension[] = [ { title: "Allowlists", body: "Limit a session's tabs to the sites you name." }, ], install: { - lead: "Install the Chrome extension first. It walks you through the rest of the steps. To install the CLI directly, use any of these.", + lead: "Install the [Chrome extension] first. It walks you through the rest of the steps. To install the CLI directly (you should not need to do this), use any of these.", commands: [ { method: "curl", command: "curl -fsSL https://opencode.ai/browse/install | bash" }, - { method: "powershell", command: "irm https://opencode.ai/browse/install.ps1 | iex" }, + { method: "pwsh", command: "irm https://opencode.ai/browse/install.ps1 | iex" }, { method: "npm", command: "npm install -g @opencode/browse && browse install" }, { method: "bun", command: "bun add -g @opencode/browse && browse install" }, ], diff --git a/services/site/src/component/site/extension-page.tsx b/services/site/src/component/site/extension-page.tsx index e4e45051d55..eb0047dd2f6 100644 --- a/services/site/src/component/site/extension-page.tsx +++ b/services/site/src/component/site/extension-page.tsx @@ -157,7 +157,7 @@ export function ExtensionPage(props: { slug: ExtensionSlug; path?: string }) {
- + diff --git a/services/site/src/i18n/content/ar.ts b/services/site/src/i18n/content/ar.ts index 1ec390e0bc1..8267abaa675 100644 --- a/services/site/src/i18n/content/ar.ts +++ b/services/site/src/i18n/content/ar.ts @@ -198,7 +198,7 @@ export const content = { allowlists: { title: "قوائم السماح", body: "اقصر علامات تبويب الجلسة على المواقع التي تحددها." }, }, install: - "ثبّت إضافة Chrome أولًا، وستُرشدك خلال بقية الخطوات. لتثبيت CLI مباشرة، استخدم أيًّا من هذه الأوامر.", + "ثبّت [إضافة Chrome] أولًا، وستُرشدك خلال بقية الخطوات. لتثبيت CLI مباشرة (لن تحتاج إلى ذلك عادةً)، استخدم أيًّا من هذه الأوامر.", }, }, apps: { diff --git a/services/site/src/i18n/content/br.ts b/services/site/src/i18n/content/br.ts index 67335dc5782..f7c71041615 100644 --- a/services/site/src/i18n/content/br.ts +++ b/services/site/src/i18n/content/br.ts @@ -390,7 +390,7 @@ export const content = { }, }, install: - "Instale a extensão do Chrome primeiro. Ela guia você pelo resto dos passos. Para instalar a CLI diretamente, use qualquer um destes.", + "Instale a [extensão do Chrome] primeiro. Ela guia você pelo resto dos passos. Para instalar a CLI diretamente (você não deve precisar disso), use qualquer um destes.", }, }, apps: { diff --git a/services/site/src/i18n/content/da.ts b/services/site/src/i18n/content/da.ts index 3efe7dcdeed..e2b2a001570 100644 --- a/services/site/src/i18n/content/da.ts +++ b/services/site/src/i18n/content/da.ts @@ -269,7 +269,7 @@ export const content = { allowlists: { title: "Hvidlister", body: "Begræns en sessions faner til de sites, du angiver." }, }, install: - "Installer Chrome-udvidelsen først. Den guider dig gennem resten af trinene. Vil du installere CLI'en direkte, så brug en af disse.", + "Installer [Chrome-udvidelsen] først. Den guider dig gennem resten af trinene. Vil du installere CLI'en direkte (det burde du ikke have brug for), så brug en af disse.", }, }, apps: { diff --git a/services/site/src/i18n/content/de.ts b/services/site/src/i18n/content/de.ts index 51fbea6f261..e481ab0f931 100644 --- a/services/site/src/i18n/content/de.ts +++ b/services/site/src/i18n/content/de.ts @@ -302,7 +302,7 @@ export const content = { allowlists: { title: "Allowlists", body: "Beschränke die Tabs einer Session auf die Websites, die du nennst." }, }, install: - "Installiere zuerst die Chrome-Extension. Sie führt dich durch die restlichen Schritte. Um die CLI direkt zu installieren, nimm einen dieser Befehle.", + "Installiere zuerst die [Chrome-Extension]. Sie führt dich durch die restlichen Schritte. Um die CLI direkt zu installieren (das solltest du nicht brauchen), nimm einen dieser Befehle.", }, }, apps: { diff --git a/services/site/src/i18n/content/es.ts b/services/site/src/i18n/content/es.ts index 81b72d74850..bfbce3969c4 100644 --- a/services/site/src/i18n/content/es.ts +++ b/services/site/src/i18n/content/es.ts @@ -365,7 +365,7 @@ export const content = { }, }, install: - "Instala primero la extensión de Chrome. Te guía por el resto de los pasos. Para instalar la CLI directamente, usa cualquiera de estos.", + "Instala primero la [extensión de Chrome]. Te guía por el resto de los pasos. Para instalar la CLI directamente (no deberías necesitarlo), usa cualquiera de estos.", }, }, apps: { diff --git a/services/site/src/i18n/content/fr.ts b/services/site/src/i18n/content/fr.ts index 8282f0e2a89..5494327ac52 100644 --- a/services/site/src/i18n/content/fr.ts +++ b/services/site/src/i18n/content/fr.ts @@ -365,7 +365,7 @@ export const content = { }, }, install: - "Installez d'abord l'extension Chrome. Elle vous guide pour le reste des étapes. Pour installer la CLI directement, utilisez l'une de ces commandes.", + "Installez d'abord l'[extension Chrome]. Elle vous guide pour le reste des étapes. Pour installer la CLI directement (vous ne devriez pas en avoir besoin), utilisez l'une de ces commandes.", }, }, apps: { diff --git a/services/site/src/i18n/content/it.ts b/services/site/src/i18n/content/it.ts index 76c66ca767d..74cd6398a6f 100644 --- a/services/site/src/i18n/content/it.ts +++ b/services/site/src/i18n/content/it.ts @@ -365,7 +365,7 @@ export const content = { }, }, install: - "Installa prima l'estensione di Chrome. Ti guida nel resto dei passaggi. Per installare la CLI direttamente, usa uno di questi.", + "Installa prima l'[estensione di Chrome]. Ti guida nel resto dei passaggi. Per installare la CLI direttamente (non dovrebbe servirti), usa uno di questi.", }, }, apps: { diff --git a/services/site/src/i18n/content/ja.ts b/services/site/src/i18n/content/ja.ts index 6ef047e3fa0..631c8159d6f 100644 --- a/services/site/src/i18n/content/ja.ts +++ b/services/site/src/i18n/content/ja.ts @@ -281,7 +281,7 @@ export const content = { allowlists: { title: "許可リスト", body: "セッションのタブを、指定したサイトだけに制限できます。" }, }, install: - "まず Chrome 拡張機能をインストールしてください。残りの手順は拡張機能が案内します。CLI を直接インストールする場合は、次のいずれかを使ってください。", + "まず [Chrome 拡張機能] をインストールしてください。残りの手順は拡張機能が案内します。CLI を直接インストールする場合は(通常は不要です)、次のいずれかを使ってください。", }, }, apps: { diff --git a/services/site/src/i18n/content/ko.ts b/services/site/src/i18n/content/ko.ts index 3ddc641813d..b79059eb901 100644 --- a/services/site/src/i18n/content/ko.ts +++ b/services/site/src/i18n/content/ko.ts @@ -232,7 +232,7 @@ export const content = { allowlists: { title: "허용 목록", body: "세션의 탭을 지정한 사이트로만 제한하세요." }, }, install: - "먼저 Chrome 확장 프로그램을 설치하세요. 나머지 단계는 확장 프로그램이 안내합니다. CLI를 직접 설치하려면 아래 명령 중 하나를 사용하세요.", + "먼저 [Chrome 확장 프로그램]을 설치하세요. 나머지 단계는 확장 프로그램이 안내합니다. CLI를 직접 설치하려면(보통은 필요 없습니다) 아래 명령 중 하나를 사용하세요.", }, }, apps: { diff --git a/services/site/src/i18n/content/no.ts b/services/site/src/i18n/content/no.ts index 8ad929c4c1b..e6ee4781375 100644 --- a/services/site/src/i18n/content/no.ts +++ b/services/site/src/i18n/content/no.ts @@ -269,7 +269,7 @@ export const content = { allowlists: { title: "Hvitelister", body: "Begrens fanene til en sesjon til nettstedene du oppgir." }, }, install: - "Installer Chrome-utvidelsen først. Den guider deg gjennom resten av stegene. Vil du installere CLI-en direkte, bruk en av disse.", + "Installer [Chrome-utvidelsen] først. Den guider deg gjennom resten av stegene. Vil du installere CLI-en direkte (det skal du ikke trenge), bruk en av disse.", }, }, apps: { diff --git a/services/site/src/i18n/content/pl.ts b/services/site/src/i18n/content/pl.ts index ea54d3a58bd..dbf4216f1ad 100644 --- a/services/site/src/i18n/content/pl.ts +++ b/services/site/src/i18n/content/pl.ts @@ -390,7 +390,7 @@ export const content = { }, }, install: - "Najpierw zainstaluj rozszerzenie Chrome. Przeprowadzi cię przez pozostałe kroki. Aby zainstalować CLI bezpośrednio, użyj jednego z tych poleceń.", + "Najpierw zainstaluj [rozszerzenie Chrome]. Przeprowadzi cię przez pozostałe kroki. Aby zainstalować CLI bezpośrednio (nie powinno to być potrzebne), użyj jednego z tych poleceń.", }, }, apps: { diff --git a/services/site/src/i18n/content/ru.ts b/services/site/src/i18n/content/ru.ts index 5dcec2db458..f5493b6abe7 100644 --- a/services/site/src/i18n/content/ru.ts +++ b/services/site/src/i18n/content/ru.ts @@ -269,7 +269,7 @@ export const content = { allowlists: { title: "Списки доступа", body: "Ограничьте вкладки сессии указанными сайтами." }, }, install: - "Сначала установите расширение для Chrome. Оно проведёт вас через остальные шаги. Чтобы установить CLI напрямую, используйте любую из этих команд.", + "Сначала установите [расширение для Chrome]. Оно проведёт вас через остальные шаги. Чтобы установить CLI напрямую (обычно это не нужно), используйте любую из этих команд.", }, }, apps: { diff --git a/services/site/src/i18n/content/th.ts b/services/site/src/i18n/content/th.ts index 55d70c2fe39..40b82bd0c5f 100644 --- a/services/site/src/i18n/content/th.ts +++ b/services/site/src/i18n/content/th.ts @@ -235,7 +235,7 @@ export const content = { allowlists: { title: "รายการที่อนุญาต", body: "จำกัดแท็บของเซสชันไว้เฉพาะเว็บไซต์ที่คุณระบุ" }, }, install: - "ติดตั้งส่วนขยาย Chrome ก่อน แล้วส่วนขยายจะพาคุณทำขั้นตอนที่เหลือ หากต้องการติดตั้ง CLI โดยตรง ให้ใช้คำสั่งใดคำสั่งหนึ่งต่อไปนี้", + "ติดตั้ง[ส่วนขยาย Chrome]ก่อน แล้วส่วนขยายจะพาคุณทำขั้นตอนที่เหลือ หากต้องการติดตั้ง CLI โดยตรง (ปกติไม่จำเป็น) ให้ใช้คำสั่งใดคำสั่งหนึ่งต่อไปนี้", }, }, apps: { diff --git a/services/site/src/i18n/content/tr.ts b/services/site/src/i18n/content/tr.ts index e3d171a4f16..81f7c82097a 100644 --- a/services/site/src/i18n/content/tr.ts +++ b/services/site/src/i18n/content/tr.ts @@ -390,7 +390,7 @@ export const content = { }, }, install: - "Önce Chrome uzantısını yükleyin. Kalan adımlarda size yol gösterir. CLI'yi doğrudan yüklemek için bunlardan birini kullanın.", + "Önce [Chrome uzantısını] yükleyin. Kalan adımlarda size yol gösterir. CLI'yi doğrudan yüklemek için (buna ihtiyacınız olmamalı) bunlardan birini kullanın.", }, }, apps: { diff --git a/services/site/src/i18n/content/uk.ts b/services/site/src/i18n/content/uk.ts index 78689a128bf..91db585a59b 100644 --- a/services/site/src/i18n/content/uk.ts +++ b/services/site/src/i18n/content/uk.ts @@ -275,7 +275,7 @@ export const content = { allowlists: { title: "Списки доступу", body: "Обмежте вкладки сесії вказаними сайтами." }, }, install: - "Спочатку встановіть розширення для Chrome. Воно проведе вас через решту кроків. Щоб установити CLI напряму, скористайтеся будь-якою з цих команд.", + "Спочатку встановіть [розширення для Chrome]. Воно проведе вас через решту кроків. Щоб установити CLI напряму (зазвичай це не потрібно), скористайтеся будь-якою з цих команд.", }, }, apps: { diff --git a/services/site/src/i18n/content/zh.ts b/services/site/src/i18n/content/zh.ts index 07821ed7a8f..8a27b688a9b 100644 --- a/services/site/src/i18n/content/zh.ts +++ b/services/site/src/i18n/content/zh.ts @@ -194,7 +194,7 @@ export const content = { allowlists: { title: "允许列表", body: "将会话的标签页限制在您指定的网站内。" }, }, install: - "请先安装 Chrome 扩展,它会引导你完成其余步骤。如需直接安装 CLI,可使用以下任一命令。", + "请先安装 [Chrome 扩展],它会引导你完成其余步骤。如需直接安装 CLI(通常不需要),可使用以下任一命令。", }, }, apps: { diff --git a/services/site/src/i18n/content/zht.ts b/services/site/src/i18n/content/zht.ts index eb01f1480ca..5d4ac82c8f8 100644 --- a/services/site/src/i18n/content/zht.ts +++ b/services/site/src/i18n/content/zht.ts @@ -198,7 +198,7 @@ export const content = { allowlists: { title: "允許清單", body: "將工作階段的分頁限制在你指定的網站內。" }, }, install: - "請先安裝 Chrome 擴充功能,它會引導你完成其餘步驟。如需直接安裝 CLI,可使用以下任一指令。", + "請先安裝 [Chrome 擴充功能],它會引導你完成其餘步驟。如需直接安裝 CLI(通常不需要),可使用以下任一指令。", }, }, apps: { diff --git a/services/site/src/lib/product-markdown.ts b/services/site/src/lib/product-markdown.ts index ddc522db433..a2dd000258b 100644 --- a/services/site/src/lib/product-markdown.ts +++ b/services/site/src/lib/product-markdown.ts @@ -150,7 +150,9 @@ export function extensionMarkdown(slug: ExtensionSlug) { extension.features.map((feature) => `- **${feature.title}:** ${feature.body}`).join("\n"), "## Install", extension.store && `Add to Chrome from the ${link("Chrome Web Store", extension.store)}.`, - extension.install.lead, + extension.store + ? extension.install.lead.replace(/\[([^\]]+)\]/g, (_, text) => link(text, extension.store!)) + : extension.install.lead.replace(/\[([^\]]+)\]/g, "$1"), extension.install.command && codeFence("bash", extension.install.command), extension.install.commands && codeFence("bash", extension.install.commands.map((item) => item.command).join("\n")), `Source: ${link(extension.source.replace("https://", ""), extension.source)}`,