feat(tui): 30-day uptime timeline in inline detail panel

Statuspage-style colored bar — one █ per day, colored by uptime:
green (>= 99%), yellow (>= 95%), red (< 95%), gray (no data).
30-day percentage shown to the right.

Daily breakdown computed via ComputeDailyBreakdown from state_changes
and loaded alongside detail data in loadDetailCmd. Auto-updates on
cursor move.
This commit is contained in:
2026-06-24 20:16:01 -04:00
parent 6799163cd4
commit a59edf8410
6 changed files with 78 additions and 4 deletions
+2 -1
View File
@@ -28,6 +28,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
m.detailChanges = msg.changes
m.detailChangesSiteID = msg.siteID
m.detailDailyDays = msg.dailyDays
return m, nil
case historyDataMsg:
if msg.siteID != m.historySiteID {
@@ -142,7 +143,7 @@ func (m *Model) handleFormMsg(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, nil
}
const detailInlineHeight = 11
const detailInlineHeight = 12
func (m *Model) recalcLayout() {
chrome := chromeBase