⬡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
| Field | Meaning |
|---|---|
branch | Current branch name (or detached marker). |
ahead / behind | Commits ahead of / behind the upstream. |
modified | Count 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.
ui.notify with error severity).The 3-second poll HydraStatusService
What happens
- Every 3 s the service calls status on the Go process.
- It fires
onDidChangeonly when the snapshot actually differs from the last one — no redundant repaints. - The sidebar provider relays the snapshot to the webview as a statusUpdate message.
.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.