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

fix: make Live View range and freshness truthful (#5801)

Louis Beaumont9fc6b8eaf302
diff --git a/COVERAGE.md b/COVERAGE.md
index 4a7d43a77..04564d495 100644
--- a/COVERAGE.md
+++ b/COVERAGE.md
@@ -19,14 +19,14 @@ results and `cargo llvm-cov` data on top when judging release confidence.
### Tauri E2E
- Mapped specs: 91
-- Declared test blocks: 254
-- Weighted coverage points: 196.7
+- Declared test blocks: 255
+- Weighted coverage points: 197.7
| Platform | Specs | Declared tests | Weighted points | Layers | Features | Critical score |
| --- | --- | --- | --- | --- | --- | --- |
-| windows | 73 | 226 | 183.2 | 15 | 77 | 91% |
-| macos | 87 | 217 | 167.5 | 17 | 79 | 89% |
-| linux | 63 | 186 | 153.0 | 14 | 72 | 88% |
+| windows | 73 | 227 | 184.2 | 15 | 77 | 91% |
+| macos | 87 | 218 | 168.5 | 17 | 79 | 89% |
+| linux | 63 | 187 | 154.0 | 14 | 72 | 88% |
### Core Engine
diff --git a/apps/screenpipe-app-tauri/components/settings/__tests__/brain-overview.test.tsx b/apps/screenpipe-app-tauri/components/settings/__tests__/brain-overview.test.tsx
index f4e182623..a81ffe263 100644
--- a/apps/screenpipe-app-tauri/components/settings/__tests__/brain-overview.test.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/__tests__/brain-overview.test.tsx
@@ -576,7 +576,7 @@ describe("BrainOverview", () => {
expect(screen.getByText("4.5")).toBeTruthy();
expect(screen.getByText("hours")).toBeTruthy();
expect(screen.getByText("Pipe: daily-summary")).toBeTruthy();
- expect(screen.getByText("artifact #88 · v2")).toBeTruthy();
+ expect(screen.getByText(/artifact #88 · v2/)).toBeTruthy();
});
it("captures a privacy-safe Live View impression with result readiness", async () => {
@@ -1000,8 +1000,8 @@ describe("BrainOverview", () => {
await screen.findByTestId("overview-dashboard-selector");
expect(screen.queryByTestId("overview-fixed-period")).toBeNull();
expect(screen.queryByTestId("overview-time-range")).toBeNull();
- expect(screen.getByTestId("overview-data-status").textContent).toMatch(
- /^Updated /,
+ expect(screen.getByTestId("overview-data-status")).toHaveTextContent(
+ /^1 of 1 block ready · updated /,
);
await openDashboardMenu();
@@ -1096,6 +1096,76 @@ describe("BrainOverview", () => {
);
});
+ it("shows block readiness and the oldest/latest update instead of one misleading dashboard timestamp", async () => {
+ const oldValue = populatedView.slots[0].value!;
+ mocks.listBrainViews.mockResolvedValue({
+ status: "ok",
+ data: [
+ {
+ ...populatedView,
+ slots: [
+ populatedView.slots[0],
+ {
+ ...populatedView.slots[0],
+ id: "newer-result",
+ order: 1,
+ value: {
+ ...oldValue,
+ artifactOutputId: 89,
+ updatedAt: "2026-07-26T17:00:00Z",
+ },
+ },
+ {
+ ...populatedView.slots[0],
+ id: "waiting-result",
+ order: 2,
+ value: null,
+ },
+ ],
+ },
+ ],
+ });
+ render(<BrainOverview />);
+
+ const status = await screen.findByTestId("overview-data-status");
+ expect(status).toHaveTextContent(/^2 of 3 blocks ready · oldest /);
+ expect(status).toHaveTextContent(/ · latest /);
+ expect(status).not.toHaveTextContent(/^Updated /);
+ });
+
+ it("treats blocks published within one minute as one coherent update", async () => {
+ const firstValue = populatedView.slots[0].value!;
+ mocks.listBrainViews.mockResolvedValue({
+ status: "ok",
+ data: [
+ {
+ ...populatedView,
+ slots: [
+ populatedView.slots[0],
+ {
+ ...populatedView.slots[0],
+ id: "same-refresh",
+ order: 1,
+ value: {
+ ...firstValue,
+ artifactOutputId: 89,
+ updatedAt: "2026-07-23T17:00:30Z",
+ },
+ },
+ ],
+ },
+ ],
+ });
+ render(<BrainOverview />);
+
+ expect(await screen.findByTestId("overview-data-status")).toHaveTextContent(
+ /^2 of 2 blocks ready · updated /,
+ );
+ expect(screen.getByTestId("overview-data-status")).not.toHaveTextContent(
+ "oldest",
+ );
+ });
+
it("keeps vertical scrolling on the dashboard while dense tables can scroll sideways", async () => {
const advancedView: ViewDefinition = {
...populatedView,
@@ -1145,7 +1215,9 @@ describe("BrainOverview", () => {
expect(
await screen.findByRole("img", { name: "Focus trend time series" }),
).toBeTruthy();
- expect(screen.getByText("Line chart · Last 7 days")).toBeTruthy();
+ expect(
+ screen.getByText("Line chart · requested: Last 7 days"),
+ ).toBeTruthy();
expect(screen.getByText("Project 30")).toBeTruthy();
const trendBody = screen.getByTestId("overview-card-scroll-focus-trend");
const tableBody = screen.getByTestId("overview-card-scroll-project-table");
@@ -2486,7 +2558,7 @@ describe("BrainOverview", () => {
expect(screen.queryByTestId("overview-mode-canvas")).toBeNull();
expect(screen.getByTestId("canvas-block-focus-time")).toBeTruthy();
expect(screen.getByText("Pipe: daily-summary")).toBeTruthy();
- expect(screen.getByText("artifact #88 · v2")).toBeTruthy();
+ expect(screen.getByText(/artifact #88 · v2/)).toBeTruthy();
await waitFor(() =>
expect(mocks.saveBrainViewCanvas).toHaveBeenCalledWith(
expect.objectContaining({
diff --git a/apps/screenpipe-app-tauri/components/settings/__tests__/live-view-card.test.tsx b/apps/screenpipe-app-tauri/components/settings/__tests__/live-view-card.test.tsx
index a24205811..e71d406cf 100644
--- a/apps/screenpipe-app-tauri/components/settings/__tests__/live-view-card.test.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/__tests__/live-view-card.test.tsx
@@ -178,3 +178,20 @@ describe("LiveViewCard line chart", () => {
expect(screen.getByRole("tooltip")).toHaveTextContent("3.25");
});
});
+
+describe("LiveViewCard range and freshness", () => {
+ it("labels the selected period as requested and keeps block freshness visible with actions", () => {
+ render(
+ <LiveViewCard
+ slot={listSlot}
+ timeRange="7d"
+ onRegenerate={() => undefined}
+ />,
+ );
+
+ expect(screen.getByText("List · requested: Last 7 days")).toBeTruthy();
+ expect(
+ screen.getByTestId("overview-card-updated-process-steps"),
+ ).toHaveTextContent(/^updated .* · artifact #42 · v1$/);
+ });
+});
diff --git a/apps/screenpipe-app-tauri/components/settings/brain-overview.tsx b/apps/screenpipe-app-tauri/components/settings/brain-overview.tsx
index 6a94ec85d..825c0c327 100644
--- a/apps/screenpipe-app-tauri/components/settings/brain-overview.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/brain-overview.tsx
@@ -171,6 +171,33 @@ type PreviewDestination = "new" | "replace";
const STARTER_DASHBOARD_ID = "my-dashboard";
const STARTER_DASHBOARD_TITLE = "My dashboard";
const LIVE_VIEW_ANALYTICS_SCHEMA_VERSION = 2;
+const LIVE_VIEW_COHERENT_UPDATE_WINDOW_MS = 60_000;
+
+const LIVE_VIEW_FRESHNESS_FORMATTER = new Intl.DateTimeFormat(undefined, {
+ month: "short",
+ day: "numeric",
+ hour: "numeric",
+ minute: "2-digit",
+});
+
+function liveViewDataStatus(slots: BrainViewSlot[]): string {
+ const timestamps = slots.flatMap((slot) => {
+ const timestamp = slot.value?.updatedAt
+ ? Date.parse(slot.value.updatedAt)
+ : Number.NaN;
+ return Number.isFinite(timestamp) ? [timestamp] : [];
+ });
+ if (timestamps.length === 0) return "No data yet";
+
+ const blockLabel = slots.length === 1 ? "block" : "blocks";
+ const readiness = `${timestamps.length} of ${slots.length} ${blockLabel} ready`;
+ const oldest = Math.min(...timestamps);
+ const latest = Math.max(...timestamps);
+ if (latest - oldest <= LIVE_VIEW_COHERENT_UPDATE_WINDOW_MS) {
+ return `${readiness} · updated ${LIVE_VIEW_FRESHNESS_FORMATTER.format(latest)}`;
+ }
+ return `${readiness} · oldest ${LIVE_VIEW_FRESHNESS_FORMATTER.format(oldest)} · latest ${LIVE_VIEW_FRESHNESS_FORMATTER.format(latest)}`;
+}
function analyticsErrorType(error: unknown): string {
return error instanceof Error ? error.name : "unknown";
@@ -2579,13 +2606,7 @@ export function BrainOverview({
const slots = normalizedSlots(view.slots);
const boundSlotCount = slots.filter((slot) => slot.binding).length;
const periodRanges = allowedLiveViewTimeRanges(view.periodPolicy);
- const latestDataTimestamp = slots.reduce<number | null>((latest, slot) => {
- const timestamp = slot.value?.updatedAt
- ? Date.parse(slot.value.updatedAt)
- : Number.NaN;
- if (!Number.isFinite(timestamp)) return latest;
- return latest === null ? timestamp : Math.max(latest, timestamp);
- }, null);
+ const dataStatus = liveViewDataStatus(slots);
const refreshIsActive =
dataRefresh?.viewId === view.id &&
(dataRefresh.status === "starting" || dataRefresh.status === "running");
@@ -2649,9 +2670,7 @@ export function BrainOverview({
>
{onboardingColdStart
? "This view will appear when Screenpipe has enough real activity for your outcome."
- : latestDataTimestamp !== null
- ? `Updated ${new Date(latestDataTimestamp).toLocaleString()}`
- : "No data yet"}
+ : dataStatus}
</p>
</div>
<div
diff --git a/apps/screenpipe-app-tauri/components/settings/live-view-card.tsx b/apps/screenpipe-app-tauri/components/settings/live-view-card.tsx
index 2fa9fe482..2acc420fc 100644
--- a/apps/screenpipe-app-tauri/components/settings/live-view-card.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/live-view-card.tsx
@@ -441,15 +441,10 @@ export function LiveViewCard({
<div className={`min-w-0 ${hasActions ? "pr-32" : ""}`}>
<h3 className="truncate text-sm font-medium">{slot.title}</h3>
<p className="mt-0.5 text-[10px] uppercase tracking-wide text-muted-foreground">
- {COMPONENT_LABELS[slot.component]} ·{" "}
+ {COMPONENT_LABELS[slot.component]} · requested:{" "}
{getLiveViewTimeRangeOption(timeRange).label}
</p>
</div>
- {slot.value && !hasActions && (
- <span className="shrink-0 text-[10px] text-muted-foreground">
- {timeAgo(slot.value.updatedAt)}
- </span>
- )}
</div>
{hasActions && (
<div
@@ -642,15 +637,19 @@ export function LiveViewCard({
onItemHandoff={onItemHandoff}
/>
</div>
- <div className="mt-4 flex items-center justify-between gap-3 border-t border-border pt-2 text-[10px] text-muted-foreground">
+ <div className="mt-4 flex flex-wrap items-center gap-x-3 gap-y-1 border-t border-border pt-2 text-[10px] text-muted-foreground">
<span className="truncate">
{slot.binding
? `Pipe: ${slot.binding.pipeName}`
: "No Pipe connected"}
</span>
{slot.value && (
- <span className="shrink-0">
- artifact #{slot.value.artifactOutputId} · v
+ <span
+ data-testid={`overview-card-updated-${slot.id}`}
+ className="ml-auto shrink-0"
+ >
+ updated {timeAgo(slot.value.updatedAt)} · artifact #
+ {slot.value.artifactOutputId} · v
{slot.value.artifactVersion}
</span>
)}
diff --git a/apps/screenpipe-app-tauri/e2e/COVERAGE.md b/apps/screenpipe-app-tauri/e2e/COVERAGE.md
index 64cbc2dff..5a9ef6587 100644
--- a/apps/screenpipe-app-tauri/e2e/COVERAGE.md
+++ b/apps/screenpipe-app-tauri/e2e/COVERAGE.md
@@ -7,8 +7,8 @@ and layer declared in the manifest, weighted by confidence and criticality.
- Manifest: `e2e/coverage-map.json`
- Specs directory: `e2e/specs`
- Mapped specs: 91
-- Declared test blocks: 254
-- Weighted coverage points: 196.7
+- Declared test blocks: 255
+- Weighted coverage points: 197.7
Confidence weights: strong=1.0, partial=0.7, conditional=0.4, smoke=0.3.
Criticality weights: high=1.0, medium=0.7, low=0.4.
@@ -19,9 +19,9 @@ can execute more runtime cases than this number shows.
| Platform | Specs | Declared tests | Weighted points | Layers | Features | Critical score |
| --- | --- | --- | --- | --- | --- | --- |
-| windows | 73 | 226 | 183.2 | 15 | 77 | 91% |
-| macos | 87 | 217 | 167.5 | 17 | 79 | 89% |
-| linux | 63 | 186 | 153.0 | 14 | 72 | 88% |
+| windows | 73 | 227 | 184.2 | 15 | 77 | 91% |
+| macos | 87 | 218 | 168.5 | 17 | 79 | 89% |
+| linux | 63 | 187 | 154.0 | 14 | 72 | 88% |
## Runtime Results
@@ -39,13 +39,13 @@ pass/fail/skip counts.
| capture-ocr | 2 specs / 16 tests / 6.4 pts | 5 specs / 7 tests / 2.8 pts | 1 specs / 3 tests / 1.2 pts |
| chat-ai | 23 specs / 37 tests / 28.1 pts | 31 specs / 51 tests / 34.7 pts | 22 specs / 36 tests / 27.6 pts |
| entitlement | - | 1 specs / 1 tests / 1.0 pts | - |
-| local-api | 18 specs / 101 tests / 83.8 pts | 19 specs / 76 tests / 64.8 pts | 14 specs / 72 tests / 63.2 pts |
+| local-api | 18 specs / 102 tests / 84.8 pts | 19 specs / 77 tests / 65.8 pts | 14 specs / 73 tests / 64.2 pts |
| notifications | 3 specs / 24 tests / 15.3 pts | 2 specs / 4 tests / 2.4 pts | 1 specs / 3 tests / 2.1 pts |
| onboarding | 3 specs / 9 tests / 6.6 pts | 3 specs / 9 tests / 6.6 pts | 3 specs / 9 tests / 6.6 pts |
| os-integration | 6 specs / 18 tests / 17.1 pts | 8 specs / 8 tests / 4.7 pts | 1 specs / 1 tests / 1.0 pts |
| performance | 2 specs / 44 tests / 44.0 pts | 4 specs / 34 tests / 30.5 pts | 1 specs / 29 tests / 29.0 pts |
-| pipes | 5 specs / 16 tests / 16.0 pts | 5 specs / 16 tests / 16.0 pts | 5 specs / 16 tests / 16.0 pts |
-| real-ui-e2e | 50 specs / 143 tests / 116.0 pts | 55 specs / 132 tests / 108.1 pts | 46 specs / 121 tests / 102.4 pts |
+| pipes | 5 specs / 17 tests / 17.0 pts | 5 specs / 17 tests / 17.0 pts | 5 specs / 17 tests / 17.0 pts |
+| real-ui-e2e | 50 specs / 144 tests / 117.0 pts | 55 specs / 133 tests / 109.1 pts | 46 specs / 122 tests / 103.4 pts |
| settings | 14 specs / 37 tests / 34.0 pts | 16 specs / 32 tests / 27.7 pts | 13 specs / 29 tests / 26.0 pts |
| storage-privacy | 9 specs / 39 tests / 30.3 pts | 8 specs / 20 tests / 19.1 pts | 6 specs / 18 tests / 17.1 pts |
| tauri-command | 13 specs / 22 tests / 15.3 pts | 16 specs / 26 tests / 17.8 pts | 12 specs / 21 tests / 14.3 pts |
@@ -71,7 +71,7 @@ pass/fail/skip counts.
| Meetings-only audio device ownership | audio-device, local-api, real-ui-e2e | weak (conditional; meetings-only-audio-lifecycle) | weak (conditional; meetings-only-audio-lifecycle) | - |
| Window lifecycle, focus, and dedupe | window-lifecycle | covered (strong; windows-system-integration, window-lifecycle) | covered (strong; window-lifecycle, viewer-deeplink) | covered (strong; window-lifecycle, viewer-deeplink) |
| Meeting note creation and editing | real-ui-e2e | covered (strong; windows-user-journey, meeting-note-bottom-click) | covered (strong; meeting-note-bottom-click) | covered (strong; meeting-note-bottom-click) |
-| Pipes discover, install, and play | pipes | covered (strong; pipes, pipes-mcp-connections) | covered (strong; pipes, pipes-mcp-connections) | covered (strong; pipes, pipes-mcp-connections) |
+| Pipes discover, install, and play | pipes | covered (strong; pipes, brain-overview) | covered (strong; pipes, brain-overview) | covered (strong; pipes, brain-overview) |
| Chat window, composer, and streaming state | chat-ai | covered (strong; chat-sidebar-groups, chat-tool-activity) | covered (strong; chat-sidebar-groups, chat-tool-activity) | covered (strong; chat-sidebar-groups, chat-tool-activity) |
| Tray/search window behavior | window-lifecycle | covered (strong; window-lifecycle, tray-search) | covered (strong; window-lifecycle, tray-search) | covered (strong; window-lifecycle, tray-search) |
| Native tray recording status refresh | os-integration | covered (strong; tray-recording-status) | - | - |
@@ -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 | 3 | 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, 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/specs/brain-overview.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.ts
index 0d3c9280d..f3dc09c60 100644
--- a/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.ts
+++ b/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.ts
@@ -50,6 +50,7 @@ interface CanvasDocument {
const SELECTABLE_VIEW_ID = "my-overview";
const FIXED_VIEW_ID = "daily-memory-fixed";
+const RANGE_TRUTH_VIEW_ID = "range-truth-e2e";
const PIPE_NAME = "e2e-overview-pipe";
const SUPPORTED_WINDOW_SIZES = [
@@ -438,6 +439,143 @@ describe("Brain Live Views", function () {
await invokeOrThrow("delete_brain_view", { id: "process-map" });
});
+ it("shows requested range and per-block freshness honestly", async () => {
+ await waitForAppReady();
+ await openHomeWithDiagnostics();
+ const config = await invokeOrThrow<LocalApiConfig>("get_local_api_config");
+ const base = `http://127.0.0.1:${config.port}`;
+ const headers: Record<string, string> = {
+ "Content-Type": "application/json",
+ };
+ if (config.key) headers.Authorization = `Bearer ${config.key}`;
+
+ const existingViews = await invokeOrThrow<BrainView[]>("list_brain_views");
+ if (existingViews.some((view) => view.id === RANGE_TRUTH_VIEW_ID)) {
+ await invokeOrThrow("delete_brain_view", { id: RANGE_TRUTH_VIEW_ID });
+ }
+ await invokeOrThrow("save_brain_view", {
+ request: {
+ id: RANGE_TRUTH_VIEW_ID,
+ title: "Time and focus",
+ expectedRevision: null,
+ timeRange: "7d",
+ periodPolicy: {
+ type: "selectable.v1",
+ values: ["today", "24h", "7d", "30d"],
+ },
+ slots: [
+ {
+ id: "tracked-work",
+ title: "Tracked work",
+ component: "metric.v1",
+ width: 6,
+ order: 0,
+ intent: "Show captured active work for the selected period.",
+ binding: { pipeName: "time-breakdown" },
+ },
+ {
+ id: "activity",
+ title: "Activity",
+ component: "timeline.v1",
+ width: 6,
+ order: 1,
+ intent: "Show recent activity for the selected period.",
+ binding: { pipeName: "time-breakdown" },
+ },
+ ],
+ },
+ });
+
+ const targetResponse = await fetch(
+ `${base}/outputs/targets?pipe=time-breakdown`,
+ { headers },
+ );
+ expect(targetResponse.ok).toBe(true);
+ const { data: targets } = (await targetResponse.json()) as {
+ data: OutputTarget[];
+ };
+ const payloads: Record<string, object> = {
+ "tracked-work": {
+ label: "Tracked active work today",
+ value: 326.1,
+ unit: "minutes",
+ },
+ activity: {
+ items: [
+ {
+ title: "Reviewed product metrics",
+ timestamp: "2026-07-25T14:10:00-07:00",
+ subtitle: "PostHog",
+ },
+ ],
+ },
+ };
+ const artifactIds: number[] = [];
+ for (const slotId of ["tracked-work", "activity"]) {
+ const targetId = `live-view:${RANGE_TRUTH_VIEW_ID}:${slotId}`;
+ const target = targets.find((candidate) => candidate.id === targetId);
+ expect(target).toBeTruthy();
+ const submit = await fetch(
+ `${base}/outputs/targets/${encodeURIComponent(targetId)}/submit`,
+ {
+ method: "POST",
+ headers,
+ body: JSON.stringify({
+ target_revision: target!.revision,
+ source_pipe: "time-breakdown",
+ payload: payloads[slotId],
+ evidence: [{ frame_id: 42, ts: "2026-07-25T21:10:00Z" }],
+ }),
+ },
+ );
+ expect(submit.ok).toBe(true);
+ const submitted = await submit.json();
+ artifactIds.push(submitted.artifact_output_id);
+ }
+
+ await browser.execute(() => {
+ window.location.href = "/home?section=brain";
+ });
+ await waitForTestId("section-brain", 15_000);
+ await waitForTestId("overview-dashboard-selector", 15_000);
+ await selectDashboard(RANGE_TRUTH_VIEW_ID);
+ await waitForTestId("live-view-canvas", 15_000);
+ await waitForTestId("canvas-block-tracked-work", 10_000);
+ await setCssWindowSize(1440, 900);
+
+ const statusText = (
+ await waitForTestId("overview-data-status", 10_000)
+ ).getText();
+ expect((await statusText).toLowerCase()).toContain("2 of 2 blocks ready");
+ expect((await statusText).toLowerCase()).toContain("updated");
+ expect((await statusText).toLowerCase()).not.toMatch(/^updated /);
+
+ const cardText = (
+ await waitForTestId("overview-card-tracked-work", 10_000)
+ ).getText();
+ expect((await cardText).toLowerCase()).toContain(
+ "requested: last 7 days",
+ );
+ expect((await cardText).toLowerCase()).toContain(
+ "tracked active work today",
+ );
+ expect((await cardText).toLowerCase()).toContain("updated");
+ expect((await cardText).toLowerCase()).toContain("artifact #");
+
+ const screenshot = await saveScreenshot(
+ "brain-overview-range-freshness-truth",
+ );
+ expect(existsSync(screenshot)).toBe(true);
+
+ for (const artifactId of artifactIds) {
+ await fetch(`${base}/artifacts/${artifactId}`, {
+ method: "DELETE",
+ headers,
+ });
+ }
+ await invokeOrThrow("delete_brain_view", { id: RANGE_TRUTH_VIEW_ID });
+ });
+
it("renders a Pipe-filled Live View template", async () => {
await waitForAppReady();
await openHomeWithDiagnostics();
@@ -834,7 +972,8 @@ Refresh the assigned Live View output targets from source-backed activity.
const fixedDashboardText = (await browser.execute(
() => document.body?.innerText || "",
)) as string;
- expect(fixedDashboardText).toContain("Updated");
+ expect(fixedDashboardText.toLowerCase()).toContain("blocks ready");
+ expect(fixedDashboardText.toLowerCase()).toContain("updated");
const fixedScreenshot = await saveScreenshot(
"brain-overview-fixed-range-hidden",
);
diff --git a/docs/assets/pr/live-view-range-truth.png b/docs/assets/pr/live-view-range-truth.png
new file mode 100644
index 000000000..17b59cfba
Binary files /dev/null and b/docs/assets/pr/live-view-range-truth.png differ