Conversation
- Add OPENCODE_APP_DIST and fallback to packages/app/dist when index.html exists - Fall back to app.opencode.ai proxy when no local build - Use same-origin changelog and favicon assets in the app - Document env vars and workflow in docs/OFFLINE_WEB.md - Ignore offline/ for local models-api.json mirrors Made-with: Cursor
- Document OPENCODE_APP_DIST in Flag; log once when serving local dist - Rewrite OFFLINE_WEB.md in English; note issue-first policy for PRs - Link air-gapped web flow from CONTRIBUTING.md Made-with: Cursor
Fixes @opencode-ai/app typecheck for dialog-connect-provider and dialog-custom-provider. Add docs/PR_BODY_offline_web.md as PR description draft for offline web PR. Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: Found potential related PRs:
These PRs all address similar functionality around serving the web UI locally and reducing external dependencies, which is the core focus of PR #18521. Check if any of these are still open and if they're addressing the same feature gap. |
Type of change
What does this PR do?
Provided a solution for building an open code web within an internal network
How did you verify your code works?
packages/opencode/src/server/server.ts— Ifpackages/app/dist/index.htmlexists (orOPENCODE_APP_DISTpoints at a directory that contains it), serve files from that directory with the same SPA fallback as before (unknown paths →index.html). Otherwise keep the existing proxy behavior.Flag.OPENCODE_APP_DISTinpackages/opencode/src/flag/flag.ts— Documents and centralizes the env var used for the absolute path override.serving web UI from local distwithroot) so operators can confirm the proxy is not in use.packages/app— Changelog fetch uses/changelog.json(frompublic/after build); notification and project avatar use same-origin favicon paths instead ofhttps://opencode.ai/..., so those requests stay on the server.docs/OFFLINE_WEB.md(English) — How to buildpackages/app, which env vars matter, and troubleshooting.CONTRIBUTING.md— Short subsection linking to that doc.Screenshots / recordings
none
Checklist