Files
buzz/desktop
Matt Toohey 92c2e2ffc0 fix(desktop): start the Canvas update socket inside the async runtime
The app aborted on every macOS and Linux launch. `ipc::start` runs
synchronously from Tauri's `setup` hook, on the main thread with no Tokio
runtime in context, and called `tokio::net::UnixListener::from_std` there.
That call registers the socket with the reactor, so it panicked with "there
is no reactor running" — and because `setup` runs inside tao's
`did_finish_launching`, a non-unwinding ObjC callback, the panic escalated to
`panic_cannot_unwind` and killed the process before a window ever appeared.

Bind the socket synchronously as before (so stale-socket and permission
failures still surface as a returned error), then hand the std listener to
`spawn_serving`, which converts it inside the spawned task where the reactor
is live. Socket cleanup on a failed conversion matches the existing accept
error path.

Covered by a unit test that calls `spawn_serving` from a plain sync context,
exactly as `setup` does, and asserts the socket still accepts a connection;
it reproduces the original panic when the conversion moves back to the call
site.

Verified with `just staging`: the app now boots past `did_finish_launching`,
creates `CANVASES/.runtime/agent-updates.sock` with 0600 permissions, and
reaches the frontend. Full Tauri test suite (3031), clippy, fmt, and the
file-size gate pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
2026-09-01 10:19:37 +10:00
..
…

Buzz

Desktop chat shell with:

  • Tauri + React + TypeScript + Vite
  • Tailwind CSS
  • shadcn/ui-ready shared components
  • Biome (lint/format/check)
  • Feature-driven frontend structure

Scripts

  • pnpm dev - run the web frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm format - Biome format (write)
  • pnpm check - Biome check

Structure

  • src/shared - reusable app-wide code (ui, lib, styles)
  • src/features - feature modules (vertical slices)
  • src/app - top-level app composition