Skip to content

feat: onboarding redesign, dual-usage display, and reliability fixes#16

Merged
TobiiNT merged 25 commits into
mainfrom
feat/onboarding-and-dual-usage
Mar 19, 2026
Merged

feat: onboarding redesign, dual-usage display, and reliability fixes#16
TobiiNT merged 25 commits into
mainfrom
feat/onboarding-and-dual-usage

Conversation

@TobiiNT

@TobiiNT TobiiNT commented Mar 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Onboarding wizard redesign: Multi-step API Console setup (session key → org → user), section dividers, inline status, close confirmation, auto-refresh on connect
  • Browser sign-in: Cross-domain SSO redirect (platform.claude.com → claude.ai) with WebView2 postMessage verification to bypass Cloudflare
  • Dual-usage display: Show subscription and API usage side by side in popover and floating widget (was mutually exclusive)
  • Settings alignment: API Console section uses same multi-step pattern as onboarding
  • Rate limit UX: Orange status with countdown, disabled refresh button, auto-refresh on expiry, linear backoff (5→7→9→...→15m)
  • IPC watchdog: Auto-restart dead pipe listeners every 30s
  • Terminal focus via window handle: HookBridge captures console window handle via GetConsoleWindow() and passes it in IPC envelope. Notification click uses SetForegroundWindow(handle) directly — no more title string matching
  • Popup auto-close: Added PreToolUse as auto-close trigger, detailed tracing logs for diagnosing popup lifecycle
  • Resource cleanup: Timer disposal, event unsubscription, notification click falls back to popover when terminal not found
  • Tray menu refactor: Update indicator, log folder access, reduced separators

Test plan

  • Fresh install onboarding: CLI Auto Detect + API Console multi-step flow
  • Browser Auto Sign In captures session key and auto-connects
  • Manual paste with platform.claude.com session key works
  • Both subscription + API usage visible in popover and floating widget
  • Rate limit shows orange status, button disabled, auto-recovers
  • Disconnect/reconnect fetches usage immediately
  • Close wizard mid-progress shows confirm dialog
  • IPC server recovers after listener crash
  • Notification click focuses terminal via window handle (not title match)
  • Permission popup auto-closes when user answers in terminal
  • Check popup auto-close logs show correct lifecycle tracing

🤖 Generated with Claude Code

TobiiNT and others added 25 commits March 19, 2026 18:54
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… additional

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ReleaseSingleInstanceMutex() can be called by both UpdateService
(before Velopack restart) and OnExit, causing ApplicationException
on the second call. Catch and ignore the expected exception.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…h settings tab

Rename CliOAuthData → ClaudeOAuthData and ClaudeAiOauth → ClaudeOAuth for consistency.
Replace CliAccountView with ClaudeOAuthView. Update services and tests to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ification

Handle OAuth redirects across Anthropic domains (platform.claude.com → claude.ai).
After detecting sessionKey on a different domain, navigate to the target domain to
trigger SSO. Use postMessage to verify connection via WebView2 fetch (bypasses Cloudflare).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Section dividers: 'Using subscription plan?' and 'Using API key?'
- Multi-step API Console: session key → org picker → user picker
- Auto Sign In fills textbox and auto-connects
- Open Console launches Edge with DevTools
- Enrich org dropdown with spend data (e.g. 'Org ($0.40 of $10.00)')
- Show Done button after first connect, let user fill both sections
- Exit app on close with no progress, confirm dialog if partial progress
- Trigger RefreshNow + popover after wizard completion
- Store ApiOrganizationName for display in floating widget

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…over

- Floating widget: replace Grid with StackPanel to prevent overlap when both
  subscription and API panels are visible. Show org name in budget label.
- Popover: set ApiPercentText which was never populated.
- Remove !hasSubscription guard that hid API/personal panels for dual users.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Show 'Update Available (vX.Y.Z)' in bold when update exists
- Add 'Open Log Folder' menu item
- Reduce separators from 4 to 2
- Group Refresh + Floating Widget together

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Single card with step-by-step flow (session key → org → user) instead of
separate browser/paste cards. Same Auto Sign In + Open Console buttons.
Fetch spend data per org for dropdown display. Save org and refresh
immediately on selection, not deferred to user confirm.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PersonalUsageViewModel.AutoDetect was discarding FetchUsageData result.
Now stores it via UpdateUsageData and calls RefreshNow. Onboarding awaits
the fetch so popover has data when it opens. Save org on selection in both
onboarding and settings so API usage refreshes immediately.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Expose IsRateLimited/RateLimitedUntil on IUsageRefreshCoordinator
- Schedule auto-refresh timer that fires when rate limit expires
- Fire RefreshFailed on every skipped refresh (not just first detection)
- Popover: orange status dot with countdown, refresh button disabled with tooltip
- Floating widget: orange status with countdown
- IsRateLimited reads directly from coordinator (always current)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implementation diverged from the original connection UX redesign plan.
Commit history and CLAUDE.md are the authoritative references.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously used a fixed 5-minute backoff that caused infinite retry loops —
each retry immediately got rate limited again. Now increases by 2 minutes
per consecutive rate limit (capped at 15m), resets on successful refresh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Listeners could silently exit from errors, leaving the IPC server in a
running-but-dead state. Add a 30s watchdog timer that detects and respawns
dead listeners. Add 2s delay after errors to prevent CPU burn on persistent
failures like pipe creation issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- UsageRefreshCoordinator.Stop: also stop _resetTimer and _rateLimitTimer
- NotificationPopup: stop _autoCloseTimer on window close
- BrowserSignInWindow: unsubscribe NavigationCompleted on close
- AutoStartSessionService: cancel pending Task.Delay on dispose
- TerminalFocusHelper.BringToFront: return bool for success
- Notification click: fall back to popover when terminal window not found

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When user answers a permission request in terminal, Claude Code proceeds
and fires PreToolUse for the next tool. Previously only PostToolUse/Stop/
UserPromptSubmit triggered auto-close, but PostToolUse was blocked by the
subagent guard when subagents are active — causing popups to stay open.

PreToolUse from the same session is a reliable signal that the permission
was already handled. Not affected by the subagent guard.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Log popup open/close lifecycle with session IDs, auto-close candidates
with match status, subagent guard blocks, and session mismatches. Makes
it easy to diagnose why a popup did or didn't auto-close from the log.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cation click

HookBridge captures its console window handle via GetConsoleWindow() and
passes it in the IPC envelope. On notification click, SetForegroundWindow
uses this handle directly — no more title string matching. Falls back to
cwd-based title match, then popover if both fail.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@TobiiNT TobiiNT merged commit 6b4223d into main Mar 19, 2026
1 check passed
@TobiiNT TobiiNT deleted the feat/onboarding-and-dual-usage branch March 19, 2026 21:24
@TobiiNT TobiiNT restored the feat/onboarding-and-dual-usage branch March 19, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant