codex icon indicating copy to clipboard operation
codex copied to clipboard

Add vim navigation keys to transcript pager

Open joshka-oai opened this issue 2 weeks ago • 3 comments

Summary

  • add vim-style pager navigation for transcript overlays (j/k, ctrl+f/b/d/u) without removing existing keys
  • update on-screen hints to reflect the additional key bindings
  • refresh pager overlay snapshots

Testing

  • just fmt
  • RUSTFLAGS="--cfg tokio_unstable" just fix -p codex-tui (fails: tokio test-util functions unavailable for tests)
  • RUSTFLAGS="--cfg tokio_unstable" cargo test -p codex-tui (fails: tokio test-util functions unavailable for tests)

Codex Task

joshka-oai avatar Dec 03 '25 22:12 joshka-oai

Not sure where the RUSTFLAGS tests instructions are coming from above

Tested that this works locally.

Testing this highlights a bug that the paging in transcript is incorrect (it skips 3 rows because it's not factoring in the header and footer).

joshka-oai avatar Dec 03 '25 22:12 joshka-oai

image

joshka-oai avatar Dec 03 '25 22:12 joshka-oai

i do feel like adding the instructions there make it too busy and isn't necessary. every vim user will just try to use those keys instinctively upon seeing a pager interface, and it's maybe uncommon enough to pollute that section.

I agree (I was 60/40 on it, so left it as is). Good to get some external confirmation - will fix.

also for a standard key equivalent for half-page, maybe and shift+.

We map space to full page down. Shift space makes sense to do full page up. Is there a reason for half page?

joshka-oai avatar Dec 03 '25 22:12 joshka-oai

@codex fix the tests

joshka-oai avatar Dec 09 '25 01:12 joshka-oai

Summary

  • Adjusted pager navigation to base page and half-page jumps on the rendered content height so transcript paging no longer skips lines when header/footer space is present (tui/src/pager_overlay.rs).
  • Factored scroll-key handling into reusable helpers and added a regression test confirming pager navigation respects the visible content area.

Testing

  • just fmt
  • ⚠️ just fix -p codex-tui (fails: tokio test-util functions like time::advance/start_paused are unavailable in this build even with --cfg tokio_unstable)
  • ⚠️ RUSTFLAGS="--cfg tokio_unstable" cargo test -p codex-tui (fails: tokio test-util functions like time::advance/start_paused are unavailable in this build)

View task →