Skip to content

0.8.2 local attach: DECRQM answers ?1016 SET but mouse reports stay cell-coordinate (terminal-browser clicks land top-left) #3295

Description

@stephanschubert

Is this a reproducible bug?

  • I confirm this is a reproducible bug, not a feature request, idea, question, contribution proposal, or direction check.
  • I reproduced this bug on the version and environment reported below using the exact steps provided.

Current behavior

Mouse input does not reach terminal-browser running in a Herdr pane on 0.8.2, on a local direct attach (no SSH, no tmux). The page renders correctly and keyboard input works, but no click has any effect.

This is the same symptom as #2673, which was closed on 2026-08-11 as fixed by #2523 ("negotiated exact pixel mouse input") and shipped in 0.8.2. It is not #3074 either: that one is about SSH/tmux clients being denied pixel_mouse, whereas here pixel_mouse is advertised as true.

What I measured:

  1. pane.graphics.info for the browser pane, and for every other pane in the session, reports the same values. pixel_mouse is on:
{"type":"pane_graphics_info","cell_width_px":14,"cell_height_px":27,
 "pane_visible":false,"file_frame_damage":true,"max_layers_per_pane":16,
 "pixel_mouse":true}

cell_height_px: 27 is exact — the pane is 64 rows over 1728 device pixels — so this is not a cell-metrics problem.

  1. Doing what terminal-browser does (enable 1000/1002/1006/1016, then query DECRQM CSI ? 1016 $ p), Herdr answers ?1016;1$y = SET. The reply is also slow: a 1.5s read window missed it and the following query picked it up.

  2. With 1016 enabled and reported SET, the SGR reports that arrive are still cell sized. A small A/B in one clicking session, plain 1006 first and then 1006+1016:

PHASE A (1006 only):  max x=16 y=22  -> cell sized
PHASE B (1006+1016):  max x=14 y=37  -> cell sized

The pane was ~113 columns by 66 rows and about 1554x1728 device pixels. As pixels those coordinates would put both clicks within ~2% of the top-left corner; as cells they land mid-pane, which is where the clicks were.

Consequence for any client that trusts the DECRQM answer: it is told pixel mode is on, receives cell numbers, and maps every click into a tiny patch at the top-left of the page. Clicks are not dropped, they all land in the same wrong place.

Expected behavior

Either of these would be consistent, the current combination is not:

  • If Herdr answers DECRQM ?1016 with SET and advertises pixel_mouse: true, mouse reports forwarded to the pane should carry pixel coordinates.
  • If Herdr forwards cell coordinates, DECRQM ?1016 should answer RESET and pixel_mouse should be false, so the client uses its cell-coordinate fallback (which feat(graphics): add direct pane frame streaming #2523's tests cover).

Reproduction

  1. Herdr 0.8.2, local attach, Ghostty, [experimental] kitty_graphics = true, [ui] mouse_capture at its default.
  2. terminal-browser open --split right https://example.com in a pane (0.6.0).
  3. Click links in the browser pane. Nothing responds; keyboard works.
  4. In any pane, enable mouse tracking including 1016, query printf '\e[?1016$p', and observe the SET reply. Then capture the raw SGR reports and compare their magnitude against the pane's pixel size.

Impact

terminal-browser is unusable with the mouse inside Herdr. This is the same user-visible breakage as #2673, which is closed.

Caveat on evidence: point 3 rests on a small number of clicks (one per phase), because I could only measure through a person clicking. Points 1 and 2 are deterministic and repeatable without any mouse input, and on their own they show DECRQM answering SET.

Environment

  • Herdr: 0.8.2
  • terminal-browser: 0.6.0
  • Host terminal: Ghostty 1.3.2-main-+65744ffe3
  • OS: macOS (Darwin 25.5.0), Apple Silicon
  • Shell: zsh
  • Attach: local, direct (no SSH_CONNECTION, no TMUX)
  • [ui].mouse_capture: default (true)
  • [experimental].kitty_graphics = true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmaintainer-neededrequires maintainer judgment or maintainer-only reproduction

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions