Files
searchi/apps/desktop
karl caf6a2f82e
Core CI / core (ubuntu-latest) (push) Failing after 3m27s
Core CI / core (macos-latest) (push) Canceled after 0s
Core CI / core (windows-latest) (push) Canceled after 0s
Core CI / desktop (ubuntu-latest) (push) Successful in 5m45s
Core CI / desktop (macos-latest) (push) Canceled after 0s
Core CI / desktop (windows-latest) (push) Canceled after 0s
feat: integrate Google semantic search and branded desktop launcher
2026-10-12 17:44:56 +02:00
..

Searchi desktop

This Tauri 2 shell calls the same Rust core as the CLI and the real Google EmbeddingGemma 2 service. It provides folder indexing, native folder selection, progressive filename/content/semantic search, folder/extension/size/date filters, keyboard navigation, escaped text previews, native open/reveal actions, persisted selected folders/resource settings, and a global shortcut. There are no mocked results or embeddings. Watchers and release installers remain roadmap work.

Develop

Install Node.js LTS, Rust stable, and the platform prerequisites documented at https://v2.tauri.app/start/prerequisites/. Windows requires MSVC build tools and WebView2; Linux requires WebKitGTK and system development packages; macOS requires Xcode command line tools.

cd apps/desktop
npm ci
npm run build
npm run tauri dev

npm run dev previews layout in a browser but cannot index or search files. The app reports this limitation explicitly. Press Ctrl+K (Cmd+K on macOS) to focus search; arrow keys navigate results. Choose a folder through the native dialog or enter an absolute path. Open/reveal commands canonicalize the path, verify it is a current file, and require exact membership in the index. The webview has no general opener or filesystem capability. Page/paragraph source locations are displayed when supplied by the core; opening at that exact location is future work.

Ctrl+Shift+Space shows and focuses the running app on Windows/Linux; Shift+Cmd+Space does so on macOS. Registration failures appear under Folders & resources rather than preventing startup. Wayland sessions explicitly report the shortcut as unsupported; launcher access remains available. Registration uses the official Tauri global shortcut plugin. Closing the app exits it; background tray lifecycle is not implemented.

Selected roots and the CPU thread budget are stored in versioned settings.json beside the index. Writes use an atomic temporary-file replacement; invalid values never overwrite previous settings. Missing files use defaults, while corrupted/unsupported settings fail explicitly. Selected roots may remain listed while disconnected and are reindexed only on user request. The CPU budget defaults to one and is limited to eight. Indexing uses one worker; CPU inference respects the saved budget.

The desktop index is stored in the platform app-data directory under dev.searchi.desktop. Search uses a cached core reader while indexing runs on a separate blocking worker; a guard limits this shell to one indexing job at a time. Production inference automatically selects supported acceleration with CPU fallback. All model testing on the Windows VM must remain CPU only.

On first launch, the native app downloads and verifies the pinned Google model artifacts (310 MB text model plus 555 MB media projector, approximately 865 MB total) into app-managed storage and prepares the packaged embedding worker. No model paths, runtime paths, or terminal setup are required. The UI shows native download bytes, verification/warming states, the actual worker device, and explicit errors with a retry control. The first download requires network access; file extraction, embeddings, and queries stay local.

After a folder is indexed, semantic indexing starts automatically when the model is ready. Existing keyword results stay searchable during setup/indexing. Progress is indeterminate during embedding because the native command does not expose a chunk completion count. Failed automatic builds retry only after a changed index/status revision or an explicit rebuild, avoiding repeated failure loops. Status polls run once per second while setup/indexing/warming is active and stop when idle.

Each query captures one immutable filter snapshot. Keyword results appear first; real hybrid results follow after the query settles. src/search-state.ts bounds each lane to one active native request and one latest pending request, discards old revisions, and retries a busy request at most once. Escape clears both pending lanes and their timers; already-running native work finishes without changing cleared results. Hybrid updates preserve the selected file and keyboard focus where possible.

Run the async-state tests with Node.js 24 or newer:

node --test tests/search-state.test.mjs

For Windows VM UI testing, disable WebView2 GPU rendering as well, before starting Tauri in PowerShell:

$env:WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS = '--disable-gpu'
$env:SEARCHI_FORCE_CPU = '1'
npm.cmd run tauri dev

Desktop design

The compact launcher follows the selected first visual direction with the searchi brand palette: blue #2563FF, dark #0B0F14, light #F8FAFC, lowercase wordmark, and “Find what matters. Locally.” Native operating-system window chrome remains native. The right pane shows real extracted passages and source locations, without invented PDF pagination or confidence scores.

Inter Variable is bundled locally with system font fallbacks. All interface icons come from Microsoft Fluent UI System Icons; no runtime CDN requests are made. Light/dark themes follow the operating system. Brief 120–160 ms opacity/transform motion respects reduced-motion settings, and forced-colors mode retains borders and focus visibility. Keyed result rows preserve selected files, keyboard focus, and scroll position during hybrid updates. Settings, filters, and model details use compact disclosures; errors open model details so recovery controls stay accessible.

Distributed notices are included in public/licenses/ and src-tauri/resources/licenses/: Inter SIL Open Font License, Microsoft Fluent icons MIT license. These are the actual upstream notices, not summaries.

Visual fidelity remains subject to native screenshot QA. Compilation and state tests alone do not verify visual appearance.

Verification and packaging

npm run build checks strict TypeScript and creates production frontend assets. npm run tauri build -- --no-bundle compiles the native shell when platform prerequisites are installed. Installer bundling is intentionally disabled until release icons, signing and native platform checks are complete. Native Windows, macOS, and Linux checks must be recorded separately; a frontend build does not prove the native shell works.