Skip to content

fix(tui): detail panel loading, overlay drift; add theme selector - #7

Merged
chxmxii merged 1 commit into
mainfrom
fix/detail-loading-overlay-drift-theme-selector
Aug 23, 2026
Merged

chxmxii merged 1 commit into
mainfrom
fix/detail-loading-overlay-drift-theme-selector

Conversation

@chxmxii

@chxmxii chxmxii commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Bug fixes

  • Detail panel stuck on "… loading": pressing 1/2/3 set the loading state but no debug command was ever dispatched, and debugOutputMsg was only routed to the overlay. The root model now issues the command and routes tagged results back to the detail panel, dropping stale responses if the tab changed mid-flight.
  • Refresh reset the detail tab: every poll tick re-set the container, snapping the panel back to the info view and wiping content. Same-container updates now preserve the active tab, content, and scroll.
  • Overlay text crawling out of the box: View() mutated the stored content lines in place, prepending one space per render. Rendering now builds a fresh slice and is idempotent (regression test added).
  • Tabs/CR escaping panel borders: FitCol/ClipLine now strip \r and expand tabs to 8-column stops, so raw inspect/top/netstat output can't move the cursor past the border.

Theme selector

  • Five built-in adaptive themes: catppuccin (default), dracula, nord, gruvbox, tokyo-night.
  • T in the dashboard opens a live-preview picker (↑↓ preview, Enter applies + persists to ~/.config/containershell/theme, Esc reverts).
  • containershell dashboard --theme <name> overrides per run; saved preference is loaded for all TUI surfaces.
  • Styles are read from pkg/tui at render time instead of init-time copies, so switches apply instantly.

Verification

  • go build, go vet, go test -race ./... all green (new unit tests for dispatch/routing, overlay idempotency, tab expansion, theme registry).
  • Live E2E against rootless Podman 5.8.4 via tmux: env/top tabs load real data and survive refresh ticks; inspect overlay pixel-identical across 11s of renders; theme picker previews, applies, persists across restart, and Esc reverts.

🤖 Generated with Claude Code

Bug fixes:
- Detail panel 1/2/3 tabs sat in "loading" forever: the panel set its
  loading state but no debug command was ever dispatched, and results were
  only routed to the overlay. The root model now issues the matching debug
  command and routes detail-tagged results back to the panel, dropping
  stale responses when the tab changed mid-flight.
- The periodic refresh reset the detail panel to the info tab every tick;
  re-setting the same container now keeps the active tab, content, and
  scroll position.
- Overlay text crawled out of its box: View() mutated the stored content
  lines in place (one leading space per render). Rendering now builds a
  fresh slice and is idempotent.
- Raw command output containing tabs or carriage returns could escape the
  panel borders; FitCol/ClipLine now strip \r and expand tabs to 8-column
  stops.

Theme selector:
- Five built-in adaptive themes: catppuccin (default), dracula, nord,
  gruvbox, tokyo-night.
- Press T in the dashboard for a live-preview picker (Enter applies and
  persists to ~/.config/containershell/theme, Esc reverts), or pass
  --theme <name> to override per run.
- Styles are now read from pkg/tui at render time instead of being cached
  in package vars, so a switch takes effect immediately.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chxmxii
chxmxii merged commit 409c6e7 into main Aug 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant