Skip to content

feat: 0.5.0 — UX polish + 1fr CSS rendering fix#9

Merged
CreatmanCEO merged 7 commits into
mainfrom
feat/0.5.0-ux-polish
May 21, 2026
Merged

feat: 0.5.0 — UX polish + 1fr CSS rendering fix#9
CreatmanCEO merged 7 commits into
mainfrom
feat/0.5.0-ux-polish

Conversation

@CreatmanCEO
Copy link
Copy Markdown
Owner

Summary

Fixes the critical TUI rendering regression where every tab body was empty,
then layers a meaningful UX polish pass on top.

Critical fix

  • TUI bodies no longer render empty. All 8 screens used height: NN%
    CSS which Textual 8.2.5 collapses to 0 inside a TabPane. Switched
    the screens (plus TabbedContent) to 1fr fractional units. Affects
    every tab — Sessions, Permissions, Context, Memory, Hooks, Schedule,
    Audit, Dream.

UX polish (per tab)

  • Per-screen header. Every tab now opens with a 1-line Rich-markup
    header stating what the tab shows and the key actions.
  • Empty-state CTAs. Schedule lists the five built-in templates when
    no jobs exist; Audit shows the cc-janitor stats snapshot recipe;
    Dream explains the safety-net concept before any pairs land.
  • F1 tab-specific help modal (HelpModal in tui/_help.py) with
    5–10 lines of guidance per tab.
  • First-run Welcome modal (WelcomeModal). Marker file at
    ~/.cc-janitor/state/seen-welcome ensures it appears exactly once.
    Re-display via cc-janitor --tutorial.
  • Filter-by-scope labels next to source-filter dropdowns on
    Permissions, Memory, Hooks.
  • Inline column legends on Sessions (Msgs/Size) and Permissions
    (Used90d, STALE/DUP flags).
  • Screen-level BINDINGS on every screen so the Footer surfaces the
    per-tab action keys.

What a user sees now

  • Sessions tab: boost-coloured header "Your Claude Code sessions ·
    ↑↓ navigate · Enter preview · d delete · / search", then a dim legend
    explaining Msgs and Size, then the data table, then the preview pane.
    Hits F1 → modal explains heavy-session pruning via session prune.
  • Schedule tab (empty): header reads "Scheduled maintenance jobs ·
    n new job · Del remove · r run now", and the right pane lists the
    five built-in templates with one-line descriptions instead of just
    "0 scheduled job(s)".
  • Dream tab (no pairs): header reads "Auto Dream snapshots
    (before/after pairs) · ↑↓ navigate · Enter diff · b rollback", and
    the right pane explains the safety-net concept and points at
    cc-janitor watch start --dream + dream doctor.

Test plan

  • ruff check src tests — clean
  • pytest -q — 302 passed (was 290; +12 in tests/tui/test_ux_polish.py)
  • python -m cc_janitor --versioncc-janitor 0.5.0
  • CcJanitorApp(show_welcome=False) constructs cleanly
  • CI green on GitHub Actions

CreatmanCEO and others added 7 commits May 21, 2026 06:24
All 8 screens used height: NN% which Textual 8.2.5 resolves to 0 when
the screen sits inside a TabPane, producing empty bodies. Switching to
1fr fractional units makes the panes share remaining space correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a 1-line Rich-markup header at the top of each screen indicating
what the tab shows and the key actions available. Also bundles in:
- inline column legends (Sessions: Msgs/Size; Permissions: Used90d/Flags)
- "Filter by scope:" labels next to source-filter dropdowns
- proper screen-level BINDINGS so Footer surfaces the right keys

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When a tab has nothing to show yet, replace the terse "no data" line
with a concrete next-step recipe pointing at CLI commands.

- Schedule: list the available templates
- Audit: show `cc-janitor stats snapshot` invocation
- Dream: explain the safety-net concept and link to `dream doctor`

Also adds the per-screen header line and bindings so Footer surfaces
the screen-level keys.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- _help.py: HelpModal renders Rich-markup guidance keyed by active TabPane
  id; WelcomeModal shows the 8-tab tour on first launch.
- app.action_help() pushes the help modal with the currently-active tab id.
- On mount the app pushes WelcomeModal if ~/.cc-janitor/state/seen-welcome
  is absent; dismissing the modal touches the marker so it never reappears.
- `cc-janitor --tutorial` forces the Welcome modal regardless of marker.
- tests/conftest.py pre-touches the marker for both mock_claude_home and
  an autouse fixture so existing TUI tests aren't blocked on a modal.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Verifies per-screen headers, sessions/perms legends, filter labels,
empty-state CTAs, F1 help modal, and Welcome marker logic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Documents the new TUI surface introduced in 0.5.0:
- F1 tab-specific help modal
- First-run Welcome modal + --tutorial flag
- 1-line header on every screen
- Per-tab keybindings and column meanings

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CreatmanCEO CreatmanCEO merged commit 77e1e3a into main May 21, 2026
4 checks passed
@CreatmanCEO CreatmanCEO deleted the feat/0.5.0-ux-polish branch May 21, 2026 10:45
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