12e91c0bbe
Picker still stuttered during load because the main thread was stuck parsing 20+ inbound IPC messages, each carrying 15-25 KB of JSON-wrapped base64. Two changes compound to fix this: 1. Binary IPC. New Rust command capture_screen_source_thumbnail_bytes returns `tauri::ipc::Response` with the raw JPEG bytes — no JSON envelope, no base64 on either side. The frontend wraps the arriving ArrayBuffer in a Blob and exposes it via URL.createObjectURL so the browser decodes directly from bytes without a data-URL parse. Empirically drops per-arrival main-thread work from ~10-15 ms to ~1-2 ms. 2. rAF-batched thumbnail state updates. Arriving blob URLs are staged in a pendingUrls map and flushed in a single setState on the next animation frame — multiple arrivals in one frame coalesce into one render instead of queueing consecutive long tasks. Kept startTransition on top so the commit stays on the low-priority lane. Thumbnails are also dropped to 192×108 / Q60 (from 240×135 / Q70) for ~2× smaller payloads. Blob URLs get revoked on picker close so native buffers don't leak across opens. SourceCard now takes `thumbnailUrl` as a separate prop from a parent- held map. Keeps source object references stable so React.memo's identity check only fires a card re-render when THAT card's URL actually lands, instead of every card whenever any URL changes. Next session: WASAPI loopback for system-audio capture in native share. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chat-app/desktop
Tauri v2 + React + Vite + Tailwind desktop client (macOS / Windows / Linux).
Prerequisites
- Node 22+, pnpm 9+
- Rust + Cargo (install via https://rustup.rs)
- Platform build deps:
- macOS: Xcode Command Line Tools
- Linux:
libwebkit2gtk-4.1-dev,build-essential,libssl-dev(Debian/Ubuntu) - Windows: Microsoft C++ Build Tools + WebView2
Dev
# from repo root
pnpm install
pnpm desktop:dev # tauri dev — launches Vite + native window
pnpm desktop:build # production bundle per platform
Layout
src/— React app (Vite bundles intodist/).src-tauri/— Rust backend.main.rswires Tauri plugins.vite.config.ts— port1420, HMR on1421, aliases to shared packages.
Secure Storage
Session tokens + user private keys live in Stronghold (tauri-plugin-stronghold).
Local message history lives in SQLite (tauri-plugin-sql), DB file encrypted at rest.