From 85952346f8d47e580a392bf7002b3fe26bbefcbe Mon Sep 17 00:00:00 2001 From: Hibryda Date: Sun, 8 Mar 2026 03:44:33 +0100 Subject: [PATCH] docs: update meta files for sidebar simplification session --- .claude/CLAUDE.md | 6 ++++-- CHANGELOG.md | 4 ++++ TODO.md | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index d4fb4d2..152dc21 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -68,8 +68,10 @@ - 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, 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. +- v3 App.svelte: VSCode-style sidebar layout. Horizontal: left icon rail (GlobalTabBar, 2.75rem, single Settings gear icon) + expandable drawer panel (Settings only, content-driven width, max 50%) + main workspace (ProjectGrid always visible) + StatusBar. Sidebar has Settings only — Sessions/Docs/Context are project-specific (in ProjectBox tabs). Keyboard: Ctrl+B (toggle sidebar), Ctrl+, (settings), Escape (close). +- v3 component tree: App -> GlobalTabBar (settings icon) + sidebar-panel? (SettingsTab) + workspace (ProjectGrid) + StatusBar. See `docs/v3-task_plan.md` for full tree. +- MarkdownPane reactively watches filePath changes via $effect (not onMount-only). Uses sans-serif font (--ui-font-family), all --ctp-* theme vars. Styled blockquotes with translucent backgrounds, table row hover, link hover underlines. +- ProjectBox terminal area only visible on Claude tab ({#if activeTab === 'claude'}). Grid rows: auto auto 1fr (+ terminal when on Claude tab). - Svelte 5 event syntax: use `onclick` not `on:click`. Svelte 5 requires lowercase event handler attributes (no colon syntax). ## Memora Tags diff --git a/CHANGELOG.md b/CHANGELOG.md index cdb2d02..528d6df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - CSS relative units rule (`.claude/rules/18-relative-units.md`): enforces rem/em for layout CSS, px only for icons/borders/shadows ### Changed +- Sidebar simplified to Settings-only: removed Sessions, Docs, Context icons from GlobalTabBar (project-specific tabs already in ProjectBox); removed DocsTab/ContextTab imports from App.svelte; removed Alt+1..4 keyboard shortcuts; drawer always renders SettingsTab +- MarkdownPane file switching: replaced onMount-only `watchFile()` with reactive `$effect` that unwatches previous file and watches new one when `filePath` prop changes; added `highlighterReady` gate to prevent premature watches +- MarkdownPane styling: migrated all CSS from legacy vars (`--bg-primary`, `--text-primary`, `--border`, `--font-mono`) to `--ctp-*` theme vars; body font changed from monospace to `var(--ui-font-family, sans-serif)`; styled blockquotes (translucent background), table row hover, link hover underlines (border-bottom transition), list markers (--ctp-overlay1), h4 (--ctp-teal); code blocks use `--ctp-mantle` background with border +- ProjectBox terminal area: only visible on Claude tab (`{#if activeTab === 'claude'}`); grid rows simplified from 4 to 3 (`auto auto 1fr`) - SettingsTab project settings: flat row layout replaced with stacked card layout; icon picker rewritten from DOM `classList.toggle('visible')` to Svelte `$state` (iconPickerOpenFor); checkbox replaced with custom toggle switch component - SettingsTab CSS: all remaining px values in project section converted to rem; add-project form uses dashed border container - AgentPane prompt: replaced separate initial prompt + follow-up input with single unified prompt area; removed `followUpPrompt` state, `handleSubmit` function; follow-up handled via `isResume` detection in `handleUnifiedSubmit()` diff --git a/TODO.md b/TODO.md index 599deb2..8c1e9bf 100644 --- a/TODO.md +++ b/TODO.md @@ -11,6 +11,7 @@ ## Completed +- [x] **Sidebar simplification + markdown fixes** -- Sidebar stripped to Settings-only (Sessions/Docs/Context removed — project-specific). MarkdownPane file switching fixed ($effect watches filePath changes). MarkdownPane restyled: sans-serif font, --ctp-* vars, styled blockquotes/tables/links. Terminal area hidden on Files/Context tabs. | Done: 2026-03-08 - [x] **Agent preview terminal** -- AgentPreviewPane.svelte: read-only xterm.js terminal subscribing to agent session messages. Renders Bash commands (cyan), file ops (yellow), tool results, errors. 👁 button in TerminalTabs spawns preview tab. TerminalTab type extended with 'agent-preview' + agentSessionId field. | Done: 2026-03-08 - [x] **Terminal tabs close fix** -- Svelte 5 `$state` reactivity bug: Map.set() didn't trigger $derived updates. Changed projectTerminals from Map to Record (plain object). Fixes: tabs can now be closed, sequential tab naming works. | Done: 2026-03-08 - [x] **Project settings card redesign** -- SettingsTab project section redesigned: card layout per project with Svelte-state icon picker, inline-editable name, CWD left-ellipsis (direction:rtl), account/profile dropdown (listProfiles), custom toggle switch, subtle remove footer. ProjectHeader profile badge styled as blue pill. All CSS in rem. | Done: 2026-03-08