Skip to content

feat: add navigation, help overlay, yank, CLI parsing and file history - #7

Merged
greenbugx merged 2 commits into
mainfrom
feat/nav-help-yank-cli-history
Aug 24, 2026
Merged

greenbugx merged 2 commits into
mainfrom
feat/nav-help-yank-cli-history

Conversation

@greenbugx

Copy link
Copy Markdown
Owner

Move the details/diff/files fetch onto a worker thread and add the
bindings users of this kind of tool expect.

Fetches were synchronous: opening the Diff pane on a large commit read
the entire patch into a Vec<String> on the UI thread, and every
selection change while a pane was open re-read it. DetailWorker now
does that work off-thread, with three separate guarantees: requests
coalesce (drain the queue, keep the last) so a keypress burst costs one
fetch; replies carry a sequence number so a slow fetch cannot repaint a
pane the user has already left; and cancel() stops a closed pane being
repopulated. The main loop polls on the tick it already had.

Navigation: g/G and Home/End for the top and bottom of the focused
pane, PageUp/PageDown by a screenful, and J/K to walk commits with a
pane open so a diff can be followed down the history.

Discoverability: ? opens a modal keymap overlay. The keymap is data in
ui::help, so the same table is rendered, measured, and checked by a
test that fails when main.rs handles a key the overlay omits. The
status bar had room for about eight bindings.

y sends the selected commit's full hash to the terminal via OSC 52,
which works over SSH and needs no dependency. The message reads "sent
to clipboard" because OSC 52 gives no acknowledgement.

Arguments are parsed before the terminal enters raw mode, so --help
prints to a normal screen instead of being handed to
Repository::discover as a path named "--help". Unknown flags are an
error with a non-zero exit rather than a mystery repository.

l in the changed-files pane scopes the graph to that path, Esc leaves.
file_history decides "touched" by comparing the blob oid at the path
against the first parent, matching git log -- <path>; the filtered list
is laid out with GraphEngine::build_linear because the graph engine
holds a lane open for parents that filtering removed, and would widen
into a staircase one lane per row.

Also fixes a pre-existing bug in the refs pane: it copied its ListState
by value before rendering, discarding the scroll offset the widget
wrote back, which pinned the pane to its first screenful.

@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: f863e4a33a

ℹ️ 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/git/repository.rs Outdated
Repository owner deleted a comment from chatgpt-codex-connector Bot Aug 24, 2026
@greenbugx
greenbugx merged commit ac05f19 into main Aug 24, 2026
4 checks passed
@greenbugx
greenbugx deleted the feat/nav-help-yank-cli-history branch August 24, 2026 21:00
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