Windows: main-screen mouse tracking requires WT_SESSION, so it never enables inside herdr panes
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 66/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli
Research direction
The mouse gate is in applyMouseTracking in packages/tui/src/tui-main-screen.ts, where the win32 check tests only WT_SESSION. Read that function, then reproduce by calling it with process.stdout.isTTY true, a recording terminal.write, and HERDR_ENV=1 on win32. Done means HERDR_ENV=1 enables mouse tracking while a plain console stays excluded. The reporter has not confirmed that herdr forwards mouse reports, so check that with a maintainer before opening a PR.
Written by the indexing model from the issue text.
Description
What happened?
On Windows, TuiMainScreen.applyMouseTracking (packages/tui/src/tui-main-screen.ts) counts a terminal as mouse-capable only when WT_SESSION is set:
(process.platform !== "win32" || Boolean(process.env.WT_SESSION))
A herdr pane on Windows is not Windows Terminal and does not set WT_SESSION, so inside it the mouse-enable sequence is never written, even with terminal.mouse: "always". The clickable pending-question blocks from #1645 therefore have no mouse input there. Senpi already recognises herdr panes by HERDR_ENV === "1" (builtin herdr extension, index.ts).
Steps to reproduce
Calling applyMouseTracking(true) on a TuiMainScreen with process.stdout.isTTY true and a recording terminal.write, against the shipped @code-yeongyu/senpi-tui 2026.10.13 dist on win32:
HERDR_ENV=1: mouse enabled=false
WT_SESSION=x: mouse enabled=true
neither: mouse enabled=false
The gate is unchanged on main (b8c1d3a84). I have not clicked in a live herdr pane with tracking forced on, so I cannot confirm yet that herdr 0.9.3 on Windows forwards SGR mouse reports to the pane. If it does not, this is a herdr limitation and can be closed.
Expected behavior
A herdr pane on Windows enables mouse tracking like Windows Terminal, and a plain console stays excluded:
- (process.platform !== "win32" || Boolean(process.env.WT_SESSION));
+ (process.platform !== "win32" || Boolean(process.env.WT_SESSION) || process.env.HERDR_ENV === "1");
With that change the check above prints HERDR_ENV=1: mouse enabled=true; the other two lines are unchanged. An alternative is to let an explicit terminal.mouse: "always" bypass the win32 host gate, which needs the mode passed into the TUI. I can send either as a PR after a Contribution Proposal if you want one.
Version
2026.10.13 (@code-yeongyu/senpi-tui), Windows 11, herdr 0.9.3, Bun 1.4.3.
Disclosure: drafted with an AI coding agent from my own session logs; I ran the offline check quoted above.
- Dominant language
- TypeScript
- Stars
- 479
- Forks
- 139
- Avg merge
- 7h 37m
- Merged PRs (30d)
- 792
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from code-yeongyu/senpi
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
code-yeongyu/senpi#3475 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
code-yeongyu/senpi#3406 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
code-yeongyu/senpi#3350 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
code-yeongyu/senpi#3349 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
code-yeongyu/senpi#3348 ·
Maintainers usually reply within 1 day
All issues in code-yeongyu/senpi
Similar issues
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitPossibly taken @myOmikron claimed this today. Openbug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
platform:windows tool triaged wontfix
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
nicolettas-muggelbude/RechnungsFee#448 ·
Maintainers usually reply within 1 day
-
Android bug feature/error-tracking react-native team/error-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PostHog/posthog-js#5310 · 1 comment ·
Maintainers usually reply within 1 day