fix(web): allow direct entry from any local browser - #449
Merged
Conversation
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.
Opening the terminal-displayed local address in a fresh browser rendered the workbench but rejected workspace actions with
invalid or missing token. The root document now dynamically supplies the current Host credential, so a local browser can use the bare address without pairing or copying a fragment link.The client prefers the current document credential over stale fragment/storage values and continues working when browser storage is unavailable. API bearer checks remain mandatory. Credential issuance uses exact Host/Origin, rejects foreign Referer and cross-site/same-site/non-document Fetch Metadata, and does not inherit API allowedOrigins exceptions. HTML is uncached and protected with CSP framing restrictions, CORP, COOP, X-Frame-Options and nosniff. No cookie, CORS grant, static credential or new bootstrap API is introduced. Separate Vite development keeps its legacy fragment entry.
Decision 0003 records the maintainer-approved local-document trust boundary and limitations. Local programs and compromised same-origin code remain within the existing local-machine trust model. Refresh obtains a new credential after a Host restart; mutations are not automatically replayed.
Validation:
bun run checkpassed.bun run test: 1457 Node passed, 1 skipped; 106 Vitest passed.An earlier full run under concurrent load also failed an unrelated settled-launch repaint timing test; the clean full rerun above passed. No runtime/performance claim is based on that failed run.
Fixes #448.