Describe the bug
https://opencode.ai/theme.json and https://docs.opencode.ai/theme.json both return 404, even though JSON Schemas for the theme exist in two locations of the repo.
The same URLs for config.json and tui.json return 200, so the bug is specific to theme.json.
Reproduction
$ curl -sI https://opencode.ai/theme.json | head -1
HTTP/2 404
$ curl -sI https://opencode.ai/config.json | head -1
HTTP/2 200
$ curl -sI https://opencode.ai/tui.json | head -1
HTTP/2 200
Same pattern for the docs subdomain.
Where the files live in the repo
packages/web/public/theme.json (7274 bytes, has selectedListItemText)
packages/console/app/public/theme.json (7202 bytes, missing selectedListItemText)
The two copies have already drifted apart.
The schema is referenced from packages/web/src/content/docs/themes.mdx:147 (the example custom-theme manifest uses "$schema": "https://opencode.ai/theme.json"), and any user-written theme with that $schema references the same URL.
Where the files get served
Verified through infra/:
| Domain |
Worker / source |
docs.opencode.ai |
Astro build at packages/web (see infra/app.ts:52) |
opencode.ai |
SolidStart app at packages/console/app (see infra/console.ts:41) |
config.json and tui.json are both generated/copied to the docs build dist during astro:build:done in packages/web/astro.config.mjs. The hook for theme.json was missing (PR attempt #56051 added it).
The console app builds with SolidStart + Nitro on Cloudflare (packages/console/app/vite.config.ts). It already ships packages/console/app/public/theme.json, yet opencode.ai/theme.json still returns 404. That suggests the console site has some static-file routing that excludes .json, or the Nitro config drops certain files. Reproducing and fixing this side requires a deploy environment to verify.
Suggested path forward
- Land the one-line docs fix (was PR fix(web): copy theme.json to dist on build #56051, closed because it only addresses the
docs.opencode.ai half).
- Investigate the Nitro / SolidStart static-asset config in
packages/console/app/ to understand why the existing public/theme.json is not reachable at opencode.ai/theme.json when the other JSON files in the same directory are.
- Consolidate the two
theme.json copies into a single source so both URLs serve identical content (the web copy looks like the more complete one).
Happy to help with any of these steps if you can confirm where the console-side 404 is coming from.