Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug that prevented some CLI users from logging in by switching to a more reliable browser launching library and addressing an issue with spinners overwriting help text.
- Replaces the open library with webbrowser in handle_device_login.
- Updates CLI output to better inform users when automatic browser opening fails.
- Updates Cargo.toml files to remove the open dependency and add webbrowser.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/tower-cmd/src/session.rs | Updates login URL browser launching logic and CLI output message. |
| crates/tower-cmd/Cargo.toml | Removes open dependency and adds webbrowser dependency. |
| Cargo.toml | Synchronizes dependency changes with the workspace configuration. |
Comments suppressed due to low confidence (1)
crates/tower-cmd/src/session.rs:39
- [nitpick] The addition of a trailing newline in the user message might affect the CLI output formatting unexpectedly in some environments. Consider verifying that this formatting change is intentional and consistent with other messages.
"Please open the following URL in your browser: {}\n",
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.
This PR fixes a few bugs in the login process. First, it uses a different library for launching browsers--one that's a bit more reliable. Secondly, it fixes a bug where spinners were overwriting the help text on the CLI!