Terminal UX fixes: preview panel, right-click menu, native image paste - #8
Merged
Merged
Conversation
…se z-index; feed Ctrl+V through for claude's native image paste Escape and outside-click now share one closeFilePreview() path that also clears previewPath/previewText/DOM so a stale file never lingers behind the next open. File links only activate on a real pointer click (event .detail === 0 marks a keyboard-synthesized click), and the panel now sits above every other overlay so its close button can't be covered. `claude` gets the raw Ctrl+V keystroke instead of AFKode's own clipboard-image substitution, since Claude Code already reads the OS clipboard itself on that keystroke.
Replaces the old copy-or-paste right-click with a real menu (Copy, Paste, Copy Command Output, Select All, Find, Scroll to Bottom, Clear Screen, Stop Process, Show in File Explorer when the click lands on a detected path, New Tab, Close Tab) — right-click no longer silently pastes the clipboard. Verified live against an isolated test build (separate app identifier, CDP + Playwright) rather than just by reading the code: - Shift+Tab / keyboard-synthesized clicks can no longer open the file preview panel (activate() now requires a real pointer click). - Escape now actually closes the preview: xterm.js intercepts Escape internally and stops its propagation before it reaches app-level listeners while the terminal still has focus, so opening the panel now moves focus onto it (matching the existing confirm-dialog pattern). - The close button and outside-click both release preview state immediately (title/body/path), so a stale file from another tab can't linger behind the next open. - The panel's z-index is raised above every other in-page overlay so its close button can never be covered and unclickable. Also: pasting into a Claude Code session now feeds the raw Ctrl+V keystroke through to the pty when the clipboard holds no text, so Claude Code's own native clipboard-image handling runs (shows "[Image #1]") instead of AFKode substituting a temp-file path. Non-Claude CLIs keep the path-substitution fallback. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GHgSVKPsaWRfuJMo1rc2AN
ohernandezdev
force-pushed
the
handoff/macos-terminal-verification
branch
from
July 26, 2026 23:40
8c8dfe1 to
75f464b
Compare
2 tasks
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
[Image #1]), instead of substituting a temp-file path. Non-Claude CLIs keep the path fallback.Verification
All of the above was verified live against an isolated test build (separate Tauri app identifier so
tauri-plugin-single-instancewouldn't collide with the running dev instance), driven via CDP + Playwright — not just read from the code. Root causes confirmed along the way:Test plan
[Image #1], not a pathCo-Authored-By: Claude Sonnet 5 noreply@anthropic.com
https://claude.ai/code/session_01GHgSVKPsaWRfuJMo1rc2AN