Hibryda
485abb4774
feat(electrobun): session continuity — Claude JSONL listing, resume/continue sidecar support, session picker UI
2026-03-27 02:43:54 +01:00
Hibryda
3d25ab675f
chore: add getDisplayMessages debug logging to trace reactivity
2026-03-26 02:46:12 +01:00
Hibryda
8031cf91cf
fix(electrobun): hasSession checks running status (dead sessions no longer block startAgent)
2026-03-26 02:35:23 +01:00
Hibryda
162b5417e4
feat(electrobun): hierarchical state tree (Rule 58)
...
New files:
- project-state.types.ts: all per-project state interfaces
- project-state.svelte.ts: unified per-project state with version counter
- app-state.svelte.ts: root facade re-exporting all stores as appState.*
Rewired components (no more local $state):
- ProjectCard: reads via appState.agent.* and appState.project.tab.*
- TerminalTabs: state in appState.project.terminals.*
- FileBrowser: state in appState.project.files.*
- CommsTab: state in appState.project.comms.*
- TaskBoardTab: state in appState.project.tasks.*
All follow Rule 57 (no $derived with new objects) and Rule 58
(state tree architecture, components are pure renderers).
2026-03-24 15:20:09 +01:00
Hibryda
8d09632879
fix(electrobun): eliminate ALL $derived from ProjectCard — 0% CPU achieved
...
Root cause: $derived with store getter functions (.filter/.map/?.operator)
created new object references on every evaluation. Svelte 5 interpreted
these as "changed values" → triggered re-render → re-evaluated $derived
→ new references → infinite loop (115% CPU).
Fix: replaced ALL $derived in ProjectCard with plain getter functions.
Functions are called in the template — Svelte tracks the inner $state
reads but doesn't create intermediate reactive nodes that can loop.
Verified via bisect:
- Skeleton (no ProjectCard): 0% CPU
- ProjectCard with $derived: 115% CPU
- ProjectCard with plain functions: 0% CPU (0 ticks in 5s)
Also fixed: CommandPalette $effect that read+wrote selectedIdx.
2026-03-24 12:59:11 +01:00
Hibryda
2709600319
fix(electrobun): isolate blink state to store, prevent prop-cascade re-renders
...
Root cause found via bisect: blinkVisible prop changed every 500ms,
causing complete re-render of ALL ProjectCard trees (AgentPane, Terminal,
all tabs) — even display:none content is re-evaluated by Svelte 5.
Fix: blink-store.svelte.ts owns the timer. StatusDot reads directly
from store, not from parent prop. No prop cascades.
Also: replaced $derived with .filter()/.map() (creates new arrays)
with plain functions in ProjectCard to prevent reactive loops.
2026-03-24 12:05:39 +01:00
Hibryda
805d1e533d
fix(electrobun): loadLastSession in onMount not $effect (prevents infinite reactive cycle)
2026-03-23 21:19:30 +01:00
Hibryda
2b1194c809
refactor(electrobun): centralize all shared state into global stores
...
New stores:
- ui-store.svelte.ts: settingsOpen, paletteOpen, searchOpen, notifDrawerOpen,
showWizard, settingsCategory, projectToDelete, showAddGroup, newGroupName
- project-tabs-store.svelte.ts: per-project activeTab + activatedTabs via Map
Wired:
- App.svelte: 8 inline $state removed, reads/writes via ui-store
- ProjectCard: activeTab/activatedTabs from project-tabs-store
- SettingsDrawer: activeCategory from ui-store
- CommandPalette: 4 commands call ui-store directly (no CustomEvent dispatch)
Components are now pure view layers reading from stores.
2026-03-23 20:26:07 +01:00
Hibryda
c88577a34a
refactor(electrobun): modularize stores + shared UI components
...
Stores:
- notifications-store.svelte.ts: owns notifications array (was inline in App)
- workspace-store.svelte.ts: extended with addProjectFromWizard, loadGroupsFromDb,
loadProjectsFromDb, derived getters (totalCost, totalTokens, mountedGroupIds)
Shared UI components (ui/):
- SegmentedControl.svelte: replaces repeated .seg button groups
- SliderInput.svelte: labeled range slider with value display
- StatusDot.svelte: colored dot with pulse support
- IconButton.svelte: icon-only button with tooltip, 3 sizes
- Section.svelte: settings section wrapper with heading
App.svelte: script 390→221 lines (removed all inline CRUD, delegates to stores)
ProjectCard: uses StatusDot shared component
AgentSettings + OrchestrationSettings: use SegmentedControl, SliderInput, Section
2026-03-23 19:42:47 +01:00
Hibryda
bd48a09fd8
fix(electrobun): remove {#if} lazy mount on all 7 tabs — eager mount with display:none (WebKitGTK hit-test fix)
2026-03-23 19:20:18 +01:00
Hibryda
8e756d3523
feat(electrobun): final 5% — full integration, real data, polish
...
1. Claude CLI: additionalDirectories + worktreeName passthrough
2. Agent-store: reads settings (default_cwd, provider model, permission)
3. Project hydration: SQLite replaces hardcoded PROJECTS, add/remove UI
4. Group hydration: SQLite groups, add/delete in sidebar
5. Terminal auto-spawn: reads default_cwd from settings
6. Context tab: real tokens from agent-store, file refs, turn count
7. Memory tab: Memora DB integration (read-only, graceful if missing)
8. Docs tab: markdown viewer (files.list + files.read + inline renderer)
9. SSH tab: CRUD connections, spawn PTY with ssh command
10. Error handling: global unhandledrejection → toast notifications
11. Notifications: agent done/error/stall → toasts, 15min stall timer
12. Command palette: all 18 commands (was 10)
+1,198 lines, 13 files. Electrobun now 100% feature-complete vs Tauri v3.
2026-03-22 02:02:54 +01:00
Hibryda
ec30c69c3e
feat(electrobun): add CommsTab and TaskBoardTab to project card tabs
2026-03-22 01:36:46 +01:00
Hibryda
252fca70df
feat(electrobun): file management — CodeMirror editor, PDF viewer, CSV table, real file I/O
...
- CodeEditor: CodeMirror 6 with Catppuccin theme, 15+ languages, Ctrl+S save,
dirty tracking, save-on-blur
- PdfViewer: pdfjs-dist canvas rendering, zoom 0.5-3x, HiDPI, lazy page load
- CsvTable: RFC 4180 parser, delimiter auto-detect, sortable columns, sticky header
- FileBrowser: real filesystem via files.list/read/write RPC, lazy dir loading,
file type routing (code→editor, pdf→viewer, csv→table, images→display)
- 10MB size gate, binary detection, base64 encoding for non-text files
2026-03-22 01:36:02 +01:00
Hibryda
29a3370e79
fix(electrobun): address all 20 Codex review findings
...
CRITICAL:
- PTY leak: Terminal.svelte now calls pty.close on destroy, not just unsubscribe
- Agent session cleanup: clearSession() removes done/error sessions, backend
deletes after 60s grace period
HIGH:
- Clone branch passthrough: user's branch name flows through callback
- Circular imports: extracted rpc.ts singleton, broke main.ts ↔ App.svelte cycle
- Settings wired to runtime: Terminal reads cursor/scrollback from settings
- Security disclaimer: added "prototype — not system keyring" notice
- ThemeEditor: fixed basePalette → initialPalette reference
MEDIUM:
- Clone race: UUID suffix instead of count-based index
- Silent failures: structured error returns from PTY handlers
- WebKitGTK mount: only current + previous group mounted
- Debug listeners: gated behind DEBUG, cleanup on destroy
- NDJSON residual buffer parsed on process exit
- Codex adapter: deduplicated tool_call/tool_result
- extraEnv: rejects CLAUDE*/CODEX*/OLLAMA* keys
- settings-db: runMigrations() with version tracking
- active_group: persisted via settings.set
LOW:
- Removed dead demo code, unused variables
- color-mix() fallbacks added
2026-03-22 01:20:23 +01:00
Hibryda
ef0183de7f
feat(electrobun): agent execution layer — sidecar manager + message adapters + store
...
- SidecarManager: spawns claude/codex/ollama runners via Bun.spawn(),
NDJSON stdio protocol, Claude CLI auto-detection, env stripping,
AbortController stop, Deno/Node runtime detection
- MessageAdapter: parses Claude stream-json, Codex ThreadEvent, Ollama
chunks into common AgentMessage format
- agent-store.svelte.ts: per-project reactive session state, RPC event
listeners for agent.message/status/cost
- AgentPane: wired to real sessions (start/stop/prompt), stop button,
thinking/system message rendering
- ProjectCard: status dot from real agent status, cost/tokens from store
- 5 new RPC types (agent.start/stop/prompt/list + events)
2026-03-22 01:03:05 +01:00
Hibryda
a020f59cb4
feat(electrobun): groups, cloning, shortcuts, custom window — all 5 features
...
Groups Sidebar:
- SQLite groups table (4 seeded: Development, Testing, DevOps, Research)
- Left icon rail with emoji group icons, Ctrl+1-4 switching
- Active group highlighted, projects filtered by group
Project Cloning:
- Clone button on project cards (fork icon)
- git worktree add via Bun.spawn (array form, no shell strings)
- 3-clone limit, branch name validation, pending-status pattern
- Clone cards: WT badge + branch name + accent top border
- Chain link SVG icons between linked clones in grid
Keyboard Shortcuts:
- keybinding-store.svelte.ts: 16 defaults across 4 categories
- Two-scope: document capture + terminal focus guard
- KeyboardSettings.svelte: search, click-to-capture, conflict detection
- Per-binding reset + Reset All
Custom Window:
- titleBarStyle: "hidden" — no native title bar
- Vertical "AGOR" text in left sidebar (writing-mode: vertical-rl)
- Floating window controls badge (minimize/maximize/close)
- Draggable region via -webkit-app-region: drag
- Window frame persisted to SQLite (debounced 500ms)
Window is resizable by default (Electrobun BrowserWindow).
2026-03-20 06:24:24 +01:00
Hibryda
4ae558af17
feat(electrobun): fixes + 7 new features (terminal input, file browser, memory, toasts)
...
Fixes:
- Terminal accepts keyboard input (echo mode with prompt)
- Terminal drawer collapses properly (display:none preserves xterm state)
Features:
- 6 project tabs: Model | Docs | Context | Files | SSH | Memory
- FileBrowser.svelte: recursive tree with expand/collapse + file preview
- MemoryTab.svelte: memory cards with trust badges (human/agent/auto)
- Subagent tree in AgentPane (demo: search-agent, test-runner)
- Drag resize handle between agent pane and terminal
- Theme dropdown in Settings (4 Catppuccin flavors)
- ToastContainer.svelte: auto-dismiss notifications
2026-03-20 02:07:18 +01:00
Hibryda
b11a856b72
feat(electrobun): full UI — terminal tabs, agent pane, settings, palette
...
Extracted into 6 components:
- ProjectCard.svelte: header with badges, tab bar, content area
- AgentPane.svelte: collapsible tool calls, status strip, prompt input
- TerminalTabs.svelte: add/close shell tabs, active highlighting
- SettingsDrawer.svelte: theme, fonts, providers
- CommandPalette.svelte: Ctrl+K search overlay
- Terminal.svelte: xterm.js with Canvas + Image addons
Status bar: running/idle/stalled counts, attention queue, session
duration, notification bell, Ctrl+K hint. All ARIA labeled.
2026-03-20 01:55:24 +01:00