Cloud login: recovery and workspace setup find the login under every team; scopes read at once

Merged
TE
2d ago
+28-11

Follow-ups F1 and F3 from #36048's review. Leo: "we literally said we were gonna do is such that you literally dont need to log in."

  • F1. Credential recovery (CloudPresenter, both automatic and by hand) and workspace setup (CloudHandlers+Account) now look up the cached Claude login under every team scope plus the personal scope, as the chat start does. They share CloudStartChat.loginScopes. A team switch no longer skips recovery or reopens setup-token.
  • F3. CloudCredentialLogin.loadAny reads every scope concurrently, so a locked Keychain costs one 30 s timeout instead of one per team. The selected team's entry still wins, then the others in order. An unreadable entry under one scope never hides a good one under another (F2, already in #36048).

The compile check passed at 63ffb2cf.

Agent session: agent session

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Follow-ups from #36048's review: credential recovery and workspace setup now find a cached Claude login under every team scope, not just the selected one, and loadAny reads all scopes at once.

  • Recovery (automatic and by hand) and workspace setup share CloudStartChat.loginScopes with chat start, so a team switch no longer skips recovery or reopens setup-token.
  • CloudCredentialLogin.loadAny reads every scope concurrently, so a locked Keychain costs one 30 s timeout instead of one per team; the selected team's entry still wins, then the others in order. An unreadable entry under one scope never hides a good one under another.