Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.

feat: theme-driven UI, blit API adoption, and toast feedback#18

Merged
moneycaringcoder merged 14 commits intomainfrom
chore/bump-blit-0.1.1
Apr 10, 2026
Merged

feat: theme-driven UI, blit API adoption, and toast feedback#18
moneycaringcoder merged 14 commits intomainfrom
chore/bump-blit-0.1.1

Conversation

@moneycaringcoder
Copy link
Copy Markdown
Owner

@moneycaringcoder moneycaringcoder commented Apr 10, 2026

Summary

  • Derive all UI styles from blit.Theme tokens, removing hardcoded colors
  • Rewrite debug overlay as full-screen modal with sorted stats and dynamic height
  • Add rate limit Gauge and per-repo Bar chart to debug overlay
  • Drop duplicate LogLevel type, dead renderEventLine, and DebugLog.entries buffer
  • Adopt blit.Divider, blit.Badge, blit.Breadcrumbs, blit.Markdown throughout
  • Switch overlays to WithSlotOverlay API (named slots)
  • Add toast notifications on all keybind actions (pause, refresh, sort, filter, clear)
  • Enable WithDevConsole, WithAnimations, WithMouseSupport
  • Reduce tick interval to 200ms for smoother updates
  • Add Harness fluent tests, golden snapshots, and full-app layout tests

Test plan

  • go test ./... passes
  • Golden snapshots for empty stream, resized stream, and tabs layout
  • Toast notifications appear on pause/resume, refresh, sort toggle, filter cycle, and clear
  • Debug overlay renders with charts and sorted stats
  • All UI colors derive from active theme
  • Builds cleanly against local blit with replace directive

- Bump github.com/blitui/blit v0.1.0 → v0.1.1
- Replace config I/O with blit.LoadYAML/SaveYAML (atomic writes)
- Use ToastInfo/ToastWarn/ToastSuccess convenience functions
- Add EmptyText to StatusPanel ListView for empty state
- Separate Validate from Set on ConfigEditor fields
- Add y keybind to copy event URL to clipboard via OSC 52
Replace ~30 hardcoded hex color vars in styles.go with a Styles struct
built from blit.Theme. EventColor/LabelColor now accept a theme param
and resolve via theme.Color() Extra tokens with semantic fallbacks.

All components (EventStream, StatusPanel, DebugOverlay) store the
theme and rebuild styles on SetTheme, enabling full runtime theme
switching. Also removes dead renderEventLine function.
- Remove duplicate LogLevel enum and LogEntry struct; use blit.LogLevel
  directly. Drop the entries circular buffer since blit.LogViewer
  handles storage.
- Replace health dots with blit.Badge in stream header and debug overlay.
- Use blit.Divider for debug overlay title line.
- Add blit.EnsureConfigDir call in AddRepo for first-run safety.
- Delete dead renderEventLine function.
- Enable WithDevConsole() and WithAnimations(true) in app setup.
- Rate limit warning toast now includes a "Pause" action button
  using blit.ToastAction.
- Event detail overlay shows a Breadcrumbs trail at the top:
  gitstream > repo > event type.
Use blit/charts Gauge for a visual rate limit meter with threshold
coloring (green > 50%, yellow > 20%, red below). Add horizontal Bar
chart showing per-repo health status.
Showcase btest APIs:
- Harness fluent API tests for render, navigation, and resize
- Golden snapshot for initial event stream layout
- Session recording for sort toggle flow
DebugOverlay now implements blit.FloatingOverlay, compositing as a
right-side drawer (40% width) over the main content instead of
replacing it. This lets users see the event stream while monitoring
API stats and logs.
- resolveTheme() now populates Extra event tokens on DefaultTheme
  so event colors work without selecting a named preset.
- Add 2 golden snapshot tests (empty_stream, resized_stream) for
  stable time-independent snapshots.
- Drop 7 unused Styles fields (Time, Repo, Actor, StatusBar,
  PanelBorder, PanelTitle, PanelDivider, Divider).
- Remove double-styling on debug divider (Divider already themes itself).
- Replace manual byte scan for '/' with strings.LastIndex in debug bar chart.
@moneycaringcoder moneycaringcoder changed the title chore: bump blit to v0.1.1 and adopt new APIs feat: replace hardcoded styles with blit theme, charts, and test harness Apr 10, 2026
- Replace FloatingOverlay side-drawer with regular Overlay modal
- Sort repo map keys for deterministic render order (no flickering)
- Dynamic height: measure stats lines, give remainder to log viewer
- Pre-truncate content before lipgloss render to prevent overflow
- Hard-clamp output to terminal dimensions with ansi.Truncate
- Pad output to exact terminal height to prevent push-down
- Cap chart widths to 60 cols max for cleaner layout
@moneycaringcoder moneycaringcoder changed the title feat: replace hardcoded styles with blit theme, charts, and test harness feat: theme-driven UI, debug overlay modal, charts, and test harness Apr 10, 2026
…sions

The existing snapshots tested EventStream directly without the Tabs
wrapper, so the barH 3→2 fix was invisible to tests. This snapshot
mirrors the real app layout (Tabs + DualPane + StatusBar) so any
future tab bar height change will break the golden file.
Replace manual app construction with testFullApp() helper and use the
new btest.SnapshotApp one-liner for the tabs snapshot. Add an AppResize
test using NewAppHarness to verify the full layout at multiple sizes.
- Switch all 5 overlays from WithOverlay to WithSlotOverlay (named slots)
- Add toast notifications on pause, refresh, sort, filter, and clear actions
- Use app.Send(ToastMsg{}) pattern from void Handler closures
- Reduce tick interval from 1s to 200ms for smoother updates
@moneycaringcoder moneycaringcoder changed the title feat: theme-driven UI, debug overlay modal, charts, and test harness feat: theme-driven UI, blit API adoption, and toast feedback Apr 10, 2026
@moneycaringcoder moneycaringcoder marked this pull request as ready for review April 10, 2026 17:59
@moneycaringcoder moneycaringcoder merged commit 59b3ac1 into main Apr 10, 2026
1 check passed
@moneycaringcoder moneycaringcoder deleted the chore/bump-blit-0.1.1 branch April 10, 2026 18:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant