login: simplify flow selection after review

main

Commit

Soph3mo ago

Cleanups from a reuse/simplification/efficiency/altitude review of the browser-flow hardening commits; no behavior change:

  • Collapse runLoginAuto's three trailing bools into a loginFlowFacts struct, so call sites are self-documenting instead of relying on /* useDevice */-style comments.
  • Pass canPrompt into runLogin instead of re-probing /dev/tty via interactive.CanPromptInteractively() a second time on the device path.
  • Slim the startBrowser adapter closure to a direct return — the typed-nil interface on error is harmless since callers check err first.
  • Move the SSH_* env blanking from the one browser-flow integration test into startLoginProcess, so future login subprocess tests are SSH-safe by default (same centralization idea as GitIsolatedEnv).
  • Share one noopOpenURL test helper instead of seven inline lambdas.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com Entire-Checkpoint: 224fb4e17934

Checkpoints

Login Flow Improvements and Fallback Handling

Claude CodeFable 5.[1m]
View session
Checkpoint 1