Skip to content

Commit 64fc372

Browse files
binarylogicclaude
andcommitted
fix: show helpful guidance when all services are disabled in drawer tabs
Previously the Services tab showed "No services discovered yet." and Waste/Compliance showed misleading empty states when services existed but were all disabled. Now all three tabs show the discovered count and guide the user to enable services. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 145c239 commit 64fc372

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

‎internal/app/statusbar/compliance/compliance.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,12 @@ func (m *Model) ExpandedView(width, height int) string {
302302
if m.db == nil {
303303
return muted.Render("Waiting for sync to start...")
304304
}
305+
if m.summary.ActiveServices == 0 && m.summary.ServiceCount > 0 {
306+
return muted.Render(fmt.Sprintf(
307+
"%d services discovered, all disabled.\nEnable services to start compliance scanning.",
308+
m.summary.ServiceCount,
309+
))
310+
}
305311
dot := lipgloss.NewStyle().Foreground(m.theme.Success).Background(m.theme.Bg).Render("●")
306312
return dot + " " + muted.Render("No compliance issues detected.")
307313
}

‎internal/app/statusbar/services/services.go‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (m *Model) Update(msg tea.Msg) tea.Cmd {
116116
if key != m.lastState {
117117
m.summary = msg.summary
118118
m.services = msg.services
119-
m.hasData = msg.summary.ActiveServices > 0
119+
m.hasData = msg.summary.ServiceCount > 0
120120
m.lastState = key
121121

122122
// Clamp cursor if services shrank.
@@ -255,8 +255,13 @@ func (m *Model) CompactView() string {
255255

256256
s := m.summary
257257
muted := lipgloss.NewStyle().Foreground(m.theme.TextMuted).Background(m.theme.Bg)
258-
d := status.ServiceDot(m.theme, s.Health)
259258

259+
if s.ActiveServices == 0 {
260+
dot := lipgloss.NewStyle().Foreground(m.theme.TextMuted).Background(m.theme.Bg).Render("●")
261+
return dot + " " + muted.Render(fmt.Sprintf("%d svcs (all disabled)", s.ServiceCount))
262+
}
263+
264+
d := status.ServiceDot(m.theme, s.Health)
260265
label := fmt.Sprintf("%d svcs", s.ActiveServices)
261266

262267
return d + " " + muted.Render(label)
@@ -277,6 +282,15 @@ func (m *Model) ExpandedView(width, height int) string {
277282
return m.detail.View(width)
278283
}
279284

285+
// All services disabled — show a clear message with guidance.
286+
if m.summary.ActiveServices == 0 {
287+
muted := lipgloss.NewStyle().Foreground(m.theme.TextMuted).Background(m.theme.Bg)
288+
return muted.Render(fmt.Sprintf(
289+
"%d services discovered, all disabled.\nAsk Tero to explore your services and pick which ones to enable.",
290+
m.summary.ServiceCount,
291+
))
292+
}
293+
280294
// Height budget: summary (1) + gap (1) + table header+border (2) = 4 lines overhead.
281295
maxRows := height - 4
282296
if maxRows < 1 {

‎internal/app/statusbar/waste/waste.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,12 @@ func (m *Model) ExpandedView(width, height int) string {
305305
if m.db == nil {
306306
return muted.Render("Waiting for sync to start...")
307307
}
308+
if m.summary.ActiveServices == 0 && m.summary.ServiceCount > 0 {
309+
return muted.Render(fmt.Sprintf(
310+
"%d services discovered, all disabled.\nEnable services to start detecting waste.",
311+
m.summary.ServiceCount,
312+
))
313+
}
308314
if m.summary.ActiveServices == 0 {
309315
return muted.Render("No services discovered yet.")
310316
}

0 commit comments

Comments
 (0)