Skip to content

feat(cli): optionally open the browser when veadk frontend is ready#655

Open
yaozheng-fang wants to merge 1 commit into
mainfrom
feat/frontend-auto-open-browser
Open

feat(cli): optionally open the browser when veadk frontend is ready#655
yaozheng-fang wants to merge 1 commit into
mainfrom
feat/frontend-auto-open-browser

Conversation

@yaozheng-fang

Copy link
Copy Markdown
Collaborator

What

Adds a --open/--no-open flag to veadk frontend. With --open, once the server's port starts accepting connections, the served UI (http://<host>:<port>) is opened in the default browser.

Details

  • Default off (--no-open) — most deployments are server-hosted with no local browser; pass --open for local use.
  • Ignored with --dev — there the Vite dev server serves the UI on its own port.
  • Waits for the port to accept connections before opening (so the tab lands on a ready server, not a connection error), with a timeout.
  • Runs on a daemon thread; any failure is logged and never blocks serving. For a bind-all host (0.0.0.0), opens 127.0.0.1.

Validation

  • veadk frontend --help lists --open / --no-open (default off).
  • Helper opens the URL once a listening socket is up; with nothing listening it times out and does not open (logged).

🤖 Generated with Claude Code

Add a --open/--no-open flag (default off): with --open, once the server's port
accepts connections, open the served UI (http://<host>:<port>) in the default
browser. Off by default since most deployments are server-hosted without a
local browser; ignored with --dev (the Vite dev server serves the UI). Browser
opening runs on a daemon thread and never blocks serving.
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