Skip to content

fix(tui): restore Codex harness scrolling - #252

Merged
senamakel merged 2 commits into
mainfrom
codex-scroll-fix
Aug 9, 2026
Merged

fix(tui): restore Codex harness scrolling#252
senamakel merged 2 commits into
mainfrom
codex-scroll-fix

Conversation

@senamakel

@senamakel senamakel commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

  • translate wheel input into Codex transcript cursor movement when Codex does not advertise alternate-scroll mode
  • retain terminal-mode routing for other harnesses
  • cover the current Codex terminal negotiation in a PTY regression test
  • once the child has exited, fall back to scrolling the emulator's retained history instead of writing into a closed PTY — covered by the new an_exited_codex_session_scrolls_our_retained_history regression test

Root cause

Recent Codex CLI releases no longer emit DECSET 1007. The embedded TUI treated that mode as a prerequisite for forwarding scroll input, so Codex sessions fell back to shallow emulator history instead of scrolling their transcript. Separately, wheel input aimed at a session whose child had already exited was written into the now-closed PTY and silently lost; the scroll entry point now detects that case and diverts the wheel to the emulator's own retained history.

Validation

  • cargo fmt --check
  • git diff --check
  • cargo test -p medulla-tui ui::harness_pane::tests::session (13 passed)
  • cargo clippy --all-targets -- -D warnings

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@senamakel, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ec3de35a-a854-4009-a9f0-2fb06190e8ec

📥 Commits

Reviewing files that changed from the base of the PR and between acb9e9d and 3c790cf.

📒 Files selected for processing (2)
  • src/tui/src/ui/harness_pane/mod.rs
  • src/tui/src/ui/harness_pane/tests/session.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7bcd02538a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tui/src/ui/harness_pane/mod.rs Outdated
@senamakel senamakel self-assigned this Aug 9, 2026
Wheel events for a dead session now move the emulator's own retained lines instead of being forwarded or synthesized into cursor keys, since no child is left to receive them. Codex sessions additionally only receive cursor keys once bracketed paste signals their input layer is up, preventing garbled input during startup.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0017 · 18,536 in / 6,007 out · 16,319 cached (88%) · z-ai/glm-5.2
critique:    $0.0006 · 4,173 in  / 2,243 out · 3,547 cached (85%)  · z-ai/glm-5.2
security:    $0.0003 · 5,898 in  / 785 out   · 5,280 cached (90%)  · z-ai/glm-5.2
tests:       $0.0005 · 4,158 in  / 1,964 out · 3,659 cached (88%)  · z-ai/glm-5.2
description: $0.0003 · 4,307 in  / 1,015 out · 3,833 cached (89%)  · z-ai/glm-5.2

Comment thread src/tui/src/ui/harness_pane/mod.rs
@tinysweeper tinysweeper Bot added priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. severity: medium labels Aug 9, 2026
@senamakel
senamakel merged commit 37f2b0c into main Aug 9, 2026
16 checks passed
@senamakel
senamakel deleted the codex-scroll-fix branch August 9, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. severity: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant