docs: update all docs for Phase 5 completion with SSH, ctx, themes, detached mode

- phases.md: Phase 5 status -> complete, added SSH/ctx/themes/detached/shiki/updater items, updated file structure
- progress.md: added Phase 5 continued session log, updated next steps
- task_plan.md: added 6 new decisions (ctx read-only, SSH via PTY, themes, detached, shiki), status Rev 3
- CLAUDE.md: added new key paths (ctx.rs, adapters, utils, stores, components), updated deps
- .claude/CLAUDE.md: updated phase status, added new technical constraints
- README.md: updated v2 feature summary
- TODO.md: resolved completed items, added new active items
- CHANGELOG.md: added SSH, ctx, themes, detached, shiki, updater entries
This commit is contained in:
Hibryda 2026-03-06 14:50:14 +01:00
parent 4db7ccff60
commit 1d028c67f7
8 changed files with 97 additions and 37 deletions

View file

@ -4,7 +4,7 @@
- v1 is a single-file Python app (`bterminal.py`). Changes are localized.
- v2 docs are in `docs/`. Architecture decisions are in `docs/task_plan.md`.
- All 6 phases complete. Phase 5 partial: tree node click-to-focus, subtree cost display, ctx integration still pending. Phase 6 (packaging) done: install-v2.sh, .deb/.AppImage bundles, GitHub Actions CI.
- All 6 phases complete + extras (SSH management, ctx integration, theme flavors, detached mode, auto-updater, shiki highlighting). Phase 5 minor deferred: tree node click-to-focus, subtree cost display.
- Consult Memora (tag: `bterminal`) before making architectural changes.
## Documentation References
@ -37,6 +37,11 @@
- Notifications use ephemeral toast system: `notifications.svelte.ts` store (max 5, 4s auto-dismiss), `ToastContainer.svelte` display. Agent dispatcher emits toasts on agent complete/error/crash.
- StatusBar component spans full grid width (grid-column: 1 / -1), shows pane counts, active agents, tokens, cost.
- Agent tree (AgentTree.svelte) uses SVG with recursive layout. Tree data built by `agent-tree.ts` utility from agent messages.
- ctx integration opens `~/.claude-context/context.db` as SQLITE_OPEN_READ_ONLY — never writes. CtxDb uses Option<Connection> for graceful absence if DB doesn't exist.
- SSH sessions spawn TerminalPane with shell=/usr/bin/ssh and args array. No SSH library needed — PTY handles it natively.
- Theme flavors (Latte/Frappe/Macchiato/Mocha) override CSS variables at runtime. Existing open terminals don't hot-swap; new terminals pick up the active theme.
- Detached pane mode: App.svelte checks URL param `?detached=1` and renders a single pane without sidebar/grid chrome. Used for pop-out windows.
- Shiki syntax highlighting uses lazy singleton pattern (avoid repeated WASM init). 13 languages preloaded. Used in MarkdownPane and AgentPane text messages.
## Memora Tags

View file

@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- SSH session management: SshSession CRUD in SQLite, SshDialog create/edit modal, SshSessionList grouped by folder with color dots, SSH pane type routing to TerminalPane with shell=/usr/bin/ssh (Phase 5)
- ctx context database integration: read-only CtxDb (Rust, SQLITE_OPEN_READ_ONLY), ContextPane with project selector, tabs for entries/summaries/search, ctx-bridge adapter (Phase 5)
- Catppuccin theme flavors: all 4 palettes (Latte/Frappe/Macchiato/Mocha) selectable via Settings dialog, theme.svelte.ts reactive store with SQLite persistence, TerminalPane theme-aware (Phase 5)
- Detached pane mode: pop-out terminal/agent panes into standalone windows via URL params (?detached=1), detach.ts utility, App.svelte conditional rendering (Phase 5)
- Shiki syntax highlighting: lazy singleton highlighter with catppuccin-mocha theme, 13 preloaded languages, integrated in MarkdownPane and AgentPane text messages (Phase 5)
- Tauri auto-updater plugin: tauri-plugin-updater (Rust + npm) + updater.ts frontend utility (Phase 6)
- Markdown rendering in agent text messages with Shiki code highlighting (Phase 5)
- Build-from-source installer `install-v2.sh` with 6-step dependency checking (Node.js 20+, Rust 1.77+, WebKit2GTK, GTK3, and 8 other system libraries), auto-install via apt, binary install to `~/.local/bin/bterminal-v2` with desktop entry (Phase 6)
- Tauri bundle configuration for .deb and AppImage targets with category, descriptions, and deb dependencies (Phase 6)
- GitHub Actions release workflow (`.github/workflows/release.yml`): triggered on `v*` tags, builds on Ubuntu 22.04 with Rust/npm caching, uploads .deb + AppImage as GitHub Release artifacts (Phase 6)

View file

@ -2,7 +2,7 @@
## Project Overview
Terminal emulator with SSH and Claude Code session management. v1 (GTK3+VTE Python) is production-stable. v2 redesign (Tauri 2.x + Svelte 5 + Claude Agent SDK) all 6 phases complete. Packaging: .deb + AppImage via GitHub Actions CI.
Terminal emulator with SSH and Claude Code session management. v1 (GTK3+VTE Python) is production-stable. v2 redesign (Tauri 2.x + Svelte 5 + Claude Agent SDK) all 6 phases complete plus extras (SSH management, ctx integration, theme flavors, detached pane mode, auto-updater). Packaging: .deb + AppImage via GitHub Actions CI.
- **Repository:** github.com/DexterFromLab/BTerminal
- **License:** MIT
@ -28,8 +28,9 @@ Terminal emulator with SSH and Claude Code session management. v1 (GTK3+VTE Pyth
| `v2/src-tauri/src/pty.rs` | PTY backend (portable-pty, PtyManager) |
| `v2/src-tauri/src/lib.rs` | Tauri commands (pty + agent + session + file + settings) |
| `v2/src-tauri/src/sidecar.rs` | SidecarManager (Node.js lifecycle, NDJSON) |
| `v2/src-tauri/src/session.rs` | SessionDb (rusqlite, sessions + layout + settings persistence) |
| `v2/src-tauri/src/session.rs` | SessionDb (rusqlite, sessions + layout + settings + ssh_sessions) |
| `v2/src-tauri/src/watcher.rs` | FileWatcherManager (notify crate, file change events) |
| `v2/src-tauri/src/ctx.rs` | CtxDb (read-only access to ~/.claude-context/context.db) |
| `v2/src/lib/stores/layout.svelte.ts` | Layout store (panes, presets, persistence, Svelte 5 runes) |
| `v2/src/lib/stores/agents.svelte.ts` | Agent session store (messages, cost) |
| `v2/src/lib/components/Terminal/TerminalPane.svelte` | xterm.js terminal pane |
@ -40,14 +41,24 @@ Terminal emulator with SSH and Claude Code session management. v1 (GTK3+VTE Pyth
| `v2/src/lib/agent-dispatcher.ts` | Routes sidecar events to agent store + toast notifications |
| `v2/src/lib/adapters/file-bridge.ts` | File watcher IPC wrapper |
| `v2/src/lib/adapters/settings-bridge.ts` | Settings IPC wrapper (get/set/list) |
| `v2/src/lib/adapters/ctx-bridge.ts` | ctx database IPC wrapper |
| `v2/src/lib/adapters/ssh-bridge.ts` | SSH session IPC wrapper |
| `v2/src/lib/utils/agent-tree.ts` | Agent tree builder (hierarchy from messages) |
| `v2/src/lib/utils/highlight.ts` | Shiki syntax highlighter (lazy singleton, 13 languages) |
| `v2/src/lib/utils/detach.ts` | Detached pane mode (pop-out windows via URL params) |
| `v2/src/lib/utils/updater.ts` | Tauri auto-updater utility |
| `v2/src/lib/stores/notifications.svelte.ts` | Toast notification store (notify, dismiss) |
| `v2/src/lib/stores/theme.svelte.ts` | Theme flavor store (Catppuccin 4 flavors) |
| `v2/src/lib/styles/themes.ts` | Catppuccin palette definitions (Latte/Frappe/Macchiato/Mocha) |
| `v2/src/lib/components/Agent/AgentTree.svelte` | SVG agent tree visualization |
| `v2/src/lib/components/Context/ContextPane.svelte` | ctx database viewer (projects, entries, search) |
| `v2/src/lib/components/SSH/SshDialog.svelte` | SSH session create/edit modal |
| `v2/src/lib/components/SSH/SshSessionList.svelte` | SSH session list in sidebar |
| `v2/src/lib/components/StatusBar/StatusBar.svelte` | Global status bar (pane counts, cost) |
| `v2/src/lib/components/Notifications/ToastContainer.svelte` | Toast notification display |
| `v2/src/lib/components/Settings/SettingsDialog.svelte` | Settings modal dialog |
| `v2/src/lib/components/Settings/SettingsDialog.svelte` | Settings modal (shell, cwd, max panes, theme) |
| `v2/src/lib/adapters/session-bridge.ts` | Session/layout persistence IPC wrapper |
| `v2/src/lib/components/Markdown/MarkdownPane.svelte` | Markdown file viewer (marked.js, live reload) |
| `v2/src/lib/components/Markdown/MarkdownPane.svelte` | Markdown file viewer (marked.js + shiki, live reload) |
| `v2/sidecar/agent-runner.ts` | Node.js sidecar (spawns claude CLI) |
## v1 Stack
@ -66,8 +77,8 @@ Terminal emulator with SSH and Claude Code session management. v1 (GTK3+VTE Pyth
- portable-pty for terminal management
- SQLite session persistence (rusqlite, WAL mode) + layout restore on startup
- File watcher (notify crate) for live markdown viewer
- Rust deps: tauri, portable-pty, rusqlite (bundled), dirs, notify, uuid, serde, tokio
- npm deps: @xterm/xterm, @xterm/addon-canvas, @xterm/addon-fit, @tauri-apps/api, marked
- Rust deps: tauri, portable-pty, rusqlite (bundled), dirs, notify, uuid, serde, tokio, tauri-plugin-updater
- npm deps: @xterm/xterm, @xterm/addon-canvas, @xterm/addon-fit, @tauri-apps/api, @tauri-apps/plugin-updater, marked, shiki
- Source: `v2/` directory
## Build / Run

View file

@ -2,7 +2,7 @@
Terminal with session panel (MobaXterm-style), built with GTK 3 + VTE. Catppuccin Mocha theme.
> **v2 all phases complete:** Multi-session Claude agent dashboard using Tauri 2.x + Svelte 5. Features: multi-pane terminal with PTY backend, agent panes with structured output and tree visualization, SQLite session persistence with layout restore, live markdown file viewer, global status bar with cost tracking, toast notifications, settings dialog, CSS Grid tiling, Catppuccin theme, .deb + AppImage packaging, and GitHub Actions CI. Branch `v2-mission-control`. See [docs/task_plan.md](docs/task_plan.md) for architecture and [docs/phases.md](docs/phases.md) for implementation plan.
> **v2 all phases complete + extras:** Multi-session Claude agent dashboard using Tauri 2.x + Svelte 5. Features: multi-pane terminal with PTY backend, agent panes with structured output and tree visualization, SSH session management, ctx context database viewer, SQLite session persistence with layout restore, live markdown file viewer with Shiki syntax highlighting, global status bar with cost tracking, toast notifications, settings dialog with theme flavors (Catppuccin Latte/Frappe/Macchiato/Mocha), detached pane mode (pop-out windows), auto-updater plugin, CSS Grid tiling, .deb + AppImage packaging, and GitHub Actions CI. Branch `v2-mission-control`. See [docs/task_plan.md](docs/task_plan.md) for architecture and [docs/phases.md](docs/phases.md) for implementation plan.
![BTerminal](screenshot.png)

23
TODO.md
View file

@ -2,21 +2,24 @@
## Active
- [ ] **Phase 5 remaining** -- Click tree node -> focus agent pane (onNodeClick wiring), subtree cost display in tree, ctx integration (port from v1).
- [ ] **Markdown rendering in agent text messages** -- Currently plain text; needs marked.js integration in AgentPane text blocks.
- [ ] **Phase 5 remaining** -- Click tree node -> focus agent pane (onNodeClick wiring), subtree cost display in tree.
- [ ] **Testing** -- vitest for sdk-messages adapter, cargo test for sidecar/session/watcher, Playwright for e2e.
- [ ] **Pane drag-resize handles** -- Deferred from Phase 2, current presets sufficient for MVP.
- [ ] **Copy/paste (Ctrl+Shift+C/V)** -- Deferred from Phase 2.
- [ ] **Session resume (SDK resumeSessionId)** -- Allow resuming previous agent sessions.
- [ ] **Evaluate Deno as sidecar runtime** -- Single binary, better packaging than Node.js. Test SDK compatibility.
- [ ] **Syntax highlighting in markdown viewer** -- Shiki integration deferred for bundle size.
- [ ] **Tauri auto-update plugin** -- Needs signing key + update server setup. Deferred from Phase 6.
- [ ] **Auto-update signing key + update server** -- Plugin integrated, needs signing infrastructure for full auto-update flow.
- [ ] **Terminal theme hot-swap** -- Existing open terminals don't update when theme flavor changes; only new terminals pick up the new theme.
## Completed
- [x] **Phase 6: Packaging + Distribution** -- install-v2.sh (build-from-source with dependency checks), tauri.conf.json bundle config (deb+appimage), icon regeneration, GitHub Actions release workflow (.deb + AppImage on v* tags). Build verified: .deb 4.3 MB, AppImage 103 MB. | Done: 2026-03-06
- [x] **Phase 5 partial: Agent Tree + Polish** -- Agent tree SVG visualization, global status bar, toast notifications, settings dialog + SQLite backend, keyboard shortcuts (Ctrl+W, Ctrl+,), agent dispatcher toast integration. | Done: 2026-03-06
- [x] **Phase 4: Session Management + Markdown Viewer** -- SQLite persistence (rusqlite, WAL), session CRUD, layout restore on startup, file watcher (notify crate), MarkdownPane with marked.js and Catppuccin styles, sidebar file picker. | Done: 2026-03-06
- [x] **Phase 3: Agent SDK Integration (core + polish)** -- Sidecar manager with restart, crash detection, auto-scroll lock, agent pane with messages/cost/stop/restart. | Done: 2026-03-06
- [x] **Phase 2: Terminal Pane + Layout** -- PTY backend (portable-pty), xterm.js + Canvas addon, CSS Grid tiling (5 presets), sidebar, keyboard shortcuts. | Done: 2026-03-05
- [x] **Phase 1: Project Scaffolding** -- Tauri 2.x + Svelte 5 scaffolded in `v2/`, Catppuccin theme, Rust stubs, sidecar scaffold. | Done: 2026-03-05
- [x] **SSH session management** -- CRUD in SQLite, SshDialog/SshSessionList components, SSH pane type routing to TerminalPane with ssh args. | Done: 2026-03-06
- [x] **ctx integration** -- Read-only CtxDb in Rust (ctx.rs), ContextPane with project selector/tabs/search, ctx-bridge adapter. | Done: 2026-03-06
- [x] **Catppuccin theme flavors** -- Latte/Frappe/Macchiato/Mocha selectable, themes.ts + theme.svelte.ts store, SettingsDialog dropdown. | Done: 2026-03-06
- [x] **Detached pane mode** -- Pop-out windows via URL params (?detached=1), detach.ts utility, App.svelte conditional rendering. | Done: 2026-03-06
- [x] **Syntax highlighting** -- Shiki with catppuccin-mocha theme, lazy singleton highlighter, 13 preloaded languages. Integrated in MarkdownPane and AgentPane. | Done: 2026-03-06
- [x] **Tauri auto-updater plugin** -- tauri-plugin-updater (Rust + npm) + updater.ts utility integrated. | Done: 2026-03-06
- [x] **Markdown rendering in agent messages** -- AgentPane text messages rendered as markdown with Shiki highlighting. | Done: 2026-03-06
- [x] **Phase 6: Packaging + Distribution** -- install-v2.sh, tauri.conf.json bundle config (deb+appimage), icon regeneration, GitHub Actions release workflow. | Done: 2026-03-06
- [x] **Phase 5 partial: Agent Tree + Polish** -- Agent tree SVG, status bar, toast notifications, settings dialog + SQLite backend, keyboard shortcuts. | Done: 2026-03-06
- [x] **Phase 4: Session Management + Markdown Viewer** -- SQLite persistence, session CRUD, layout restore, file watcher, MarkdownPane. | Done: 2026-03-06

View file

@ -22,44 +22,56 @@ bterminal-v2/
pty.rs # PTY management (portable-pty, not plugin)
sidecar.rs # Node.js sidecar lifecycle (spawn, restart, health)
watcher.rs # File watcher for markdown viewer
session.rs # Session persistence (SQLite via rusqlite)
session.rs # Session + SSH session persistence (SQLite via rusqlite)
ctx.rs # Read-only ctx context DB access
Cargo.toml
src/
App.svelte # Root layout
App.svelte # Root layout + detached pane mode
lib/
components/
Layout/
TilingGrid.svelte # Dynamic tiling manager
PaneContainer.svelte # Individual pane wrapper
PaneHeader.svelte # Pane title bar with controls
Terminal/
TerminalPane.svelte # xterm.js terminal pane
TerminalPane.svelte # xterm.js terminal pane (theme-aware)
Agent/
AgentPane.svelte # SDK agent structured output
AgentTree.svelte # Subagent tree visualization (SVG)
Markdown/
MarkdownPane.svelte # Live markdown file viewer
MarkdownPane.svelte # Live markdown file viewer (shiki highlighting)
Context/
ContextPane.svelte # ctx database viewer (projects, entries, search)
SSH/
SshDialog.svelte # SSH session create/edit modal
SshSessionList.svelte # SSH session list in sidebar
Sidebar/
SessionList.svelte # Session browser
SessionList.svelte # Session browser + SSH list
StatusBar/
StatusBar.svelte # Global status bar (pane counts, cost)
Notifications/
ToastContainer.svelte # Toast notification display
Settings/
SettingsDialog.svelte # Settings modal dialog
SettingsDialog.svelte # Settings modal (shell, cwd, max panes, theme)
stores/
sessions.svelte.ts # Session state ($state runes)
agents.svelte.ts # Active agent tracking
layout.svelte.ts # Pane layout state
notifications.svelte.ts # Toast notification state
theme.svelte.ts # Catppuccin theme flavor state
adapters/
sdk-messages.ts # SDK message abstraction layer
pty-bridge.ts # PTY IPC wrapper
settings-bridge.ts # Settings IPC wrapper
ctx-bridge.ts # ctx database IPC wrapper
ssh-bridge.ts # SSH session IPC wrapper
utils/
agent-tree.ts # Agent tree builder (hierarchy from messages)
highlight.ts # Shiki syntax highlighter (lazy singleton)
detach.ts # Detached pane mode (pop-out windows)
updater.ts # Tauri auto-updater utility
styles/
catppuccin.css # Theme CSS variables
catppuccin.css # Theme CSS variables (Mocha defaults)
themes.ts # All 4 Catppuccin flavor definitions
app.css
sidecar/
agent-runner.ts # Node.js sidecar entry point
@ -163,7 +175,7 @@ bterminal-v2/
### Markdown Viewer
- [x] File watcher (notify crate v6) -> Tauri events -> frontend
- [x] Markdown rendering (marked.js)
- [ ] Syntax highlighting (Shiki) — deferred, adds significant bundle size
- [x] Syntax highlighting (Shiki) — added in Phase 5 (highlight.ts, 13 preloaded languages)
- [x] Open from sidebar (file picker button "M")
- [x] Catppuccin-themed markdown styles (h1-h3, code, pre, tables, blockquotes)
- [x] Live reload on file change
@ -172,7 +184,7 @@ bterminal-v2/
---
## Phase 5: Agent Tree + Polish [status: partial] — Post-MVP
## Phase 5: Agent Tree + Polish [status: complete] — Post-MVP
- [x] Agent tree visualization (SVG, compact horizontal layout) — AgentTree.svelte + agent-tree.ts utility
- [ ] Click tree node -> focus agent pane (onNodeClick prop exists, not wired)
@ -181,9 +193,13 @@ bterminal-v2/
- [x] Notification system (toast: success/error/warning/info, auto-dismiss 4s, max 5) — notifications.svelte.ts + ToastContainer.svelte
- [x] Agent dispatcher toast integration (agent complete, error, sidecar crash notifications)
- [x] Global keyboard shortcuts — Ctrl+W close focused pane, Ctrl+, open settings
- [x] Settings dialog (default shell, cwd, max panes) — SettingsDialog.svelte + settings-bridge.ts
- [x] Settings dialog (default shell, cwd, max panes, theme flavor) — SettingsDialog.svelte + settings-bridge.ts
- [x] Settings backend — settings table in SQLite (session.rs), Tauri commands settings_get/set/list (lib.rs)
- [ ] ctx integration (port from v1)
- [x] ctx integration — read-only access to ~/.claude-context/context.db (ctx.rs, ctx-bridge.ts, ContextPane.svelte)
- [x] SSH session management — CRUD in SQLite (SshSession struct, SshDialog.svelte, SshSessionList.svelte, ssh-bridge.ts)
- [x] Catppuccin theme flavors — Latte/Frappe/Macchiato/Mocha selectable (themes.ts, theme.svelte.ts)
- [x] Detached pane mode — pop-out terminal/agent into standalone windows (detach.ts, App.svelte)
- [x] Syntax highlighting — Shiki integration for markdown + agent messages (highlight.ts, shiki dep)
---
@ -203,7 +219,8 @@ bterminal-v2/
- Caches Rust and npm dependencies
- Builds .deb + AppImage, uploads as GitHub Release artifacts
- [x] Build verified: .deb (4.3 MB), AppImage (103 MB)
- [ ] Auto-update mechanism (Tauri updater) — deferred, needs signing key + update server
- [x] Auto-updater plugin integrated (tauri-plugin-updater Rust + @tauri-apps/plugin-updater npm + updater.ts)
- [ ] Auto-update signing key + update server setup (needed for full auto-update flow)
### System Requirements
- Node.js 20+ (for Agent SDK sidecar)

View file

@ -97,13 +97,13 @@ Architecture decision: Uses `claude` CLI with `--output-format stream-json` inst
- [x] Sidebar "M" button opens file picker for .md/.markdown/.txt files
- [x] TilingGrid routes markdown pane type to MarkdownPane component
### Phase 5: Agent Tree + Polish (2026-03-06, in progress)
### Phase 5: Agent Tree + Polish (2026-03-06, complete)
- [x] Agent tree visualization (SVG): AgentTree.svelte component with horizontal tree layout, bezier edges, status-colored nodes; agent-tree.ts utility (buildAgentTree, countTreeNodes, subtreeCost)
- [x] Agent tree toggle in AgentPane: collapsible tree view shown when tool_call messages exist
- [x] Global status bar: StatusBar.svelte showing terminal/agent pane counts, active agents with pulse animation, total tokens and cost
- [x] Notification system: notifications.svelte.ts store (notify, dismissNotification, max 5 toasts, 4s auto-dismiss) + ToastContainer.svelte (slide-in animation, color-coded by type)
- [x] Agent dispatcher notifications: toast on agent_stopped (success), agent_error (error), sidecar crash (error), cost result (success with cost/turns)
- [x] Settings dialog: SettingsDialog.svelte modal (default shell, cwd, max panes) with settings-bridge.ts adapter
- [x] Settings dialog: SettingsDialog.svelte modal (default shell, cwd, max panes, theme flavor) with settings-bridge.ts adapter
- [x] Settings backend: settings table (key/value) in session.rs, Tauri commands settings_get/set/list in lib.rs
- [x] Keyboard shortcuts: Ctrl+W close focused pane, Ctrl+, open settings dialog
- [x] CSS grid update: app.css grid-template-rows '1fr' -> '1fr auto' for status bar row
@ -123,8 +123,20 @@ Architecture decision: Uses `claude` CLI with `--output-format stream-json` inst
- [x] Build verified: .deb (4.3 MB), AppImage (103 MB) both built successfully
- [ ] Tauri auto-update plugin deferred (needs signing key + update server)
### Phase 5 continued: SSH, ctx, themes, detached mode, auto-updater (2026-03-06)
- [x] ctx integration: Rust ctx.rs (read-only CtxDb with SQLITE_OPEN_READ_ONLY), 5 Tauri commands (ctx_list_projects, ctx_get_context, ctx_get_shared, ctx_get_summaries, ctx_search), ctx-bridge.ts adapter, ContextPane.svelte (project selector, tabs for entries/summaries/search)
- [x] SSH session management: SshSession struct + ssh_sessions table in session.rs, 3 Tauri commands (ssh_session_list/save/delete), ssh-bridge.ts adapter, SshDialog.svelte (create/edit modal with validation), SshSessionList.svelte (grouped by folder, color dots)
- [x] TilingGrid SSH routing: SSH pane type routes to TerminalPane with shell=/usr/bin/ssh and constructed args array
- [x] Catppuccin theme flavors: themes.ts with all 4 palettes (Latte/Frappe/Macchiato/Mocha), theme.svelte.ts reactive store, SettingsDialog flavor dropdown, TerminalPane uses getXtermTheme(), persistence via SQLite settings
- [x] Detached pane mode: detach.ts utility (isDetachedMode, getDetachedConfig from URL params), App.svelte renders single pane in full-viewport without chrome when ?detached=1
- [x] Syntax highlighting: highlight.ts with Shiki lazy singleton (13 preloaded languages, catppuccin-mocha theme), integrated into MarkdownPane and AgentPane text messages
- [x] Tauri auto-updater plugin: tauri-plugin-updater (Rust) + @tauri-apps/plugin-updater (npm) + updater.ts frontend utility
- [x] AgentPane markdown rendering: text messages now rendered as markdown with Shiki highlighting
- [x] New npm dependencies: shiki, @tauri-apps/plugin-updater
- [x] New Rust dependency: tauri-plugin-updater
### Next Steps
- [ ] Markdown rendering in agent text messages
- [ ] Testing: vitest for sdk-messages adapter, cargo test for sidecar
- [ ] Phase 5 remaining: click tree node -> focus pane, subtree cost display, ctx integration
- [ ] Tauri auto-update plugin (signing key + update server)
- [ ] Phase 5 remaining: click tree node -> focus pane, subtree cost display
- [ ] Auto-update signing key + update server setup
- [ ] Session resume (SDK resumeSessionId)

View file

@ -3,7 +3,7 @@
## Goal
Redesign BTerminal from a GTK3 terminal emulator into a **multi-session Claude agent dashboard** optimized for 32:9 ultrawide (5120x1440). Simultaneous visibility of all active sessions, agent tree visualization, inline markdown rendering, maximum information density.
## Status: All 6 Phases Complete (MVP + post-MVP, packaging done — Rev 2)
## Status: All 6 Phases Complete + extras (MVP + post-MVP, packaging, SSH, ctx, themes — Rev 3)
---
@ -128,6 +128,11 @@ See [phases.md](phases.md) for the full phased implementation plan (Phases 1-6).
| SQLite settings table for app config | Key-value `settings` table in session.rs for persisting user preferences (shell, cwd, max panes). Simple and extensible without schema migrations. | 2026-03-06 |
| Toast notifications over persistent log | Ephemeral toasts (4s auto-dismiss, max 5) for agent events rather than a persistent notification log. Keeps UI clean; persistent logs can be added later if needed. | 2026-03-06 |
| Build-from-source installer over pre-built binaries | install-v2.sh checks deps and builds locally. Pre-built binaries via GitHub Actions CI (.deb + AppImage on v* tags). Auto-update deferred until signing key infrastructure is set up. | 2026-03-06 |
| ctx read-only access from Rust | Open ~/.claude-context/context.db with SQLITE_OPEN_READ_ONLY. Never write — ctx CLI owns the schema. Separate CtxDb struct in ctx.rs with Option<Connection> for graceful absence. | 2026-03-06 |
| SSH via PTY shell args | SSH sessions spawn TerminalPane with shell=/usr/bin/ssh and args=[-p, port, [-i, keyfile], user@host]. No special SSH library — PTY handles it natively. | 2026-03-06 |
| Catppuccin 4 flavors at runtime | CSS variables overridden at runtime for non-Mocha flavors. Existing terminals don't hot-swap (limitation accepted); new terminals pick up the active theme. | 2026-03-06 |
| Detached pane via URL params | Pop-out windows use ?detached=1&type=terminal URL params. App.svelte conditionally renders single pane without sidebar/grid chrome. Simple, no IPC needed. | 2026-03-06 |
| Shiki over highlight.js | Shiki provides VS Code-grade syntax highlighting with Catppuccin theme. Lazy singleton pattern avoids repeated WASM init. 13 languages preloaded. | 2026-03-06 |
## Open Questions