Skip to content

git-glance: run in the Herdr app as well as the TUI - #7

Merged
JacobAtchley merged 9 commits into
mainfrom
feat/git-glance-gui
Nov 2, 2026
Merged

JacobAtchley merged 9 commits into
mainfrom
feat/git-glance-gui

Conversation

@JacobAtchley

Copy link
Copy Markdown
Owner

Git Glance now works in the Herdr desktop app (herdr-app) as well as the TUI. This is the pilot for "option C": the Rust binary does the git work and prints JSON, and each UI draws it.

What changed

  • Rust: git-glance <command> --cwd <dir> prints JSON. Commands: status, stage/unstage (one file or all), commit, diff, branches, switch/create, stashes, and stash push/pop/apply/drop. Exit codes are 0 for ok, 1 when git refuses, 2 for bad arguments. git-glance ui runs the TUI unchanged.
  • App mod git-glance (plugins/git-glance/gui/git-glance/): native glance with the same views as the TUI (status, diff, branches, stashes) and the same keys, plus buttons and clicks. It refreshes live when files change.
  • App mod git-glance-pane: toggles the glance as a split pane on the right that follows the focused terminal's repo.
  • Tooling: just links the mods into ~/.config/herdr-app/mods/. just gui-check runs herdr-app check (needs the app, so it is not in CI). just gui-test runs Node tests for the mod's refresh logic, in just ci and GitHub CI.
  • Spec: docs/superpowers/specs/2026-11-02-git-glance-gui-design.md. Plan: docs/superpowers/plans/2026-11-02-git-glance-gui.md.

Review fixes (each with a test that failed first)

  • Status calls run git with core.fsmonitor=false, so repos with fsmonitor on don't refresh forever.
  • Bursts of file changes collapse into one refresh, and an older result can't replace a newer one.
  • Only one watch loop runs per pane as it follows terminals.
  • Following a terminal into another repo resets prompts and pickers, so Enter can't act on the wrong repo.

Testing

  • just ci passes: 65 Rust tests, 6 Node tests, fmt and clippy.
  • herdr-app check passes on both mods.
  • In the app, I checked by screenshot that the status, diff, branch and stash views render. The pane picked up a new file without a keypress.
  • Not yet tried by hand in the app: keypress and click actions (stage, commit, stash, branch create/switch, stash pop/drop, Esc in prompts, pane toggle).

Known gaps (not fixed here)

  • Paths are passed to git as pathspecs, so names like [id].tsx can match other files. The TUI has the same issue.
  • A file named like an option (--create) is read as an option by the JSON CLI.
  • Actions pressed while another is running are dropped silently.
  • Renames are only partly handled. The TUI has the same issue.
  • No message when the pane toggle can't open a split.
  • just doesn't remove links for deleted or renamed mods.

🤖 Generated with Claude Code

https://claude.ai/code/session_017SHDkxeudXCfQdJrUungWE

JacobAtchley and others added 9 commits November 2, 2026 11:29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SHDkxeudXCfQdJrUungWE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SHDkxeudXCfQdJrUungWE
Also keeps the commit/stash prompt open until git accepts (TUI parity) and
hands each callback the running task's cx instead of a captured one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SHDkxeudXCfQdJrUungWE
- git calls turn core.fsmonitor off, so a status never writes under .git
  and the app's folder watch can't refresh forever
- refreshes coalesce (one running, one queued) and older snapshots never
  replace newer ones
- one watch loop per repo root; following a terminal within the same repo
  no longer stacks loops
- following a terminal into another repo resets prompt, picker, footer and
  selection, so nothing aimed at the old repo runs against the new one
- the lifecycle rules live in lifecycle.js with node tests, run by just ci
  and CI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SHDkxeudXCfQdJrUungWE
@JacobAtchley
JacobAtchley merged commit 4355673 into main Nov 2, 2026
2 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