HydraGit Docs
v0.3.1

Repository status

The always-current picture of the working tree: current branch, ahead/behind counts, modified-file count, upstream presence and the changed-file list. It feeds the sidebar tree, the status bar and the activity-bar badge.

Status snapshot status

Entry points

  • AutomaticNo click needed — status is requested on mount and re-requested every ~3 s.
  • SidebarThe whole staging view is a rendering of the latest status.

What it returns

FieldMeaning
branchCurrent branch name (or detached marker).
ahead / behindCommits ahead of / behind the upstream.
modifiedCount of changed files.
files[]Per-file path + status (M A D U R C T).

Status bar & activity-bar badge

The StatusBar component and the badge carrier surface branch, ahead/behind and the modified count. The badge on the HydraGit activity-bar icon shows the number of changed files at a glance.

The in-panel status bar lives at the top of the main panel and is collapsible (hidden by default — it duplicated VS Code's own status bar, where HydraGit already shows repo · branch). A teal/silver hydra icon in the toolbar, before the branch pill, slides it in and out; it auto-peeks while a transient ⚡ message is showing.

iErrors also raise a native VS Code error toast (not just the in-panel ⚡ flash), so a collapsed status bar can't swallow a failure (ui.notify with error severity).

The 3-second poll HydraStatusService

What happens

  1. Every 3 s the service calls status on the Go process.
  2. It fires onDidChange only when the snapshot actually differs from the last one — no redundant repaints.
  3. The sidebar provider relays the snapshot to the webview as a statusUpdate message.
iGit activity from the terminal is also caught: a .git file watcher posts a refresh independently of the poll, so external commits/branch switches appear promptly.

Edge cases handled

  • Detached HEAD — reported via status.detached, which drives the detached-HEAD rescue banner.
  • Tags-only commits — handled correctly when the tip is a tag rather than a branch.
  • No upstream — ahead/behind degrade gracefully instead of erroring in the UI.