Skip to content

Commit f8a6fd1

Browse files
cpcloudclaude
andcommitted
feat(llm): use dim italic for insights error with aligned section header
Render insights errors with the standard dashSectionHeader pill and a DashSubtitle (gray dim italic) message instead of bold vermillion, so the error reads as a non-critical degradation aligned with the other dashboard sections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 80c9875 commit f8a6fd1

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

internal/app/dashboard.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,8 @@ func (m *Model) dashboardView(budget, maxWidth int) string {
596596
}
597597
dimmed := cursorSection != "" && cursorSection != dashSectionInsights
598598
hdr := m.dashSectionHeader(dashSectionInsights, 0, dimmed)
599-
lines = append(lines, hdr, " "+m.styles.Error().Render("error: "+m.dash.insights.err.Error()))
599+
msg := m.styles.DashSubtitle().Render(" unavailable: " + m.dash.insights.err.Error())
600+
lines = append(lines, hdr, msg)
600601
}
601602

602603
// Staleness indicator for insights section header.

internal/app/dashboard_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,9 @@ func TestInsightsSection_ErrorState(t *testing.T) {
13341334
m.buildDashNav()
13351335

13361336
view := m.dashboardView(50, 80)
1337+
assert.Contains(t, view, "unavailable")
13371338
assert.Contains(t, view, "network timeout")
1339+
assert.NotContains(t, view, "error:")
13381340
}
13391341

13401342
func TestInsightsNav_JumpsToEntity(t *testing.T) {

0 commit comments

Comments
 (0)