Skip to content

Commit 9b5eaac

Browse files
opencodeclaude
andcommitted
fix(console): reconcile Copilot's 3 findings on PR #45
- docs-stub.ts: docsStub uniformly 200'd every HTTP method the /docs routes export (GET through PATCH). Now checks the method and 405s anything but GET/HEAD -- the routes still export every verb (matching the original proxy's shape), but only GET/HEAD get the actual page. - header.tsx: removed both <Show when={false}> download-CTA blocks entirely instead of leaving them as permanently-disabled dead JSX -- consistent with how every other removed surface in this PR relies on git history for reversibility rather than an inert guard. Orphaned the hideGetStarted prop these blocks were the only consumer of; removed it from Header's signature and its one caller (go/index.tsx). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JJQrqYMv43CrdbjpTT7884
1 parent 146f9b2 commit 9b5eaac

3 files changed

Lines changed: 8 additions & 32 deletions

File tree

‎packages/console/app/src/component/header.tsx‎

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const fetchSvgContent = async (svgPath: string): Promise<string> => {
3535
}
3636
}
3737

38-
export function Header(props: { zen?: boolean; go?: boolean; hideGetStarted?: boolean }) {
38+
export function Header(props: { zen?: boolean; go?: boolean }) {
3939
const navigate = useNavigate()
4040
const i18n = useI18n()
4141
const language = useLanguage()
@@ -161,28 +161,6 @@ export function Header(props: { zen?: boolean; go?: boolean; hideGetStarted?: bo
161161
<a href="/auth">{i18n.t("nav.login")}</a>
162162
</li>
163163
</Show>
164-
<Show when={false}>
165-
<li>
166-
<A href={language.route("/download")} data-slot="cta-button">
167-
<svg
168-
width="18"
169-
height="18"
170-
viewBox="0 0 18 18"
171-
fill="none"
172-
xmlns="http://www.w3.org/2000/svg"
173-
style="flex-shrink: 0;"
174-
>
175-
<path
176-
d="M12.1875 9.75L9.00001 12.9375L5.8125 9.75M9.00001 2.0625L9 12.375M14.4375 15.9375H3.5625"
177-
stroke="currentColor"
178-
stroke-width="1.5"
179-
stroke-linecap="square"
180-
/>
181-
</svg>
182-
{i18n.t("nav.free")}
183-
</A>
184-
</li>
185-
</Show>
186164
</ul>
187165
</nav>
188166
<nav data-component="nav-mobile">
@@ -257,13 +235,6 @@ export function Header(props: { zen?: boolean; go?: boolean; hideGetStarted?: bo
257235
<a href="/auth">{i18n.t("nav.login")}</a>
258236
</li>
259237
</Show>
260-
<Show when={false}>
261-
<li>
262-
<A href={language.route("/download")} data-slot="cta-button">
263-
{i18n.t("nav.getStartedFree")}
264-
</A>
265-
</li>
266-
</Show>
267238
</ul>
268239
</nav>
269240
</div>

‎packages/console/app/src/lib/docs-stub.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
import type { APIEvent } from "@solidjs/start/server"
2+
13
// Disabled (TKT-396): the console's own /docs previously proxied to docs.opencode.ai, an
24
// upstream service. Real documentation now ships inside the product itself (packages/opencode's
35
// compiled binary embeds and serves it at /docs on the running instance, TKT-391) -- this console
46
// has no in-tree deployment today, so a stub page states that truthfully rather than 404ing the
57
// ~30 nav links that still point here across the site.
6-
export function docsStub(): Response {
8+
export function docsStub(evt: APIEvent): Response {
9+
if (evt.request.method !== "GET" && evt.request.method !== "HEAD") {
10+
return new Response(null, { status: 405, headers: { allow: "GET, HEAD" } })
11+
}
712
return new Response(
813
`<!doctype html>
914
<html>

‎packages/console/app/src/routes/go/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export default function Home() {
254254
<Meta name="opencode:auth" content={workspaceID() ? "true" : "false"} />
255255

256256
<div data-component="container">
257-
<Header go hideGetStarted />
257+
<Header go />
258258

259259
<div data-component="content">
260260
<section data-component="hero">

0 commit comments

Comments
 (0)