mirror of
https://github.com/block/buzz.git
synced 2026-11-03 07:51:22 +00:00
Two pre-existing crashes surfaced in the dev console, both independent of the projects work on this branch. SelectionFormattingTray read `editor.view.dom` on mount. A tiptap v3 Editor outlives its ProseMirror view, and while the view is detached `editor.view` is a proxy that throws for every key it does not stub. When React reconnected the effect for a hidden composer subtree the view was already torn down, so the read threw, crashed the component, and escaped to the router's root catch boundary. Track the mounted view as state synced from tiptap's mount/unmount events, and route every view access through a `getMountedView` guard. The huddle listeners called Tauri's unlisten function directly. `listen()` resolves with its event id as soon as the backend command returns, but the backend publishes that id into the webview through a separate eval, so an unlisten issued in that gap throws from `unregisterListener` before it reaches `plugin:event|unlisten`. That left the backend listener registered and still firing its handler after unmount, on top of the unhandled rejection. Add `safeUnlisten`, which retries with backoff until the teardown actually lands. Signed-off-by: Matt Toohey <contact@matttoohey.com>
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 frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm 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