Repository navigation
Closed
Feature
Copy link
Labels
Description
Summary
Color the git branch icon in the input box top border (⎇ fix/issue-1147 ─ #1148) when the workspace is dirty or has unpushed commits, so the user sees the state at a glance without running git status.
Behaviour:
- Uncommitted changes (
git status --porcelainnon-empty): icon in the theme warning color. - Unpushed commits (
git rev-list --count @{u}..HEAD> 0, or no upstream at all): icon in the theme accent color. - Both: warning wins (uncommitted is the more urgent signal).
- Clean and pushed: icon stays in the current status color, unchanged from today.
- Only applies when the working directory is a git repository. Outside a repo the branch label is already omitted, and the status check must not run or surface any error.
Implementation notes (reuse what exists, no new goroutines or tickers):
- Follow the
fetchGitPRCmdpattern ininternal/presentation/tui/components/input_view.go: afetchGitStatusCmdtea.Cmdthat shells out viautils.RunGitoff the UI goroutine and returns a newtui.GitStatusResolvedEvent{Dirty, Unpushed bool}(defined ininternal/presentation/tui/state_events.gonext toGitPRResolvedEvent). - Trigger on the same event-loop points the PR fetch uses:
Init,BashCommandCompletedEvent, andToolExecutionCompletedEvent. Unlike the PR fetch, fire it for every completed tool result, not only Bash, becauseWrite/Edit/Deletealso dirty the tree. It is a cheap local git call. - Render:
buildGitBranchLabelkeeps producing the plain label;RenderInputField/spliceBranchIntoTopBorderininternal/presentation/tui/styles/provider.goreceive the state and color only the icon rune. Truncation intruncateBorderLabelmust keep working with the colored icon (color after truncation, not before). - Gate on the existing
chat.status_bar.indicators.git_branchflag; no new config key. - Changes made outside the TUI (editor, another terminal) stay unknown until the next event-loop trigger. That is acceptable for v1; a slow
tea.Tickrefetch can be added later if it matters.
Acceptance Criteria
-
tui.GitStatusResolvedEventandfetchGitStatusCmdadded, following theGitPRResolvedEvent/fetchGitPRCmdpattern - Status refetched on
Init,BashCommandCompletedEvent, and everyToolExecutionCompletedEvent - Icon rendered in warning color when there are uncommitted changes, accent color when only unpushed commits, default status color when clean
- No status command runs and nothing is rendered when the cwd is not a git repository
- Label truncation still works with the colored icon; PR number still survives long branch names
- Respects
chat.status_bar.indicators.git_branch: false - Unit tests in
input_view_test.gofor the event handling and inprovidertests for the coloring -
docs/configuration-reference.mdstatus bar indicator description updated
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
inference-gateway-releaser commentedon Sep 2, 2026
🎉 This issue has been resolved in version 0.188.0 🎉
The release is available on:
Your semantic-release bot 📦🚀