Skip to content

feat: auto open the browser after web listen the port#42

Merged
cnjack merged 1 commit intomainfrom
feat/auto-open-browser
Apr 25, 2026
Merged

feat: auto open the browser after web listen the port#42
cnjack merged 1 commit intomainfrom
feat/auto-open-browser

Conversation

@cnjack
Copy link
Copy Markdown
Owner

@cnjack cnjack commented Apr 25, 2026

Summary by CodeRabbit

  • New Features
    • Added --open flag to automatically launch your default web browser when the server starts (enabled by default for convenient access to the web interface).

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a6e6d9fc-bf7c-4c81-bf31-2185c0d74389

📥 Commits

Reviewing files that changed from the base of the PR and between a2e666e and 0fa80ed.

📒 Files selected for processing (2)
  • internal/command/web.go
  • internal/web/server.go

📝 Walkthrough

Walkthrough

The pull request adds a new CLI option --open (default true) to the web command that controls whether a browser is automatically opened when the web server starts. The flag is threaded through the command handler into the server configuration, enabling asynchronous browser launch functionality.

Changes

Cohort / File(s) Summary
Browser Auto-Open Feature
internal/command/web.go, internal/web/server.go
Adds --open CLI flag and threads value through to ServerConfig.OpenBrowser. Server startup now explicitly binds TCP listener and triggers async browser launch via new openBrowser helper function when enabled.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A flag named --open, so helpful and bright,
Makes browsers pop open at startup's first light,
The listener binds and the URL takes flight,
While servers serve safely throughout the night! 🌐

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/auto-open-browser

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cnjack cnjack merged commit 4053590 into main Apr 25, 2026
1 check was pending
@cnjack cnjack deleted the feat/auto-open-browser branch April 25, 2026 05:00
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.

1 participant