Open
Conversation
added 5 commits
March 21, 2026 17:24
- 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
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs Found
Recommendation: Review #15721, #17104, and #18235 for overlap before merging #18522. These PRs appear to address similar offline/local serving scenarios. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #
Type of change
What does this PR do?
Provided a solution for building an open code web within an internal network;
Opencode web serves the browser UI by proxying to https://app.opencode.ai when no API route matches. On machines without outbound access to that host, the UI never loads.
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
Changes:
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
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.