Skip to content

Conversation

@gonengar
Copy link
Contributor

Summary

  • Add "Press Enter to open in browser..." prompt to auth login flow for better UX
  • Auto-open the verification URL in the user's default browser when they press Enter
  • Style the verification URL with theme.colors.links() for visual consistency

Test plan

  • Run base44 auth login command
  • Verify the verification code and URL are displayed (URL should be cyan colored)
  • Verify "Press Enter to open in browser..." prompt appears
  • Press Enter and confirm browser opens to the verification URL
  • Complete authentication and verify login succeeds

- Add confirm prompt asking user to press enter to open browser
- Auto-open verification URL when user confirms
- Style the verification URL as a link using theme.colors.links()
Replace confirm dialog (Open/Skip) with simple "Press Enter to open
in browser..." prompt using readline for a cleaner UX.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 25, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.17-pr.110.70e2c01

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.17-pr.110.70e2c01"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.17-pr.110.70e2c01"
  }
}

Preview published to npm registry — try new features instantly!

@claude
Copy link

claude bot commented Jan 25, 2026


Code review

No issues found. Checked for bugs and CLAUDE.md compliance.


});

await new Promise<void>((resolve) => {
rl.question("Press Enter to open in browser...", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't want to use readline in the project, we cause use clack prompts to show something like this, i would also claim that maybe we don't want the even ask the user? we already have open installed (for the dashboard command), lets just open the browser? we can also add a check before if we're is a non-tty environment and not open the browser.
@claude suggest a fix please

Copy link

@claude claude bot Jan 26, 2026

Choose a reason for hiding this comment

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

Claude finished @kfirstri's task in 1m 17s —— View job


Summary

I've refactored the auth login flow to address your feedback:

Changes Made

  • ✅ Removed readline dependency entirely (no longer imported or used)
  • ✅ Removed the "Press Enter to open in browser..." prompt
  • ✅ Browser now auto-opens immediately after displaying the verification code
  • ✅ Added TTY check (process.stdout.isTTY) to only open browser in interactive terminals (non-TTY environments won't attempt to open)
  • ✅ Kept the styled verification URL display with cyan color

Implementation Details

The code now follows the same pattern as the dashboard command - it simply calls open() with the URL. The TTY check ensures we don't try to open a browser in CI/CD or other non-interactive environments.

Before: 18 lines with readline prompt
After: 5 lines with auto-open

The UX is now cleaner and more consistent with the rest of the codebase.


View changes |

- Remove readline dependency from auth login flow
- Auto-open verification URL in browser without prompting
- Add TTY check to only open browser in interactive terminals
- Simplify UX by removing unnecessary prompt

Co-authored-by: Kfir Stri <kfirstri@users.noreply.github.com>
@kfirstri kfirstri moved this to Backlog in CLI Development Jan 27, 2026
@kfirstri kfirstri moved this from Backlog to Ready in CLI Development Jan 27, 2026
@kfirstri kfirstri moved this from Ready to Backlog in CLI Development Jan 29, 2026
@kfirstri kfirstri moved this from Backlog to Ready in CLI Development Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready

Development

Successfully merging this pull request may close these issues.

4 participants