-
Notifications
You must be signed in to change notification settings - Fork 22
Add 'y' hotkey to copy review content to clipboard #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+731
−73
Conversation
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
- Press 'y' in review view to copy review output - Press 'y' in queue view on completed/failed jobs to fetch and copy - Shows "Copied to clipboard" flash message on success - Uses golang.design/x/clipboard for cross-platform support - ClipboardWriter interface allows mocking for CI tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Switch to atotto/clipboard for CGO-free builds, add tests - Replace golang.design/x/clipboard with atotto/clipboard (uses pbcopy/xclip/clip, no CGO required) - Simplify realClipboard implementation (no init needed) - Add httptest tests for fetchReviewAndCopy: - Success case with mock server - 404 error handling - Empty output error handling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Add tests for clipboard write failure propagation - TestTUIClipboardWriteFailurePropagates: verifies errors from clipboard.WriteAll propagate through copyToClipboard - TestTUIFetchReviewAndCopyClipboardFailure: verifies clipboard failures after successful fetch are reported correctly These cover the case when clipboard tools (pbcopy/xclip/clip) are missing or fail. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Add macOS and Windows CI jobs for cross-platform testing - Convert test job to matrix strategy across ubuntu/macos/windows - Add CGO_ENABLED=0 build step to verify release build compatibility - Move coverage upload to separate job (Ubuntu only) This ensures clipboard functionality (and all other code) is tested on all supported platforms and doesn't regress. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Skip race detector on Windows CI (not supported) Run plain `go test` on Windows since -race flag requires CGO which isn't available on windows-latest runners. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Fix flash message causing content shift in review view Reserve a line for the flash message area in review view so content doesn't shift when "Copied to clipboard" appears. The flash message line is always present (blank when no message), preventing jarring layout changes. Updated visible lines calculation and test expectations to account for the new reserved line. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Only show flash message in view where it was triggered Track which view the flash message was triggered in and only display it in that same view. Prevents confusing "Copied to clipboard" message appearing when navigating from queue to review view after copying. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Fix flash message causing layout issues in TUI views Instead of reserving a dedicated line for the flash message, share the status line with other notifications: - Queue view: flash takes priority over update notification - Review view: flash takes priority over scroll indicator This fixes the title being pushed off screen and extra blank lines appearing between the scroll indicator and help bar. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Path separator fixes: - GetRepoRoot: use filepath.FromSlash on git output (MSYS paths) - sanitizeTarPath: make destDir absolute before path comparison Test fixes: - Use t.TempDir() instead of hardcoded Unix paths like /test/repo - Skip shell script tests on Windows (agent tests) - Make Windows absolute path test conditional on runtime.GOOS Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Flash view attribution: - Capture view at trigger time in tuiClipboardResultMsg - Use captured view instead of current view when setting flashView - Add test for view-change scenario between trigger and result MSYS path handling: - Add normalizeMSYSPath helper to convert /c/... to C:\... - Use in GetRepoRoot for proper Windows path handling - Add comprehensive tests for path normalization Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix setupMockDaemon to use ROBOREV_DATA_DIR instead of HOME (on Windows, os.UserHomeDir() uses USERPROFILE, not HOME) - Create Windows batch file stubs for codex in tests that need an executable command in PATH - Skip TestDaemonRunStartsAndShutdownsCleanly on Windows due to SQLite file locking differences Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The test case for "/etc/passwd" expects it to be rejected as an absolute path, but on Windows this is treated as a relative path since Windows uses drive letters (C:\) for absolute paths. The Windows-specific absolute path test (C:\Windows\System32) already covers the Windows case. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
yin review view or queue view to copy review content to clipboardatotto/clipboard(no CGO required)Changes
CI Improvements
Test plan
🤖 Generated with Claude Code