fix(cli): include credentials in console URLs printed for headless users - #12333
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The previously suggested changeset ( Files Reviewed (2 files)
Previous Review Summary (commit 1c0eaa5)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 1c0eaa5)Status: 1 Issue Found | Recommendation: Merge (non-blocking) Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (1 file)
The rename of Reviewed by claude-sonnet-5 · Input: 22 · Output: 2.3K · Cached: 564.9K Review guidance: REVIEW.md from base branch |
The headless path printed `${urls.local}/console` and `${urls.network}/console` without basic-auth credentials, leaving remote or display-less users unable to reach the console.
Rename `browserUrl` to `withCredentials(base, state)` so credentials are embedded into any base URL, and use it for both the printed Local/Network URLs and the in-process browser launch (which previously used `state.url` directly and now matches what the user would see if they copy/pasted the Local URL from the terminal).
1c0eaa5 to
0f57b27
Compare
marius-kilocode
left a comment
There was a problem hiding this comment.
LGTM. Verified the daemon password is a randomUUID rotated on every start and already lives in the local state file, so printing the credentialed URL adds no new exposure beyond the terminal output itself. Headless flow is genuinely broken without this.
|
Merged, thanks @IamCoder18! Nice catch on the headless flow, and thanks for the clean fix. |
…ers (Kilo-Org#12333) The headless path printed `${urls.local}/console` and `${urls.network}/console` without basic-auth credentials, leaving remote or display-less users unable to reach the console. Rename `browserUrl` to `withCredentials(base, state)` so credentials are embedded into any base URL, and use it for both the printed Local/Network URLs and the in-process browser launch (which previously used `state.url` directly and now matches what the user would see if they copy/pasted the Local URL from the terminal).
Issue
Closes #12332
Context
Running
kilo consoleon a headless host (Linux withoutDISPLAY/WAYLAND_DISPLAY, SSH sessions, CI runners) does not launch a browser. The command instead prints the Local and Network Console URLs and tells the user to open one manually. Those printed URLs were missing basic-auth credentials, leaving headless users with no way to authenticate into the Console.Credentials were only embedded into the URL used by the in-process
open()call, which is unreachable without a display.Implementation
browserUrl(state)towithCredentials(base, state)so any base URL can be augmented withstate.username/state.password. Behavior is identical (new URL("/console", base)withurl.username/url.passwordset); the rename is what unlocks reuse.withCredentialsto both printed URLs (consoleLocal,consoleNetwork) so headless users can copy/paste an authenticated URL into a browser on another machine.hasDisplay()branch'sopen()call frombrowserUrl(state)towithCredentials(urls.local, state), so the URL it launches is the same one a headless user would copy from the terminal.Screenshots / Video
How to Test
Manual/local verification
kilo consoleChecklist
Get in Touch
Discord: @IamCoder18