Fix Log In button when Tailscale auth URL is missing#77
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.
What
Fixes the
NeedsLoginflow so the popup’s Log In button no longer silently no-ops when Tailchrome does not already have a usable cached login URL.When the cached URL is missing or invalid, the extension now asks the native helper to request a fresh Tailscale login URL, then opens that URL when it arrives in status.
Why
Closes #75.
The screenshots show Tailchrome successfully rendering the login-required view, but clicking Log In does not open a browser tab. The issue was that the popup depended on a cached IPN-bus
BrowseToURL; if Tailchrome enteredNeedsLoginwithout that cached URL, the button could appear active while having nothing valid to open.How
logincommand that callsStartLoginInteractive()to request or resume an interactive Tailscale login flow.ipnstate.Status.AuthURLas a fallback when no cachedBrowseToURLis available.browseToURLfrom eitherBrowseToURLorAuthURL, so the popup can recover from older or partial status updates.Runninglogin.tailscale.com,controlplane.tailscale.com, andtailscale.com.Test
Checklist
go test ./...pnpm --filter @tailchrome/shared exec vitest run src/background/background.test.ts src/background/state-store.test.tspnpm --filter @tailchrome/shared exec tsc --noEmitpnpm e2e --suite=full --grep="login requests fresh URL"Marking draft while I finish manual smoke testing.