Repository navigation
Windows: sign in to Claude directly from the usage card - #257
Conversation
|
Thanks @rustamnova — signing in through
No CI has run on it yet; a push will trigger it. Note that #269 (Linux) would move |
|
Merged as The README conflict was just your section and #210's landing at the same spot — kept both. One follow-up, Two nits left alone: |
The polling loop conflicted structurally with #257, which landed earlier today: both rewrote it. Took this branch's per-account loop and re-applied #257's four hooks onto it — the sign-in gate shared with renewal, the busy check that stops polling a credential mid-login, clearing the card's message on a good reading, and keeping 403 as access denied rather than folding it back into needsAuth. Also kept the empty-token guard, and the sign-in row now keys on the account's base so a second account gets it too. Thanks @lucaedulima.
Runs the Claude Code CLI's own browser login in a terminal of its own, so the OAuth never enters Codenotch: no token or code crosses the IPC boundary, no embedded webview, and the inherited Claude environment is stripped. README conflict was two unrelated sections appended at the same place; kept both. Thanks @rustamnova.
…laude The polling loop conflicted structurally with vinzdg#257, which landed earlier today: both rewrote it. Took this branch's per-account loop and re-applied vinzdg#257's four hooks onto it — the sign-in gate shared with renewal, the busy check that stops polling a credential mid-login, clearing the card's message on a good reading, and keeping 403 as access denied rather than folding it back into needsAuth. Also kept the empty-token guard, and the sign-in row now keys on the account's base so a second account gets it too. Thanks @lucaedulima.
vinzdg#279's rewrite of usage.rs restored the private signature, but vinzdg#257's claude_auth calls it to locate the CLI.
Runs the Claude Code CLI's own browser login in a terminal of its own, so the OAuth never enters Codenotch: no token or code crosses the IPC boundary, no embedded webview, and the inherited Claude environment is stripped. README conflict was two unrelated sections appended at the same place; kept both. Thanks @rustamnova.
…laude The polling loop conflicted structurally with vinzdg#257, which landed earlier today: both rewrote it. Took this branch's per-account loop and re-applied vinzdg#257's four hooks onto it — the sign-in gate shared with renewal, the busy check that stops polling a credential mid-login, clearing the card's message on a good reading, and keeping 403 as access denied rather than folding it back into needsAuth. Also kept the empty-token guard, and the sign-in row now keys on the account's base so a second account gets it too. Thanks @lucaedulima.
vinzdg#279's rewrite of usage.rs restored the private signature, but vinzdg#257's claude_auth calls it to locate the CLI.
Proposal
Thanks for adding Windows token renewal. This builds on current
maininstead of replacing or duplicatingRenewer: when the user really needs to sign in again, the Claude hover card should offer an actionable Sign in button instead of requiring them to find a terminal themselves.Changes
auth login --claudeaiin a visible console on an explicit click. The official CLI opens the browser, handles PKCE/callback or pasted code, and writes its credential store. The widget handles no OAuth codes and exposes no tokens over IPC.Retry-Afterdeadline. No changes to automatic-renewal timing/backoff or quota percentage semantics.Scope
Windows only. No macOS changes, new dependency, hard-coded proxy, machine-specific paths/settings, account data, credential backups, Codex/Astra changes, or modifications to #210. The new login path does not send an inference prompt; the existing upstream renewal mechanism is left in place.
Validation
cargo build --lockedcargo test --locked: 103 passed; 2 existing opt-in live tests ignored.cargo clippy --all-targets --locked: existingtype_complexitywarning intray.rs; no new diagnostics. Strict-D warningsreports that existing warning, so this is not claimed as warning-free.node scripts/check-ui-scripts.mjsnode scripts/test-claude-auth-ui.cjs: labels/localization, escaped messages, duplicate-click guard, refresh backoff feedback and launch errors.git diff --checkA local prototype's card → native CLI → browser sign-in → fresh quota response was tested interactively on Windows without restarting the widget. This PR ports that path onto the newer main layout and its existing renewal implementation; the complete rebased application was not installed over the customized local build. No forced live token expiry or macOS tests were run. GitHub CI results are separate from these local checks.
If you prefer a narrower change, the 403/empty-token diagnostics can be split out; the primary proposal is discoverable, user-initiated Claude sign-in directly from the card.