Repository navigation
[Bug]: Left click becomes right-click; sidebar threads unclickable until Ctrl+Escape #11066
Description
Activity
Triage
Confirmed as a real desktop bug, not a duplicate of the closed sidebar-menu tickets.
What this report is
On Pop!_OS 24.04 COSMIC / Wayland (AppImage v0.0.40), left click sometimes starts opening context menus (or otherwise behaving as a right click). Sidebar threads stop selecting. Escape / clicking around / restarting the app is unreliable. Ctrl+Escape consistently restores normal left-click behavior.
That stuck state is distinct from:
- [Bug]: Right Click / Context Menu on Projects & Sessions #2053 / [Bug]: RIght-click behaviour on projects and threads is inconsistent. #2535 — menu opens in the wrong place or fires an inconsistent action
- Right-click menu anywhere instantly selects first option #285 / [Bug]: Sidebar context menu auto-selects a random item on right-click (regression of #285) #3698 — menu item activates immediately on open
Those are the same menu surface, different failure modes. This issue is the leftover “right-click mode” after the menu is gone.
Likely cause
The desktop app always uses native Electron
Menu.popup()whendesktopBridgeis present (apps/web/src/localApi.ts→apps/desktop/src/electron/ElectronMenu.ts). There is no Linux/Wayland special case.contextMenu.close()is a no-op on desktop, and the native path never callsmenu.closePopup().The web DOM fallback (
apps/web/src/contextMenuFallback.ts) is not used by this AppImage. Leftover renderer listeners are a poor fit: they would not survive a full process restart, and leftover sidebar drag listeners would block clicks rather than turn left click into right-click.This lines up with a COSMIC/Wayland pointer grab left behind by Electron’s native GTK popup. COSMIC’s compositor
Escapepath unsets pointer/keyboard grabs. Ctrl+Escape is not a T3 shortcut; Escape can be swallowed by a still-grabbing (possibly invisible) native menu, which would explain why Ctrl+Escape is the reliable reset.Related but unmerged: #6440 would have routed Linux through the themed renderer fallback and avoided native GTK popups. #3025 only hardened the web fallback.
Also adjacent upstream: Electron Wayland mouse-state leftovers after right-click (electron#48656 / electron#48752).
Next step
Keep this open. Investigate native
Menu.popup()grab lifetime on COSMIC/Wayland. Practical T3 mitigations:- Use the renderer fallback on Linux (especially Wayland), as fix(web): theme context menus on Windows and Linux #6440 proposed.
- Track the live
Menuand callclosePopup(); make desktopcontextMenu.close()actually dismiss it.
Helpful checks (if easy)
- Does the stuck state always start after a sidebar right-click (even a “successful” one)?
- Does
ELECTRON_OZONE_PLATFORM_HINT=x11(or an X11 session) avoid it? - Do other Electron apps on this COSMIC session get the same leftover right-click mode?
- After it sticks, do left clicks open context menus outside T3 Code as well, or only inside the app?
Workaround: Ctrl+Escape, as reported.
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.via-triageFiled through npx t3 triageFiled through npx t3 triage
on Sep 10, 2026
Before submitting
Area
apps/desktop
Steps to reproduce
I do not have a deterministic first trigger. It happens often during normal use of the desktop app, especially around the left sidebar (projects / threads). After it starts, every left click behaves like a right click.
Related tickets I found (same menu, different symptom, all closed): #2053, #2535, #285, #3698. Those describe a misplaced menu or an item firing on open. This report is the stuck state that follows: left click stays in right-click mode and the thread list stops accepting selection.
Expected behavior
A left click selects the thread or UI control under the cursor. A right click opens the context menu. After the menu closes, left click works again.
Actual behavior
Left click starts opening context menus (or otherwise acting as a right click). Threads in the left sidebar cannot be selected. Escape or clicking around sometimes clears it. Closing T3 Code often does not. Ctrl+Escape consistently restores normal left-click behavior.
That looks like a leftover context-menu listener or compositor pointer grab. Ctrl+Escape may just force a focus change that drops the grab; I am not claiming it is an intentional T3 shortcut.
Impact
Major degradation or frequent failure
Version or commit
v0.0.40 (Linux AppImage
T3-Code-0.0.40-x86_64.AppImage)Environment
Pop!_OS 24.04 LTS, COSMIC desktop, Wayland, T3 Code desktop AppImage v0.0.40
Workaround
Ctrl+Escape resets the stuck state and left click works again. Escape alone or clicking around only helps sometimes. Restarting the app is unreliable.
Created with AI · Commissioned by Karsten.