From 3ecc4f02d1b5738a5350b5ca63499a149064a1d3 Mon Sep 17 00:00:00 2001 From: Hibryda Date: Sun, 8 Mar 2026 00:27:28 +0100 Subject: [PATCH] docs: update meta files for relative-units rule session Add session entries to progress logs, update CLAUDE.md files with rule 18 reference and rem units, archive multi-machine progress entries, update CHANGELOG/TODO/v3-task_plan with CSS units decision. --- .claude/CLAUDE.md | 3 +- CHANGELOG.md | 7 ++- CLAUDE.md | 1 + TODO.md | 5 +- docs/progress-archive.md | 93 +++++++++++++++++++++++++++++++++++ docs/progress.md | 102 +++------------------------------------ docs/v3-progress.md | 13 +++++ docs/v3-task_plan.md | 3 +- 8 files changed, 128 insertions(+), 99 deletions(-) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index f20da18..386ff96 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -65,7 +65,7 @@ - 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: VSCode-style sidebar layout. Horizontal: left icon rail (GlobalTabBar, 36px, 4 SVG icons) + expandable drawer panel (28em, max 50%, renders active tab content) + main workspace (ProjectGrid always visible) + StatusBar. Settings is a regular sidebar tab. Keyboard: Alt+1..4 (tabs), Ctrl+B (toggle sidebar), Ctrl+, (settings), Escape (close). +- v3 App.svelte fully rewritten: VSCode-style sidebar layout. Horizontal: left icon rail (GlobalTabBar, 2.75rem, 4 SVG icons) + expandable drawer panel (28em, max 50%, renders active tab content) + main workspace (ProjectGrid always visible) + StatusBar. Settings is a regular sidebar tab. Keyboard: Alt+1..4 (tabs), Ctrl+B (toggle sidebar), Ctrl+, (settings), Escape (close). - v3 component tree: App -> GlobalTabBar (icon rail) + sidebar-panel? (drawer) + workspace (ProjectGrid) + StatusBar. 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). @@ -99,3 +99,4 @@ All operational rules live in `.claude/rules/`. Every `.md` file in that directo | 15 | `memora.md` | Persistent memory across sessions | | 16 | `sub-agents.md` | When to use sub-agents and team agents | | 17 | `document-imports.md` | Resolve @ imports in CLAUDE.md before acting | +| 18 | `relative-units.md` | Use rem/em for layout, px only for icons/borders | diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aa760b..d428179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- CSS relative units rule (`.claude/rules/18-relative-units.md`): enforces rem/em for layout CSS, px only for icons/borders/shadows + ### Changed -- UI redesigned from top tab bar + right-side settings drawer to VSCode-style left sidebar: vertical icon rail (GlobalTabBar, 36px, 4 SVG icons) + expandable drawer panel (28em, max 50%) + always-visible main workspace (ProjectGrid) +- GlobalTabBar.svelte CSS converted from px to rem: rail width 2.75rem, button 2rem, gap 0.25rem, padding 0.5rem 0.375rem, border-radius 0.375rem; rail-btn color changed from --ctp-overlay1 to --ctp-subtext0 for better contrast +- App.svelte sidebar header CSS converted from px to rem: padding 0.5rem 0.75rem, close button 1.375rem, border-radius 0.25rem +- UI redesigned from top tab bar + right-side settings drawer to VSCode-style left sidebar: vertical icon rail (GlobalTabBar, 2.75rem, 4 SVG icons) + expandable drawer panel (28em, max 50%) + always-visible main workspace (ProjectGrid) - GlobalTabBar rewritten from horizontal text tabs + gear icon to vertical icon rail with SVG icons for Sessions, Docs, Context, Settings; Props: `expanded`/`ontoggle` (was `settingsOpen`/`ontoggleSettings`) - Settings is now a regular sidebar tab (not a special right-side drawer); `WorkspaceTab` type: `'sessions' | 'docs' | 'context' | 'settings'` - App.svelte layout: `.main-row` flex container with icon rail + optional sidebar panel + workspace; state renamed `settingsOpen` -> `drawerOpen` diff --git a/CLAUDE.md b/CLAUDE.md index 230f438..a307147 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -134,6 +134,7 @@ cd v2/src-tauri && cargo test # Cargo tests (backend) ## Conventions - 17 themes in 3 groups: 4 Catppuccin (Mocha default) + 7 Editor + 6 Deep Dark (Tokyo Night, Gruvbox Dark, Ayu Dark, Poimandres, Vesper, Midnight) +- CSS uses rem/em for layout; px only for icons/borders (see `.claude/rules/18-relative-units.md`) - Session configs stored as JSON - Single-file Python app (v1) — will change to multi-file Rust+Svelte (v2) - Polish language in some code comments (v1 legacy) diff --git a/TODO.md b/TODO.md index 6cdb97f..73b141b 100644 --- a/TODO.md +++ b/TODO.md @@ -7,10 +7,12 @@ - [ ] **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. +- [ ] **Convert remaining components to rem** -- Apply rule 18 (relative-units.md) to all remaining px-based layout CSS across v3 components. ## Completed -- [x] **VSCode-style sidebar redesign** -- Redesigned UI from top tab bar + right-side settings drawer to VSCode-style left sidebar: vertical icon rail (36px, 4 SVG icons) + expandable drawer panel (28em) + always-visible workspace. Settings is regular tab. Ctrl+B toggles sidebar. | Done: 2026-03-08 +- [x] **CSS relative units rule** -- Added .claude/rules/18-relative-units.md enforcing rem/em for layout CSS. Converted GlobalTabBar.svelte + App.svelte sidebar styles from px to rem. | Done: 2026-03-08 +- [x] **VSCode-style sidebar redesign** -- Redesigned UI from top tab bar + right-side settings drawer to VSCode-style left sidebar: vertical icon rail (2.75rem, 4 SVG icons) + expandable drawer panel (28em) + always-visible workspace. Settings is regular tab. Ctrl+B toggles sidebar. | Done: 2026-03-08 - [x] **Settings drawer conversion** -- Converted Settings from full-page tab to collapsible side drawer (superseded by sidebar redesign 2026-03-08). | Done: 2026-03-07 - [x] **SettingsTab global settings redesign** -- Split font into UI font (sans-serif options) + Terminal font (monospace options), each with custom dropdown + size stepper. Single-column layout with Appearance/Defaults subsections. All custom themed dropdowns (no native select). New CSS vars: --term-font-family, --term-font-size. Setting keys: ui_font_family, ui_font_size, term_font_family, term_font_size. | Done: 2026-03-07 - [x] **Global font controls** -- Font family select (9 monospace fonts) + font size +/- stepper (8-24px) in SettingsTab. Live preview via CSS vars, persisted to SQLite. initTheme() restores on startup. | Done: 2026-03-07 @@ -19,4 +21,3 @@ - [x] **Multi-theme system** -- 7 editor themes (VSCode Dark+, Atom One Dark, Monokai, Dracula, Nord, Solarized Dark, GitHub Dark) + 4 Catppuccin. ThemeId/ThemePalette/ThemeMeta types, THEME_LIST, custom dropdown. | Done: 2026-03-07 - [x] **v3 Phases 6-10 Complete** -- Session continuity (persist/restore agent messages), workspace teardown on group switch, dead v2 component removal (~1,836 lines), StatusBar rewrite, subagent routing fix. | Done: 2026-03-07 - [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 diff --git a/docs/progress-archive.md b/docs/progress-archive.md index f40f036..a2532ab 100644 --- a/docs/progress-archive.md +++ b/docs/progress-archive.md @@ -178,3 +178,96 @@ Architecture decision: Initially used `claude` CLI with `--output-format stream- #### TAURI_SIGNING_PRIVATE_KEY - [x] Set via `gh secret set` on DexterFromLab/BTerminal GitHub repo + +### Session: 2026-03-06 (continued) — Multi-Machine Architecture Design + +#### Multi-Machine Support Architecture +- [x] Designed full multi-machine architecture in docs/multi-machine.md (303 lines) +- [x] Three-layer model: BTerminal (controller) + bterminal-relay (remote binary) + unified frontend +- [x] WebSocket NDJSON protocol: RelayCommand/RelayEvent envelope wrapping existing sidecar format +- [x] Authentication: pre-shared token + TLS, rate limiting, lockout +- [x] Autonomous relay model: agents keep running when controller disconnects +- [x] Reconnection with exponential backoff (1s-30s), state_sync on reconnect +- [x] 4-phase implementation plan: A (extract bterminal-core crate), B (relay binary), C (RemoteManager), D (frontend) +- [x] Updated TODO.md and docs/task_plan.md to reference the design + +### Session: 2026-03-06 (continued) — Multi-Machine Implementation (Phases A-D) + +#### Phase A: bterminal-core crate extraction +- [x] Created Cargo workspace at v2/ level (v2/Cargo.toml, workspace members: src-tauri, bterminal-core, bterminal-relay) +- [x] Extracted PtyManager into v2/bterminal-core/src/pty.rs +- [x] Extracted SidecarManager into v2/bterminal-core/src/sidecar.rs +- [x] Created EventSink trait (v2/bterminal-core/src/event.rs) to abstract event emission +- [x] TauriEventSink (v2/src-tauri/src/event_sink.rs) implements EventSink for Tauri AppHandle +- [x] src-tauri/src/pty.rs and sidecar.rs now thin re-export wrappers +- [x] Cargo.lock moved from src-tauri/ to workspace root (v2/) + +#### Phase B: bterminal-relay binary +- [x] New Rust binary at v2/bterminal-relay/ with WebSocket server (tokio-tungstenite) +- [x] Token auth via Authorization: Bearer header on WebSocket upgrade +- [x] CLI flags: --port (default 9750), --token (required), --insecure (allow ws://) +- [x] Routes RelayCommand types (pty_create/write/resize/close, agent_query/stop, sidecar_restart, ping) +- [x] Forwards RelayEvent types (pty_data/exit, sidecar_message/exited, error, pong, ready) +- [x] Rate limiting: 10 failed auth attempts triggers 5-minute lockout +- [x] Per-connection isolated PtyManager + SidecarManager instances + +#### Phase C: RemoteManager in controller +- [x] New v2/src-tauri/src/remote.rs module — RemoteManager struct +- [x] WebSocket client connections to relay instances (tokio-tungstenite) +- [x] RemoteMachine struct: id, label, url, token, status (Connected/Connecting/Disconnected/Error) +- [x] Machine lifecycle: add_machine, remove_machine, connect, disconnect +- [x] 12 new Tauri commands: remote_add_machine, remote_remove_machine, remote_connect, remote_disconnect, remote_list_machines, remote_pty_spawn/write/resize/kill, remote_agent_query/stop, remote_sidecar_restart +- [x] Heartbeat ping every 15s to detect stale connections + +#### Phase D: Frontend integration +- [x] v2/src/lib/adapters/remote-bridge.ts — IPC adapter for machine management + remote events +- [x] v2/src/lib/stores/machines.svelte.ts — Svelte 5 store for remote machine state +- [x] Layout store: added remoteMachineId?: string to Pane interface +- [x] agent-bridge.ts: routes to remote_agent_query/stop when pane has remoteMachineId +- [x] pty-bridge.ts: routes to remote_pty_spawn/write/resize/kill when pane has remoteMachineId +- [x] SettingsDialog: new "Remote Machines" section (add/remove/connect/disconnect UI) +- [x] SessionList sidebar: auto-groups remote panes by machine label + +#### Verification +- cargo check --workspace: clean (0 errors) +- vitest: 114/114 tests passing +- svelte-check: clean (0 errors) + +#### New dependencies added +- bterminal-core: serde, serde_json, log, portable-pty, uuid (extracted from src-tauri) +- bterminal-relay: tokio, tokio-tungstenite, clap, env_logger, futures-util +- src-tauri: tokio-tungstenite, tokio, futures-util, uuid (added for RemoteManager) + +### Session: 2026-03-06 (continued) — Relay Hardening & Reconnection + +#### Relay Command Response Propagation +- [x] Shared event channel between EventSink and command response sender (sink_tx clone in bterminal-relay) +- [x] send_error() helper function: all command failures now emit RelayEvent with commandId + error message instead of just logging +- [x] ping command: now sends pong response via event channel (was a no-op) +- [x] pty_create: returns pty_created event with session ID and commandId for correlation +- [x] All error paths (pty_write, pty_resize, pty_close, agent_query, agent_stop, sidecar_restart) use send_error() + +#### RemoteManager Reconnection +- [x] Exponential backoff reconnection in remote.rs: spawns async tokio task on disconnect +- [x] Backoff schedule: 1s, 2s, 4s, 8s, 16s, 30s (capped) +- [x] attempt_tcp_probe() function: TCP-only connect probe (5s timeout, default port 9750) — avoids allocating per-connection resources on relay +- [x] Emits remote-machine-reconnecting (with backoffSecs) and remote-machine-reconnect-ready Tauri events +- [x] Cancellation: stops if machine removed (not in HashMap) or manually reconnected (status != disconnected) +- [x] Fixed scoping: disconnection cleanup uses inner block to release mutex before emitting event + +#### RemoteManager PTY Creation Confirmation +- [x] Handles pty_created event type from relay: emits remote-pty-created Tauri event with machineId, ptyId, commandId + +### Session: 2026-03-06 (continued) — Reconnection Hardening + +#### TCP Probe Refactor +- [x] Replaced attempt_ws_connect() with attempt_tcp_probe() in remote.rs: TCP-only connect (no WS upgrade), 5s timeout, default port 9750 +- [x] Avoids allocating per-connection resources (PtyManager, SidecarManager) on the relay during reconnection probes +- [x] Probe no longer needs auth token — only checks TCP reachability + +#### Frontend Reconnection Listeners +- [x] Added onRemoteMachineReconnecting() listener in remote-bridge.ts: receives machineId + backoffSecs +- [x] Added onRemoteMachineReconnectReady() listener in remote-bridge.ts: receives machineId when probe succeeds +- [x] machines.svelte.ts: reconnecting handler sets machine status to 'reconnecting', shows toast with backoff duration +- [x] machines.svelte.ts: reconnect-ready handler auto-calls connectMachine() to re-establish full WebSocket connection +- [x] Updated docs/multi-machine.md to reflect TCP probe and frontend listener changes diff --git a/docs/progress.md b/docs/progress.md index f94b680..21e0354 100644 --- a/docs/progress.md +++ b/docs/progress.md @@ -1,99 +1,6 @@ # BTerminal v2 — Progress Log -> Earlier sessions (2026-03-05 to 2026-03-06 early): see [progress-archive.md](progress-archive.md) - -### Session: 2026-03-06 (continued) — Multi-Machine Architecture Design - -#### Multi-Machine Support Architecture -- [x] Designed full multi-machine architecture in docs/multi-machine.md (303 lines) -- [x] Three-layer model: BTerminal (controller) + bterminal-relay (remote binary) + unified frontend -- [x] WebSocket NDJSON protocol: RelayCommand/RelayEvent envelope wrapping existing sidecar format -- [x] Authentication: pre-shared token + TLS, rate limiting, lockout -- [x] Autonomous relay model: agents keep running when controller disconnects -- [x] Reconnection with exponential backoff (1s-30s), state_sync on reconnect -- [x] 4-phase implementation plan: A (extract bterminal-core crate), B (relay binary), C (RemoteManager), D (frontend) -- [x] Updated TODO.md and docs/task_plan.md to reference the design - -### Session: 2026-03-06 (continued) — Multi-Machine Implementation (Phases A-D) - -#### Phase A: bterminal-core crate extraction -- [x] Created Cargo workspace at v2/ level (v2/Cargo.toml, workspace members: src-tauri, bterminal-core, bterminal-relay) -- [x] Extracted PtyManager into v2/bterminal-core/src/pty.rs -- [x] Extracted SidecarManager into v2/bterminal-core/src/sidecar.rs -- [x] Created EventSink trait (v2/bterminal-core/src/event.rs) to abstract event emission -- [x] TauriEventSink (v2/src-tauri/src/event_sink.rs) implements EventSink for Tauri AppHandle -- [x] src-tauri/src/pty.rs and sidecar.rs now thin re-export wrappers -- [x] Cargo.lock moved from src-tauri/ to workspace root (v2/) - -#### Phase B: bterminal-relay binary -- [x] New Rust binary at v2/bterminal-relay/ with WebSocket server (tokio-tungstenite) -- [x] Token auth via Authorization: Bearer header on WebSocket upgrade -- [x] CLI flags: --port (default 9750), --token (required), --insecure (allow ws://) -- [x] Routes RelayCommand types (pty_create/write/resize/close, agent_query/stop, sidecar_restart, ping) -- [x] Forwards RelayEvent types (pty_data/exit, sidecar_message/exited, error, pong, ready) -- [x] Rate limiting: 10 failed auth attempts triggers 5-minute lockout -- [x] Per-connection isolated PtyManager + SidecarManager instances - -#### Phase C: RemoteManager in controller -- [x] New v2/src-tauri/src/remote.rs module — RemoteManager struct -- [x] WebSocket client connections to relay instances (tokio-tungstenite) -- [x] RemoteMachine struct: id, label, url, token, status (Connected/Connecting/Disconnected/Error) -- [x] Machine lifecycle: add_machine, remove_machine, connect, disconnect -- [x] 12 new Tauri commands: remote_add_machine, remote_remove_machine, remote_connect, remote_disconnect, remote_list_machines, remote_pty_spawn/write/resize/kill, remote_agent_query/stop, remote_sidecar_restart -- [x] Heartbeat ping every 15s to detect stale connections - -#### Phase D: Frontend integration -- [x] v2/src/lib/adapters/remote-bridge.ts — IPC adapter for machine management + remote events -- [x] v2/src/lib/stores/machines.svelte.ts — Svelte 5 store for remote machine state -- [x] Layout store: added remoteMachineId?: string to Pane interface -- [x] agent-bridge.ts: routes to remote_agent_query/stop when pane has remoteMachineId -- [x] pty-bridge.ts: routes to remote_pty_spawn/write/resize/kill when pane has remoteMachineId -- [x] SettingsDialog: new "Remote Machines" section (add/remove/connect/disconnect UI) -- [x] SessionList sidebar: auto-groups remote panes by machine label - -#### Verification -- cargo check --workspace: clean (0 errors) -- vitest: 114/114 tests passing -- svelte-check: clean (0 errors) - -#### New dependencies added -- bterminal-core: serde, serde_json, log, portable-pty, uuid (extracted from src-tauri) -- bterminal-relay: tokio, tokio-tungstenite, clap, env_logger, futures-util -- src-tauri: tokio-tungstenite, tokio, futures-util, uuid (added for RemoteManager) - -### Session: 2026-03-06 (continued) — Relay Hardening & Reconnection - -#### Relay Command Response Propagation -- [x] Shared event channel between EventSink and command response sender (sink_tx clone in bterminal-relay) -- [x] send_error() helper function: all command failures now emit RelayEvent with commandId + error message instead of just logging -- [x] ping command: now sends pong response via event channel (was a no-op) -- [x] pty_create: returns pty_created event with session ID and commandId for correlation -- [x] All error paths (pty_write, pty_resize, pty_close, agent_query, agent_stop, sidecar_restart) use send_error() - -#### RemoteManager Reconnection -- [x] Exponential backoff reconnection in remote.rs: spawns async tokio task on disconnect -- [x] Backoff schedule: 1s, 2s, 4s, 8s, 16s, 30s (capped) -- [x] attempt_tcp_probe() function: TCP-only connect probe (5s timeout, default port 9750) — avoids allocating per-connection resources on relay -- [x] Emits remote-machine-reconnecting (with backoffSecs) and remote-machine-reconnect-ready Tauri events -- [x] Cancellation: stops if machine removed (not in HashMap) or manually reconnected (status != disconnected) -- [x] Fixed scoping: disconnection cleanup uses inner block to release mutex before emitting event - -#### RemoteManager PTY Creation Confirmation -- [x] Handles pty_created event type from relay: emits remote-pty-created Tauri event with machineId, ptyId, commandId - -### Session: 2026-03-06 (continued) — Reconnection Hardening - -#### TCP Probe Refactor -- [x] Replaced attempt_ws_connect() with attempt_tcp_probe() in remote.rs: TCP-only connect (no WS upgrade), 5s timeout, default port 9750 -- [x] Avoids allocating per-connection resources (PtyManager, SidecarManager) on the relay during reconnection probes -- [x] Probe no longer needs auth token — only checks TCP reachability - -#### Frontend Reconnection Listeners -- [x] Added onRemoteMachineReconnecting() listener in remote-bridge.ts: receives machineId + backoffSecs -- [x] Added onRemoteMachineReconnectReady() listener in remote-bridge.ts: receives machineId when probe succeeds -- [x] machines.svelte.ts: reconnecting handler sets machine status to 'reconnecting', shows toast with backoff duration -- [x] machines.svelte.ts: reconnect-ready handler auto-calls connectMachine() to re-establish full WebSocket connection -- [x] Updated docs/multi-machine.md to reflect TCP probe and frontend listener changes +> Earlier sessions (2026-03-05 to 2026-03-06 multi-machine): see [progress-archive.md](progress-archive.md) ### Session: 2026-03-06 (continued) — Sidecar Env Var Bug Fix @@ -298,8 +205,15 @@ - [x] Added --term-font-family and --term-font-size CSS vars to catppuccin.css - [x] Updated initTheme() to restore 4 font settings instead of 2 +### Session: 2026-03-08 — CSS Relative Units Rule +- [x] Created `.claude/rules/18-relative-units.md` — enforces rem/em for layout CSS (px only for icons/borders) +- [x] Converted GlobalTabBar.svelte styles from px to rem (rail width, button size, gap, padding, border-radius) +- [x] Converted App.svelte sidebar header styles from px to rem (padding, close button, border-radius) +- [x] Changed GlobalTabBar rail-btn color from --ctp-overlay1 to --ctp-subtext0 + ### Next Steps - [ ] Real-world relay testing (2 machines) - [ ] TLS/certificate pinning for relay connections - [ ] E2E testing with Playwright/WebDriver (when display server available) - [ ] Test agent teams with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 +- [ ] Convert remaining components from px to rem per rule 18 diff --git a/docs/v3-progress.md b/docs/v3-progress.md index 0a7560b..598440d 100644 --- a/docs/v3-progress.md +++ b/docs/v3-progress.md @@ -271,3 +271,16 @@ All editor themes map to the same `--ctp-*` CSS custom property names (26 vars). #### Verification - No test changes needed — UI/CSS-only changes, no logic changes + +### Session: 2026-03-08 — CSS Relative Units Rule + +#### New Rule: 18-relative-units.md +- [x] Created `.claude/rules/18-relative-units.md` enforcing rem/em for layout CSS +- [x] Pixels allowed only for icon sizes, borders/outlines, box shadows +- [x] Exception: --ui-font-size/--term-font-size CSS vars store px (xterm.js API requirement) +- [x] Added rule #18 to `.claude/CLAUDE.md` rule index + +#### CSS Conversions +- [x] GlobalTabBar.svelte: rail width 36px -> 2.75rem, button 28px -> 2rem, gap 2px -> 0.25rem, padding 6px 4px -> 0.5rem 0.375rem, border-radius 4px -> 0.375rem +- [x] App.svelte: sidebar header padding 8px 12px -> 0.5rem 0.75rem, close button 22px -> 1.375rem, border-radius 4px -> 0.25rem +- [x] Also changed GlobalTabBar rail-btn color from --ctp-overlay1 to --ctp-subtext0 for better contrast diff --git a/docs/v3-task_plan.md b/docs/v3-task_plan.md index 3f64b90..69f9efe 100644 --- a/docs/v3-task_plan.md +++ b/docs/v3-task_plan.md @@ -326,7 +326,8 @@ All 10 phases complete. Detailed checklists in [v3-progress.md](v3-progress.md). | xterm budget: 4 active, unlimited suspended | WebKit2GTK OOM at ~5 instances. Serialize scrollback to text buffer, destroy xterm, recreate on focus. PTY stays alive. | 2026-03-07 | | Flexbox + scroll-snap over CSS Grid | Allows horizontal scroll on narrow screens. Scroll-snap gives clean project-to-project scrolling. | 2026-03-07 | | Team panel: inline >2560px, overlay <2560px | Adapts to available space. Collapsed when no subagents running. | 2026-03-07 | -| VSCode-style left sidebar (replaces top tab bar + settings drawer) | Vertical icon rail (36px, 4 SVG icons) + expandable drawer panel (28em, max 50%) + always-visible workspace. Settings is a regular tab, not special drawer. ProjectGrid always visible. Ctrl+B toggles sidebar. | 2026-03-08 | +| VSCode-style left sidebar (replaces top tab bar + settings drawer) | Vertical icon rail (2.75rem, 4 SVG icons) + expandable drawer panel (28em, max 50%) + always-visible workspace. Settings is a regular tab, not special drawer. ProjectGrid always visible. Ctrl+B toggles sidebar. | 2026-03-08 | +| CSS relative units (rule 18) | Use rem/em for all layout CSS. Pixels only for icon sizes, borders, box shadows. Exception: --ui-font-size/--term-font-size store px for xterm.js API. | 2026-03-08 | | Project accent colors from Catppuccin palette | Visual distinction: blue/green/mauve/peach/pink per slot 1-5. Applied to border + header tint. | 2026-03-07 | | Remote machines deferred to v3.1 | Elevate to project level (project.remote_machine_id) but don't implement in MVP. | 2026-03-07 | | Keyboard shortcut layers: App > Workspace > Terminal | Prevents conflicts. Terminal captures raw keys only when focused. App layer uses Ctrl+K/G. | 2026-03-07 |