Repository navigation
feat(cli): open browser for device login - #108
Merged
Merged
Conversation
The device login now tries to open the verification URL in a browser and keeps the printed link and code as the fallback. Over SSH it skips this, because the only browser there would be a console one that takes over the terminal. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W33GYKjNWdZciXus4hh2HT
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
mrchtr
enabled auto-merge (squash)
October 26, 2026 09:04
volkanarisli
approved these changes
Oct 26, 2026
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.
Proposed Changes?
haystack-enterprise login(device flow, now the default) only printed the verification link and code, so you had to click or copy it. It now also tries to open the link in a browser, the same way the--no-devicebrowser login already does. The printed link and code stay as the fallback.Over SSH (
SSH_CONNECTIONset) it doesn't try, because the only browser there would be a text-mode one like lynx or w3m that would take over the terminal while the CLI waits for approval.How did you test it?
test_show_device_code_opens_browser_unless_over_ssh: the browser opens with the full verification URL normally and is skipped over SSH.make all-fix,make types,make tests-unitpass (840 passed, 1 skipped).Notes for the reviewer
webbrowser.openreturnsFalsewithout raising when there's no browser (containers, headless machines), so nothing changes in those environments.Checklist