From 50a9ad40faec0e439ef8b9edac473a0c8e6bc62e Mon Sep 17 00:00:00 2001 From: Hibryda Date: Sun, 8 Mar 2026 21:58:23 +0100 Subject: [PATCH] docs: update meta files for E2E expansion session --- CHANGELOG.md | 11 ++++++++++- TODO.md | 4 ++-- docs/v3-progress.md | 16 ++++++++++++++-- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12e589d..f110531 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - E2E wdio.conf.js: added `wdio:enforceWebDriverClassic: true` to disable BiDi negotiation (wdio v9 injects `webSocketUrl:true` which tauri-driver rejects), removed unnecessary `browserName: 'wry'`, fixed binary path to Cargo workspace target dir (`v2/target/debug/` not `v2/src-tauri/target/debug/`) -- `tauri-plugin-log` init panic: changed `?` to `let _ =` in lib.rs setup hook — telemetry::init() registers tracing-subscriber first, plugin-log silently skips instead of panicking (lib.rs) +- E2E consolidated to single spec file: Tauri creates one app session per spec file; multiple files caused "invalid session id" on 2nd+ file (wdio.conf.js, bterminal.test.ts) +- E2E WebDriver clicks on Svelte 5 components: `element.click()` doesn't reliably trigger onclick handlers inside complex components via WebKit2GTK/tauri-driver; replaced with `browser.execute()` JS-level clicks for .ptab, .dropdown-trigger, .panel-close (bterminal.test.ts) +- Removed `tauri-plugin-log` entirely — `telemetry::init()` already registers tracing-subscriber which bridges the `log` crate; adding plugin-log after panics with "attempted to set a logger after the logging system was already initialized" (lib.rs, Cargo.toml) + +### Changed +- E2E tests expanded from 6 smoke tests to 25 tests across 4 describe blocks: Smoke (6), Workspace & Projects (8), Settings Panel (6), Keyboard Shortcuts (5) — all in single bterminal.test.ts file (bterminal.test.ts) + +### Removed +- `tauri-plugin-log` dependency from Cargo.toml — redundant with telemetry::init() tracing-subscriber setup +- Individual E2E spec files (smoke.test.ts, keyboard.test.ts, settings.test.ts, workspace.test.ts) — consolidated into bterminal.test.ts - Workspace teardown race: `switchGroup()` now awaits `waitForPendingPersistence()` before clearing agent state, preventing data loss when agents complete during group switch (agent-dispatcher.ts, workspace.svelte.ts) - SettingsTab switchGroup click handler made async with await to properly handle the async switchGroup() flow (SettingsTab.svelte) - Re-entrant sidecar exit handler race condition: added `restarting` guard flag preventing double-restart on rapid disconnect/reconnect (agent-dispatcher.ts) diff --git a/TODO.md b/TODO.md index a649e93..fabe1d2 100644 --- a/TODO.md +++ b/TODO.md @@ -3,13 +3,14 @@ ## Active ### v2/v3 Remaining -- [ ] **E2E testing — expand coverage** -- 6 smoke tests passing (WebdriverIO v9.24 + tauri-driver). Add tests for agent sessions, terminal interaction, settings persistence. +- [ ] **E2E testing — expand coverage** -- 25 tests passing (WebdriverIO v9.24 + tauri-driver, single spec file). Add tests for agent sessions, terminal interaction, settings persistence. - [ ] **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. ## Completed +- [x] **E2E testing — consolidated & expanded** -- Consolidated 4 spec files into single bterminal.test.ts (Tauri single-session requirement). 25 tests across 4 describe blocks: Smoke(6), Workspace(8), Settings(6), Keyboard(5). Fixed WebDriver clicks on Svelte components via browser.execute(), removed tauri-plugin-log (redundant with telemetry::init()). | Done: 2026-03-08 - [x] **px→rem conversion** -- All ~100 px layout violations converted to rem across 10 components (AgentPane, ToastContainer, CommandPalette, SettingsTab, TeamAgentsPanel, AgentCard, StatusBar, AgentTree, TerminalPane, AgentPreviewPane). Rule 18 fully enforced. | Done: 2026-03-08 - [x] **Workspace teardown race fix** -- Added pendingPersistCount counter + waitForPendingPersistence() fence in agent-dispatcher.ts. switchGroup() awaits persistence before clearing state. Last open HIGH audit finding resolved. | Done: 2026-03-08 - [x] **OTEL telemetry** -- Full-scope OpenTelemetry: telemetry.rs (TelemetryGuard, tracing + OTLP layers), telemetry-bridge.ts (frontend→Rust), #[tracing::instrument] on 10 commands, agent dispatcher lifecycle logging, Docker Tempo+Grafana stack (port 9715). BTERMINAL_OTLP_ENDPOINT env var controls export. | Done: 2026-03-08 @@ -19,4 +20,3 @@ - [x] **ContextPane project-scoped redesign** -- Auto-registers project in ctx DB on mount. Removed project selector. | Done: 2026-03-08 - [x] **ctx init fix + UI init button** -- Fixed ctx CLI, added Initialize Database button in ContextPane. | Done: 2026-03-08 - [x] **Premium markdown typography** -- MarkdownPane CSS overhaul with Inter font, prose spacing, gradient HR. | Done: 2026-03-08 -- [x] **Collapsible terminal panel** -- Terminal section collapses to status bar. Default collapsed. | Done: 2026-03-08 diff --git a/docs/v3-progress.md b/docs/v3-progress.md index 8e3e8c5..fb92aca 100644 --- a/docs/v3-progress.md +++ b/docs/v3-progress.md @@ -432,5 +432,17 @@ All editor themes map to the same `--ctp-*` CSS custom property names (26 vars). - [x] Fixed wdio v9 BiDi: added `wdio:enforceWebDriverClassic: true` — wdio v9 injects webSocketUrl:true which tauri-driver rejects - [x] Removed `browserName: 'wry'` from capabilities (not needed in wdio, only Selenium) - [x] Fixed binary path: Cargo workspace target is v2/target/debug/, not v2/src-tauri/target/debug/ -- [x] Fixed tauri-plugin-log panic: telemetry::init() registers tracing-subscriber before plugin-log → changed `?` to `let _ =` in lib.rs -- [x] All 6 E2E smoke tests pass (6s runtime after build) +- [x] Fixed tauri-plugin-log panic: telemetry::init() registers tracing-subscriber before plugin-log → removed tauri-plugin-log entirely (redundant with telemetry::init()) +- [x] Removed tauri-plugin-log from Cargo.toml dependency + +#### E2E Coverage Expansion (25 tests, single spec file) +- [x] Consolidated 4 spec files into single bterminal.test.ts — Tauri creates one app session per spec file; after first spec completes, app closes and subsequent specs get "invalid session id" +- [x] Added Workspace & Projects tests (8): project grid, project boxes, header with name, 3 project tabs, active highlight, tab switching, status bar counts +- [x] Added Settings Panel tests (6): settings tab, sections, theme dropdown, dropdown open+options, group list, close button +- [x] Added Keyboard Shortcuts tests (5): Ctrl+K command palette, Ctrl+, settings, Ctrl+B sidebar, Escape close, palette group list +- [x] Fixed WebDriver clicks on Svelte 5 components: `element.click()` doesn't reliably trigger onclick inside complex components via WebKit2GTK/tauri-driver — use `browser.execute()` for JS-level clicks +- [x] Fixed CSS text-transform: `.ptab` getText() returns uppercase — use `.toLowerCase()` for comparison +- [x] Fixed element scoping: `browser.$('.ptab')` returns ALL tabs across project boxes — scope via `box.$('.ptab')` +- [x] Fixed keyboard focus: `browser.execute(() => document.body.focus())` before sending shortcuts +- [x] Removed old individual spec files (smoke.test.ts, keyboard.test.ts, settings.test.ts, workspace.test.ts) +- [x] All 25 E2E tests pass (9s runtime after build)