Commit graph

86 commits

Author SHA1 Message Date
Hibryda
2f03cf0ef0 fix(ui-dioxus): class-toggle animation instead of inline opacity (Blitz compatible) 2026-03-19 07:11:01 +01:00
Hibryda
67ab77ebf4 feat(ui-dioxus): use dioxus-motion for Blitz-compatible pulse animation 2026-03-19 07:04:23 +01:00
Hibryda
c9f8679744 fix(ui-dioxus): use schedule_update() for cross-thread Blitz animation 2026-03-19 06:50:26 +01:00
Hibryda
7cea86361a fix(ui-dioxus): use atomic+thread for Blitz animation (Signal not Send) 2026-03-19 06:45:52 +01:00
Hibryda
b0547d5c05 feat(ui-dioxus): add signal-based PulsingDot animation (Blitz-friendly) 2026-03-19 06:39:47 +01:00
Hibryda
6f9607d1ba fix(ui-dioxus): remove CSS animations causing 30% CPU in Blitz renderer 2026-03-19 06:31:48 +01:00
Hibryda
d5172275e2 feat(ui-dioxus): switch to Blitz/wgpu native renderer (no WebView) 2026-03-19 06:12:11 +01:00
Hibryda
f3d2ca78ba feat: add Dioxus and GPUI UI prototypes for framework comparison
Dioxus (ui-dioxus/): 2,169 lines, WebView mode (same wry as Tauri),
  Catppuccin theme, 12 components, agor-core integration, compiles clean.
  Evolution path — keeps xterm.js, gradual migration from Tauri.

GPUI (ui-gpui/): 2,490 lines, GPU-accelerated rendering, alacritty_terminal
  for native terminal, 17 files, Catppuccin palette, demo data.
  Revolution path — pure Rust UI, 120fps target, no WebView.

Both are standalone (not in workspace), share agor-core backend.
Created for side-by-side comparison to inform framework decision.
2026-03-19 06:05:58 +01:00
Hibryda
90c7315336 docs: add v3.2 features and architecture decisions to TODO
- Profile export/import with format evaluation
- Keyboard shortcuts settings (levels, compose, conflicts)
- Per-project settings cascade (global → group → project)
- Custom AI-augmented editors (image, video, audio, 3D)
- Tauri vs WGPU alternative evaluation
- Frontend-backend tight binding investigation
- More realistic E2E fixtures (multi-provider, multi-group)
2026-03-18 05:56:26 +01:00
Hibryda
60614a75f5 fix(e2e): daemon runner parses per-spec PASSED/FAILED from WDIO output
Previously marked all specs as failed when any single spec failed.
Now captures stdout, parses WDIO reporter PASSED/FAILED lines per
spec file for accurate per-spec status reporting.
2026-03-18 05:36:56 +01:00
Hibryda
d7dd7722ab feat(e2e): add test daemon CLI with ANSI dashboard and Agent SDK bridge
- index.ts: CLI entry point (--full, --spec, --watch, --agent flags)
- runner.ts: programmatic WDIO launcher with result streaming
- dashboard.ts: ANSI terminal UI (pass/fail/skip/running icons, summary)
- agent-bridge.ts: NDJSON stdin/stdout for Agent SDK queries
  (status, rerun, failures, reset-cache)
- Standalone package at tests/e2e/daemon/
2026-03-18 05:17:17 +01:00
Hibryda
46f51d7941 feat(e2e): add smart test caching and error toast catching
- results-db.ts: TestPassCache with consecutivePasses counter,
  recordTestResult(), shouldSkip(threshold=3), resetCache()
- wdio.conf.js: afterTest hook catches unexpected .toast.error/.load-error
  elements, records results to smart cache. FULL_RESCAN=1 bypasses caching
2026-03-18 05:16:49 +01:00
Hibryda
0803dc3844 docs: update TODO and CHANGELOG for session work
- TODO: mark completed (SPKI persistence, theme editor, pro components,
  error handling, marketplace, E2E expansion), add new items (E2E failures,
  daemon integration)
- CHANGELOG: add ThemeEditor, marketplace, 6 commercial modules, AppError
  enum, E2E daemon, security fixes (5 critical + 14 high)
2026-03-18 05:16:37 +01:00
Hibryda
a94158e894 fix(e2e): fix remaining selector and state issues (3 files)
- settings.test.ts: use browser.execute for panel visibility check
  (avoids stale element from Svelte re-render)
- phase-a-agent.test.ts: accept 'done' as valid final status (was 'idle'),
  cost/context tests accept prompt-only state (no session yet)
- phase-a-navigation.test.ts: wait for terminal-tabs after expanding,
  add tab before checking active styling, re-open palette if closed
2026-03-18 04:56:06 +01:00
Hibryda
1b838eb9fc fix(e2e): update selectors for redesigned UI (9 spec files)
- BTerminal → Agent Orchestrator (title, describe blocks, LLM context)
- Settings: .sidebar-panel → .settings-panel .settings-content,
  .dropdown-trigger → .dropdown-btn, .dropdown-option → .dropdown-item
- Settings open: [data-testid=settings-btn] + .panel-close
- Font controls: .size-control → .stepper, .size-btn → stepper button
- Terminal: data-testid selectors for toggle/tab-add
- Agent pane: .cost-bar → .status-strip/.done-bar, context meter conditional
- Project header: .cwd → .info-cwd
- Health: .health-dot → .status-dot
- Multi-project: proper this.skip() when single-project fixture
2026-03-18 04:45:22 +01:00
Hibryda
6459877c89 fix: change dev port from 9700 to 9710 (avoid BridgeCoach conflict)
Port 9700 was occupied by BridgeCoach Docker container, causing the
Tauri debug binary to load the wrong frontend. Changed to 9710:
- vite.config.ts: server.port 9700 → 9710
- tauri.conf.json: devUrl localhost:9700 → localhost:9710
- wdio.conf.js: DEV_URL_PORT check updated
- Binary rebuilt with new port baked in
2026-03-18 04:20:49 +01:00
Hibryda
10de2a3c8b fix(e2e): detect devUrl port conflict before launching tests
Debug binary has devUrl (localhost:9700) baked in via cfg(debug_assertions).
If another app (Docker, Nuxt, etc.) serves on that port, the Tauri WebView
loads the WRONG frontend. onPrepare now fails fast with a clear message
if port 9700 is occupied, preventing false test results against wrong app.
2026-03-18 04:11:31 +01:00
Hibryda
c73a2e1caf fix(e2e): build frontend before tests (prevents wrong-app loading)
- onPrepare: run `npm run build` before `cargo tauri build --debug --no-bundle`
  (--no-bundle skips beforeBuildCommand, leaving no dist/ for the WebView)
- SKIP_BUILD: still verify dist/index.html exists, build frontend if missing
- Without this fix, the Tauri binary falls back to devUrl and loads whatever
  app is serving on that port (e.g., BridgeCoach on another project)
2026-03-18 04:06:28 +01:00
Hibryda
1f21a9fb46 fix(e2e): kill stale processes, verify app identity before tests
- onPrepare: kill stale tauri-driver on port 9750 before spawning
- onPrepare: verify debug binary exists (fail fast with clear message)
- before: app identity check — waits for known Agent Orchestrator elements
  (status-bar, project-grid, settings-panel) or matching window title
- Prevents wrong-app connection when other Tauri/WebKit2GTK apps are running
2026-03-18 04:01:46 +01:00
Hibryda
ae321ad108 fix(e2e): use dedicated port 9750 for tauri-driver (avoid conflicts)
- tauri-driver spawned with --port 9750 (was default 4444)
- Pre-check: fail fast if port already in use (clear error message)
- TCP readiness probe uses the dedicated port
- Follows project port convention (9000-9999 range)
2026-03-18 03:58:21 +01:00
Hibryda
91a3b56dba test(e2e): split + expand phase-b into grid + LLM specs
- phase-b-grid.test.ts (227 lines): multi-project grid, tab switching,
  status bar, accent colors, project icons, scroll, tab bar completeness
- phase-b-llm.test.ts (211 lines): LLM-judged agent response, code gen,
  context tab, tool calls, cost display, session persistence
- Original phase-b.test.ts (377 lines) deleted
- New exhaustive tests added for grid layout and agent interaction
2026-03-18 03:47:16 +01:00
Hibryda
718133f9f6 test(e2e): split + expand agent-scenarios into Phase A (22 → 47 tests)
- phase-a-structure.test.ts (156 lines, 14 tests): structural integrity,
  settings panel, sidebar gear, accent colors, project name/icon, grid layout
- phase-a-agent.test.ts (210 lines, 14 tests): agent pane, prompts,
  provider badge, cost display, context meter, status transitions
- phase-a-navigation.test.ts (297 lines, 19 tests): terminal tabs,
  command palette, focus switching, palette categories, shortcut hints
- Original agent-scenarios.test.ts (429 lines) deleted
- 25 new exhaustive tests added
2026-03-18 03:46:40 +01:00
Hibryda
56971c3f27 test(e2e): add Phase D/E/F specs covering new architecture (54 tests)
Phase D — Settings & Error Handling:
- D1: Settings panel 6-category tabs, search, active highlighting
- D2: Appearance settings (themes, fonts, cursor, scrollback)
- D3: Theme Editor (color pickers, groups, save/cancel)
- D4: Toast notifications, notification center bell/dropdown
- D5: Error states (no loadError warnings, status bar)

Phase E — Agents & Health:
- E1: ProjectBox tab bar (7+ tabs, PERSISTED-LAZY switching)
- E2: Agent session UI (prompt input, context meter, cost)
- E3: Provider configuration (panels, capabilities, toggles)
- E4: Status bar fleet state (counts, cost, attention queue)
- E5: Project health indicators (status dot, CWD, pressure, burn rate)
- E6: Metrics tab (fleet aggregates, health cards, Live/History)
- E7: Conflict detection (no false badges on fresh launch)
- E8: Audit log (manager-only tab, toolbar, entries)

Phase F — Search & LLM Quality:
- F1: Search overlay (Ctrl+Shift+F, input, empty state, close)
- F2: Context tab & anchors (visualization, budget scale)
- F3: SSH tab (connection list, add button)
- F4-F7: LLM-judged quality (settings completeness, theme editor,
  error messages, overall UI consistency)
2026-03-18 03:20:37 +01:00
Hibryda
6f247da514 refactor(e2e): complete agor.test.ts split (799 lines → 5 files)
- smoke.test.ts (47) — stateless smoke checks
- workspace.test.ts (79) — workspace & projects
- settings.test.ts (247) — settings panel + interaction
- features.test.ts (220) — command palette + keyboard shortcuts
- terminal-theme.test.ts (292) — terminal tabs + theme switching
- Reset-to-home-state hooks in all stateful before() blocks
- Original agor.test.ts deleted, wdio.conf.js specs updated
- All 50+ original tests preserved
2026-03-18 03:11:10 +01:00
Hibryda
f08c4b18cf refactor(e2e): split spec files under 300-line limit
- phase-c.test.ts (626 lines) → phase-c-ui.test.ts (279), phase-c-tabs.test.ts
  (272), phase-c-llm.test.ts (76) — all 11 scenarios preserved
- agor.test.ts (799 lines) → smoke.test.ts (47), workspace.test.ts (79),
  settings.test.ts (247), features.test.ts (488) — split in progress
- Reset-to-home-state hooks added to stateful before() blocks
- wdio.conf.js specs array updated for all new filenames
2026-03-18 03:09:29 +01:00
Hibryda
e76bc341f2 refactor(e2e): extract infrastructure into tests/e2e/infra/ module
- Move fixtures.ts, llm-judge.ts, results-db.ts to tests/e2e/infra/
- Deduplicate wdio.conf.js: use createTestFixture() instead of inline copy
- Replace __dirname paths with projectRoot-anchored paths
- Create test-mode-constants.ts (typed env var names, flag registry)
- Create scripts/preflight-check.sh (validates tauri-driver, display, Claude CLI)
- Create scripts/check-test-flags.sh (CI lint for AGOR_TEST flag drift)
- Rewrite tests/e2e/README.md with full documentation
- Update spec imports for moved infra files
2026-03-18 03:06:57 +01:00
Hibryda
538a31f85c feat(remote): persist SPKI pins and machine configs to SQLite
- remote_machines table in sessions.db (id, label, url, token, auto_connect,
  spki_pins as JSON array, created_at, updated_at)
- session/machines.rs: save/load/delete/update_pins CRUD operations
- RemoteManager: set_session_db() + load_from_db() for startup restoration
- All mutations persist: add_machine, remove_machine, add_spki_pin,
  remove_spki_pin, TOFU auto-store — pins survive restart
- 197 cargo tests passing, 0 warnings
2026-03-18 02:18:17 +01:00
Hibryda
d1463d4d1e feat(pro): wire all 7 Pro components into app
- ProjectBox: 5 Pro tabs (Analytics, Budget, Export, Symbols, Agent Mem)
  with PERSISTED-LAZY mount, proStatus() feature gate, peach accent color
- SettingsPanel: Pro tab (Accounts + Marketplace) conditionally shown
- ProSettings.svelte: wrapper with sub-tabs for AccountSwitcher + PluginMarketplace
- Feature detection via dynamic import of pro-bridge + proStatus() call
- All tabs hidden when agor-pro plugin not loaded (community edition)
2026-03-18 02:01:18 +01:00
Hibryda
0953395423 feat(theme): add Theme Editor with live preview, import/export
- ThemeEditor.svelte: 26 color pickers (14 accents + 12 neutrals) with
  native <input type="color"> and hex text input, live CSS preview
- custom-themes.ts: persistence layer (SQLite JSON blob), validation,
  import/export as JSON files, clone from any built-in theme
- theme.svelte.ts: previewPalette/clearPreview for live editing,
  setCustomTheme for persistence, initTheme loads custom themes on startup
- themes.ts: applyPaletteDirect + buildXtermThemeFromPalette + PALETTE_KEYS
- AppearanceSettings.svelte: custom themes list with edit/delete, "New
  Custom Theme" button, ThemeEditor toggle
- All files under 300 lines (296 + 227 + 98)
2026-03-18 01:43:22 +01:00
Hibryda
c1149561c7 fix: remove unused variable and suppress dead_code warning in agor-pro 2026-03-18 01:37:11 +01:00
Hibryda
f19b69f018 fix(error): migrate session submodules + btmsg/bttask backends to AppError
- session/*.rs (sessions, layout, settings, ssh, agents, metrics, anchors)
  now return Result<T, AppError> internally, not just at command boundary
- btmsg.rs and bttask.rs backends migrated to AppError::Database
- 116 cargo tests passing
2026-03-18 01:32:07 +01:00
Hibryda
eb04e7e5b5 fix(error): migrate remaining Rust commands to AppError (btmsg, bttask, knowledge, plugins, search) 2026-03-18 01:23:56 +01:00
Hibryda
4fccc3f3e0 fix(error): replace console.warn with handleInfraError in session-persistence 2026-03-18 01:23:51 +01:00
Hibryda
d582a1d26c fix(error): migrate notifications.rs + message-adapters error handling 2026-03-18 01:22:30 +01:00
Hibryda
1978475766 fix(error): migrate misc.rs to AppError 2026-03-18 01:22:27 +01:00
Hibryda
07f41fe0ea fix(error): migrate remote.rs to AppError 2026-03-18 01:22:19 +01:00
Hibryda
93b3db8b1f fix(error): add global error handler, fix stores and dispatcher
- Global unhandledrejection handler with IPC+network filtering
- Agent dispatcher heartbeat uses handleInfraError (was fire-and-forget)
- All stores: layout, workspace, anchors, theme, plugins, machines,
  wake-scheduler — silent failures replaced with handleInfraError
- initGlobalErrorHandler() called in App.svelte onMount
2026-03-18 01:22:12 +01:00
Hibryda
8b3b0ab720 feat(error): add Rust AppError enum and migrate command modules
- AppError enum with 10 variants (Database, Auth, Filesystem, Ipc, NotFound,
  Validation, Sidecar, Config, Network, Internal) + serde tag serialization
- From impls for rusqlite::Error, std::io::Error, serde_json::Error
- Migrated 9 command modules from Result<T, String> to Result<T, AppError>
- Frontend receives structured {kind, detail} objects via IPC
2026-03-18 01:22:04 +01:00
Hibryda
365c420901 fix(settings): replace console.error with handleError + Promise.allSettled
- All 6 settings components: save handlers use handleError with user intent
- onMount loaders migrated from Promise.all to Promise.allSettled (partial recovery)
- loadError $state + inline warning banner on full load failure
- JSON parse catches use handleInfraError with explicit fallback comments
- Secret operations (reveal/store/delete) use handleError for user feedback
2026-03-18 01:21:48 +01:00
Hibryda
c7292e9e54 docs: update TODO, CHANGELOG for error handling audit and settings redesign 2026-03-18 01:19:29 +01:00
Hibryda
dcdb741403 feat(error): add error handling foundation (Day 0)
- extractErrorMessage(err: unknown) normalizes any error shape to string
- handleError/handleInfraError dual utilities (user-facing vs infra-only)
- error-classifier extended with ipc/database/filesystem types (9 total)
- Toast rate-limiting (max 3 per type per 30s) in notifications store
- Infrastructure bridges use documented console.warn (recursion prevention)
- 13 new tests for extractErrorMessage
2026-03-18 01:19:23 +01:00
Hibryda
bfc01192d2 docs(todo): add urgent error handling audit task 2026-03-17 06:33:41 +01:00
Hibryda
1ac6b69311 fix(settings): copy monolith's working theme dropdown pattern exactly 2026-03-17 06:30:09 +01:00
Hibryda
c094983814 fix: missing closing > on appearance div tag 2026-03-17 06:22:13 +01:00
Hibryda
b2f0c446b1 fix(settings): use monolith's working dropdown pattern (onclick on container div) 2026-03-17 06:20:44 +01:00
Hibryda
1f2dd91f82 fix(settings): use document pointerdown for dropdown close (no backdrop) 2026-03-17 06:18:42 +01:00
Hibryda
f8032debac fix(settings): replace window click handler with backdrop for dropdown close 2026-03-17 06:16:18 +01:00
Hibryda
201f168621 fix(settings): fix theme/font dropdown toggle (stopPropagation on buttons) 2026-03-17 06:11:41 +01:00
Hibryda
614ae79f8e fix(settings): switch to horizontal tab bar layout (single column, full width content) 2026-03-17 06:09:00 +01:00
Hibryda
1670ea4482 feat(settings): wire new SettingsPanel into App.svelte (replaces monolith) 2026-03-17 06:06:22 +01:00