Commit Graph

18 Commits

Author SHA1 Message Date
Alejandro Gutiérrez
c722112a7f feat: weighted grid layout, pane list bar, sorted tabs, and idle sound delay
- Replace 70/30 rearranging split with weighted grid: focused pane's
  column/row get 70%, others shrink in place (no spatial reordering)
- Add clickable pane list row below tab bar in both grid and picker modes
- Sort grid tabs numerically by tab number
- Click on focused pane no longer unfocuses it
- Delay idle notification sound by 10s to filter false intermediate alerts
- Bump chrome top from 3 to 4 rows (tab bar, pane list, header, content)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:52:35 +00:00
Alejandro Gutiérrez
9e424c192a feat: add tabbed grids, click-to-expand, and keybind cleanup
Introduces per-tab pane management with independent focus/expansion state,
a persistent tab bar visible in both picker and grid modes, and a 70/30
soft-expand layout triggered by clicking pane bodies. Removes legacy
toggle keybinds (Ctrl+^ and Ctrl+`) leaving only Ctrl+Space.

New keybinds: Ctrl+T new tab, Alt+1-9 switch tab, Alt+n/p cycle tabs,
Ctrl+E toggle click-expand, Ctrl+W auto-removes empty tabs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:45:25 +00:00
Alejandro Gutiérrez
61add15531 perf: hoist keyMap constant, dedup selection toggles, split stdinHandler
- Move keyMap to module-level KEY_MAP constant (was recreated per keystroke)
- Extract toggleRowSelection() to replace 4x duplicated toggle logic
- Extract refreshMockSessions() to deduplicate demo setup in index.ts
- Split stdinHandler into processGridInput/processPickerInput
- Extract collapseProject helper from nested left/right key handling
- Add shared syntheticKey() and clearChildren() helpers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 02:14:53 +00:00
Alejandro Gutiérrez
6488816d89 refactor: extract index.ts into 7 focused modules
Break 1507-line index.ts into a slim 251-line entry point plus:
- lib/theme.ts, lib/state.ts (shared constants + app singleton)
- ui/formatters.ts, ui/panels.ts (row formatting + UI updates)
- input/parser.ts, input/handlers.ts (stdin parsing + keyboard/mouse)
- grid/view-switch.ts, actions/launch.ts (grid switching + PTY launch)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 02:01:17 +00:00
Alejandro Gutiérrez
3ce6572952 feat: add direct PTY grid with expand/select mode for text copying
Replace tmux-based grid with direct PTY rendering. Add [MAX] button
to expand a pane to fullscreen and [SEL] to enable native text
selection within the expanded pane. Esc exits select/expanded mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 01:41:31 +00:00
Alejandro Gutiérrez
4132744a01 feat: add tmux-based multi-terminal grid view
Launch Claude Code sessions inside embedded tmux panes instead of
separate Terminal.app windows. Sessions are tiled in a grid layout with
color-coded borders per project. Border flashing alerts when a session
goes idle and needs input. Ctrl+` switches between picker and grid view.

New modules:
- src/tmux/session-manager.ts — tmux session lifecycle
- src/tmux/ansi-parser.ts — ANSI escape code to cell grid parser
- src/tmux/capture.ts — polls tmux capture-pane for rendering
- src/tmux/input-bridge.ts — forwards keystrokes to tmux sessions
- src/components/terminal-view.ts — FrameBuffer renderable for panes
- src/components/session-grid.ts — tiled grid with flash effects

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 00:37:35 +00:00
Alejandro Gutiérrez
2286aa5cc3 fix: prioritize checkmarked selections over idle/active focus on enter
When items are selected with checkmarks, pressing enter now always
launches them instead of being intercepted by idle panel or active
session focus logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:36:05 +00:00
Alejandro Gutiérrez
972269ef20 feat: add usage panel with session, weekly, and monthly cost bars
Scan ~/.claude/projects JSONL files to compute API cost usage.
Shows 4 bars matching Claude's usage screen: current session (5h window),
weekly all models, weekly sonnet-only, and monthly total.
Configurable plan limits in PLAN_LIMITS. Refreshes every 30s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 19:27:43 +00:00
Alejandro Gutiérrez
e56ed9bc95 fix: robust terminal focus with session targeting and code review fixes
- Extract helpers: focusTerminalTab, getTtyViaPsForPids, escapeAppleScript
- Batch ps tty lookup (single call for all PIDs instead of sequential)
- Target specific session tty when g pressed on session row
- Sort ttys by most recent activity for project-level focus
- Deduplicate tried ttys between primary and fallback paths
- Escape AppleScript interpolations to prevent injection
- Wrap flash animation in try/end try for mid-close safety
- Wrap async handleKeypress in try/catch for unhandled rejections
- Fix activeTag padding for consistent column alignment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:33:44 +00:00
Alejandro Gutiérrez
f8c6a5f584 feat: flash terminal background on focus and fix active tag alignment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:52:10 +00:00
Alejandro Gutiérrez
6e9788804f fix: deduplicate idle sessions and refresh session data on transitions
Multiple claude processes in the same CWD share one sessionFile via
findActiveJsonl, causing duplicate idle entries. Now deduplicates by
project+sessionFile key. Also refreshes session data on busy→idle
transitions so the parser fix takes effect immediately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 01:54:15 +00:00
Alejandro Gutiérrez
66ac50813a feat: idle panel navigation, dock bounce, and fix session text parsing
- Tab/shift-tab to select idle sessions, enter to focus terminal
- Dock bounces on busy→idle transition for attention
- Fix session parser to handle array-format user messages and skip
  system tags (<local-command-caveat>, <command-name>, etc.)
- Eagerly load session data for active projects so idle panel
  always shows title, prompt, and response
- Render idle rows as individual Text nodes to avoid t`` nesting bug

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 01:51:42 +00:00
Alejandro Gutiérrez
287d7d3228 feat: idle sessions panel toggle + session status indicators in tree view
Press 'i' to toggle bottom panel between Preview and Idle Sessions.
Auto-switches to idle mode on busy→idle transitions. Session rows now
show ● running / ◉ idle dots at the start for quick visual scanning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 01:37:03 +00:00
Alejandro Gutiérrez
ade8034294 feat: session status in expanded rows + idle panel
Show running/idle status inline on expanded session rows, add idle
sessions panel (toggle with 'i'), auto-switch to idle panel on
busy→idle transitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 01:33:31 +00:00
Alejandro Gutiérrez
c49de9865d Fix app closing on enter — stay open after launching sessions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 01:10:42 +00:00
Alejandro Gutiérrez
4a68cb698f feat: live session monitoring with busy/idle indicators and sound notification
Detect active Claude sessions' real-time status by monitoring JSONL file
modification times. Shows green dot when Claude is processing, yellow dot
with elapsed time when idle. Plays Glass.aiff when sessions transition
from busy to idle. Updates website and README with new features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 00:58:53 +00:00
Alejandro Gutiérrez
294b3f6b6c Add README with screenshots, animated GIF, and global CLI setup
Polished README with logo, demo GIF, annotated screenshots, column
legend, keybinding table, and install instructions. Added bin entry
and shebang so `bun link` registers the `cladm` command globally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:07:37 +00:00
Alejandro Gutiérrez
fcafe652cf Add TUI launcher implementation and project docs
Source modules for history parsing, git metadata, project scanning,
terminal launching, and OpenTUI component layout. Remove private flag
for publishing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:56:54 +00:00