fix(desktop): patch trpc-electron for Electron 39 compatibility
Closed
AV
9mo ago+78+78+01234567890123456789-0-0-0123456789
Summary
- Adds a postinstall script to patch trpc-electron for Electron 39+ / Node.js 22+ compatibility
- Fixes the
Symbol.asyncDispose already existserror that breaks tRPC subscriptions - This enables the visual indicator on workspace tabs to work correctly when agent notifications arrive
Background
Electron 39 uses Node.js 22, which has Symbol.asyncDispose built-in on AsyncIterators. The trpc-electron library throws an error when trying to add Symbol.asyncDispose to objects that already have it:
TRPCClientError: Symbol.asyncDispose already exists
This was breaking the notification subscription that powers the red dot indicator on workspace tabs.
Changes
- Added
apps/desktop/scripts/patch-trpc-electron.ts- patches the library on install - Modified
apps/desktop/package.json- added postinstall script
Test plan
- Run
bun installin apps/desktop and verify patch applies - Start dev server with
bun run dev - Trigger a Claude agent completion notification
- Verify the red dot indicator appears on the workspace tab
🤖 Generated with Claude Code
Summary by CodeRabbit
- Chores
- Automated patching of TRPC Electron during installation for compatibility with Electron 39+ and Node.js 22+.
✏️ Tip: You can customize this high-level summary in your review settings.