Repository navigation
Conversation
`dashboard start` now waits for the server to bind before it reports success, and prints the port it actually bound. This lets `--port 0` pick a free port, and makes start fail instead of claiming success when the port is taken. Co-authored-by: usesprocket[bot] <306702232+usesprocket[bot]@users.noreply.github.com>
Co-authored-by: usesprocket[bot] <306702232+usesprocket[bot]@users.noreply.github.com>
Contributor
|
@Amronos is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Problem
A script or tool that starts the dashboard needs to know which port it listens on and when it is ready. Today neither is reported:
dashboard start --port 0is rejected, so a caller has to pick a free port itself and pass it in. Another process can take that port before the dashboard binds it.dashboard startprints success and the requested port right after it spawns the background server, before the server binds. If the port is taken, the command still reportsDashboard startedand exits 0, and the caller only finds out by polling the URL.Changes
dashboard startwaits for that line before it writesdashboard.pidanddashboard.configand reports success.--port 0is accepted. The OS picks a free port anddashboard startreports the bound port, asdata.portwith--json.dashboard.configstores the bound port.dashboard startfails withFailed to start dashboard: the dashboard server exited before it started listeningand cleans up its state files.dashboard start --port 0reuses a running dashboard on any port when the allowed origins match, and reports the running dashboard's port.agent_browser_dashboard_startacceptsport: 0.--help, the docs, and the core skill reference describe--port 0and the reported port.Tests
cli/tests/dashboard_cli.rs: a new test starts with--port 0, connects to the reported port without retrying, gets200 OKfrom/api/sessions, then checks that a second--port 0start reportsalready_runningwith the same port.--port 65536replaces--port 0as the invalid case.pnpm --filter docs test,type-check,buildandtest:routespass locally, with adocs-edits.jsonentry for the changed sentence on/commands.session_settingsunit tests that also fail onmain, so it stops before the integration tests.Written by Opus 5.5 (opus-5.5) through Sprocket.