fix(desktop): ship chat-runtime migrations + Claude SDK binary path to host-service
Two twin bundling bugs found by the CDP gate, both 'runtime file dependency unresolvable from the bundled host-service': (1) chat.db migrations — folder now ships like host-migrations (vite copy + extraResources + coordinator env), turbo passthrough added; verified live: chat.db gets its tables. (2) The Agent SDK's bundled Claude CLI — adapter/mount accept pathToClaudeCodeExecutable, coordinator resolves from the bun store in dev (SUPERSET_CHAT_V3_CLAUDE_BIN); packaged builds are an IOU (231MB binary — extraResources vs resolving user's installed claude, to decide). Also deletes the corrupted zero-table chat.db recovery case by failing loud.
https://claude.ai/code/session_01XRFCEPsfmJHu2SenDKYJ2h
Summary by cubic
Fixes two bundling issues and a session status bug: ships chat.db migrations as resources, wires the Claude SDK CLI path via env, and emits session idle after a turn so the UI doesn’t stick on “Working”.
- Bug Fixes
- Ship chat-runtime migrations with the app and pass their path via
SUPERSET_CHAT_V3_MIGRATIONS(Vite copy + ElectronextraResources; Turbo env passthrough). Host-service reads this to run migrations. - Resolve the Claude Agent SDK CLI in dev by threading
pathToClaudeCodeExecutableand settingSUPERSET_CHAT_V3_CLAUDE_BINfrom the Bun store. Host-service forwards it tocreateClaudeAdapter. - Emit a "session idle" event after a turn completes or interrupts to reset session status and prevent the UI from staying on “Working”.
- Ship chat-runtime migrations with the app and pass their path via
Summary by CodeRabbit
- Improvements
- Improved Claude-powered chat integration by supporting the appropriate Claude Code executable in development environments.
- Ensured chat database migrations are included and available in both development and packaged desktop builds.
- Improved reliability when the Claude Code executable is unavailable or cannot be located.
- Added clearer session-idle notifications after completed or interrupted chat interactions.
- Tests
- Updated chat session behavior checks to reflect the new completion and idle-event sequence.