2026-10-12 19:57:34 +02:00
|
|
|
# Real-engine desktop screenshots
|
|
|
|
|
|
|
|
|
|
This independent software-test runner launches its own bundled headless Chromium
|
|
|
|
|
with CPU rendering/video-decode flags. It does not control the user's Chrome,
|
|
|
|
|
reuse personal profiles, or use Windows UI Automation. Screenshots render the
|
|
|
|
|
production frontend against the actual shared Rust/Google EmbeddingGemma 2 engine;
|
|
|
|
|
responses are neither replayed nor supplied by page evaluation.
|
|
|
|
|
|
|
|
|
|
Playwright 1.64.0 is pinned in the package lock. See the official
|
|
|
|
|
[browser installation](https://playwright.dev/docs/browsers) and
|
|
|
|
|
[screenshot API](https://playwright.dev/docs/screenshots). The browser binaries
|
|
|
|
|
stay under this tool's ignored node_modules directory.
|
|
|
|
|
|
|
|
|
|
## Prepare
|
|
|
|
|
|
|
|
|
|
Build the production frontend from apps/desktop with `npm ci && npm run build`.
|
|
|
|
|
Build/stage the CPU Google worker and verified media helpers as documented in
|
|
|
|
|
[BUILDING](../../docs/BUILDING.md). Provision the actual Google models first.
|
|
|
|
|
The backend uses a dedicated generated/verified fixture corpus, never a user
|
|
|
|
|
home/document directory. It indexes documents and two licensed real photos,
|
|
|
|
|
then warms its retained CPU worker before listening on 127.0.0.1:1431.
|
|
|
|
|
|
|
|
|
|
```powershell
|
|
|
|
|
$env:SEARCHI_FORCE_CPU = '1'
|
2026-10-14 11:44:15 +02:00
|
|
|
$env:SEARCHI_EXTRACT_WORKER = (Resolve-Path target/release/searchi-extract-worker.exe).Path
|
2026-10-12 19:57:34 +02:00
|
|
|
cargo run --manifest-path tools/desktop-capture/backend/Cargo.toml -- --root .searchi/readme-capture/files --db .searchi/readme-capture/index.sqlite --models .searchi/models/embeddinggemma2 --worker .searchi/runtime/cpu/Release/searchi-gemma-worker.exe --dist apps/desktop/dist --ffmpeg .searchi/media-runtime/bin/ffmpeg.exe --ffprobe .searchi/media-runtime/bin/ffprobe.exe
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Keep that owned test process running while capturing. Its loopback API is a
|
|
|
|
|
fixture-only test adapter with origin/token checks, not a product HTTP server.
|
|
|
|
|
The production Tauri app keeps its native command/asset-protocol interface.
|
|
|
|
|
|
|
|
|
|
In another terminal, from the repository root:
|
|
|
|
|
|
|
|
|
|
```powershell
|
|
|
|
|
npm ci --prefix tools/desktop-capture
|
|
|
|
|
$env:PLAYWRIGHT_BROWSERS_PATH = '0'
|
|
|
|
|
npm run --prefix tools/desktop-capture install-browser
|
|
|
|
|
npm run --prefix tools/desktop-capture capture
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The runner always uses the local browser cache and its own temporary profile.
|
|
|
|
|
CPU flags are `--disable-gpu --disable-accelerated-video-decode --disable-webgl`.
|
|
|
|
|
Only loopback fixture origin requests are permitted during capture. It waits for
|
|
|
|
|
actual backend readiness, measured hybrid responses, matching DOM results,
|
|
|
|
|
loaded fonts, image pixels, and genuine worker inference counters in debug mode.
|
|
|
|
|
|
|
|
|
|
## Artifacts and limits
|
|
|
|
|
|
2026-10-14 11:44:15 +02:00
|
|
|
Outputs under docs/screenshots are launcher-empty.png, search-light.png, search-dark.png,
|
2026-10-12 19:57:34 +02:00
|
|
|
media-search.png and performance-details.png, plus capture-manifest.json. The
|
|
|
|
|
manifest contains actual fixture queries, counts/selection, measured response
|
|
|
|
|
metrics, device/model, viewport, PNG SHA256, runner/browser versions, Git base
|
|
|
|
|
commit and dirty-state flag. The base commit does not identify uncommitted
|
2026-10-14 11:44:15 +02:00
|
|
|
source exactly. It also records the actual frontend package version and built
|
|
|
|
|
index SHA-256. The compact empty-bar capture has no manufactured results and
|
|
|
|
|
uses the genuine ready backend. The ephemeral API token is never saved in the manifest.
|
2026-10-12 19:57:34 +02:00
|
|
|
|
|
|
|
|
Captures are **browser-rendered production UI with the actual CPU engine**.
|
|
|
|
|
They omit native window chrome. They do not establish native WebView visual QA,
|
|
|
|
|
OS integration, playback codec parity, production relevance, GPU behavior or
|
|
|
|
|
other operating-system releases. The runner closes only its browser; stop only
|
|
|
|
|
the separately launched owned backend when finished.
|