Skip to content

Conversation

@bradhe
Copy link
Contributor

@bradhe bradhe commented May 8, 2025

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!

@bradhe bradhe requested review from Copilot and sankroh May 8, 2025 13:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

@bradhe bradhe merged commit 07a5bf2 into develop May 8, 2025
3 checks passed
@bradhe bradhe deleted the feature/tow-391-cli-user-is-having-problems-opening-browser-on-her-windows branch May 8, 2025 13:29
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.

2 participants