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
Merge remote-tracking branch 'origin/main' into release/workflow-ui-2-7-60
louis2c6008964985
diff --cc apps/screenpipe-app-tauri/components/workflows/workflow-timing.test.tsxindex de0190971,de0190971..513ebc3fb--- a/apps/screenpipe-app-tauri/components/workflows/workflow-timing.test.tsx+++ b/apps/screenpipe-app-tauri/components/workflows/workflow-timing.test.tsx@@@ -33,6 -33,6 +33,11 @@@ describe("workflow elapsed timing", ()platform.assistant!.openLink = openLink;await act(async () => { render(<WorkflowsApp platform={platform} initialAnalysis={fixtureWorkflowAnalysis} storageKey={null} />); });const card = screen.getByRole("heading", { name: "Research synthesis" }).closest("article")!;++ expect(within(card).getByText(/~24m \/ run · estimated/)).toBeVisible();++ fireEvent.click(within(card).getByText("Workflow details"));++ for (const title of ["Partner meeting preparation", "Website release check"]) {++ fireEvent.click(within(screen.getByRole("heading", { name: title }).closest("article")!).getByText("Workflow details"));++ }expect(within(card).getByText("Avg. time / run")).toBeVisible();expect(within(card).getByText("~24m")).toBeVisible();expect(within(card).getByText("3 runs · estimated")).toBeVisible();diff --cc apps/screenpipe-app-tauri/vitest.setup.tsindex 686c7ce2d,686c7ce2d..79e2738cf--- a/apps/screenpipe-app-tauri/vitest.setup.ts+++ b/apps/screenpipe-app-tauri/vitest.setup.ts@@@ -41,6 -41,6 +41,14 @@@ if (typeof window === "undefined")}++// jsdom has no media-query implementation. Default to the desktop viewport;++// responsive behavior is exercised in browser tests or an explicit test mock.++window.matchMedia ??= (query: string) => ({++ matches: false, media: query, onchange: null,++ addListener() {}, removeListener() {},++ addEventListener() {}, removeEventListener() {}, dispatchEvent: () => true,++});++// Component/hook tests get the app's provider even when they supply their own// additional wrapper. Nested providers in localization tests still choose their// explicit locale and catalog, so the runtime itself remains under test.diff --cc apps/screenpipe-workflows-web/scripts/check-workflow-timing-browser.cjsindex 179c87c28,000000000..445615d1cmode 100644,000000..100644--- a/apps/screenpipe-workflows-web/scripts/check-workflow-timing-browser.cjs+++ b/apps/screenpipe-workflows-web/scripts/check-workflow-timing-browser.cjs@@@ -1,44 -1,0 +1,46 @@@+// screenpipe — AI that knows everything you've seen, said, or heard+// https://screenpipe.com+// Consume the catalog saved by workflow_timing_e2e. No user data or live app writes.+const { chromium } = require('playwright');+const assert = require('node:assert/strict');+const fs = require('node:fs');+const catalogPath = process.env.WORKFLOW_TIMING_CATALOG_OUTPUT;+if (!catalogPath) throw new Error('Set WORKFLOW_TIMING_CATALOG_OUTPUT to the native test catalog');+const catalog = JSON.parse(fs.readFileSync(catalogPath, 'utf8'));+const workflow = catalog.analysis.workflows[0];+(async () => {+ const browser = await chromium.launch({ headless: true, channel: 'chrome' });+ try {+ const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });+ const errors = [];+ page.on('pageerror', error => errors.push(error.message));+ const base = process.env.WORKFLOW_TIMING_PREVIEW_URL || 'http://127.0.0.1:1437/preview.html';+ await page.goto(base + '?catalog=empty');+ await page.evaluate(value => localStorage.setItem('screenpipe:fictional-workflow-editor-preview', JSON.stringify(value)), catalog);+ await page.goto(base + '?catalog=native-timing');+ await page.getByRole('heading', { name: workflow.title, exact: true }).waitFor();++ await page.getByText(/~7m \/ run · estimated/).waitFor();++ await page.getByText('Workflow details', { exact: true }).click();+ await page.getByText('~7m', { exact: true }).waitFor();+ assert.equal(await page.getByText('2 runs · estimated', { exact: true }).count(), 1);+ await page.locator('article').first().screenshot({ path: process.env.WORKFLOW_TIMING_CARD_SCREENSHOT || '/tmp/workflow-timing-native-card.png' });+ await page.getByRole('button', { name: 'Open map' }).click();+ await page.getByText('Evidence and limitations', { exact: true }).click();+ const region = page.getByRole('region', { name: 'Time per run' });+ await region.waitFor();+ assert.match(await region.innerText(), /6m–8m across 2 runs/);+ assert.equal(await region.locator('summary').count(), 2);+ await region.locator('summary').first().click();+ await region.getByText(workflow.timing.runs[0].start.quote, { exact: true }).waitFor();+ await region.getByText(workflow.timing.runs[0].end.quote, { exact: true }).waitFor();+ await page.screenshot({ path: process.env.WORKFLOW_TIMING_SCREENSHOT || '/tmp/workflow-timing-native-ui.png', fullPage: true });+ await page.setViewportSize({ width: 700, height: 900 });+ assert(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth));+ await page.goto(base + '?catalog=native-timing');- await page.getByText('~7m', { exact: true }).waitFor();++ await page.getByText(/~7m \/ run · estimated/).waitFor();+ await page.reload();- await page.getByText('~7m', { exact: true }).waitFor();++ await page.getByText(/~7m \/ run · estimated/).waitFor();+ assert.deepEqual(errors, []);+ console.log('PASS native saved catalog: 7m average, two distinct runs, evidence disclosure, narrow layout, reload, no browser errors');+ } finally { await browser.close(); }+})().catch(error => { console.error(error); process.exitCode = 1; });diff --cc packages/workflows-ui/src/workflows-app.module.cssindex 6964b45e2,79bfe01c3..ed3a29cc1--- a/packages/workflows-ui/src/workflows-app.module.css+++ b/packages/workflows-ui/src/workflows-app.module.css@@@ -1023,20 -1023,22 +1023,39 @@@.workflowNotes .bottleneckTime { grid-column: 2; }}+/* Loading follows the catalog geometry without pretending the catalog is empty. */+.skeletonBar { display: block; max-width: 100%; flex-shrink: 0; border-radius: 4px; background: var(--line); animation: catalogPulse 1.8s ease-in-out infinite; }+.skeletonCard { pointer-events: none; cursor: default; }- .skeletonTitle { margin: 22px 0 14px; }++.skeletonTitle { margin: 16px 0 8px; }+.skeletonLines { display: grid; gap: 7px; min-height: 42px; }+.skeletonDetail { display: grid; gap: 16px; }+.skeletonCard .cardMetrics .skeletonBar + .skeletonBar { margin-top: 9px; }+.catalogLoadStatus, .catalogRefreshNotice { color: var(--muted); font-size: 12px; }+.catalogRefreshNotice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }+.catalogRefreshNotice button { color: inherit; background: none; border: 0; text-decoration: underline; cursor: pointer; }+.catalogLoadError { border: 1px solid var(--line); border-radius: 8px; padding: 40px 24px; text-align: center; }+.catalogLoadError > svg { color: var(--muted); }+.catalogLoadError h2 { font-size: 20px; margin: 16px 0 8px; }+.catalogLoadError p { color: var(--muted); margin: 0 0 24px; font-size: 13px; }+.catalogLoadError button { margin: auto; }+@keyframes catalogPulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }+@media (prefers-reduced-motion: reduce) { .skeletonBar { animation: none; } }+ /* Details stay above the stretched open target and remain independently accessible. */+ .cardDetails { position: relative; z-index: 1; order: 4; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }+ .cardDetails summary { width: fit-content; cursor: pointer; color: var(--muted); font-size: 11px; }+ .cardDetails summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }+ .cardDetails .cardPath { margin: 12px 0; font-size: 11px; }+ .cardDetails .cardMetrics span { font-size: 10px; }+ .cardSummary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 16px 0; }+ .cardSummary span { opacity: .5; }+ .filterBar { border: 0; padding-left: 0; background: transparent; }+ .filterBar > div strong { font-size: 12px; font-weight: 500; }+ .filterBar > div span { font-size: 11px; }+ .filterButton, .filterButtonActive, .clearButton { font-size: 12px; min-height: 36px; font-weight: 500; }+ .filterButtonActive { background: var(--soft); border-color: var(--muted); color: var(--ink); }+ .filterPanel label > span, .filterPanel select, .filterPanel > button { font-size: 12px; }+ @media (max-width: 680px) {+ .workflowCard { padding: 18px; }+ .cardSummary { gap: 6px; }+ .filterPanel { grid-template-columns: 1fr; }+ }diff --cc packages/workflows-ui/src/workflows-app.tsxindex 06b02c500,232518a9f..f1b951270--- a/packages/workflows-ui/src/workflows-app.tsx+++ b/packages/workflows-ui/src/workflows-app.tsx@@@ -761,27 -770,6 +770,27 @@@ function WorkflowsView({ workflows, kno);}+function CatalogPlaceholder({ detail = false }: { detail?: boolean }) {+ const ui = useGT();+ const bar = (width: string, height = 10) => <span className={styles.skeletonBar} style={{ width, height }} />;+ return <section aria-busy="true" aria-label={ui("Loading workflows")}>+ <div className={`${styles.pageHeader} ${styles.catalogHeader}`}><h1>{detail ? ui("Workflow") : ui("Your workflows")}</h1><span role="status" className={styles.catalogLoadStatus}>{ui("Loading saved workflows…")}</span></div>+ <div aria-hidden="true">+ {!detail && <div className={styles.filterBar}><div>{bar("100px")}{bar("140px", 8)}</div>{bar("85px", 28)}</div>}+ <div className={detail ? styles.skeletonDetail : styles.workflowGrid}>+ {Array.from({ length: detail ? 3 : 4 }, (_, i) => <div key={i} className={`${styles.workflowCard} ${styles.skeletonCard}`}>+ <div className={styles.workflowCardTop}>{bar("20px")}{bar("120px", 18)}</div>+ <div className={styles.skeletonTitle}>{bar("78%", 20)}</div>+ <div className={styles.skeletonLines}>{bar("100%")}{bar("91%")}{bar("64%")}</div>- <div className={styles.cardPath}>{bar("90%", 28)}<span />{bar("95%", 28)}</div>- <div className={styles.cardMetrics}>{[0, 1, 2, 3].map(n => <div key={n}>{bar("70%", 7)}{bar("22px", 12)}</div>)}</div>++ <div className={styles.cardSummary}>{bar("64%", 12)}</div>++ <div className={styles.cardDetails}>{bar("90px", 11)}</div>+ <div className={styles.cardFooter}>{bar("45%", 8)}{bar("55px", 8)}</div>+ </div>)}+ </div>+ </div>+ </section>;+}+function readableSkillInstructions(value: string) {return value.replace(/^#{1,6}\s+/gm, "")