How adrianogpena/session-deck works
Session Deck is a terminal dashboard for managing Claude Code and GitHub Copilot CLI sessions. The main workflow is to discover sessions across accounts and projects, organize and inspect them in the TUI, then attach, resume, or start an agent while it continues running in a background PTY. Supporting branches cover session status and usage, full-text search, configuration and saved organization, and control requests. The README documents product behavior; source excerpts and the index clarify selected internal links, but several implementation details are unsampled.
Main entry points: app.rs TUI app · sessions.rs Session model · tree.rs Session tree · live_session.rs PTY sessions
Components 21
Terminal interface
- TUI app
crates/sdeck/src/app.rs - Input events
crates/sdeck/src/event.rs - Session tree
crates/sdeck/src/tree.rs - Session list
crates/sdeck/src/view/list_panel.rs - Live preview
crates/sdeck/src/view/preview_panel.rs - Search and settings
crates/sdeck/src/view/overlays.rs
Session lifecycle
- Session model
crates/sdeck/src/sessions.rs - PTY sessions
crates/sdeck/src/live_session.rs - Transcript search
crates/sdeck/src/app/search.rs
Discovery and state
- Claude discovery
crates/sdeck-core/src/discovery/claude_storage.rs - Copilot discovery
crates/sdeck-core/src/discovery/copilot_storage.rs - Project grouping
crates/sdeck-core/src/discovery/git_project.rs - Saved state
crates/sdeck-core/src/store/deck_store.rs - Tree preferences
crates/sdeck-core/src/store/tree_prefs.rs
Status and control
- Session status
crates/sdeck-core/src/status/session_status.rs - Usage tracking
crates/sdeck-core/src/status/session_usage.rs - Waiting alerts
crates/sdeck-core/src/status/waiting_notifier.rs - Control server
crates/sdeck-core/src/ctl/server.rs - Control client
crates/sdeck/src/ctl_client.rs
Other components
- Terminal user
- Claude or Copilot CLI
Connections 22
- Terminal user → TUI app: uses
- Input events → TUI app: sends events
crates/sdeck/src/event.rs - TUI app → Session model: loads sessions
crates/sdeck/src/app.rs - Session model → Claude discovery: discovers sessions
crates/sdeck/src/sessions.rs - Session model → Copilot discovery: discovers sessions
crates/sdeck/src/sessions.rs - Session model → Project grouping: groups by project
- TUI app → Session tree: builds rows
crates/sdeck/src/app.rs - Session tree → Tree preferences: uses ordering
crates/sdeck/src/tree.rs - TUI app → Saved state: persists organization
- TUI app → Session list: renders sessions
crates/sdeck/src/app.rs - TUI app → Live preview: renders preview
crates/sdeck/src/app.rs - TUI app → Search and settings: opens overlays
crates/sdeck/src/app.rs - TUI app → Transcript search: handles search
crates/sdeck/src/app/search.rs - Transcript search → Session model: filters sessions
crates/sdeck/src/app/search.rs - Session model → Session status: derives status
crates/sdeck/src/sessions.rs - TUI app → Usage tracking: shows usage
crates/sdeck/src/app.rs - Session status → Waiting alerts: triggers alerts
- Terminal user → PTY sessions: attaches or resumes
- PTY sessions → Claude or Copilot CLI: runs in background
- Terminal user → Claude or Copilot CLI: starts session
- Terminal user → Control client: issues control request
- Control client → Control server: sends request