docs: update meta files for v3 Mission Control MVP
- CLAUDE.md: add v3 key paths, update overview and test counts - .claude/CLAUDE.md: add v3 constraints and Svelte 5 event syntax note - README.md: update description for v3 MVP status - TODO.md: move v3 planning to completed, add Phases 6-10 active items - CHANGELOG.md: add v3 MVP entries under Unreleased
This commit is contained in:
parent
4f29582aac
commit
9766a480ed
5 changed files with 50 additions and 28 deletions
|
|
@ -4,8 +4,9 @@
|
|||
|
||||
- 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`.
|
||||
- v2 Phases 1-7 + multi-machine (A-D) + profiles/skills complete. Extras: SSH, ctx, themes, detached mode, auto-updater, shiki, copy/paste, session resume, drag-resize, session groups, Deno sidecar, Claude profiles (switcher-claude), skill discovery/autocomplete, 114 vitest + 29 cargo tests.
|
||||
- v3 planning started: multi-project mission control redesign. See `docs/v3-task_plan.md`, `docs/v3-findings.md`, `docs/v3-progress.md`.
|
||||
- v2 Phases 1-7 + multi-machine (A-D) + profiles/skills complete. Extras: SSH, ctx, themes, detached mode, auto-updater, shiki, copy/paste, session resume, drag-resize, session groups, Deno sidecar, Claude profiles, skill discovery.
|
||||
- v3 Mission Control MVP (Phases 1-5) implemented: project groups, workspace store, 12 new Workspace components, groups.rs backend, SQLite migrations. 138 vitest + 36 cargo tests.
|
||||
- v3 docs: `docs/v3-task_plan.md`, `docs/v3-findings.md`, `docs/v3-progress.md`.
|
||||
- Consult Memora (tag: `bterminal`) before making architectural changes.
|
||||
|
||||
## Documentation References
|
||||
|
|
@ -61,6 +62,12 @@
|
|||
- Pane.remoteMachineId?: string routes operations through RemoteManager instead of local managers. Bridge adapters (pty-bridge, agent-bridge) check this field.
|
||||
- bterminal-relay binary (v2/bterminal-relay/) is a standalone WebSocket server with token auth, rate limiting, and per-connection isolated managers. Commands return structured responses (pty_created, pong, error) with commandId for correlation via send_error() helper.
|
||||
- RemoteManager reconnection: exponential backoff (1s-30s cap) on disconnect, attempt_tcp_probe() (TCP-only, no WS upgrade), emits remote-machine-reconnecting and remote-machine-reconnect-ready events. Frontend listeners in remote-bridge.ts; machines store auto-reconnects on ready.
|
||||
- v3 workspace store (`workspace.svelte.ts`) replaces layout store for v3. Groups loaded from `~/.config/bterminal/groups.json` via `groups-bridge.ts`. State: groups, activeGroupId, activeTab, focusedProjectId. Derived: activeGroup, activeProjects.
|
||||
- v3 groups backend (`groups.rs`): load_groups(), save_groups(), default_groups(). Tauri commands: groups_load, groups_save.
|
||||
- v3 SQLite additions: agent_messages table (per-project message persistence), project_agent_state table (sdkSessionId, cost, status per project), sessions.project_id column.
|
||||
- v3 App.svelte fully rewritten: no sidebar, no TilingGrid. Renders GlobalTabBar + tab content (Sessions/Docs/Context/Settings) + StatusBar.
|
||||
- v3 component tree: App -> GlobalTabBar + ProjectGrid -> ProjectBox -> (ProjectHeader + ClaudeSession + TeamAgentsPanel + TerminalTabs). See `docs/v3-task_plan.md` for full tree.
|
||||
- Svelte 5 event syntax: use `onclick` not `on:click`. Svelte 5 requires lowercase event handler attributes (no colon syntax).
|
||||
|
||||
## Memora Tags
|
||||
|
||||
|
|
|
|||
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -8,7 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- v3 Mission Control redesign planning: architecture docs (`docs/v3-task_plan.md`, `docs/v3-findings.md`, `docs/v3-progress.md`), codebase reuse analysis, adversarial architecture review launched
|
||||
- v3 Mission Control MVP (Phases 1-5): multi-project dashboard with project groups, per-project Claude sessions, team agents panel, terminal tabs, workspace tabs (Sessions/Docs/Context/Settings)
|
||||
- v3 data model: `groups.rs` (Rust structs + load/save `~/.config/bterminal/groups.json`), `groups.ts` (TypeScript interfaces), `groups-bridge.ts` (IPC adapter), `--group` CLI argument
|
||||
- v3 workspace store (`workspace.svelte.ts`): replaces `layout.svelte.ts`, manages groups/activeGroupId/activeTab/focusedProjectId with Svelte 5 runes
|
||||
- v3 SQLite migrations: `agent_messages` table (per-project message persistence), `project_agent_state` table (sdkSessionId/cost/status per project), `project_id` column on sessions
|
||||
- 12 new Workspace components: GlobalTabBar, ProjectGrid, ProjectBox, ProjectHeader, ClaudeSession, TeamAgentsPanel, AgentCard, TerminalTabs, CommandPalette, DocsTab, ContextTab, SettingsTab
|
||||
- v3 App.svelte full rewrite: GlobalTabBar + tab content area + StatusBar (no sidebar, no TilingGrid)
|
||||
- 24 new vitest tests for workspace store, 7 new cargo tests for groups (total: 138 vitest + 36 cargo)
|
||||
- v3 adversarial architecture review: 3 agents (Architect, Devil's Advocate, UX+Performance Specialist), 12 issues identified and resolved
|
||||
- v3 Mission Control redesign planning: architecture docs (`docs/v3-task_plan.md`, `docs/v3-findings.md`, `docs/v3-progress.md`), codebase reuse analysis
|
||||
- Claude profile/account switching: `claude_list_profiles()` reads `~/.config/switcher/profiles/` directories with `profile.toml` metadata (email, subscription_type, display_name); profile selector dropdown in AgentPane toolbar when multiple profiles available; selected profile's `config_dir` passed as `CLAUDE_CONFIG_DIR` env override to SDK
|
||||
- Skill discovery and autocomplete: `claude_list_skills()` reads `~/.claude/skills/` (directories with `SKILL.md` or standalone `.md` files); type `/` in agent prompt textarea to trigger autocomplete menu with arrow key navigation, Tab/Enter selection, Escape dismiss; `expandSkillPrompt()` reads skill content and injects as prompt
|
||||
- New frontend adapter `claude-bridge.ts`: `ClaudeProfile` and `ClaudeSkill` interfaces, `listProfiles()`, `listSkills()`, `readSkill()` IPC wrappers
|
||||
|
|
@ -24,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Sidecar runners inject `CLAUDE_CONFIG_DIR` into clean env when `claudeConfigDir` provided in query message (multi-account support)
|
||||
|
||||
### Fixed
|
||||
- AgentPane Svelte 5 event modifier syntax: `on:click` changed to `onclick` (Svelte 5 requires lowercase event handler attributes, not colon syntax)
|
||||
- CLAUDE* env var stripping now applied at Rust level in SidecarManager (bterminal-core/src/sidecar.rs): `env_clear()` + `envs(clean_env)` strips all CLAUDE-prefixed vars before spawning sidecar process, providing primary defense against nesting detection (JS-side stripping retained as defense-in-depth)
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
16
CLAUDE.md
16
CLAUDE.md
|
|
@ -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) Phases 1-7 + multi-machine (A-D) + profiles/skills complete. Packaging: .deb + AppImage via GitHub Actions CI. v3 planning started: multi-project mission control redesign (project groups, per-project Claude sessions, workspace tabs).
|
||||
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) Phases 1-7 + multi-machine (A-D) + profiles/skills complete. Packaging: .deb + AppImage via GitHub Actions CI. v3 Mission Control MVP (Phases 1-5) implemented: multi-project dashboard with project groups, per-project Claude sessions, team agents panel, terminal tabs, workspace tabs (Sessions/Docs/Context/Settings).
|
||||
|
||||
- **Repository:** github.com/DexterFromLab/BTerminal
|
||||
- **License:** MIT
|
||||
|
|
@ -34,14 +34,16 @@ Terminal emulator with SSH and Claude Code session management. v1 (GTK3+VTE Pyth
|
|||
| `v2/bterminal-core/` | Shared crate: EventSink trait, PtyManager, SidecarManager |
|
||||
| `v2/bterminal-relay/` | Standalone relay binary (WebSocket server, token auth, CLI) |
|
||||
| `v2/src-tauri/src/pty.rs` | PTY backend (thin re-export from bterminal-core) |
|
||||
| `v2/src-tauri/src/lib.rs` | Tauri commands (pty + agent + session + file + settings + 12 remote + 4 claude profile/skill) |
|
||||
| `v2/src-tauri/src/groups.rs` | Groups config (load/save ~/.config/bterminal/groups.json) |
|
||||
| `v2/src-tauri/src/lib.rs` | Tauri commands (pty + agent + session + file + settings + 12 remote + 4 claude + 2 groups) |
|
||||
| `v2/src-tauri/src/sidecar.rs` | SidecarManager (thin re-export from bterminal-core) |
|
||||
| `v2/src-tauri/src/event_sink.rs` | TauriEventSink (implements EventSink for AppHandle) |
|
||||
| `v2/src-tauri/src/remote.rs` | RemoteManager (WebSocket client connections to relays) |
|
||||
| `v2/src-tauri/src/session.rs` | SessionDb (rusqlite, sessions + layout + settings + ssh_sessions) |
|
||||
| `v2/src-tauri/src/session.rs` | SessionDb (rusqlite, sessions + layout + settings + ssh_sessions + agent_messages + project_agent_state) |
|
||||
| `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, groups, persistence, Svelte 5 runes) |
|
||||
| `v2/src/lib/stores/workspace.svelte.ts` | v3 workspace store (project groups, tabs, focus, replaces layout store) |
|
||||
| `v2/src/lib/stores/layout.svelte.ts` | v2 layout store (panes, presets, groups, persistence, Svelte 5 runes) |
|
||||
| `v2/src/lib/stores/agents.svelte.ts` | Agent session store (messages, cost, parent/child hierarchy) |
|
||||
| `v2/src/lib/components/Terminal/TerminalPane.svelte` | xterm.js terminal pane |
|
||||
| `v2/src/lib/components/Agent/AgentPane.svelte` | Agent session pane (prompt, messages, cost, profile selector, skill autocomplete) |
|
||||
|
|
@ -54,6 +56,7 @@ Terminal emulator with SSH and Claude Code session management. v1 (GTK3+VTE Pyth
|
|||
| `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/adapters/claude-bridge.ts` | Claude profiles + skills IPC wrapper |
|
||||
| `v2/src/lib/adapters/groups-bridge.ts` | Groups config IPC wrapper (load/save) |
|
||||
| `v2/src/lib/adapters/remote-bridge.ts` | Remote machine management IPC wrapper |
|
||||
| `v2/src/lib/stores/machines.svelte.ts` | Remote machine state store (Svelte 5 runes) |
|
||||
| `v2/src/lib/utils/agent-tree.ts` | Agent tree builder (hierarchy from messages) |
|
||||
|
|
@ -70,6 +73,8 @@ Terminal emulator with SSH and Claude Code session management. v1 (GTK3+VTE Pyth
|
|||
| `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 (shell, cwd, max panes, theme) |
|
||||
| `v2/src/lib/components/Workspace/` | v3 components: GlobalTabBar, ProjectGrid, ProjectBox, ProjectHeader, ClaudeSession, TeamAgentsPanel, AgentCard, TerminalTabs, CommandPalette, DocsTab, ContextTab, SettingsTab |
|
||||
| `v2/src/lib/types/groups.ts` | TypeScript interfaces (ProjectConfig, GroupConfig, GroupsFile) |
|
||||
| `v2/src/lib/adapters/session-bridge.ts` | Session/layout/group persistence IPC wrapper |
|
||||
| `v2/src/lib/components/Markdown/MarkdownPane.svelte` | Markdown file viewer (marked.js + shiki, live reload) |
|
||||
| `v2/sidecar/agent-runner.ts` | Sidecar source (compiled to .mjs by esbuild, includes findClaudeCli()) |
|
||||
|
|
@ -80,6 +85,7 @@ Terminal emulator with SSH and Claude Code session management. v1 (GTK3+VTE Pyth
|
|||
| `v2/src/lib/agent-dispatcher.test.ts` | Vitest tests for agent dispatcher (28 tests) |
|
||||
| `v2/src/lib/stores/layout.test.ts` | Vitest tests for layout store (30 tests) |
|
||||
| `v2/src/lib/utils/agent-tree.test.ts` | Vitest tests for agent tree builder (20 tests) |
|
||||
| `v2/src/lib/stores/workspace.test.ts` | Vitest tests for workspace store (24 tests) |
|
||||
|
||||
## v1 Stack
|
||||
|
||||
|
|
@ -88,7 +94,7 @@ Terminal emulator with SSH and Claude Code session management. v1 (GTK3+VTE Pyth
|
|||
- Context DB: `~/.claude-context/context.db`
|
||||
- Theme: Catppuccin Mocha
|
||||
|
||||
## v2 Stack (Phases 1-7 + Multi-Machine A-D + Profiles/Skills complete, branch: v2-mission-control)
|
||||
## v2/v3 Stack (v2 complete, v3 MVP Phases 1-5 complete, branch: v2-mission-control)
|
||||
|
||||
- Tauri 2.x (Rust backend) + Svelte 5 (frontend)
|
||||
- Cargo workspace: bterminal-core (shared), bterminal-relay (remote binary), src-tauri (Tauri app)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Terminal with session panel (MobaXterm-style), built with GTK 3 + VTE. Catppuccin Mocha theme.
|
||||
|
||||
> **v2 complete, v3 planning started.** v2: Multi-session Claude agent dashboard using Tauri 2.x + Svelte 5. v3: Multi-project mission control redesign (project groups, per-project Claude sessions, workspace tabs) — planning phase, no code yet. Features: multi-pane terminal with PTY backend and copy/paste, agent panes with structured output, tree visualization with subtree cost and session resume, **subagent/agent-teams support** (auto-spawns child panes for subagents with parent/child navigation and recursive cost aggregation), **multi-machine support** (bterminal-relay WebSocket server + RemoteManager for managing agents/terminals on remote machines), **Claude profile/account switching** (switcher-claude integration with per-session account selection), **skill discovery and autocomplete** (type `/` in agent prompt for skill menu), session groups/folders with collapsible sidebar headers, 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) and live hot-swap, detached pane mode (pop-out windows), pane drag-resize handles, auto-updater plugin with signing key configured, @anthropic-ai/claude-agent-sdk integration, unified sidecar bundle (Deno-first, Node.js fallback), CSS Grid tiling, .deb + AppImage packaging, GitHub Actions CI, 114 vitest + 29 cargo tests. 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 complete, v3 MVP implemented.** v2: Multi-session Claude agent dashboard using Tauri 2.x + Svelte 5. v3: Multi-project mission control dashboard (Phases 1-5 complete) -- project groups with per-project Claude sessions, team agents panel, terminal tabs, workspace tabs (Sessions/Docs/Context/Settings), command palette. Features: **project groups** (up to 5 projects per group, horizontal layout, adaptive viewport count), **per-project Claude sessions** (ClaudeSession wrapping AgentPane with project cwd/profile), **team agents panel** (compact subagent cards), **terminal tabs** (shell/SSH/agent per project), agent panes with structured output, tree visualization with subtree cost and session resume, **subagent/agent-teams support**, **multi-machine support** (bterminal-relay WebSocket server + RemoteManager), **Claude profile/account switching** (switcher-claude integration), **skill discovery and autocomplete** (type `/` in agent prompt), SSH session management, ctx context database viewer, SQLite session persistence with layout restore, live markdown file viewer with Shiki syntax highlighting, Catppuccin themes (4 flavors), .deb + AppImage packaging, GitHub Actions CI, 138 vitest + 36 cargo tests. Branch `v2-mission-control`. See [docs/v3-task_plan.md](docs/v3-task_plan.md) for v3 architecture.
|
||||
|
||||

|
||||
|
||||
|
|
|
|||
38
TODO.md
38
TODO.md
|
|
@ -2,28 +2,28 @@
|
|||
|
||||
## Active
|
||||
|
||||
### v3 Planning
|
||||
- [ ] **Collect adversarial agent findings** -- 3 architecture agents launched (Architect, Devil's Advocate, UX+Perf Specialist). Collect and synthesize findings.
|
||||
- [ ] **Produce final v3 architecture plan** -- Finalize decisions on config format, layout engine, session isolation, state management, etc.
|
||||
- [ ] **Create v3 implementation phases** -- Break v3 into phased implementation plan.
|
||||
### v3 Post-MVP (Phases 6-10)
|
||||
- [ ] **Phase 6: Session continuity** -- Persist agent messages to SQLite, persist sdkSessionId in project_agent_state, load cached messages on startup, "Continue" button with resume_session_id.
|
||||
- [ ] **Phase 7: Command palette + group switching** -- Wire CommandPalette.svelte with full Ctrl+K, fuzzy search, workspace teardown/setup on group switch.
|
||||
- [ ] **Phase 8: Docs tab** -- `discover_markdown_files` Tauri command (walk with depth/exclusions), DocsTab file tree + content split layout, MdFilePicker.
|
||||
- [ ] **Phase 9: Settings tab** -- Per-project config editor, icon picker (nerd font), group CRUD (create/rename/delete).
|
||||
- [ ] **Phase 10: Polish + cleanup** -- Remove dead v2 components (TilingGrid, PaneContainer, SessionList, SettingsDialog), update all tests, performance audit.
|
||||
|
||||
### v2 Remaining
|
||||
- [ ] **E2E testing (Playwright/WebDriver)** -- Scaffold at v2/tests/e2e/README.md. Needs display server to run. Test: open terminal, run command, open agent, verify output.
|
||||
- [ ] **Multi-machine real-world testing** -- Test bterminal-relay with 2 machines (local + 1 remote). Verify PTY + agent operations over WebSocket.
|
||||
- [ ] **Multi-machine TLS/certificate pinning** -- Add TLS support to bterminal-relay and certificate pinning in RemoteManager for production security.
|
||||
- [ ] **Agent Teams real-world testing** -- Frontend routing implemented (Phase 7). Needs testing with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 and real subagent spawning.
|
||||
- [ ] **Model selector in AgentPane** -- Dropdown for model override per session (field already passes through to SDK).
|
||||
- [ ] **System prompt field in AgentPane** -- Custom instructions per agent session (field already passes through to SDK).
|
||||
- [ ] **Additional directories picker** -- UI for additional_directories per session (field already passes through to SDK).
|
||||
- [ ] **E2E testing (Playwright/WebDriver)** -- Scaffold at v2/tests/e2e/README.md. Needs display server.
|
||||
- [ ] **Multi-machine real-world testing** -- Test bterminal-relay with 2 machines.
|
||||
- [ ] **Multi-machine TLS/certificate pinning** -- TLS support for bterminal-relay + certificate pinning in RemoteManager.
|
||||
- [ ] **Agent Teams real-world testing** -- Test with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.
|
||||
|
||||
## Completed
|
||||
|
||||
- [x] **Claude profiles & skill discovery** -- switcher-claude profile integration, skill autocomplete in agent prompt (`/` prefix), extended AgentQueryOptions with 5 new fields. | Done: 2026-03-07
|
||||
- [x] **Claude CLI path auto-detection** -- findClaudeCli() in both sidecar runners auto-detects Claude CLI path, passes to SDK via pathToClaudeCodeExecutable. Early error if CLI not found. | Done: 2026-03-07
|
||||
- [x] **Unified sidecar bundle** -- Single agent-runner.mjs runs on both Deno and Node.js. Rust-side CLAUDE* env var stripping (dual-layer). | Done: 2026-03-07
|
||||
- [x] **AgentPane onDestroy bug fix** -- Stop-on-close moved to TilingGrid onClose handler. | Done: 2026-03-06
|
||||
- [x] **Permission mode passthrough** -- permission_mode field flowing Rust -> sidecar -> SDK. | Done: 2026-03-06
|
||||
- [x] **Sidecar SDK migration** -- Migrated from raw CLI spawning to @anthropic-ai/claude-agent-sdk query(). | Done: 2026-03-06
|
||||
- [x] **Sidecar CLAUDE* env var leak fix** -- Strip ALL CLAUDE-prefixed env vars (dual-layer). | Done: 2026-03-06
|
||||
- [x] **Multi-machine reconnection** -- Exponential backoff, TCP probe, frontend listeners + auto-reconnect. | Done: 2026-03-06
|
||||
- [x] **v3 Mission Control MVP (Phases 1-5)** -- Data model + groups.rs + workspace store + 12 Workspace components + App.svelte rewrite + ClaudeSession + TerminalTabs + TeamAgentsPanel. 138 vitest + 36 cargo tests. | Done: 2026-03-07
|
||||
- [x] **v3 Architecture planning** -- Adversarial review (3 agents, 12 issues resolved), final architecture in docs/v3-task_plan.md. | Done: 2026-03-07
|
||||
- [x] **Claude profiles & skill discovery** -- switcher-claude integration, skill autocomplete, extended AgentQueryOptions. | Done: 2026-03-07
|
||||
- [x] **Claude CLI path auto-detection** -- findClaudeCli() + pathToClaudeCodeExecutable. | Done: 2026-03-07
|
||||
- [x] **Unified sidecar bundle** -- Single agent-runner.mjs, dual-layer CLAUDE* env var stripping. | Done: 2026-03-07
|
||||
- [x] **AgentPane onDestroy bug fix** -- Stop-on-close moved to TilingGrid onClose. | Done: 2026-03-06
|
||||
- [x] **Sidecar SDK migration** -- @anthropic-ai/claude-agent-sdk query(). | Done: 2026-03-06
|
||||
- [x] **Multi-machine support (Phases A-D)** -- bterminal-core, bterminal-relay, RemoteManager, frontend. | Done: 2026-03-06
|
||||
- [x] **Multi-machine reconnection** -- Exponential backoff, TCP probe, auto-reconnect. | Done: 2026-03-06
|
||||
- [x] **Sidecar CLAUDE* env var leak fix** -- Dual-layer stripping. | Done: 2026-03-06
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue