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): follow onboarding final setup flow
Louis Beaumont94790e498a6b
diff --git a/apps/screenpipe-app-tauri/e2e/COVERAGE.md b/apps/screenpipe-app-tauri/e2e/COVERAGE.mdindex 1aa450b8b..94534cc22 100644--- a/apps/screenpipe-app-tauri/e2e/COVERAGE.md+++ b/apps/screenpipe-app-tauri/e2e/COVERAGE.md@@ -198,7 +198,7 @@ pass/fail/skip counts.| meeting-workspace-tabs.spec.ts | windows, macos, linux | real-ui-e2e, local-api | meeting-notes | high | strong | real-user-flow | 1 | Seeds a live meeting with notes and summary, proves the saved summary is the preferred outcome view, switches persistent tabs, resizes to 640x560, checks footer separation and horizontal overflow, captures a review screenshot, then stops from the transcript and verifies the Summary tab opens. || meetings-only-audio-lifecycle.spec.ts | windows, macos | audio-device, local-api, real-ui-e2e | meetings-only-audio-lifecycle, audio-device-health | high | conditional | real-user-flow | 1 | Opt-in real-audio lifecycle lane: configured devices stay closed outside meetings and open only across a manual meeting edge. || notification-viewer-link.spec.ts | windows, macos, linux | notifications, local-api, window-lifecycle | notifications, viewer-deeplink | high | partial | mixed | 3 | Notification local file links rewrite into in-app viewer links. |-| onboarding-background-ai-tools.spec.ts | windows, macos, linux | onboarding, real-ui-e2e, storage-privacy | onboarding, settings-ai | high | strong | real-user-flow | 2 | Isolated agent-home CI lane verifies private native config writes, the resolved local API credential, a real authenticated MCP tool call, skills setup, and removal of the connection slide. |+| onboarding-background-ai-tools.spec.ts | windows, macos, linux | onboarding, real-ui-e2e, storage-privacy | onboarding, settings-ai | high | strong | real-user-flow | 2 | Isolated agent-home CI lane verifies private native config writes, the resolved local API credential, a real authenticated MCP tool call, skills setup, and migration from the removed connection slide through engine startup to optional recommended setup and completion. || onboarding-first-run.spec.ts | windows, macos, linux | onboarding, real-ui-e2e, tauri-command | onboarding, first-run-learning, settings-persistence | high | strong | real-user-flow | 8 | Fresh-install setup walk: the acquisition slide is reachable in the shipped slide order and counted by the progress bar, offers no free-text field, one tap persists through to store.bin via the real settings command, skip records nothing, and the engine slide is the last one with no goal picker after it. || onboarding-h1-follow-up.spec.ts | windows, macos, linux | onboarding, notifications, pipes, real-ui-e2e | onboarding, notifications, pipes | high | strong | real-user-flow | 1 | A due H1 activation runs its real Pipe, sends one visible prompt through the app-control notification server, and remains exactly-once across repeated scheduler ticks. || onboarding-redirect.spec.ts | windows, macos, linux | onboarding, real-ui-e2e, window-lifecycle | onboarding, app-launch | high | conditional | real-user-flow | 5 | Opt-in no-onboarding seed verifies onboarding redirect. |diff --git a/apps/screenpipe-app-tauri/e2e/coverage-map.json b/apps/screenpipe-app-tauri/e2e/coverage-map.jsonindex 8224d6c82..88ecb2a9e 100644--- a/apps/screenpipe-app-tauri/e2e/coverage-map.json+++ b/apps/screenpipe-app-tauri/e2e/coverage-map.json@@ -2237,7 +2237,7 @@"criticality": "high","confidence": "strong","ux": "real-user-flow",- "notes": "Isolated agent-home CI lane verifies private native config writes, the resolved local API credential, a real authenticated MCP tool call, skills setup, and removal of the connection slide."+ "notes": "Isolated agent-home CI lane verifies private native config writes, the resolved local API credential, a real authenticated MCP tool call, skills setup, and migration from the removed connection slide through engine startup to optional recommended setup and completion."},{"spec": "onboarding-first-run.spec.ts",diff --git a/apps/screenpipe-app-tauri/e2e/specs/onboarding-background-ai-tools.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/onboarding-background-ai-tools.spec.tsindex 13f2d977b..70423f48e 100644--- a/apps/screenpipe-app-tauri/e2e/specs/onboarding-background-ai-tools.spec.ts+++ b/apps/screenpipe-app-tauri/e2e/specs/onboarding-background-ai-tools.spec.ts@@ -304,11 +304,10 @@ async function callActivitySummaryThroughMcp();});- it("resumes a saved connection slide at the engine step and finishes setup", async () => {- // Retries must start from an incomplete store. The engine slide finishes- // setup on its own, and once `isCompleted` is true `show_window` correctly- // routes Onboarding to Home — so without this reset, attempt 2 would fail- // waiting for an `onboarding` handle that must never appear again.+ it("resumes a saved connection slide through the engine and finishes setup", async () => {+ // Retries must start from an incomplete store. Once `isCompleted` is true+ // `show_window` correctly routes Onboarding to Home, so without this reset+ // attempt 2 would wait for an `onboarding` handle that must never appear.await invokeOrThrow("reset_onboarding");await invokeOrThrow("set_onboarding_step", { step: "connect-apps" });@@ -323,8 +322,8 @@ async function callActivitySummaryThroughMcp(await browser.switchToWindow("onboarding");await waitForWindowUrl("/onboarding", undefined, t(15_000));- // Best effort: the engine slide completes setup on its own, so the window- // can go away while this runs. The contract below is what actually gates.+ // Best effort: the window can move from engine to recommended setup while+ // this runs. The contract below is what actually gates.try {await saveScreenshot("onboarding-legacy-connect-apps-resume");} catch {@@ -332,57 +331,77 @@ async function callActivitySummaryThroughMcp(}// The contract: a saved `connect-apps` install must not get stuck on the- // removed slide — it resumes at the engine and finishes. Sample the body- // while the window is alive so we can prove the removed slides never- // rendered, and stop as soon as the store says setup completed.+ // removed slide. It resumes at the engine, advances to the new optional+ // recommended-setup step, and finishes when the user continues. Sample+ // the body while the window is alive so we can prove the removed slides+ // never rendered.//// Which window each half runs in is load-bearing. `invoke` executes in- // whichever window is currently switched to, and the engine slide closes- // Onboarding the moment it finishes setup. Polling the store from the- // onboarding handle therefore races its own success condition: completion- // destroys the context the completion check runs in, and the driver fails- // the whole `waitUntil` with "No window could be found" instead of- // reporting `isCompleted: true`. So the store is read from Home, which is- // opened above and outlives Onboarding, and only the body sample runs- // against Onboarding while that handle still exists.+ // whichever window is currently switched to, and completing recommended+ // setup closes Onboarding. The store is therefore read from Home, which+ // is opened above and outlives Onboarding.const seen: string[] = [];await browser.waitUntil(async () => {- // Driver-level, so it stays valid even with no live current window.const handles = await browser.getWindowHandles();if (!handles.includes("home")) {throw new Error(- "home window disappeared; it is the surviving context this poll reads the onboarding store from",+ "home window disappeared while waiting for recommended setup",);}if (handles.includes("onboarding")) {try {await browser.switchToWindow("onboarding");- seen.push(- (- (await browser.execute(- () => document.body?.innerText || "",- )) as string- ).toLowerCase(),+ const snapshot = (+ (await browser.execute(+ () => document.body?.innerText || "",+ )) as string+ ).toLowerCase();+ seen.push(snapshot);+ return Boolean(+ await browser.execute(+ () =>+ !!document.querySelector(+ '[data-testid="onboarding-final-setup"]',+ ),+ ),);} catch {- // Window closed underneath the sample. Expected once setup- // completes; the status check below settles it.+ // Window changed underneath the sample; retry from the surviving+ // Home context so a native-window transition cannot fail the test.}}await browser.switchToWindow("home");+ return false;+ },+ {+ timeout: t(30_000),+ interval: 250,+ timeoutMsg:+ "legacy connect-apps step never advanced through engine to recommended setup",+ },+ );++ await browser.switchToWindow("onboarding");+ const continueButton = await $("button=continue");+ await continueButton.waitForClickable({ timeout: t(10_000) });+ await continueButton.click();++ await browser.switchToWindow("home");+ await browser.waitUntil(+ async () => {const status = await invokeOrThrow<{ isCompleted: boolean }>("get_onboarding_status",);return status.isCompleted;},{- timeout: t(30_000),+ timeout: t(15_000),interval: 250,timeoutMsg:- "legacy connect-apps step never resumed at the engine slide and finished setup",+ "recommended setup did not complete the restored onboarding flow",},);