From 9a7479d2d711112183887ee16fd2d3d565c0493e Mon Sep 17 00:00:00 2001 From: Dax Date: Fri, 6 Nov 2026 20:10:42 -0500 Subject: [PATCH] fix(site): remove the home page faq (#62461) --- .../site/src/component/site/design-mode.tsx | 28 +-------------- .../src/component/site/design-overlay.tsx | 1 - .../site/src/component/site/home-order.tsx | 2 -- .../site/src/component/site/page-settings.tsx | 19 ++++------ .../site/src/component/site/search-index.ts | 15 -------- .../src/component/site/settings-defaults.json | 2 -- services/site/src/component/site/settings.ts | 4 +-- .../site/src/component/structured-data.tsx | 19 ---------- services/site/src/lib/faq-content.ts | 12 +++---- services/site/src/lib/home-content.ts | 2 -- services/site/src/lib/home-markdown.ts | 2 -- services/site/src/lib/page-markdown.ts | 2 +- services/site/src/routes/index.css | 8 +---- services/site/src/routes/index.tsx | 35 +------------------ 14 files changed, 16 insertions(+), 135 deletions(-) diff --git a/services/site/src/component/site/design-mode.tsx b/services/site/src/component/site/design-mode.tsx index a53284de531..676c3c775dc 100644 --- a/services/site/src/component/site/design-mode.tsx +++ b/services/site/src/component/site/design-mode.tsx @@ -118,7 +118,7 @@ export const copyVariants = { "Used by developers at", ], }, - // Home sections and FAQ answers without copy of their own in Design mode until the coding-agents + // Home sections without copy of their own in Design mode until the coding-agents // review (positioningRec). One line each: editing reads the whole text, links included. Links in // an option come from homeContent's copyLinks phrases. "home.feature.anyModel.body": { @@ -146,32 +146,6 @@ export const copyVariants = { `OpenCode is MIT licensed. ${config.stats.contributors} contributors have made ${config.stats.commits}+ commits, and ${config.stats.monthlyUsers} developers use it every month.`, ], }, - "home.faq.a3": { - label: "FAQ: extra subscriptions", - lines: 1, - options: [ - "No. OpenCode includes free models that need no account. You can also connect any of 200+ providers, sign in with ChatGPT or Copilot, or run local models.", - ], - }, - "home.faq.a4": { - label: "FAQ: existing subscriptions", - lines: 1, - options: ["Yes. Sign in with ChatGPT (Plus or Pro) or GitHub Copilot, including GitHub Enterprise."], - }, - "home.faq.a6": { - label: "FAQ: cost", - lines: 1, - options: [ - "OpenCode is free and MIT licensed. The free models cost nothing. With another provider, you pay that provider. OpenCode Go is from $10/month, and OpenCode Models are pay as you go.", - ], - }, - "home.faq.a7": { - label: "FAQ: data and privacy", - lines: 1, - options: [ - "OpenCode runs on your computer and keeps your sessions there. Your code goes only to the model provider you choose. If you choose a model hosted by OpenCode, its training and retention terms are listed in the docs.", - ], - }, // The home page's "New" bar (announcement.ts): each option keeps its own link. "home.announcement": { label: "Announcement", lines: 1, options: announcements.map(announcementCopy) }, // "Get started" (lib/get-started.ts); the first option is the page's own copy. diff --git a/services/site/src/component/site/design-overlay.tsx b/services/site/src/component/site/design-overlay.tsx index 966b165b38a..33e59a4e6b6 100644 --- a/services/site/src/component/site/design-overlay.tsx +++ b/services/site/src/component/site/design-overlay.tsx @@ -271,7 +271,6 @@ const settingControls: Record = { whatColumns: setting("whatColumns", "Body columns", () => sectionColumns), toolsColumns: setting("toolsColumns", "Body columns", () => sectionColumns), openSourceColumns: setting("openSourceColumns", "Body columns", () => sectionColumns), - faqColumns: setting("faqColumns", "FAQ width", () => sectionColumns), consoleColumns: setting("consoleColumns", "Body columns", () => sectionColumns), whatCopyColumns: setting("whatCopyColumns", "Copy columns", () => sectionColumns), toolsCopyColumns: setting("toolsCopyColumns", "Copy columns", () => sectionColumns), diff --git a/services/site/src/component/site/home-order.tsx b/services/site/src/component/site/home-order.tsx index d9574b418d8..3c62b5de5ea 100644 --- a/services/site/src/component/site/home-order.tsx +++ b/services/site/src/component/site/home-order.tsx @@ -27,7 +27,6 @@ const selectors: Record = { tools: '[data-section="tools"]', // Open source proof as its own section moves with the stats, right after them. openSource: ':is([data-section="openSource"], [data-section="openSourceProof"])', - faq: '[data-section="faq"]', console: '[data-section="console"]', } @@ -39,7 +38,6 @@ const labels: Record = { byos: "Bring your own subs", tools: "Bring your own tools", openSource: "Open source", - faq: "FAQ", console: "Console", } diff --git a/services/site/src/component/site/page-settings.tsx b/services/site/src/component/site/page-settings.tsx index f1bbcb4ba54..24b4d19de33 100644 --- a/services/site/src/component/site/page-settings.tsx +++ b/services/site/src/component/site/page-settings.tsx @@ -76,7 +76,6 @@ const sectionColumnSettings = [ { key: "whatColumns", label: "What is OpenCode?", copy: "whatCopyColumns" }, { key: "toolsColumns", label: "Bring your own tools", copy: "toolsCopyColumns" }, { key: "openSourceColumns", label: "Open source", copy: "openSourceCopyColumns" }, - { key: "faqColumns", label: "FAQ" }, { key: "consoleColumns", label: "Console", copy: "consoleCopyColumns" }, ] as const @@ -573,18 +572,14 @@ export default function PageSettings(props: { home?: boolean; terminal?: boolean {(item) => ( <> - - {(copy) => ( - setSiteSetting(copy(), value)} - /> - )} - setSiteSetting(item.copy, value)} + /> + setSiteSetting(item.key, value)} diff --git a/services/site/src/component/site/search-index.ts b/services/site/src/component/site/search-index.ts index 98bbfd91e70..a143227802a 100644 --- a/services/site/src/component/site/search-index.ts +++ b/services/site/src/component/site/search-index.ts @@ -84,19 +84,6 @@ export function buildSearchIndex( href: route(path), target: { text: title }, }) - const faq = (page: string, path: string) => - home.faq.items.map( - (item): SearchItem => ({ - id: `faq:${path}:${item.question}`, - group: "Sections", - title: item.question, - context: t("site.search.faq", { page }), - body: plainRich(item.answer), - keywords: "faq question", - href: route(path), - target: { faq: item.question }, - }), - ) const pages: SearchItem[] = [ { title: names.home, path: "/", body: joinSentences([home.hero.title, ...home.hero.subtitle]) }, @@ -161,7 +148,6 @@ export function buildSearchIndex( home.tools.items.map((i) => i.name).join(" "), ), section(names.home, "/", home.openSource.title, stripTags(home.openSource.lead)), - section(names.home, "/", home.faq.title, undefined, "questions"), section(names.home, "/", home.console.title, `${home.console.headline} ${home.console.body}`), ] const productSections = productPages.flatMap((product) => [ @@ -314,7 +300,6 @@ export function buildSearchIndex( ...homeSections, ...productSections, ...downloadSections, - ...faq(names.home, "/"), ...pressSections, ...brandSections, ...legalSections, diff --git a/services/site/src/component/site/settings-defaults.json b/services/site/src/component/site/settings-defaults.json index c2700f0faa7..9634f475eac 100644 --- a/services/site/src/component/site/settings-defaults.json +++ b/services/site/src/component/site/settings-defaults.json @@ -312,7 +312,6 @@ "byos", "tools", "openSource", - "faq", "console" ], "toolTiles": "logo", @@ -346,7 +345,6 @@ "whatColumns": "2 columns", "toolsColumns": "2 columns", "openSourceColumns": "2 columns", - "faqColumns": "2 columns", "consoleColumns": "2 columns", "whatCopyColumns": "2 columns", "toolsCopyColumns": "2 columns", diff --git a/services/site/src/component/site/settings.ts b/services/site/src/component/site/settings.ts index 12b60366540..710d26425bf 100644 --- a/services/site/src/component/site/settings.ts +++ b/services/site/src/component/site/settings.ts @@ -173,7 +173,6 @@ export const homeSections = [ "byos", "tools", "openSource", - "faq", "console", ] as const export type HomeSection = (typeof homeSections)[number] @@ -815,7 +814,7 @@ function createSchema() { ditherOpacity: z.number().min(10).max(100).catch(20), ditherCurve: z.number().min(1).max(4).catch(1), ditherLine: z.enum(toggles).catch("off"), - // The Console section between the FAQ and the footer on the home page. + // The Console section above the footer on the home page. consoleSection: z.enum(consoleSections).catch("panel"), consoleHeight: z.enum(consoleHeights).catch("compact"), consoleLabel: z.enum(consoleLabels).catch("left"), @@ -1043,7 +1042,6 @@ function createSchema() { whatColumns: z.enum(sectionColumns).catch("2 columns"), toolsColumns: z.enum(sectionColumns).catch("2 columns"), openSourceColumns: z.enum(sectionColumns).catch("2 columns"), - faqColumns: z.enum(sectionColumns).catch("2 columns"), consoleColumns: z.enum(sectionColumns).catch("2 columns"), // The intro copy (lead or Console headline) beside the body columns above; the section body is // as wide as the wider of the two. diff --git a/services/site/src/component/structured-data.tsx b/services/site/src/component/structured-data.tsx index 8ad53517bf0..7198f915451 100644 --- a/services/site/src/component/structured-data.tsx +++ b/services/site/src/component/structured-data.tsx @@ -1,5 +1,4 @@ import { config } from "~/config" -import type { RichText } from "~/lib/markdown" // Structured data (https://schema.org) for search engines, one JSON-LD script per type. @@ -93,21 +92,3 @@ export function breadcrumbData(items: { name: string; path: string }[]) { })), } } - -/** The FAQ as plain text: link runs keep their text. */ -export function faqData(items: { question: string; answer: RichText }[]) { - return { - "@type": "FAQPage", - mainEntity: items.map((item) => ({ - "@type": "Question", - name: item.question, - acceptedAnswer: { - "@type": "Answer", - text: item.answer - .map((run) => (typeof run === "string" ? run : "code" in run ? run.code : run.text)) - .join("") - .trim(), - }, - })), - } -} diff --git a/services/site/src/lib/faq-content.ts b/services/site/src/lib/faq-content.ts index f7c32d4b04b..62a369f438f 100644 --- a/services/site/src/lib/faq-content.ts +++ b/services/site/src/lib/faq-content.ts @@ -5,9 +5,8 @@ import { rich } from "~/i18n/rich" import type { RichText } from "~/lib/markdown" /** - * The home page FAQ, which the product pages' download section shows too (lib/download-content.ts). - * A module of its own, so the download section, on every page, doesn't take the rest of the home - * page copy with it. + * The FAQ in the product pages' download section (lib/download-content.ts). A module of its own, so + * the download section, on every page, doesn't take the home page copy with it. */ export function homeFaq(t: Translate, route: (path: string) => string) { const docs = (path: string) => `https://opencode.ai${docsUrl(path)}` @@ -24,7 +23,6 @@ export function homeFaq(t: Translate, route: (path: string) => string) { }, { question: t("home.faq.q3"), - copy: "home.faq.a3", answer: rich( `${t("home.faq.a3.p1")} ${t("home.faq.a3.p4.beforeLocal")} ${t("home.faq.a3.providers")} ${t("home.faq.a3.models.after")}`, { local: docs("/models/#local"), models: "https://opencode.ai/console/models" }, @@ -32,7 +30,6 @@ export function homeFaq(t: Translate, route: (path: string) => string) { }, { question: t("home.faq.q4"), - copy: "home.faq.a4", answer: [`${t("home.faq.a4.p1")} `, { text: t("common.learnMore"), href: docs("/providers/") }, "."], }, { @@ -43,10 +40,9 @@ export function homeFaq(t: Translate, route: (path: string) => string) { sdk: route("/sdk"), }), }, - { question: t("home.faq.q6"), copy: "home.faq.a6", answer: [t("home.faq.a6")] }, + { question: t("home.faq.q6"), answer: [t("home.faq.a6")] }, { question: t("home.faq.q7"), - copy: "home.faq.a7", answer: [ `${t("home.faq.a7.p1")} ${t("home.faq.a7.p2.beforeModels")} `, { text: t("home.faq.a7.p2.modelsLink"), href: docs("/console/models/#privacy") }, @@ -67,6 +63,6 @@ export function homeFaq(t: Translate, route: (path: string) => string) { t("home.faq.a8.p3"), ], }, - ] satisfies { question: string; copy?: string; answer: RichText }[], + ] satisfies { question: string; answer: RichText }[], } } diff --git a/services/site/src/lib/home-content.ts b/services/site/src/lib/home-content.ts index 3a3886832f3..96a78c7e4fd 100644 --- a/services/site/src/lib/home-content.ts +++ b/services/site/src/lib/home-content.ts @@ -4,7 +4,6 @@ import { logoMetrics } from "~/component/site/logo-metrics" import type { Translate } from "~/i18n" import { rich } from "~/i18n/rich" import type { RichText } from "~/lib/markdown" -import { homeFaq } from "~/lib/faq-content" // Product order rule: whenever copy lists the products, name them in this order: desktop, mobile, // terminal, SDK (the order of `products` in component/site/product-data.ts). @@ -208,6 +207,5 @@ export function homeContent(t: Translate, route: (path: string) => string) { slimHeadline: t("home.console.slimHeadline"), sales: { text: t("home.console.sales"), href: "/console/enterprise" }, }, - faq: homeFaq(t, route), } } diff --git a/services/site/src/lib/home-markdown.ts b/services/site/src/lib/home-markdown.ts index ffd8df23514..2c541769d9d 100644 --- a/services/site/src/lib/home-markdown.ts +++ b/services/site/src/lib/home-markdown.ts @@ -44,8 +44,6 @@ export function homeMarkdown(context: MarkdownContext) { `## ${content.openSource.title}`, inlineHtmlToMarkdown(content.openSource.lead), content.openSource.stats.map((stat) => `- ${stat.label}: ${stat.value}`).join("\n"), - `## ${content.faq.title}`, - ...content.faq.items.map((item) => blocks(`### ${item.question}`, richToMarkdown(item.answer)).trimEnd()), `## ${content.console.title}`, `**${content.console.headline}**`, content.console.body, diff --git a/services/site/src/lib/page-markdown.ts b/services/site/src/lib/page-markdown.ts index bae7bba083e..9aab845857f 100644 --- a/services/site/src/lib/page-markdown.ts +++ b/services/site/src/lib/page-markdown.ts @@ -36,7 +36,7 @@ type PageMarkdown = { * negotiation, llms.txt and llms-full.txt all read this list. */ export const pageMarkdown: Record = { - "/": { title: "Home", description: "What OpenCode is, its apps, features and FAQ", markdown: homeMarkdown }, + "/": { title: "Home", description: "What OpenCode is, its apps and features", markdown: homeMarkdown }, "/product": { title: "Product", description: "Every OpenCode product and extension, more open source from Anomaly, and every download", diff --git a/services/site/src/routes/index.css b/services/site/src/routes/index.css index 869407394dc..b92142a50e0 100644 --- a/services/site/src/routes/index.css +++ b/services/site/src/routes/index.css @@ -41,12 +41,6 @@ } } - /* The FAQ always spans two card columns, whatever the section width setting, so its plus signs - end on the third column's right edge. */ - &[data-site] [data-component="block"]:has([data-component="faq"]) [data-slot="body"] { - max-width: var(--two-cards); - } - /* "What is OpenCode?": ten features in five rows of two, one feature per card column, under the two-column lead. */ &[data-site] [data-component="block"]:has([data-component="features"]) [data-slot="body"] { @@ -1200,7 +1194,7 @@ } /* No divider above, whatever the section spacer is (the second attribute outranks the spacer - rules). The gap below the FAQ is half the "space" spacer's (David, 5 Nov: 184px to 92px, and + rules). The gap above the Console is half the "space" spacer's (David, 5 Nov: 184px to 92px, and 96px to 48px on phones). The "section" option keeps the spacer. */ [data-page="home"][data-site] [data-component="block"][data-console]:not([data-console="section"]) { margin-top: calc(var(--block-space) + 1.25rem); diff --git a/services/site/src/routes/index.tsx b/services/site/src/routes/index.tsx index c5937769e22..83c63628293 100644 --- a/services/site/src/routes/index.tsx +++ b/services/site/src/routes/index.tsx @@ -20,7 +20,6 @@ import { Suspense, Switch, } from "solid-js" -import { Faq } from "~/component/faq" import { ConsoleField } from "~/component/site/console-field" import { ChevronRight, ExternalArrow } from "~/component/site/icons" import { LogoWall } from "~/component/site/logo-wall" @@ -49,7 +48,7 @@ import { isMobile } from "~/lib/platform" import { LocaleLinks } from "~/component/locale-links" import { ShareMeta } from "~/component/share-meta" import { ogImage } from "~/lib/og" -import { faqData, JsonLd, organizationData, softwareData, websiteData } from "~/component/structured-data" +import { JsonLd, organizationData, softwareData, websiteData } from "~/component/structured-data" import { Rich } from "~/component/site/rich-text" import { homeOrderDefaultCss, homeOrderScript, homeOrderStyleId, useHomeOrder } from "~/component/site/home-order" import { designCopy, designEditing } from "~/component/site/design-copy" @@ -217,7 +216,6 @@ export default function Home() { operatingSystem: "macOS, Windows, Linux", })} /> - {/* The default section order from the server; a saved one (Design mode, development only) replaces it before the sections paint. */} @@ -449,37 +447,6 @@ export default function Home() { -
-

{content().faq.title}

-
-
    - - {(item) => ( -
  • - - } - > - {(copy) => ( - - - - )} - - -
  • - )} -
    -
-
-
-