t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Right-clicking chat text on macOS desktop lights up other sidebar thread rows

Open 3xcalibur-tech opened this issue 1 month ago • 1 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Open the macOS desktop app (Nightly) with several threads in the sidebar's Working section.
  2. Open one of those threads.
  3. Right-click message text in the chat timeline, not the composer. The native Cut / Copy / Paste / Select All menu opens.

Expected behavior

Only the context menu opens. The sidebar stays as it was: the open thread is highlighted and no other row is.

Actual behavior

When the menu opens, other thread rows in the left sidebar light up as if selected. In my capture, a Working row far from the pointer is in its hover state: highlighted background, Snooze and Settle buttons visible, and its thread hover card open beside the sidebar. At that moment the pointer is on the context menu in the middle of the chat.

Impact

Minor bug or occasional failure

Version or commit

0.1.4-nightly.20261027.3770 (7c3b3b3605)

Environment

macOS 27.0.1 (26A434), Apple M3 Max, T3 Code Nightly desktop app, Electron 44.9.3

Logs or stack traces

I could not reproduce this in the web client on current main (319c572c96) with a synthetic right-click in the chat. The events (pointerdown, mousedown, contextmenu, pointerup, mouseup, button 2) reach only the chat paragraph. Afterwards no sidebar row matches :hover or :focus-within, and none has the selected background. That points at the desktop path, where a right-click opens the native Electron menu from the context-menu handler in apps/desktop/src/window/DesktopWindow.ts instead of the browser's menu.

Screenshots, recordings, or supporting files

I have a screenshot, but it shows private thread titles, so I have not attached it.

Workaround

None known.


Filed with Claude Code on behalf of the reporter.

3xcalibur-tech avatar Oct 27 '26 12:10 3xcalibur-tech

Reproduced on a desktop dev build from current main (319c572c96, Electron 44.9.3, macOS 27.0.1), with a page-side recorder logging every pointer event.

After a right-click opens the native context menu, the page gets a trusted pointerover + mousemove 1 to 5 ms later, with buttons: 2, at a point the real pointer never visits. This happened on 10 of the 11 right-clicks in the session. Excerpt, titles redacted. The window was at screen x=314, y=105, size 1100×780, on a 1728×1117 screen.

t(ms)  event        clientX,Y  buttons  target
57263  contextmenu  661,428    2        chat text
57275  mousemove    347,660    2        composer
57735  contextmenu  642,431    2        chat text
57736  mousemove    328,663    2        composer
59677  contextmenu  568,476    2        chat text
59678  mousemove    254,708    2        sidebar resize handle
61359  contextmenu  549,438    2        chat text
61360  mousemove    235,670    2        sidebar
61810  contextmenu  553,399    2        chat text
61814  pointerover  239,631    2        sidebar thread row
61976  that row's thread hover card opens

The extra event always lands at (clickX − 314, clickY + 232). 314 is the window's left edge on screen, and 232 is the gap between the window's bottom edge and the bottom of the screen (1117 − 105 − 780). The window's screen origin seems to get subtracted a second time, in Cocoa's bottom-left coordinates, when the move is sent while the menu opens.

Whatever is under that point gets real hover. When it is a sidebar row, the row shows its Snooze and Settle buttons and opens its thread hover card, which matches the original report.

The offset depends on where the window sits, which is why this looks intermittent. A window against the screen's left and bottom edges shifts the point little or not at all. A window further right and higher sends it into the sidebar, but only for clicks whose shifted point lands on a row.

Deterministic repro: place the window away from the screen's left and bottom edges, then right-click chat text that sits (window left edge) points right of a sidebar row and (gap below the window) points above it.

The wrong coordinates look like they come from Electron/Chromium's macOS context-menu handling rather than from T3 code. The web client never gets this event, because no native menu is involved there.

3xcalibur-tech avatar Oct 27 '26 13:10 3xcalibur-tech