Metadata
| Status | done |
|---|---|
| Assigned | agent-1134 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-29T17:01:47.444579507+00:00 |
| Started | 2026-04-29T17:02:12.003062521+00:00 |
| Completed | 2026-04-29T17:28:20.374497956+00:00 |
| Tags | bug,tui,ux,input, eval-scheduled |
| Eval score | 0.77 |
| └ blocking impact | 0.80 |
| └ completeness | 0.70 |
| └ constraint fidelity | 0.85 |
| └ coordination overhead | 0.85 |
| └ correctness | 0.75 |
| └ downstream usability | 0.75 |
| └ efficiency | 0.85 |
| └ intent fidelity | 0.64 |
| └ style adherence | 0.80 |
Description
Description
User report 2026-04-29: in the wg TUI codex chat tab, touch scroll (trackpad gesture) successfully scrolls the chat scrollback. Mouse wheel does NOT — the same logical scroll action produces no effect.
User quote: 'touch scrolled codex. but not mouse wheel!'
This proves:
- The codex scrollback IS scrollable (good news — fix-pass-no's --no-alt-screen really did give us scrollback content)
- The scroll handler exists and works for at least one input event type
- The mouse wheel events specifically aren't being captured or aren't propagating to the chat tab's scroll path
Likely cause
Mouse wheel and touch scroll generate different event types in the terminal-input layer:
- Touch scroll (gesture / pixel-precise) often translates to PgUp/PgDn-style key codes OR pixel-level scroll events
- Mouse wheel produces discrete
MouseEventKind::ScrollUp/ScrollDownevents (crossterm types)
The chat tab probably handles one type but not the other. Most likely the mouse-wheel events are either:
- Not being captured by the TUI's mouse-event subscriber
- Captured but routed to the parent task list / viz pane instead of the active chat tab
- Captured + routed but the chat tab's handler doesn't include MouseEventKind::ScrollUp/Down arms
Investigation
- Find the TUI's main input dispatch — search for
MouseEventKindorEvent::Mousehandling - Confirm the chat tab is registered to receive these events when active
- Check whether the chat tab's handler delegates to the same scroll function that touch scroll triggers — if not, wire it up
Validation
- Failing test or repro: open codex chat with multi-screen scrollback, mouse wheel up. Pre-fix: nothing happens. Post-fix: scrollback scrolls.
- Both directions work — wheel up scrolls back, wheel down scrolls forward
- No regression: touch scroll still works
- Test the same fix on claude chat tab (likely same code path)
- Same on nex chat tab if the in-process handler also uses chat tabs
- Other panes (task list, viz, log) still receive their wheel events for THEIR scrolling — wheel events don't get monopolized by the chat tab
- cargo build + cargo test pass
- cargo install --path . was run before claiming done
Depends on
Required by
- (none)
Log
- 2026-04-29T17:01:47.435209785+00:00 Task paused
- 2026-04-29T17:01:47.475492017+00:00 Task published
- 2026-04-29T17:02:10.304772023+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer is best fit: TUI input bug requires careful event routing and no-regression guarantees; proven track record (0.77 score on 314 tasks) on similar implementation work.
- 2026-04-29T17:02:12.003065657+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-29T17:02:21.873446089+00:00 Starting investigation: searching for mouse wheel and scroll handling in TUI
- 2026-04-29T17:07:08.258953385+00:00 Will write test for wheel scroll on chat tab to verify if existing handler works
- 2026-04-29T17:19:04.432645436+00:00 Hypothesis: in vendor PTY mode, wheel events scroll wg's vt100 buffer (mostly empty due to codex repaints / fix-codex-chat-3 trimming), but user expects the embedded codex chat to scroll. Touch scroll works because it sends key events forwarded to codex. Fix: forward wheel events as arrow keys to the embedded PTY when in vendor PTY focus mode.
- 2026-04-29T17:27:16.027120269+00:00 Implementation: refactored chat-tab wheel handler into forward_chat_wheel(). In vendor-PTY focus mode (chat_pty_forwards_stdin + RightPanel focus + !observer), wheel forwards 3x Up/Down arrow key presses to the embedded child via pane.send_key. Outside vendor-PTY mode (observer or stdin-detached), still navigates vt100 scrollback via pane.scroll_up/down. Added two tests: vendor-PTY mode forwards keys (verified via send_key's auto_follow=true side-effect resetting scrollback), observer mode scrolls vt100.
- 2026-04-29T17:27:18.157852545+00:00 Validated: cargo build OK, 3213 bin tests pass (one pre-existing lib test failure unrelated to wheel: config::tests::test_global_config_path expecting .workgraph/config.toml). cargo install --path . succeeded — global wg binary updated.
- 2026-04-29T17:27:58.778420986+00:00 Committed: 8439303de — pushed to remote
- 2026-04-29T17:28:20.374504849+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-29T17:30:09.102077335+00:00 PendingEval → Done (evaluator passed; downstream unblocks)