Use native clipboard for terminal copy and paste#724
Conversation
34886ec to
91d3a70
Compare
…rynta#724) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The copy-paste functionality of this is crucial. Any chance it'll land in the next release? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds the ChangesTerminal Clipboard via Tauri Plugin
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/modules/terminal/lib/rendererPool.ts`:
- Around line 289-292: The asynchronous readTerminalClipboard call in the
keydown event handler can resolve after the renderer slot has been rebound to a
different terminal session due to pooling and tab switching. Capture a reference
to the current slot or leaf before initiating the readTerminalClipboard promise,
then in the promise resolution handler (the then callback where slot.term.paste
is called) verify that the same leaf is still bound to the slot. Only proceed
with the paste operation if the leaf binding has not changed, otherwise the text
will be pasted into the wrong terminal session.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ae6c7215-f0dc-4ff0-b0b7-1b48aab22c28
⛔ Files ignored due to path filters (2)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!**/pnpm-lock.yamlsrc-tauri/Cargo.lockis excluded by!**/*.lock,!**/*.lock,!src-tauri/Cargo.lock
📒 Files selected for processing (7)
package.jsonsrc-tauri/Cargo.tomlsrc-tauri/capabilities/default.jsonsrc-tauri/src/lib.rssrc/modules/terminal/lib/rendererPool.tssrc/modules/terminal/lib/terminalClipboard.test.tssrc/modules/terminal/lib/terminalClipboard.ts
Fixes #713.
Summary
Validation
Summary by CodeRabbit