Skip to content

Commit fe2cbf6

Browse files
authored
feat(site): move browse to a product page (#62419)
1 parent 4e9c00a commit fe2cbf6

72 files changed

Lines changed: 225 additions & 530 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎services/site/script/check-client-bundle.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const budgets: Record<string, number> = {
7070
"changelog/index.tsx": 112,
7171
"desktop.tsx": 126.3,
7272
"devices.tsx": 51,
73-
"extensions/browse.tsx": 99,
73+
"browse.tsx": 99,
7474
"font/index.tsx": 121,
7575
"ide.tsx": 126.3,
7676
"index.tsx": 118,
@@ -80,7 +80,7 @@ const budgets: Record<string, number> = {
8080
"mini.tsx": 126.3,
8181
"mobile.tsx": 126.3,
8282
"press/index.tsx": 112,
83-
"product/index.tsx": 113.5,
83+
"product/index.tsx": 113.6,
8484
"sdk.tsx": 126.3,
8585
"terminal.tsx": 126.3,
8686
"video-editor/index.tsx": 49,

‎services/site/script/og.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const cards: Card[] = [
7979
{
8080
path: "/mobile",
8181
title: "Mobile",
82-
description: "Start, steer and approve your coding sessions from your phone.",
82+
description: "Start and steer your coding sessions from your phone.",
8383
shows: "the mobile app's dotted voice orb",
8484
shot: "orb",
8585
},
@@ -112,7 +112,7 @@ const cards: Card[] = [
112112
shot: angled(`${covers}/mini.webp`, [250, 540, 680, 260], 150),
113113
},
114114
{
115-
path: "/extensions/browse",
115+
path: "/browse",
116116
title: "Browse",
117117
description: "Let your agents use your real browser, with your tabs and logins.",
118118
shows: "the desktop app setting up the Browse extension, at an angle",

‎services/site/src/app.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const shareImagePages = [
2929
"/sdk",
3030
"/ide",
3131
"/mini",
32-
"/extensions/browse",
32+
"/browse",
3333
"/product",
3434
"/docs",
3535
"/changelog",

‎services/site/src/component/site/download-sections.tsx‎

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,19 @@ function alignActions(root: HTMLElement) {
8585
}
8686

8787
/**
88-
* The download sections (Desktop, Mobile, Terminal, Extensions, Integrations, FAQ), at the bottom of
88+
* The download sections (Desktop, Mobile, Terminal, Extensions, FAQ), at the bottom of
8989
* /product. `heading` draws each section's
9090
* title (an id for anchors, then the title); `columns` marks the blocks for the /product
9191
* title-in-the-first-column layout. `apps: false` leaves out the Desktop, Mobile and Terminal
92-
* sections (/product has those on its cards); `editors: false` and
93-
* `integrations: false` the editor Extensions and Integrations ones. `firstId` replaces the first section's id, so a
94-
* page's own anchor (/product#download) lands on it. `beforeFaq` goes right above the FAQ.
92+
* sections (/product has those on its cards); `editors: false` the editor Extensions one. `firstId`
93+
* replaces the first section's id, so a page's own anchor (/product#download) lands on it.
94+
* `beforeFaq` goes right above the FAQ.
9595
*/
9696
export function DownloadSections(props: {
9797
heading: (id: string, title: string) => JSX.Element
9898
columns?: boolean
9999
apps?: boolean
100100
editors?: boolean
101-
integrations?: boolean
102101
firstId?: string
103102
beforeFaq?: JSX.Element
104103
}) {
@@ -146,15 +145,6 @@ export function DownloadSections(props: {
146145
</Section>
147146
</Show>
148147

149-
<Show when={props.integrations !== false}>
150-
<Section
151-
id={props.editors === false ? (props.firstId ?? "download-integrations") : "download-integrations"}
152-
title={content().integrations.title}
153-
>
154-
<LinkList items={content().integrations.items} action={content().actions.install} />
155-
</Section>
156-
</Show>
157-
158148
{props.beforeFaq}
159149

160150
<Section id="download-faq" title={content().faq.title}>

‎services/site/src/component/site/extension-data.ts‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// Extensions: things you add to OpenCode, listed on /product under the products, each with a light
2-
// page at /extensions/<slug>. Only real ones, with copy from their READMEs and source:
3-
// - Browse: anomalyco/browse (an MCP server and a Chromium extension).
4-
// - SSH and WSL: built-in desktop app extensions (anomalyco/opencode packages/gui-extensions).
1+
// Light product pages with copy from their READMEs and source. Browse is a product, listed on
2+
// /product with the others and served at /browse. SSH and WSL, built-in desktop app extensions
3+
// (anomalyco/opencode packages/gui-extensions), were listed under /extensions.
54

65
// SSH and WSL are left out for now, like Isocast in links.ts: to bring them back, restore "ssh" |
76
// "wsl" here, uncomment their entries below and their pages in routes/extensions (now redirects).
@@ -20,7 +19,11 @@ type Extension = {
2019
features: { title: string; body: string }[]
2120
/** How to get it: a command to copy, or where to find it in the desktop app. */
2221
install: { lead: string; command?: string }
22+
/** The Chrome Web Store listing, when there is one. The page's main action. */
23+
store?: string
2324
source: string
25+
/** Listed with the products on /product, at /<slug>, instead of under Extensions. */
26+
product?: boolean
2427
/** For the page's structured data; every OS when left out. */
2528
operatingSystem?: string
2629
}
@@ -46,9 +49,11 @@ export const extensionPages: readonly Extension[] = [
4649
{ title: "Allowlists", body: "Limit a session's tabs to the sites you name." },
4750
],
4851
install: {
49-
lead: "Run this once. It adds the browse MCP server to the agents you choose and pairs the extension from the Chrome Web Store. Needs Node.js 22.19 or newer.",
50-
command: "npx @opencode/browse install",
52+
lead: "One line installs Browse, adds it to the agents it finds and pairs the extension. On Windows, run irm https://opencode.ai/browse/install.ps1 | iex. Or ask your agent to set it up.",
53+
command: "curl -fsSL https://opencode.ai/browse/install | bash",
5154
},
55+
store: "https://chromewebstore.google.com/detail/mfnicocicmmlkpjnaffgihfjhdgjkdjg",
56+
product: true,
5257
source: "https://github.com/anomalyco/browse",
5358
},
5459
// {

‎services/site/src/component/site/extension-page.tsx‎

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import "./product-page.css"
22
import { Meta, Title } from "@solidjs/meta"
33
import { useNavigate } from "@solidjs/router"
4-
import { For, onCleanup, onMount } from "solid-js"
4+
import { For, onCleanup, onMount, Show } from "solid-js"
55
import { LocaleLinks } from "~/component/locale-links"
66
import { ShareMeta } from "~/component/share-meta"
77
import { ogImage } from "~/lib/og"
@@ -20,17 +20,18 @@ import { useMarkdown } from "./use-markdown"
2020
import { inlineKey } from "~/lib/direction"
2121

2222
/**
23-
* An extension's page: a lighter product page with a black hero until there is real footage, what
24-
* it does, how to get it and its source. The arrow keys step through the extensions only.
23+
* A light product page: what it does, how to get it and its source. Browse is a product, served at
24+
* /browse; an extension page would sit at /extensions/<slug>. The arrow keys step through the
25+
* extensions only, when there is more than one.
2526
*/
26-
export function ExtensionPage(props: { slug: ExtensionSlug }) {
27+
export function ExtensionPage(props: { slug: ExtensionSlug; path?: string }) {
2728
const language = useLanguage()
2829
const i18n = useI18n()
2930
const extensionCopy = useArea("extensions", extensionsSource)
3031
const navigate = useNavigate()
3132
const data = () => extensionPages.find((item) => item.slug === props.slug)!
3233
const extension = () => extensionCopy()[props.slug]
33-
const path = () => `/extensions/${props.slug}`
34+
const path = () => props.path ?? `/extensions/${props.slug}`
3435
const neighbour = (step: number) => {
3536
const index = extensionPages.findIndex((item) => item.slug === props.slug)
3637
const slug = extensionPages[(index + step + extensionPages.length) % extensionPages.length].slug
@@ -41,6 +42,7 @@ export function ExtensionPage(props: { slug: ExtensionSlug }) {
4142

4243
onMount(() => {
4344
const step = (event: KeyboardEvent) => {
45+
if (extensionPages.length < 2 || data().product) return
4446
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") return
4547
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey || event.defaultPrevented) return
4648
if ((event.target as HTMLElement).closest('input, textarea, select, [contenteditable], [role="tablist"]')) return
@@ -53,19 +55,15 @@ export function ExtensionPage(props: { slug: ExtensionSlug }) {
5355
return (
5456
<Site page="product" markdown={markdown}>
5557
<Title>{extension().title}</Title>
56-
<ShareMeta
57-
title={extension().title}
58-
description={extension().description}
59-
image={ogImage(`/extensions/${props.slug}`)}
60-
/>
58+
<ShareMeta title={extension().title} description={extension().description} image={ogImage(path())} />
6159
<LocaleLinks path={path()} />
6260
<Meta name="description" content={extension().description} />
6361
<JsonLd
6462
data={softwareData({
6563
name: `OpenCode ${extension().name}`,
6664
description: extension().description,
6765
path: language.route(path()),
68-
image: ogImage(`/extensions/${props.slug}`).src,
66+
image: ogImage(path()).src,
6967
operatingSystem: data().operatingSystem ?? "macOS, Windows, Linux",
7068
})}
7169
/>
@@ -86,29 +84,31 @@ export function ExtensionPage(props: { slug: ExtensionSlug }) {
8684
</nav>
8785

8886
{/* Fixed beside the GitHub mark in the top-right corner (product-page.css). */}
89-
<nav data-component="product-cycle" aria-label={i18n.t("site.cycle.extensions")}>
90-
<a
91-
href={language.route(`/extensions/${neighbour(-1).slug}`)}
92-
aria-label={i18n.t("site.cycle.previousExtension", { name: neighbour(-1).name })}
93-
data-tip={i18n.t("site.cycle.previous", { name: neighbour(-1).name })}
94-
>
95-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
96-
<path d="M10 4L6 8L10 12" stroke="currentColor" stroke-width="1" />
97-
</svg>
98-
</a>
99-
<a
100-
href={language.route(`/extensions/${neighbour(1).slug}`)}
101-
aria-label={i18n.t("site.cycle.nextExtension", { name: neighbour(1).name })}
102-
data-tip={i18n.t("site.cycle.next", { name: neighbour(1).name })}
103-
>
104-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
105-
<path d="M6 4L10 8L6 12" stroke="currentColor" stroke-width="1" />
106-
</svg>
107-
</a>
108-
</nav>
87+
<Show when={extensionPages.length > 1 && !data().product}>
88+
<nav data-component="product-cycle" aria-label={i18n.t("site.cycle.extensions")}>
89+
<a
90+
href={language.route(`/extensions/${neighbour(-1).slug}`)}
91+
aria-label={i18n.t("site.cycle.previousExtension", { name: neighbour(-1).name })}
92+
data-tip={i18n.t("site.cycle.previous", { name: neighbour(-1).name })}
93+
>
94+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
95+
<path d="M10 4L6 8L10 12" stroke="currentColor" stroke-width="1" />
96+
</svg>
97+
</a>
98+
<a
99+
href={language.route(`/extensions/${neighbour(1).slug}`)}
100+
aria-label={i18n.t("site.cycle.nextExtension", { name: neighbour(1).name })}
101+
data-tip={i18n.t("site.cycle.next", { name: neighbour(1).name })}
102+
>
103+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
104+
<path d="M6 4L10 8L6 12" stroke="currentColor" stroke-width="1" />
105+
</svg>
106+
</a>
107+
</nav>
108+
</Show>
109109

110110
<div data-slot="first-screen">
111-
{/* Plain black until there is real footage of the extension. */}
111+
{/* Plain black until there is real footage of the product. */}
112112
<div data-component="product-hero" data-product={props.slug} data-empty />
113113

114114
<section data-component="product-intro" data-section="intro">
@@ -117,10 +117,26 @@ export function ExtensionPage(props: { slug: ExtensionSlug }) {
117117
<p>{extension().intro}</p>
118118
</div>
119119
<div data-slot="action">
120-
<a href={data().source} target="_blank" rel="noopener" data-component="site-button">
121-
{i18n.t("site.action.viewSource")}
122-
<NewTab />
123-
</a>
120+
<div data-component="site-buttons">
121+
<Show when={data().store}>
122+
{(store) => (
123+
<a href={store()} target="_blank" rel="noopener" data-component="site-button">
124+
{i18n.t("site.action.addToChrome")}
125+
<NewTab />
126+
</a>
127+
)}
128+
</Show>
129+
<a
130+
href={data().source}
131+
target="_blank"
132+
rel="noopener"
133+
data-component="site-button"
134+
data-variant="neutral"
135+
>
136+
{i18n.t("site.action.viewSource")}
137+
<NewTab />
138+
</a>
139+
</div>
124140
</div>
125141
</section>
126142
</div>

‎services/site/src/component/site/icons.tsx‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,6 @@ export function CheckIcon() {
160160
)
161161
}
162162

163-
/** The GitLab mark (packages/ui provider/gitlab.svg), cropped to the tanuki. */
164-
export function GitLabMark() {
165-
return (
166-
<svg width="20" height="20" viewBox="100 100 180 180" fill="currentColor" aria-hidden="true">
167-
<path d="M265.26416,174.37243l-.2134-.55822-21.19899-55.30908c-.4236-1.08359-1.18542-1.99642-2.17699-2.62689-.98837-.63373-2.14749-.93253-3.32305-.87014-1.1689.06239-2.29195.48925-3.20809,1.21821-.90957.73554-1.56629,1.73047-1.87493,2.85346l-14.31327,43.80662h-57.90965l-14.31327-43.80662c-.30864-1.12299-.96536-2.11791-1.87493-2.85346-.91614-.72895-2.03911-1.15582-3.20809-1.21821-1.17548-.06239-2.33468.23641-3.32297.87014-.99166.63047-1.75348,1.5433-2.17707,2.62689l-21.19891,55.31237-.21348.55493c-6.28158,16.38521-.92929,34.90803,13.05891,45.48782.02621.01641.04922.03611.07552.05582l.18719.14119,32.29094,24.17392,15.97151,12.09024,9.71951,7.34871c2.34117,1.77316,5.57877,1.77316,7.92002,0l9.71943-7.34871,15.96822-12.09024,32.48142-24.31511c.02958-.02299.05588-.04269.08538-.06568,13.97834-10.57977,19.32735-29.09604,13.04905-45.47796Z" />
168-
</svg>
169-
)
170-
}
171-
172163
/**
173164
* The Hex mark: two hexagon rings around a solid hexagon. Hex has no vector logo, so this is its app
174165
* icon's mark (anomalyco/hex app/AppIcon.icon/Assets/Image.png) rebuilt from that image's measured

‎services/site/src/component/site/product-data.ts‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,11 @@ export const productDetails: Record<
221221
mobile: {
222222
title: "OpenCode | Mobile, your coding sessions on your phone",
223223
description:
224-
"Start, steer and approve OpenCode sessions from your phone. Talk to the agent, review its changes and allow what it needs, while it runs on your computer.",
224+
"Start and steer OpenCode sessions from your phone. Talk to the agent while it runs on your computer.",
225225
// Android joins when it is available (androidStatus).
226226
operatingSystem: androidSoon ? "iOS" : "iOS, Android",
227227
intro:
228-
"Start, steer and approve sessions from your phone, wherever you are. Call a session and talk to the agent, review its changes, and allow what it needs, all on OpenCode running on your own computer.",
228+
"Start and steer sessions from your phone, wherever you are. Call a session and talk to the agent, or open any session to pick up where you left off, all on OpenCode running on your own computer.",
229229
// The page shows only its four clips for now (5 Nov 2026). The grid's points, checked against
230230
// the iOS app's What's New entries (anomalyco/opencode-ios), are kept here to bring back:
231231
// "Every computer" takes two taps (the drawer title, then the server), and muting leaves
@@ -245,11 +245,6 @@ export const productDetails: Record<
245245
clip: "/product-videos/features/mobile-1",
246246
body: "Call a session and say what you need. The agent answers out loud.",
247247
},
248-
{
249-
title: "Approvals",
250-
clip: "/product-videos/features/mobile-2",
251-
body: "Review the change and allow it from your phone when the agent asks.",
252-
},
253248
{
254249
title: "Sessions",
255250
clip: "/product-videos/features/mobile-3",

‎services/site/src/component/site/search-index.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,17 @@ export function buildSearchIndex(
107107
...deviceOrder(productPages).map((product) => ({
108108
title: content.products[product.slug].name,
109109
path: `/${product.slug}`,
110-
body: `${content.products[product.slug].body} ${content.productDetails[product.slug].intro}`,
110+
body:
111+
product.slug === "mobile"
112+
? content.productDetails.mobile.description
113+
: `${content.products[product.slug].body} ${content.productDetails[product.slug].intro}`,
111114
keywords: "product",
112115
})),
113116
...extensionPages.map((extension) => ({
114117
title: content.extensions[extension.slug].name,
115-
path: `/extensions/${extension.slug}`,
118+
path: extension.product ? `/${extension.slug}` : `/extensions/${extension.slug}`,
116119
body: `${content.extensions[extension.slug].body} ${content.extensions[extension.slug].intro}`,
117-
keywords: "extension",
120+
keywords: extension.product ? "product" : "extension",
118121
})),
119122
{ title: t("nav.changelog"), path: "/changelog", keywords: "releases versions what's new" },
120123
{ title: names.brand, path: "/brand", body: brand.hero.body, keywords: "logo wordmark assets" },
@@ -193,7 +196,6 @@ export function buildSearchIndex(
193196
download.extensions.title,
194197
download.extensions.items.map((i) => i.label).join(" "),
195198
),
196-
section(names.product, "/product#download", download.integrations.title, "GitHub GitLab"),
197199
]
198200
const pressSections = [press.company, press.about, press.brand, press.product, press.contact].map((part) =>
199201
section(names.press, "/press", part.title, "lead" in part ? part.lead : undefined),

‎services/site/src/component/site/site.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ const speculationRules = JSON.stringify({
158158
where: {
159159
and: [
160160
{
161-
href_matches: ["{/:locale}?/:page(product|ide|mini|font)", "{/:locale}?/extensions/*", "/docs{/*}?", "/data{/*}?"],
161+
href_matches: ["{/:locale}?/:page(product|ide|mini|font|browse)", "{/:locale}?/extensions/*", "/docs{/*}?", "/data{/*}?"],
162162
},
163163
{ not: { selector_matches: "[hreflang]" } },
164164
],

0 commit comments

Comments
 (0)