fix(remote-control): carry server token in rc local UI link - #3696
Merged
sailist merged 3 commits intoSep 10, 2026
Conversation
- add required localServerToken to RemoteControlOutputOptions - render the Local UI line with buildOpenableUrl and dim the #token= fragment like the ready banner - pass the resolved token at both rc call sites (kimi web --rc, TUI /rc)
🦋 Changeset detectedLatest commit: 2d89e05 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
… link - assert the Local UI line carries the #token= fragment - scope the token-free ban to the relay and session URLs, which must never leak the local server token
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.
Related Issue
None — reported directly by an internal user; the problem is explained below.
Problem
In remote-control mode (
kimi web --rcand the TUI/rccommand), theLocal UI:line printed to the terminal shows the bare localhost origin without the#token=fragment. In non-rc mode (kimi web/ TUI/web) the opened URL carries#token=, so the web UI authenticates automatically on load. With rc running, clicking the Local UI link instead hits the server-auth login dialog even though the terminal just printed a token-authenticated relay URL.What changed
RemoteControlOutputOptionsgains a requiredlocalServerToken; theLocal UI:line is now built withbuildOpenableUrl(localOrigin, token)so it carries#token=, and the fragment is rendered dim (base in accent) viasplitTokenFragment, matching the ready banner's access-link styling.kimi web --rc(cli/sub/web/run.ts) and TUI/rc(tui/commands/web.ts).formatRemoteControlOutputtests updated to cover the token fragment; no new test cases added.Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.