diff --git a/cmd/footer_layout_clip_test.go b/cmd/footer_layout_clip_test.go index a8105081..eb03f451 100644 --- a/cmd/footer_layout_clip_test.go +++ b/cmd/footer_layout_clip_test.go @@ -9,7 +9,7 @@ import ( func TestLayoutFooterRow_TokensSurviveFinishFooterLine(t *testing.T) { m := chatModel{width: 70, height: 24} - left := lipgloss.NewStyle().Foreground(statusCWDColor).Inline(true).Render("~/OSS2026/RealWork/graycode-eco/hawk:") + left := lipgloss.NewStyle().Foreground(statusCWDColor).Inline(true).Render("~/OSS2026/RealWork/graycode-eco/hawk") left += " " + lipgloss.NewStyle().Foreground(statusBranchColor).Inline(true).Render("⎇ main") right := lipgloss.NewStyle().Foreground(statusTokenColor).Inline(true).Render("[db] 13k") right += lipgloss.NewStyle().Foreground(dimColor).Inline(true).Render(" · ") @@ -42,7 +42,7 @@ func TestLayoutFooterRow_LeftWiderThanFooterStillShowsTokens(t *testing.T) { func TestLayoutFooterRow_ClipDoesNotDropStyledTokens(t *testing.T) { m := chatModel{width: 55, height: 24} - left := lipgloss.NewStyle().Foreground(statusCWDColor).Inline(true).Render("~/Desktop/OSS2026/RealWork/graycode-eco/hawk:") + left := lipgloss.NewStyle().Foreground(statusCWDColor).Inline(true).Render("~/Desktop/OSS2026/RealWork/graycode-eco/hawk") left += " " + lipgloss.NewStyle().Foreground(statusBranchColor).Inline(true).Render("⎇ feature/footer-fix") dim := lipgloss.NewStyle().Foreground(dimColor).Inline(true) tok := lipgloss.NewStyle().Foreground(statusTokenColor).Inline(true) diff --git a/cmd/footer_layout_width_test.go b/cmd/footer_layout_width_test.go index be5c02d0..d8568700 100644 --- a/cmd/footer_layout_width_test.go +++ b/cmd/footer_layout_width_test.go @@ -13,7 +13,7 @@ func TestLayoutFooterRow_StyledStringsAlignRight(t *testing.T) { tokenStyle := lipgloss.NewStyle().Foreground(statusTokenColor).Inline(true) dim := lipgloss.NewStyle().Foreground(dimColor).Inline(true) - left := cwdStyle.Render("~/hawk:") + " " + cwdStyle.Render("⎇ main") + left := cwdStyle.Render("~/hawk") + " " + cwdStyle.Render("⎇ main") right := tokenStyle.Render("[db] 13k") + dim.Render(" · ") + tokenStyle.Render("$0.00") width := 80 @@ -42,7 +42,7 @@ func TestLayoutFooterRow_StyledStringsAlignRight(t *testing.T) { func TestFinishFooterLine_PreservesRightAlignedStats(t *testing.T) { m := chatModel{width: 100, height: 24} tokenStyle := lipgloss.NewStyle().Foreground(statusTokenColor).Inline(true) - left := lipgloss.NewStyle().Foreground(statusCWDColor).Inline(true).Render("~/proj:") + left := lipgloss.NewStyle().Foreground(statusCWDColor).Inline(true).Render("~/proj") right := tokenStyle.Render("[db] 1k") + lipgloss.NewStyle().Foreground(dimColor).Inline(true).Render(" · ") + tokenStyle.Render("$1.00") row := layoutFooterRow(left, right, m.footerContentWidth(100)) out := m.finishFooterLine(row, 100) diff --git a/cmd/statusbar.go b/cmd/statusbar.go index 0bc4d08e..03d3c408 100644 --- a/cmd/statusbar.go +++ b/cmd/statusbar.go @@ -121,7 +121,7 @@ func renderStatusBarPrimaryLeft(m *chatModel) string { if !ok { return "" } - parts := []string{statusCwdStyle.Render(cwd + ":")} + parts := []string{statusCwdStyle.Render(cwd)} if branch := cachedStatusBranch(m); branch != "" { parts = append(parts, statusBranchStyle.Render(icons.Branch()+" "+branch)) if m != nil && len(m.statusLeftPRs) > 0 { @@ -165,15 +165,7 @@ func formatStatusCost(c *engine.Cost) string { } func renderStatusBarSecondaryLeft(m *chatModel) string { - if m == nil || m.session == nil { - return "" - } - parts := []string{} - branch := cachedStatusBranch(m) - if branch == "main" || branch == "master" { - parts = append(parts, dryRunStyle.Render(icons.Alert()+" default-branch")) - } - return strings.Join(parts, statusDimStyle.Render(" · ")) + return "" } // renderStatusBarSecondaryRight — errors, dry-run, vim, focus/pause, spend. @@ -304,7 +296,7 @@ func renderStatusBarLeft(m *chatModel) string { if !ok { return "" } - parts := []string{statusCwdStyle.Render(cwd + ":")} + parts := []string{statusCwdStyle.Render(cwd)} if branch := cachedStatusBranch(m); branch != "" { parts = append(parts, statusBranchStyle.Render(icons.Branch()+" "+branch)) if m != nil && len(m.statusLeftPRs) > 0 { diff --git a/cmd/statusbar_test.go b/cmd/statusbar_test.go index 79b1af57..7c87259d 100644 --- a/cmd/statusbar_test.go +++ b/cmd/statusbar_test.go @@ -89,7 +89,7 @@ func TestRenderStatusBarRight_OmitsDuplicatedContext(t *testing.T) { func TestRenderStatusBarLeft_UsesCachedState(t *testing.T) { m := &chatModel{statusLeftVal: "~/repo", statusLeftBranch: "main"} got := renderStatusBarLeft(m) - if !strings.Contains(got, "~/repo:") { + if !strings.Contains(got, "~/repo") { t.Fatalf("status left = %q, want cached cwd", got) } if !strings.Contains(got, "main") { diff --git a/docs/architecture/control-plane.md b/docs/architecture/control-plane.md index e692a48e..95d84e56 100644 --- a/docs/architecture/control-plane.md +++ b/docs/architecture/control-plane.md @@ -96,7 +96,7 @@ Single entry for subagents + background tasks: ### Git safety - `engine.InspectGitBranch` / `EnsureAgentBranch` - `/branch-agent` when on main/master -- Status bar warns `default-branch` when on main +- Status bar warns `main!` when on main ### HUD - Wide status secondary row: `mode:act · iso:workspace · trusted`