YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
test(e2e): align process map with builder handoff (#5835)
Louis Beaumontcc78d0b0f613
diff --git a/apps/screenpipe-app-tauri/e2e/COVERAGE.md b/apps/screenpipe-app-tauri/e2e/COVERAGE.mdindex 800874963..0d1871eeb 100644--- a/apps/screenpipe-app-tauri/e2e/COVERAGE.md+++ b/apps/screenpipe-app-tauri/e2e/COVERAGE.md@@ -105,7 +105,7 @@ pass/fail/skip counts.| app-lifecycle.spec.ts | windows, macos, linux | real-ui-e2e, window-lifecycle | app-launch, home-navigation, webview-stability, route-churn, browser-storage | high | strong | mixed | 14 | Home webview, routing, reload, focus, resize, and storage stability. || artifacts-api.spec.ts | windows, macos, linux | local-api | local-api-auth, artifacts | medium | strong | api | 7 | CRUD coverage for artifact registration, validation, unified listing, upsert, and delete. || audio-fallback.spec.ts | macos | audio-device, settings, notifications | audio-device-health, settings-recording, notifications | medium | conditional | real-user-flow | 1 | Opt-in macOS cloud audio fallback seed. |-| brain-overview.spec.ts | windows, macos, linux | real-ui-e2e, local-api, pipes | brain, brain-overview, brain-canvas, artifacts, pipes | high | strong | real-user-flow | 4 | Creates the first-open starter dashboard, renders source-backed selectable and fixed-period Live Views, verifies dashboard switching stays available during refresh, omits fixed-period controls from view and Customize, exercises durable Canvas notes, connections, keyboard movement, navigation restore, deletion cleanup, and checks layout bounds from 800x600 through 1920x1080. |+| brain-overview.spec.ts | windows, macos, linux | real-ui-e2e, local-api, pipes | brain, brain-overview, brain-canvas, artifacts, pipes | high | strong | real-user-flow | 4 | Creates the first-open starter dashboard, verifies template handoff to the Live View builder agent without a legacy fixed Canvas install, renders source-backed selectable and fixed-period Live Views, verifies dashboard switching stays available during refresh, omits fixed-period controls from view and Customize, exercises durable Canvas notes, connections, keyboard movement, navigation restore, deletion cleanup, and checks layout bounds from 800x600 through 1920x1080. || brain-section.spec.ts | windows, macos, linux | real-ui-e2e | brain, artifacts, memories, viewer-deeplink | medium | strong | real-user-flow | 10 | Brain coverage for filters, search, delete flows, selection pruning, add memory, and inline artifact markdown preview. || capture-frequency-floor.spec.ts | macos | capture-ocr, settings, real-ui-e2e | capture-ocr, settings-recording, restart-flow | high | conditional | real-user-flow | 1 | macOS fixed screenshot cadence regression: persists the 1s setting before immediate Apply & Restart, then verifies real capture attempts and frame writes. || capture-loop-liveness.spec.ts | macos | capture-ocr, local-api, os-integration | app-launch, capture-ocr | high | conditional | api | 1 | Opt-in macOS fault injection wedges a visual-change probe; asserts the bounded probe keeps the capture loop and its /health heartbeat live (no false stale/incident). |diff --git a/apps/screenpipe-app-tauri/e2e/coverage-map.json b/apps/screenpipe-app-tauri/e2e/coverage-map.jsonindex d21f32bc6..de64e7297 100644--- a/apps/screenpipe-app-tauri/e2e/coverage-map.json+++ b/apps/screenpipe-app-tauri/e2e/coverage-map.json@@ -972,7 +972,7 @@"criticality": "high","confidence": "strong","ux": "real-user-flow",- "notes": "Creates the first-open starter dashboard, renders source-backed selectable and fixed-period Live Views, verifies dashboard switching stays available during refresh, omits fixed-period controls from view and Customize, exercises durable Canvas notes, connections, keyboard movement, navigation restore, deletion cleanup, and checks layout bounds from 800x600 through 1920x1080."+ "notes": "Creates the first-open starter dashboard, verifies template handoff to the Live View builder agent without a legacy fixed Canvas install, renders source-backed selectable and fixed-period Live Views, verifies dashboard switching stays available during refresh, omits fixed-period controls from view and Customize, exercises durable Canvas notes, connections, keyboard movement, navigation restore, deletion cleanup, and checks layout bounds from 800x600 through 1920x1080."},{"spec": "live-view-item-actions.spec.ts",diff --git a/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.tsindex bba9111bc..4422122c1 100644--- a/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.ts+++ b/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.ts@@ -377,7 +377,7 @@ describe("Brain Live Views", function () {}});- it("installs the process map template as a connected Canvas", async () => {+ it("hands the process map template to the Live View builder agent", async () => {await waitForAppReady();await openHomeWithDiagnostics();const existingViews = await invokeOrThrow<BrainView[]>("list_brain_views");@@ -395,48 +395,66 @@ describe("Brain Live Views", function () {await waitForTestId("preview-live-view-template-process-map", 10_000).then((element) => element.click(),);++ const capturedPrefillKey = "e2eLiveViewBuilderPrefill";+ await browser.execute((captureKey: string) => {+ window.sessionStorage.removeItem(captureKey);+ const originalSetItem = Storage.prototype.setItem;+ Storage.prototype.setItem = function (key: string, value: string) {+ if (this === window.sessionStorage && key === "pendingChatPrefill") {+ originalSetItem.call(this, captureKey, value);+ }+ originalSetItem.call(this, key, value);+ };+ }, capturedPrefillKey);+await waitForTestId("overview-apply-template", 10_000).then((element) =>element.click(),);- const selector = await waitForTestId("overview-dashboard-selector", 20_000);- await browser.waitUntil(- async () => (await selector.getText()).includes("Process map"),- {- timeout: t(20_000),- timeoutMsg: "Process map dashboard was not selected after install",- },+ await waitForTestId("section-home", 20_000);+ const capturedPrefill = (await browser.execute((captureKey: string) => {+ const value = window.sessionStorage.getItem(captureKey);+ return value ? JSON.parse(value) : null;+ }, capturedPrefillKey)) as {+ context?: string;+ prompt?: string;+ displayLabel?: string;+ autoSend?: boolean;+ source?: string;+ useHomeChat?: boolean;+ targetWindow?: string;+ } | null;++ expect(capturedPrefill).not.toBeNull();+ expect(capturedPrefill?.context).toBe(+ "Create a Live View guided by “Process map”",);- await waitForTestId("live-view-canvas", 15_000);- expect(await $("textarea[aria-label='Canvas note']").getValue()).toContain(- "Observed workflow → handoffs → friction → controls → improvement",+ expect(capturedPrefill?.displayLabel).toBe(+ "Build “Process map” with the Live View agent",);- expect(await $$(`[data-testid^='canvas-arrow-']`)).toHaveLength(5);- const canvasText = (await browser.execute(- () => document.body?.innerText || "",- )) as string;- expect(canvasText).toContain("moves through");- expect(canvasText).toContain("must preserve");- await waitForTestId("canvas-fit", 10_000).then((element) =>- element.click(),+ expect(capturedPrefill?.source).toBe("live-view-builder-agent");+ expect(capturedPrefill?.autoSend).toBe(true);+ expect(capturedPrefill?.useHomeChat).toBe(true);+ expect(capturedPrefill?.targetWindow).toBe("home");+ expect(capturedPrefill?.prompt).toContain('"title":"Trigger and outcome"');+ expect(capturedPrefill?.prompt).toContain(+ '"title":"Safe improvement path"',);- await browser.pause(300);- const screenshot = await saveScreenshot("brain-process-map-template");- expect(existsSync(screenshot)).toBe(true);+ expect(capturedPrefill?.prompt).not.toContain("automate-my-work");- const saved = await invokeOrThrow<CanvasDocument | null>(- "load_brain_view_canvas",- { viewId: "process-map" },+ const viewsAfterHandoff = await invokeOrThrow<BrainView[]>(+ "list_brain_views",);- expect(saved?.mode).toBe("canvas");- expect(saved?.arrows.map((arrow) => arrow.label)).toEqual([- "starts",- "moves through",- "reveals",- "must preserve",- "enables",- ]);- await invokeOrThrow("delete_brain_view", { id: "process-map" });+ expect(viewsAfterHandoff.some((view) => view.id === "process-map")).toBe(+ false,+ );++ const screenshot = await saveScreenshot("brain-process-map-agent-handoff");+ expect(existsSync(screenshot)).toBe(true);+ await browser.execute((captureKey: string) => {+ window.sessionStorage.removeItem(captureKey);+ }, capturedPrefillKey);});it("shows requested range and per-block freshness honestly", async () => {