Skip to content

0.5.2 — Sessions tab UX overhaul + universal y clipboard yank#11

Merged
CreatmanCEO merged 4 commits into
mainfrom
feat/0.5.2-sessions-ux
May 23, 2026
Merged

0.5.2 — Sessions tab UX overhaul + universal y clipboard yank#11
CreatmanCEO merged 4 commits into
mainfrom
feat/0.5.2-sessions-ux

Conversation

@CreatmanCEO
Copy link
Copy Markdown
Owner

Summary

  • Universal y clipboard yank across all 8 DataTable screens (Sessions, Perms, Context, Memory, Hooks, Schedule, Audit, Dream) via Textual's App.copy_to_clipboard (OSC 52). Works around Textual's mouse-capture which blocks the terminal's native select-to-copy.
  • Sessions tab column reorg: Topic · Activity · Duration · Msgs · Tokens · Cost · ID · Project. Topic eats width; Activity is relative (2h ago); Duration shows started→last (4h22m); Tokens uses size_bytes/4 estimate (cheap, no full re-read); Cost shows $ at Opus input rate.
  • Sessions drill-down: Enter opens a new SessionDetailScreen modal with full metadata, summaries, first/last user messages, and d/r/y/Esc footer actions.
  • Action-oriented Sessions header with session count + top-size hint + cc-janitor session prune tip.

Test plan

  • uv run ruff check src tests — clean
  • uv run pytest -q338 passed, 2 skipped (was 319 before; +19 new tests)
  • New tests: tests/tui/test_yank.py, tests/tui/test_sessions_columns.py, tests/tui/test_session_detail.py
  • Manual: uv run cc-janitor → Sessions tab → new columns visible
  • Manual: press y on any cell → notification "Copied to clipboard: ..." → paste in another app to verify
  • Manual: press Enter on a Sessions row → detail screen opens → Esc returns

Notes

tokens_estimate uses size_bytes // 4 rather than a full JSONL re-read — trades ±20% accuracy for O(1) per session vs O(file_size). The CLI session token-count remains the source of truth for an exact count.

🤖 Generated with Claude Code

CreatmanCEO and others added 4 commits May 23, 2026 09:04
Adds YankMixin to every screen with a DataTable (Sessions, Perms,
Context, Memory, Hooks, Schedule, Audit, Dream). `y` copies the
highlighted cell (fallback: full row joined by tabs) via
App.copy_to_clipboard (OSC 52) and shows a preview notification.

Also introduces tui/_format.py with format_tokens, format_cost,
relative_time, duration, short_id, strip_project_slug,
topic_from_session, estimate_tokens_from_size — used by Sessions
column reorg in the next commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sessions tab UX overhaul (proof-of-concept for the pattern):

- New columns left→right: Topic · Activity · Duration · Msgs · Tokens ·
  Cost · ID · Project. Topic eats available width; Activity is relative
  (`2h ago`, `yesterday`, `Apr 14`); Duration shows started→last
  (`4h22m`, `1d3h`); Tokens uses size_bytes/4 estimate (O(1), no full
  re-read of jsonl); Cost shows $ at Opus input rate ($15/M).
- ID truncated to 8 chars + `..`; full UUID lives in the new
  SessionDetailScreen and is copyable via `y`.
- Header is action-oriented: `Sessions — N stored`, key map, plus a
  hint about the biggest session and a `cc-janitor session prune` tip.
- Enter on a row pushes SessionDetailScreen (ModalScreen) with full
  metadata, all summaries, first/last user messages (truncated past 30
  lines), and footer `d`/`r`/`y`/`Esc` actions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 a5b908c into main May 23, 2026
4 checks passed
@CreatmanCEO CreatmanCEO deleted the feat/0.5.2-sessions-ux branch May 23, 2026 13:11
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