Skip to content

Fix center scroll handling#291

Open
andyrewlee wants to merge 1 commit into
mainfrom
cant-scroll
Open

Fix center scroll handling#291
andyrewlee wants to merge 1 commit into
mainfrom
cant-scroll

Conversation

@andyrewlee

Copy link
Copy Markdown
Owner

Summary

Fix center-pane scrolling for chat/terminal tabs while preserving raw terminal input behavior.

What changed

  • Capture chat redraw history for normal-screen clear/redraw flows, including tmux-translated ESC[H ESC[J synchronized redraws.
  • Forward mouse wheel events to embedded apps that request mouse reporting, using SGR coordinates when enabled.
  • Add prefix-based center scroll controls: C-Space u scrolls up and C-Space d scrolls down when a center terminal is focused.
  • Keep raw Ctrl+U and Ctrl+D flowing to the agent instead of using them as amux scroll shortcuts.
  • Preserve explicit CSI 3J clearback semantics outside the synchronized redraw-preservation case.
  • Add unit and real tmux/e2e coverage for wheel forwarding, chat redraw scrollback, prefix scrolling, and raw control byte delivery.

Root cause

Amux was not preserving chat redraw frames when tmux translated full-screen clears into cursor-home plus erase-to-end. Separately, mouse wheel events were treated only as local scroll unless the embedded terminal's mouse reporting state was tracked.

Validation

  • /Users/andrewlee/.agents/skills/autoreview/scripts/autoreview --mode local clean
  • make verify-loop
  • go test ./...
  • make harness-presets
  • pinned make devcheck
  • pinned make lint-strict-new
  • git diff --check
  • pre-push CI-parity lint, harness, and e2e hook passed

@andyrewlee andyrewlee changed the title [codex] Fix center scroll handling Fix center scroll handling Jun 10, 2026
@andyrewlee andyrewlee marked this pull request as ready for review June 10, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant