fix(opencode): strip transfer-encoding in UI proxy and allow public manifest assets#25698
Merged
kitlangton merged 2 commits intoanomalyco:devfrom May 4, 2026
Conversation
…ublic manifest assets
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Contributor
Author
How to reproduce / test locally
bun --cwd packages/app build
bun --cwd packages/app serve -- --host 127.0.0.1 --port 4173
export const UI_UPSTREAM = new URL("https://app.opencode.ai")to: export const UI_UPSTREAM = new URL("http://127.0.0.1:4173")
Issues
PR Fixes
|
…nked-and-manifest-auth # ------------------------ >8 ------------------------ # Do not modify or remove the line above. # Everything below it will be ignored. # # Conflicts: # packages/app/src/components/terminal.tsx
kitlangton
approved these changes
May 4, 2026
kitlangton
added a commit
that referenced
this pull request
May 4, 2026
Adds three regression tests that lock in the contracts behind Ope's cleanup PR #25698: 1. httpapi-ui.test.ts: 'strips upstream transfer-encoding header from proxied assets' — fails on dev today (transfer-encoding leaks through the UI proxy and triggers ERR_INVALID_CHUNKED_ENCODING in browsers). 2. httpapi-ui.test.ts: 'serves the PWA manifest without auth even when a server password is set' — fails on dev today (auth middleware rejects /site.webmanifest and the web-app-manifest icons with 401, breaking PWA install). 3. httpapi-listen.test.ts: 'PTY connect token requires matching directory across mint and connect' — passes on dev (the server already enforces strict directory scope match), but documents the contract Ope's app fix relies on. Without a directory query, the server resolves the PTY in its own cwd and returns 404 — the symptom the app hit when calling client.pty.connectToken({ ptyID }) without directory. On dev: 2 fail, 1 passes (3rd is contract-only). With #25698 applied: 3 pass.
kitlangton
added a commit
that referenced
this pull request
May 4, 2026
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 #25697
Type of change
What does this PR do?
How did you verify your code works?
Reproduced and verified both serve UI issues:
Manually verified PTY terminal startup: token mint and websocket connect now consistently succeed because directory matches across both requests.
Ran focused server tests:
Manually verified production proxy and local preview proxy through opencode serve.
Screenshots / recordings
Checklist