Skip to content

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

test(e2e): cover Windows timeline scrub UX

Louis Beaumontb3ce0be542f7
diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
index c15be2704..9c8101e7d 100644
--- a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
@@ -1664,6 +1664,8 @@ export const TimelineSlider = ({
<motion.div
key={`${frame.timestamp}-${frameIdx}`}
data-timestamp={frame.timestamp}
+ data-frame-id={frameId || undefined}
+ data-current={isCurrent ? "true" : undefined}
data-selected={isSelected || isInRange ? "true" : undefined}
className={cn(
"flex-shrink-0 cursor-ew-resize rounded-t relative hover:z-50 transition-all duration-200",
diff --git a/apps/screenpipe-app-tauri/e2e/README.md b/apps/screenpipe-app-tauri/e2e/README.md
index 7188ea758..aa0a55037 100644
--- a/apps/screenpipe-app-tauri/e2e/README.md
+++ b/apps/screenpipe-app-tauri/e2e/README.md
@@ -160,7 +160,7 @@ Saves to `e2e/videos/`.
|---|---|
| `home-window.spec.ts` | Opens Home window; clicks through Home, Pipes, Timeline, Help, Settings nav items |
| `timeline.spec.ts` | Navigates to Timeline; seeds a capture event; verifies at least one frame renders |
-| `windows-core-recording.spec.ts` | Windows opt-in. Enables real vision recording and requires API auth, health/load, audio/device, vision, and search endpoints to stay responsive. In CI it uses `SCREENPIPE_E2E_SEED=onboarding,no-audio` so hosted runners exercise OCR without booting Whisper. When the runner exposes usable desktop frames, it also shows a foreground marker window and verifies OCR indexing/query search plus Timeline frame metadata; hosted runners without frames self-skip those capture-dependent assertions. |
+| `windows-core-recording.spec.ts` | Windows opt-in. Enables real vision recording and requires API auth, health/load, audio/device, vision, and search endpoints to stay responsive. In CI it uses `SCREENPIPE_E2E_SEED=onboarding,no-audio` so hosted runners exercise OCR without booting Whisper. When the runner exposes usable desktop frames, it also shows a foreground marker window and verifies OCR indexing/query search plus Timeline frame metadata, visible scrubber clicks, and arrow-key frame stepping; hosted runners without frames self-skip those capture-dependent assertions. |
| `windows-system-integration.spec.ts` | Windows-only. Verifies isolated data dir, native DLL/WebView2 runtime, display/DPI topology, localhost-only API binding, process health, Defender visibility, audio service/device health, concurrent local API load, focus churn, rapid Home-window routing, Home close/reopen backend survival, and absence of Windows crash-report events during the suite |
| `windows-user-journey.spec.ts` | Windows-only. Drives Home search button -> floating Search input -> Timeline -> Home, and opens Recording settings to reveal Windows audio troubleshooting controls from the real UI |
| `hd-recording-pipeline.spec.ts` | macOS opt-in. Starts an HD timer session via `/capture/hd/start`; asserts the controller goes active, a non-empty `hd_*.mp4` chunk is written, and OCR keeps indexing during HD (high-fps + indexing decouple, #3699/#3707) |
diff --git a/apps/screenpipe-app-tauri/e2e/specs/windows-core-recording.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/windows-core-recording.spec.ts
index 1257bcb81..3374bd46b 100644
--- a/apps/screenpipe-app-tauri/e2e/specs/windows-core-recording.spec.ts
+++ b/apps/screenpipe-app-tauri/e2e/specs/windows-core-recording.spec.ts
@@ -179,6 +179,58 @@ async function waitForTimelineFrameCount(timeoutMs = t(45_000)): Promise<number>
return latestCount;
}
+async function getCurrentTimelineFrame(): Promise<{ timestamp: string; frameId: string } | null> {
+ return (await browser.execute(() => {
+ const frame = document.querySelector("[data-testid='timeline-slider'] [data-current='true']");
+ if (!frame) return null;
+ return {
+ timestamp: frame.getAttribute("data-timestamp") ?? "",
+ frameId: frame.getAttribute("data-frame-id") ?? "",
+ };
+ })) as { timestamp: string; frameId: string } | null;
+}
+
+async function clickFirstNonCurrentTimelineFrame(): Promise<{
+ timestamp: string;
+ frameId: string;
+ stepKey: "ArrowLeft" | "ArrowRight";
+}> {
+ const frames = await $$("[data-testid='timeline-slider'] [data-timestamp]");
+ let target:
+ | { timestamp: string; frameId: string; stepKey: "ArrowLeft" | "ArrowRight" }
+ | null = null;
+
+ const frameCount = await frames.length;
+ for (let i = 0; i < frameCount; i += 1) {
+ const frame = frames[i]!;
+ if ((await frame.getAttribute("data-current")) === "true") continue;
+
+ target = {
+ timestamp: (await frame.getAttribute("data-timestamp")) ?? "",
+ frameId: (await frame.getAttribute("data-frame-id")) ?? "",
+ stepKey: i === 0 ? "ArrowLeft" : "ArrowRight",
+ };
+ await frame.scrollIntoView({ block: "nearest", inline: "center" });
+ await frame.click();
+ break;
+ }
+
+ if (!target?.timestamp) {
+ throw new Error("Could not find a non-current Timeline frame to click");
+ }
+
+ await browser.waitUntil(
+ async () => (await getCurrentTimelineFrame())?.timestamp === target.timestamp,
+ {
+ timeout: t(10_000),
+ interval: 250,
+ timeoutMsg: "Clicked Timeline frame did not become the current frame",
+ },
+ );
+
+ return target;
+}
+
async function requireHealthyLocalApi(cfg: LocalApiConfig): Promise<HealthBody> {
return browser.waitUntil(
async () => {
@@ -378,4 +430,42 @@ describe("Windows core recording pipeline", function () {
const screenshot = await saveScreenshot("windows-core-recording");
expect(existsSync(screenshot)).toBe(true);
});
+
+ it("lets users scrub captured Timeline frames and step with arrow keys", async function () {
+ if (!canRun || !cfg) this.skip();
+
+ const probe = await probeMarkerIndexing();
+ if (probe.rows.length === 0) this.skip();
+
+ await openTimeline();
+ const frameCount = await waitForTimelineFrameCount(t(75_000));
+ if (frameCount < 2) this.skip();
+
+ await browser.waitUntil(async () => (await getCurrentTimelineFrame()) !== null, {
+ timeout: t(20_000),
+ interval: 250,
+ timeoutMsg: "Timeline did not mark any visible frame as current",
+ });
+
+ const clickedFrame = await clickFirstNonCurrentTimelineFrame();
+ expect((await getCurrentTimelineFrame())?.timestamp).toBe(clickedFrame.timestamp);
+
+ await browser.execute(() => window.focus());
+ await browser.keys([clickedFrame.stepKey]);
+
+ await browser.waitUntil(
+ async () => {
+ const current = await getCurrentTimelineFrame();
+ return current !== null && current.timestamp !== clickedFrame.timestamp;
+ },
+ {
+ timeout: t(10_000),
+ interval: 250,
+ timeoutMsg: `${clickedFrame.stepKey} did not move the current Timeline frame`,
+ },
+ );
+
+ const scrubScreenshot = await saveScreenshot("windows-core-recording-timeline-scrub");
+ expect(existsSync(scrubScreenshot)).toBe(true);
+ });
});