Commit graph

108 commits

Author SHA1 Message Date
Hibryda
b1b34f8195 docs: update meta files for SettingsTab global settings redesign session 2026-03-07 23:23:53 +01:00
Hibryda
36af9dd1d2 feat(v3): redesign SettingsTab global settings with split font controls
Split single font setting into separate UI font (sans-serif options)
and Terminal font (monospace options), each with custom themed dropdown
and size stepper (8-24px). Single-column layout with Appearance and
Defaults subsections. All native <select> replaced with custom themed
dropdowns. Font previews render in their own typeface. New CSS vars:
--term-font-family, --term-font-size. Setting keys changed from
font_family/font_size to ui_font_family/ui_font_size +
term_font_family/term_font_size.
2026-03-07 23:23:33 +01:00
Hibryda
fa7d0bd915 docs: update meta files for SettingsTab global font controls session 2026-03-07 23:03:05 +01:00
Hibryda
47492aa637 feat(v3): add global font controls to SettingsTab
Add font family select (9 monospace fonts) and font size +/- stepper
(8-24px) to SettingsTab global settings. Both controls apply live
preview via CSS custom properties (--ui-font-family, --ui-font-size)
and persist to SQLite. Restructure global settings from inline rows
to 2-column grid with labels above controls. initTheme() now restores
saved font settings on startup.
2026-03-07 23:02:55 +01:00
Hibryda
1279981bf9 docs: update meta files for theme dropdown CSS polish session 2026-03-07 22:47:16 +01:00
Hibryda
9af7ac3f68 fix(v3): improve theme dropdown sizing and prevent label truncation 2026-03-07 22:47:06 +01:00
Hibryda
d38adc017a docs: update meta files for custom theme dropdown session 2026-03-07 22:33:37 +01:00
Hibryda
37d211e9a7 feat(v3): replace native select with custom themed dropdown for theme picker
Custom dropdown in SettingsTab uses --ctp-* CSS vars for full theming.
Shows color swatches (base color) and accent dot previews (red/green/
blue/yellow) per theme. Grouped sections (Catppuccin/Editor/Deep Dark)
with styled headers. Click-outside and Escape to close. Uses getPalette()
from themes.ts for live color rendering.
2026-03-07 22:33:31 +01:00
Hibryda
edaf5fcdb6 docs: update meta files for deep dark themes session 2026-03-07 22:19:12 +01:00
Hibryda
4a46ef42ab feat(v3): add 6 deep dark themes to multi-theme system
Add Tokyo Night, Gruvbox Dark, Ayu Dark, Poimandres, Vesper, and
Midnight themes. Now 17 total themes in 3 groups: Catppuccin (4),
Editor (7), Deep Dark (6). Midnight is pure OLED black (#000000).
2026-03-07 22:19:05 +01:00
Hibryda
54edb43e8b docs: update meta files for multi-theme system session 2026-03-07 22:07:25 +01:00
Hibryda
ff2d354219 feat(v3): add 7 editor themes to multi-theme system
Generalize theme system from Catppuccin-only (4 flavors) to 11 themes
across 2 groups. New editor themes: VSCode Dark+, Atom One Dark,
Monokai, Dracula, Nord, Solarized Dark, GitHub Dark.

All themes map to the same 26 --ctp-* CSS custom properties, so every
component works unchanged. ThemeId replaces CatppuccinFlavor as primary
type. Theme store uses getCurrentTheme()/setTheme() with deprecated
wrappers. SettingsTab uses optgroup-based theme selector.
2026-03-07 22:07:14 +01:00
Hibryda
1ba818e7a5 docs: update meta files for SettingsTab global settings session 2026-03-07 21:31:48 +01:00
Hibryda
3b2c1353fa feat(v3): add global settings section to SettingsTab
Add Global section with theme flavor dropdown, default shell input, and
default CWD input. All settings persisted via settings-bridge. Fix a11y
by using wrapping <label> elements for project fields. Clean up unused
CSS selectors.
2026-03-07 21:31:42 +01:00
Hibryda
6ea1ed1dfd chore(v2): remove dead update_ssh_session method and fix stale comment
- Remove unused SessionDb::update_ssh_session() and its test (SshDialog
  was deleted in P10, this method had no callers)
- Fix stale TilingGrid reference in AgentPane comment
- Eliminates the last Rust compiler warning
2026-03-07 16:51:15 +01:00
Hibryda
67c416dc10 docs: update meta files for v3 Phases 6-10 completion 2026-03-07 16:34:00 +01:00
Hibryda
ab0811ca2b docs(v3): update progress logs and task plan for Phases 6-10 completion 2026-03-07 16:33:54 +01:00
Hibryda
86da302aa6 test(v3): add clearAllAgentSessions mock to workspace store tests 2026-03-07 16:33:47 +01:00
Hibryda
160712de50 refactor(v3): remove dead v2 components and empty directories
Delete 7 components no longer used in v3 Mission Control (~1,836 lines):
TilingGrid, PaneContainer, PaneHeader, SessionList, SshSessionList,
SshDialog, SettingsDialog. Empty directories (Layout/, Sidebar/,
Settings/, SSH/) removed.
2026-03-07 16:33:39 +01:00
Hibryda
e0056f811f feat(v3): implement session continuity, workspace teardown, StatusBar rewrite, subagent routing fix
P6: persistSessionForProject() saves agent state + messages to SQLite on
session complete. registerSessionProject() maps sessionId -> projectId.
ClaudeSession restoreMessagesFromRecords() restores cached messages on mount.

P7: clearAllAgentSessions() clears sessions on group switch. switchGroup()
calls clearAllAgentSessions() + resets terminal tabs.

P10: StatusBar rewritten for workspace store (group name, project count,
agent count, "BTerminal v3"). Subagent routing fixed: project-scoped
sessions skip layout pane creation (render in TeamAgentsPanel instead).
2026-03-07 16:33:27 +01:00
Hibryda
9766a480ed 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
2026-03-07 16:06:39 +01:00
Hibryda
4f29582aac docs(v3): update architecture docs and progress for MVP completion
- v3-task_plan.md: mark Phases 1-5 complete, update adversarial review
  results with 12 resolved issues, finalize component tree and layout
- v3-findings.md: add adversarial review agent findings
- v3-progress.md: document Phases 1-5 implementation details
- progress.md: add v3 MVP session entry
- docs/README.md: reorganize with v2/v3 sections
2026-03-07 16:06:27 +01:00
Hibryda
a11e7f9d2c test(v3): add workspace store tests (24 tests)
Tests for loadGroups, setActiveGroup, setActiveTab, focusProject,
resetWorkspace, derived state (activeGroup, activeProjects), and
edge cases. All 138 vitest + 36 cargo tests pass.
2026-03-07 16:06:17 +01:00
Hibryda
ab79dac4b3 feat(v3): implement Mission Control MVP (Phases 1-5)
Phase 1: Data model - groups.rs (Rust structs + load/save groups.json),
groups.ts (TypeScript interfaces), groups-bridge.ts (IPC adapter),
workspace.svelte.ts (replaces layout store), SQLite migrations
(agent_messages, project_agent_state tables, project_id column),
--group CLI argument.

Phase 2: Project shell layout - GlobalTabBar, ProjectGrid, ProjectBox,
ProjectHeader, CommandPalette, DocsTab, ContextTab, SettingsTab,
App.svelte full rewrite (no sidebar/TilingGrid).

Phase 3: ClaudeSession.svelte wrapping AgentPane per-project.
Phase 4: TerminalTabs.svelte with shell/SSH/agent tab types.
Phase 5: TeamAgentsPanel + AgentCard for compact subagent view.

Also fixes AgentPane Svelte 5 event modifier (on:click -> onclick).
2026-03-07 16:06:07 +01:00
Hibryda
293bed6dc5 docs: update meta files for v3 Mission Control planning
Add v3 doc references to CLAUDE.md, .claude/CLAUDE.md, README.md, and
docs index. Add v3 planning TODOs. Update progress log with v3 session.
Update CHANGELOG with v3 planning entry. Trim oldest completed TODOs.
2026-03-07 15:23:03 +01:00
Hibryda
03e9f34e07 docs(v3): add Mission Control redesign planning docs
v3 architecture planning: task plan with core concept, user requirements,
and architecture questions for adversarial review. Findings doc with
codebase reuse analysis (keep/replace/drop). Progress log for v3 sessions.
2026-03-07 15:22:55 +01:00
Hibryda
761070251f fix(v2): default systemPrompt to claude_code preset for CLAUDE.md loading
Without the preset, settingSources loads files but the system prompt has
no slot to inject CLAUDE.md content. The claude_code preset enables the
full Claude Code system prompt including project instructions.
2026-03-07 01:59:51 +01:00
Hibryda
17c5f9b88a docs: update meta files for Claude profiles, skill discovery, and extended agent options 2026-03-07 01:58:37 +01:00
Hibryda
ff49e7e176 feat(v2): add Claude profile switching, skill discovery, and extended agent options
Add switcher-claude multi-account support with profile selector in AgentPane
toolbar, skill autocomplete menu (type / in prompt), and 5 new AgentQueryOptions
fields (setting_sources, system_prompt, model, claude_config_dir,
additional_directories) flowing through full stack from Rust to SDK.

New Tauri commands: claude_list_profiles, claude_list_skills, claude_read_skill,
pick_directory. New frontend adapter: claude-bridge.ts.
2026-03-07 01:58:29 +01:00
Hibryda
768db420d3 docs: update meta files for Claude CLI path detection and split progress log
- Added pathToClaudeCodeExecutable and findClaudeCli() docs to CLAUDE.md,
  .claude/CLAUDE.md, task_plan.md decisions log, and CHANGELOG.md
- Split docs/progress.md (425 lines) into progress.md (153 lines) +
  progress-archive.md (180 lines) to stay under 300-line threshold
- Updated docs/README.md, README.md with archive file reference
- Updated TODO.md with completed items from this session
2026-03-07 01:28:13 +01:00
Hibryda
d35b3dc7fc feat(v2): auto-detect Claude CLI path and pass to SDK via pathToClaudeCodeExecutable
Both sidecar runners (agent-runner.ts and agent-runner-deno.ts) now include
findClaudeCli() which checks common paths (~/.local/bin/claude,
~/.claude/local/claude, /usr/local/bin/claude, /usr/bin/claude) and falls
back to `which claude`. The resolved path is passed to the SDK query()
options as pathToClaudeCodeExecutable. If the CLI is not found, an
agent_error is emitted immediately instead of a cryptic SDK failure.
2026-03-07 01:28:04 +01:00
Hibryda
14b62da729 docs: update meta files for Rust-side CLAUDE* env var stripping
- .claude/CLAUDE.md: document dual-layer env var stripping (Rust + JS)
- docs/progress.md: add session entry for Rust-side stripping
- docs/task_plan.md: add CLAUDE* env var leak to errors table
- CHANGELOG.md: add fix entry under Unreleased
- .gitignore: exclude debug/, plugins/, projects/ (Claude Code working dirs)
2026-03-07 01:15:10 +01:00
Hibryda
a3d9933221 fix(v2): strip CLAUDE* env vars at Rust level in SidecarManager
Add env_clear() + envs(clean_env) to Command in SidecarManager to
filter all CLAUDE-prefixed environment variables before spawning the
sidecar process. This provides primary defense against SDK nesting
detection when BTerminal is launched from a Claude Code terminal.
The JS-side stripping via SDK env option is retained as defense-in-depth.
2026-03-07 01:15:01 +01:00
Hibryda
f97e7391a9 docs: update meta files for unified sidecar bundle
Updated all docs, CLAUDE.md files, README, and CHANGELOG to reflect
the consolidated sidecar approach (single agent-runner.mjs for both
Deno and Node.js). Removed references to agent-runner-deno.ts as
active runner. Added progress log entry for 2026-03-07 session.
2026-03-07 01:07:13 +01:00
Hibryda
2409642925 refactor(v2): unify sidecar to single agent-runner.mjs bundle
Consolidated from two separate runners (agent-runner-deno.ts +
agent-runner.ts) to a single pre-built agent-runner.mjs that runs
under both Deno and Node.js. resolve_sidecar_command() now checks
runtime availability upfront before path search, with improved
error messages. Removed agent-runner-deno.ts from tauri.conf.json
bundled resources.
2026-03-07 01:07:06 +01:00
Hibryda
658dc4715e docs: update meta files for permission mode, agent stop-on-close fix, SDK bundling 2026-03-06 23:34:09 +01:00
Hibryda
e7c957d650 docs: update docs for permission mode, agent stop-on-close fix, SDK bundling 2026-03-06 23:34:00 +01:00
Hibryda
d5eb08ed42 feat(v2): add permission mode passthrough and fix agent stop-on-close
- Add permission_mode field to AgentQueryOptions (Rust, sidecar, bridge)
  flowing from controller through sidecar to SDK; defaults to
  bypassPermissions, supports default mode
- Fix AgentPane onDestroy bug: remove stopAgent() from onDestroy (fires
  on layout remounts), move stop-on-close to TilingGrid onClose handler
- Bundle SDK into sidecar via esbuild (remove --external flag)
2026-03-06 23:33:51 +01:00
Hibryda
af0eb362e6 docs: update meta files for SDK migration and AgentPane onDestroy bug 2026-03-06 22:57:55 +01:00
Hibryda
bb530edd28 docs: update docs for sidecar SDK migration and AgentPane bug discovery 2026-03-06 22:57:47 +01:00
Hibryda
323703caba feat(v2): migrate sidecar from raw CLI spawning to @anthropic-ai/claude-agent-sdk
Claude CLI v2.1.69 hangs silently when spawned via child_process.spawn()
with piped stdio (known bug github.com/anthropics/claude-code/issues/6775).

Replace raw CLI spawning in both sidecar runners with the SDK's query()
function, which handles subprocess management internally. SDK message
format matches CLI stream-json, so the sdk-messages.ts adapter is
unchanged.

- agent-runner.ts: use SDK query() with AbortController for stop
- agent-runner-deno.ts: use npm:@anthropic-ai/claude-agent-sdk import
- sidecar.rs: add --allow-write and --allow-net Deno permissions
- package.json: add @anthropic-ai/claude-agent-sdk ^0.2.70, build:sidecar script
2026-03-06 22:57:36 +01:00
Hibryda
fdd1884015 docs: update meta files for CLAUDE* env var fix and sidecar constraint 2026-03-06 22:12:23 +01:00
Hibryda
ce79ae671a fix(v2): strip all CLAUDE* env vars in sidecar to prevent CLI nesting detection
When BTerminal is launched from a Claude Code terminal, ~8 CLAUDE*
env vars leak into the sidecar child processes. The claude CLI detects
these as nesting indicators and silently hangs. Previously only
CLAUDECODE was removed; now all CLAUDE-prefixed vars are stripped
in both Node.js and Deno sidecar runners.
2026-03-06 22:12:16 +01:00
Hibryda
4c06b5f121 docs: update docs for TCP probe refactor and frontend reconnection listeners
Replace stale attempt_ws_connect() references with attempt_tcp_probe()
across all docs. Add progress entry for reconnection hardening session.
Update CHANGELOG with new entries and probe refactor change.
2026-03-06 21:50:54 +01:00
Hibryda
71100da125 feat(v2): refactor reconnection probe to TCP-only and add frontend listeners
Replace attempt_ws_connect() with attempt_tcp_probe() in RemoteManager to
avoid allocating per-connection resources (PtyManager, SidecarManager) on
the relay during reconnection probes. Add onRemoteMachineReconnecting and
onRemoteMachineReconnectReady event listeners in remote-bridge.ts. Wire
machines store to auto-reconnect when relay becomes reachable.
2026-03-06 21:50:45 +01:00
Hibryda
218570ac35 docs: update docs for relay hardening, reconnection, and session wrap
Update multi-machine docs with reconnection implementation details,
command response propagation, and pty_created confirmation flow.
Mark reconnection as complete in phases.md, progress.md, TODO.md.
Update CLAUDE.md files with reconnection and relay response info.
Add CHANGELOG entries for new features.
2026-03-06 19:49:28 +01:00
Hibryda
b0cce7ae4f feat(v2): add relay response propagation and reconnection with exponential backoff
Relay (bterminal-relay): command handlers now send structured responses
(pty_created, pong, error) back via shared event channel with commandId
for correlation. New send_error() helper replaces log-only error
reporting.

RemoteManager (remote.rs): exponential backoff reconnection on
disconnect (1s/2s/4s/8s/16s/30s cap). Uses attempt_ws_connect() probe
with 5s timeout. Emits remote-machine-reconnecting and
remote-machine-reconnect-ready events. Handles pty_created relay event
as remote-pty-created Tauri event.
2026-03-06 19:49:19 +01:00
Hibryda
0a17c09a46 docs: update docs for multi-machine implementation (Phases A-D)
Update phases.md with completed multi-machine phases A-D. Add session
entry to progress.md. Update task_plan.md decisions log and open
questions. Update multi-machine.md status to implemented. Update
CLAUDE.md files with new paths and deps. Add multi-machine section to
README.md. Mark multi-machine as done in TODO.md with new follow-up
items. Add changelog entries for all multi-machine components.
2026-03-06 19:06:00 +01:00
Hibryda
5503340e87 feat(v2): add frontend remote machine integration
remote-bridge.ts adapter for machine management IPC. machines.svelte.ts
store for remote machine state. Layout store extended with
remoteMachineId on Pane interface. agent-bridge.ts and pty-bridge.ts
route to remote commands when remoteMachineId is set. SettingsDialog
gains Remote Machines section. Sidebar auto-groups remote panes by
machine label.
2026-03-06 19:05:53 +01:00
Hibryda
0b39133d66 feat(v2): add RemoteManager for multi-machine WebSocket connections
New remote.rs module in src-tauri with WebSocket client connections to
bterminal-relay instances. Machine lifecycle: add/remove/connect/
disconnect. 12 new Tauri commands for remote operations. Heartbeat
ping every 15s. lib.rs updated with remote commands and AppState.
2026-03-06 19:05:47 +01:00