Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/footer_layout_clip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(" · ")
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions cmd/footer_layout_width_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
14 changes: 3 additions & 11 deletions cmd/statusbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/statusbar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/control-plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Loading