Hotfix: header label fallback + VITE_EXPOSE gate - #10
Merged
Conversation
The unscoped OAuth token response (/oauth/authorize vs /vaults/<name>/oauth/authorize) returns an empty vault field, leaving VaultRecord.name blank. The vault switcher then rendered a blank <option>, so Aaron saw an empty dropdown next to Manage. Use name when present, otherwise the URL host, otherwise the raw URL. Tests cover all three branches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Binding to 0.0.0.0 + accepting any Host header is useful when reaching the dev server from another device on a tailnet, but permissive by default isn't the right committed behavior. Gate both on VITE_EXPOSE=true so the default stays locked down. README documents the flag under Development. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 tasks
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.
Two follow-on fixes from the fetch-binding hotfix (PR #9, already merged), per team-lead direction.
Summary
1. Header: fall back to URL host when vault name is empty
Aaron hit a blank
<option>next to the Manage button. Root cause: the unscoped OAuth token response (/oauth/authorizevs/vaults/<name>/oauth/authorize) returns an emptyvaultfield, soVaultRecord.nameis blank for default-vault connections.src/components/Header.tsxnow usesname || new URL(v.url).host || v.urland sorts by the computed label. Three tests cover the full fallback chain.2. vite.config.ts: gate exposed dev server behind VITE_EXPOSE=true
Aaron needs the dev server reachable over his tailnet, but permissive binding shouldn't be the committed default. Gate
host: "0.0.0.0"andallowedHosts: trueonprocess.env.VITE_EXPOSE === "true". README documents the flag under Development.Follow-up (non-blocking, tracked separately)
The vault's unscoped OAuth token response returns an empty
vaultfield — either it should include the default vault's actual name or omit the field entirely. Will file an issue onparachute-vault.Test plan
bun run lintcleanbun run typecheckcleanbun run test— 104 tests pass (3 new Header tests)bun run buildsucceedsVITE_EXPOSE=true bun run devaccepts his tailnet host;bun run dev(default) does not🤖 Generated with Claude Code