Skip to content

feat(rex): zoom the pane for diffs and the graph - #6

Merged
owlnai merged 1 commit into
mainfrom
feat/rex-zoom
Nov 11, 2026
Merged

owlnai merged 1 commit into
mainfrom
feat/rex-zoom

Conversation

@owlnai

@owlnai owlnai commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Written by an AI agent on behalf of @owlnai. @owlnai has not reviewed it yet.

This is the bottom layer of four. rex-git usually sits in a narrow pane, about 30% of a Rex window, so a diff wraps a lot and long lines are hard to read. Until now the only Rex-specific thing rex-git did was keep its pane title up to date.

What changed

  • In a diff or the commit graph, z zooms rex-git's pane to fill its Rex window. Pressing it again unzooms.
  • Leaving the diff or graph (Esc, a click on the header), or quitting, puts the layout back.
  • The diff and graph footers show z zoom / z unzoom second, so it still fits in a narrow pane. The hint only shows in Rex. Outside Rex, z says "zoom works in a Rex pane".
  • The Rex calls move to a new src/rex.rs, which the pane title uses too.

Evidence

This is from a throwaway Rex session with a temp repo, rex-git split beside a shell. zoomed_block_id comes from rex session inspect. I captured it on the top of the stack, which has the same zoom code.

$ # Enter on a file, then z
zoomed: block:01a1ca07-619e-7d79-b60b-38de064b56dc
 ← f.txt unstaged                                                         +1 −1
$ # Esc
after esc: null
$ # Enter, z, then Ctrl+C to quit
zoomed: block:01a1ca07-619e-7d79-b60b-38de064b56dc
after quit: null

The diff footer, unzoomed:

 esc back  z zoom  s stage  n next file  o open  e context 3

(o open comes from the next layer.)

cargo fmt --check, cargo clippy --all-targets and cargo test (40 tests) pass on this branch.

Not checked: if you unzoom with Rex's own shortcut, rex-git still thinks it's zoomed, so the next z sends "off" and appears to do nothing once.

ELI5

The git panel is skinny. Press z while reading a change and it fills the whole window; go back and everything returns to where it was.

In a Rex pane, z zooms rex-git to fill its window while a diff or the
commit graph is open. Leaving them, or quitting, puts the layout back.

The Rex calls move to src/rex.rs, which the pane title now uses too.
@owlnai
owlnai added this pull request to stack #10 November 11, 2026 14:20
@owlnai
owlnai merged commit c43ade5 into main Nov 11, 2026
9 checks passed
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