Repository navigation
fix(cli): shorten remote-control URLs on a character boundary - #293
Merged
Merged
Conversation
Both the /remote-control command output and the "Remote control active" notification cut the session URL at byte 60 with a plain slice, which panics when a multi-byte character straddles that byte. Step back to the nearest character boundary in both places; the CLI notification text moves into a private helper so it can be tested. The 60-byte budget and the ellipsis are unchanged. Surface unit 102 (manifest entry 100). Coven-Harness: Claude Code / claude-opus-5-5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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.
Summary
Remote-control session URLs containing multi-byte characters no longer crash the CLI. Both the
/remote-controlcommand output and the "Remote control active" notification cut the URL at byte 60 with a plain slice, which panics inside a multi-byte character.Context
surface-remote-url-utf8(fix/remote-url-utf8).crates/commands/src/lib.rs, plus the newcrates/commands/tests/remote_url.rs;crates/cli/src/main.rs, a privateremote_connection_notificationhelper wired into the bridge-connected handler, plus its tests.Changes
…suffix are unchanged.remote_connection_notification, used at the same call site.take_remote_promptand its queue tests at the same place in the file. The helper is added aftertake_remote_promptand the four tests at the top of the test module. All existing tests are kept, and the file isrustfmt-clean.Validation
é(bytes 59..61). The extracted CLI helper reproduced the same failure before the fix.cargo test --locked -p claurst --bin coven-code remote_notification: 4 passed (2-, 3- and 4-byte boundaries, plus ASCII, exact and short controls).cargo test --locked -p claurst-commands --test remote_url: passed (six cases, the full context URL left unchanged).cargo fmt --all -- --check,cargo check --workspace --locked,cargo clippy --workspace --all-targets --locked -- -D warnings: pass.git diff --check: clean.cargo test --workspaceon this branch: hosted CI.PR Readiness