Skip to content

feat(text): jump between the files of a diff page - #997

Merged
umputun merged 3 commits into
masterfrom
diff-file-list
Nov 14, 2026
Merged

umputun merged 3 commits into
masterfrom
diff-file-list

Conversation

@umputun

@umputun umputun commented Nov 14, 2026

Copy link
Copy Markdown
Owner

A diff page can now jump between its files. The bar shows the file in view with its place (b.go 2/4); a click or f opens the page's own file list.

  • the list filters as you type, moves with arrow keys or Ctrl-N/Ctrl-P, and Enter or a click jumps; Escape closes it, and while it is open typing goes to the filter, not to the page's own keys
  • a jump puts the file's header under the bar and makes its first change current, so ] and [ go on from there, and a change step updates the button to the file it reached
  • agtermctl session overlay files --go N|PATH (session.overlay.files) jumps by number or path and answers the file reached; htmlOverlays[].text.files reads back the file in view
  • remote pages work through a new page.files presenter kind, so an older presenter is never sent the action; agterm-server serves the command too
  • the file index is built in Swift at any page size and covers git and plain unified headers, renames, mode-only and binary sections, and quoted paths

The Wrap button moves to the left end of every text page's bar, and the change counter keeps a fixed width, so neither shifts as the label changes. On a page narrower than 480px the counter hides its text and keeps its buttons, so the file button and every search control still fit.

multi-file patches need a way to reach a file without stepping through
every change. The bar's file button, `f` and session.overlay.files --go
pick a file, and file selection and change navigation stay in sync,
including on remote pages.
the file button pushed the search controls off a narrow page, so it now
shrinks faster than the search box down to its place and chevron, and
below 480px the change counter hides its text. A path holding " b/",
like docs b/run.sh, now keeps its whole name in a mode-only or binary
section, and the remote and agterm-server action lists name files.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Deploying agterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: c1daaae
Status: ✅  Deploy successful!
Preview URL: https://72cc12d1.agterm.pages.dev
Branch Preview URL: https://diff-file-list.agterm.pages.dev

View logs

Copilot AI balanced review requested due to automatic review settings November 14, 2026 11:02

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

a runner's classic scroll bar takes 17px of clientWidth, so the narrow-bar test never saw the 1200px it waited for. The fit checks still measure the visible width.
@umputun
umputun merged commit c1bd2d5 into master Nov 14, 2026
10 checks passed
@umputun
umputun deleted the diff-file-list branch November 14, 2026 11:34
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.

2 participants