Summary
Give the always-on context gauge visual warning states as usage approaches the compaction threshold, and show a "compacting…" state while compaction runs.
Motivation
The sidebar already renders "Context: N%" but with no color/warning cues. Users get no signal that they're near the limit or that compaction is happening.
Proposed behavior
- Color the gauge (e.g. normal → warning → critical) as it nears the configured compaction threshold.
- Show a "compacting…" indicator driven by the existing
SessionCompactionEvent (pkg/runtime/event.go ~line 471).
- Apply to both the main TUI sidebar and the lean TUI status line.
Implementation notes (starting points)
pkg/tui/components/sidebar/sidebar.go (gauge at ~560-566, 1109-1137)
pkg/tui/styles/styles.go
pkg/leantui/update.go
Complexity: S.
Background: shared plan context-management-gap-analysis (Phase 1, item 3).
Dependencies / Relationships
Summary
Give the always-on context gauge visual warning states as usage approaches the compaction threshold, and show a "compacting…" state while compaction runs.
Motivation
The sidebar already renders "Context: N%" but with no color/warning cues. Users get no signal that they're near the limit or that compaction is happening.
Proposed behavior
SessionCompactionEvent(pkg/runtime/event.go~line 471).Implementation notes (starting points)
pkg/tui/components/sidebar/sidebar.go(gauge at ~560-566, 1109-1137)pkg/tui/styles/styles.gopkg/leantui/update.goComplexity: S.
Background: shared plan
context-management-gap-analysis(Phase 1, item 3).Dependencies / Relationships
compaction_threshold) #3433 (needs the configurable compaction threshold to color against)