Fix CLI terminal interactions and transcript hierarchy / 修复 CLI 终端交互与消息层级#6632
Merged
Merged
Conversation
Problem: - Captured mouse mode could copy selections but could not right-click paste clipboard text. - Composer drag selections were visible but did not reliably reach the system clipboard. - Non-Git workspaces reserved or misaligned an empty footer data band. - Assistant answers lacked a distinct identity and spacing from reasoning and turn receipts. Root cause: - Mouse handling had no text-only clipboard read path, composer selection release stopped at local state, and footer/transcript rendering assumed fixed visual bands. Fix: - Route right-click clipboard text through the canonical paste event and auto-copy composer drag selections. - Make optional footer telemetry compact and left-aligned outside Git repositories. - Render assistant markdown with a Reasonix identity, stable indentation, replay support, and semantic spacing. - Document the interaction changes and add focused regression coverage. Verification: - go test ./internal/cli - go test ./... - git diff --check
Problem: Captured right-click paste attempted to read the remote host clipboard during SSH sessions and the documentation implied it could access the user's local clipboard. Root cause: The right-click path called the native clipboard reader without applying the remote-session boundary already used by clipboard copy. Fix: Detect SSH sessions before reading clipboard text, preserve the composer, show a localized terminal-paste hint, and document local versus remote behavior. Verification: go test ./internal/cli; go test ./...; go vet ./...; git diff --check.
Problem: Four local clipboard interaction tests inherited SSH environment variables and failed when the suite ran on a remote development host. Root cause: The tests stubbed native clipboard operations without explicitly selecting a local clipboard session. Fix: Add a shared test helper that clears all supported SSH markers and use it in each local paste and drag-copy case. Verification: Normal and simulated-SSH go test ./internal/cli -count=1; go test ./...; go vet ./...; git diff --check.
SivanCola
marked this pull request as ready for review
July 18, 2026 05:10
SivanCola
enabled auto-merge (squash)
July 18, 2026 05:11
SivanCola
added a commit
that referenced
this pull request
Jul 19, 2026
Problem: - The contributor behind #6560 helped identify and solve the CLI clipboard compatibility gap, but the integrated #6632 commit did not record that co-contribution. Root cause: - The final implementation was merged independently without a contributor trailer or a permanent acknowledgment next to the shipped fix. Fix: - Credit Andrei Kiparuk in the changelog and bilingual README acknowledgments. - Add a public Co-authored-by trailer so GitHub records the contribution after merge. Verification: - git diff --check - ./scripts/check-cache-impact.sh Co-authored-by: Andrei Kiparuk <88461327+andrei-kiparuk@users.noreply.github.com>
This was referenced Jul 19, 2026
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
Root cause
Captured-mouse handling only implemented selection copy, composer selection release stopped at local selection state, and the footer/transcript renderers assumed fixed visual bands without accounting for non-Git or short-answer layouts.
User impact
In local sessions, CLI users can paste with right-click again when mouse capture is enabled and copy text selected inside the composer. Over SSH, Reasonix now avoids reading the remote host clipboard and points users to the terminal paste shortcut or
/mouse. Non-Git workspaces receive a cleaner transcript and footer.Compatibility
Related open PRs
Verification
go test ./internal/cligo test ./...go vet ./...git diff --check