Repository navigation
Conversation
Applications that enable mouse tracking (herdr, tmux, btop, ...) draw their own context menu on right-click, but Wave's menu opened on top of it, so the app's menu was unreachable. Add `term:rightclickmenu` (auto | wave | app, default auto). In auto mode the right-click is left to the app while the terminal reports a mouse tracking mode other than none; otherwise Wave keeps its menu. The event is always prevented and stopped, so Chromium's text menu still cannot appear over the terminal. Unit tests cover the auto/wave/app resolution in termutil.test.
|
No actionable comments were generated in the recent review. WalkthroughThe changes add the Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk:
|
Problem
Full-screen terminal apps that enable mouse tracking (herdr, tmux, btop, lazygit, …) draw their own context menu on right-click, but Wave's terminal context menu opens on top of it. The app's menu is there — it is just covered, so it is unreachable with the mouse.
Fix
Add a
term:rightclickmenusetting with three modes:auto(default)none, otherwise show Wave's menuwaveappterm:rightclickmenucan be set globally or per block (block metadata wins).The contextmenu handler still always calls
preventDefault()/stopPropagation(), so Chromium's text menu never appears over the terminal — the only thing that changes is whether Wave's own menu is shown.Default value
autochanges existing behaviour for users who run a mouse-tracking TUI (they stop getting Wave's menu on right-click). That seemed like the right default — the alternative is a user-visible regression for exactly the people this is meant to help — butwaveis a one-line change if you would rather keep today's behaviour and make the new mode opt-in.Files
frontend/app/view/term/termutil.ts—shouldShowWaveContextMenu(setting, mouseTrackingMode)frontend/app/view/term/term.tsx— resolve the setting and consultterminal.modes.mouseTrackingModepkg/wconfig/metaconsts.go,pkg/wconfig/settingsconfig.go,schema/settings.json,frontend/types/gotypes.d.ts— the setting keyfrontend/app/view/term/termutil-rightclick.test.ts— 4 tests covering auto/wave/app and unknown valuesTesting
Verified manually with herdr (
ui.mouse_capture): inautothe TUI menu opens, inwaveWave's menu opens.