Add in-place auto-refresh, --fetch, and a repository path argument - #168
Open
occcat wants to merge 3 commits into
Open
Add in-place auto-refresh, --fetch, and a repository path argument#168occcat wants to merge 3 commits into
occcat wants to merge 3 commits into
Conversation
added 3 commits
September 4, 2026 21:10
Reload git refs on an interval without clearing the terminal or deleting graph images first. Reuse Kitty image IDs across refreshes and drop only stale images after the new frame is drawn.
Serie previously only opened the current directory, so a trailing path was rejected as an unexpected argument.
Run git fetch --all on a dedicated watch thread before auto-refresh ticks, without blocking key input. Persist / search query and cursor across reloads instead of dropping ticks while the user is typing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds automatic refresh while keeping the existing
Rreload path usable as a dashboard: no full-screen clear, skip work when git refs have not changed, and restore an in-progress/search instead of dropping ticks.Related: #159 (same problem, different trade-offs), #94 / #131 (manual refresh), #146 (clearing / flicker).
Behavior
-r, --auto-refresh [SECONDS]— poll for local ref changes. Bare flag defaults to 2s.0disables. Alsocore.option.auto_refresh.--fetch—git fetch --all --quieton a dedicated watch thread before each tick (non-interactive, failures ignored). Implies auto-refresh at 30s unless-ris set. Alsocore.option.fetch.[PATH]— open a repository other than the current directory.terminal.clear()/ deletes every Kitty image first. Graph image IDs are reused; stale IDs are deleted after the new frame.HEAD/refs/packed-refsskips a fullgit logwhen nothing changed./search (query + cursor + live matches) is restored across reloads, so auto-refresh does not steal the prompt.Compared with #159
#159 is still open and currently conflicts with master. This PR overlaps on auto-refresh + fetch, but:
--watch(min 5s, default 30s)-r/--auto-refresh(default 2s) +--fetchRpath (terminal.clear)Happy to rename
-r/--auto-refreshto--watchif you prefer to stay aligned with #159.Test plan
cargo test— 78 testscargo build --release--helpshows-r,--fetch, and[PATH]serie -r 1+ commit in another terminal — new commit appears without a full-screen flashserie --fetchagainst a remote — fetch errors do not kill the TUIserie /path/to/repofrom another cwd/search while a tick fires — prompt and cursor remain