Skip to content

fix(desktop): set dev script to tauri dev instead of vite - #2

Open
cole-hackman wants to merge 7 commits into
mainfrom
claude/follow-code-prompt-ug8T1
Open

cole-hackman wants to merge 7 commits into
mainfrom
claude/follow-code-prompt-ug8T1

Conversation

@cole-hackman

@cole-hackman cole-hackman commented May 10, 2026

Copy link
Copy Markdown
Owner

The dev script was set to vite, which launches a browser-only frontend with no Rust backend, no IPC bridge, and no native window. tauri dev wraps Vite internally and starts the full Tauri shell — which is what pnpm dev needs to do.


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Claude CLI agent: streaming chat, CLI availability check, and agent-mode badges; settings UI adapts (API key UI hidden when CLI present)
    • Playlist browser panel with nested playlist/folder navigation
    • Waveform preview with cue markers and playback sync
    • Agent tools for playlist/track lookup and library health scans (duplicates & broken links)
  • Tests

    • Updated and expanded tests for track list/detail, waveform, playback hooks, and agent/chat behavior
  • Documentation

    • Project status updated and new v0.1.0 release notes added

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 0c4b8884-4e48-400f-aa36-4a8ff8833606

📥 Commits

Reviewing files that changed from the base of the PR and between e5b1ad7 and aa9d7cd.

📒 Files selected for processing (1)
  • docs/lexicon-parity-features.md
✅ Files skipped from review due to trivial changes (1)
  • docs/lexicon-parity-features.md

📝 Walkthrough

Walkthrough

Migration of Rekordbox IDs from integers to strings across schema, Rust types, queries, and frontend types; addition of a Claude CLI streaming bridge (claude_agent), new Tauri commands and IPC wrappers, agent hook refactor for three auth modes, waveform UI, playlist browser, tests, and docs.

Changes

ID Type Migration: Integer to String Identifiers

Layer / File(s) Summary
Database schema and core Rust types
crates/rekordbox-db/src/sql/schema.sql, crates/rekordbox-db/src/types.rs
All identifier columns in the SQLite schema converted from INTEGER to TEXT; Rust types (Track, Playlist, PlaylistEntry, HotCue) now use String/Option<String> for id fields.
Query signatures & connection
crates/rekordbox-db/src/connection.rs, crates/rekordbox-db/src/queries/tracks.rs, crates/rekordbox-db/src/queries/cues.rs, crates/rekordbox-db/src/queries/playlists.rs
Public query APIs now accept &str identifiers (e.g., by_id, for_track, entries); connection maintains SQLCipher pragmas and read-only enforcement tests.
Integration & unit tests
crates/rekordbox-db/tests/integration.rs, query unit tests
Tests updated to pass string IDs ("1", "2", "9999") and to assert equivalent behavior.
Frontend types & IPC
apps/desktop/src/types.ts, apps/desktop/src/ipc.ts, apps/desktop/src/hooks/useTrackCues.ts
TypeScript types updated to string IDs; IPC wrappers changed (e.g., getTrackCues(path, trackId: string)).
React components & fixtures
apps/desktop/src/components/TrackTable.tsx, apps/desktop/src/components/TrackDetailPanel.test.tsx, test fixtures/hooks
Component prop selectedTrackId and test fixtures updated to use string IDs; waveform integration tests adapt to new WaveformDisplay mock.

Claude CLI Agent Integration

Layer / File(s) Summary
Claude streaming bridge (backend)
apps/desktop/src-tauri/src/claude_agent.rs
New module spawns claude --print --output-format stream-json, streams and parses JSON stdout lines into ClaudeChunk events, emits incremental text via Tauri events, captures session IDs, and returns session id on completion.
Tauri commands
apps/desktop/src-tauri/src/lib.rs
Adds claude_available (version check), chat_with_claude (delegates to claude_agent::chat), plus playlist/track listing and health-scan commands; wires commands into invoke_handler.
Frontend IPC bridge & tools
apps/desktop/src/ipc.ts, apps/desktop/src/agent/tools.ts, apps/desktop/src/agent/types.ts
Exports claudeAvailable, chatWithClaude, new library/health IPC wrappers; expands tool schemas and executeTool to handle track/playlist/cue queries and health scans with string IDs.
useAgent hook refactor
apps/desktop/src/agent/useAgent.ts
Detects modes claude-cli / api-key / no-auth on mount; implements sendViaClaude streaming via Tauri events and refactors api-key streaming/tool loop; exposes mode.
UI components & hooks
apps/desktop/src/components/SettingsPanel.tsx, apps/desktop/src/components/ChatPanel.tsx, apps/desktop/src/components/PlaylistBrowser.tsx, apps/desktop/src/components/WaveformDisplay.tsx, apps/desktop/src/hooks/usePlaylists.ts, apps/desktop/src/hooks/useWaveform.ts
SettingsPanel checks claudeAvailable() and conditionally hides API-key UI; ChatPanel shows mode badge; new PlaylistBrowser component and WaveformDisplay + useWaveform hook provide playlist tree and waveform rendering with cue markers.
Tests & docs
apps/desktop/src/components/*.{test,tsx}, docs/releases/v0.1.0.md, STATUS.md, package.json, apps/desktop/src-tauri/capabilities/default.json
Tests updated/mocked for new modes and string IDs; docs and status updated; wavesurfer.js dependency added; Tauri capability core:asset:allow-asset added.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 "I hopped through IDs from numbers to text,

spawned Claude in a streaming context,
playlists and waveforms stitched in a row,
small rabbit cheers for the new flow! 🥕"


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

claude added 3 commits May 11, 2026 03:29
Rekordbox 7 stores every ID column as TEXT (UUID-like strings such as
"000uQGol0000001V"). Our schema assumed INTEGER, causing rusqlite to
panic with "Invalid column type Text at index: 0, name: ID" on a real
master.db.

Changes:
- schema.sql: all ID / foreign-key columns → TEXT PRIMARY KEY / TEXT
- types.rs: Track.id, Playlist.id/.parent_id, HotCue.id/.content_id,
  PlaylistEntry.playlist_id/.content_id → String
- queries/{tracks,playlists,cues}.rs: by_id/entries/for_track take &str;
  row reads use String; test call-sites updated
- connection.rs: track_by_id/playlist_entries/hot_cues_for_track → &str
- tests/integration.rs: all ID literals → string literals
- apps/desktop/src-tauri/src/lib.rs: get_track_cues track_id: i64 → String
- TypeScript: Track.id, HotCue.id/.content_id, Playlist.id/.parent_id → string
- ipc.ts, useTrackCues.ts, TrackTable.tsx: trackId/selectedTrackId → string
- test fixtures updated throughout

16 rekordbox-db tests + 71 vitest tests pass; cargo fmt applied.

https://claude.ai/code/session_01W6AyniFKJQsw9Pyv1Q6yST
- New Rust `claude_agent` module spawns `claude --print --output-format
  stream-json` and streams text chunks back to the frontend via uniquely
  named Tauri events, maintaining session continuity across messages.
- `useAgent.ts` auto-detects on mount: uses claude CLI if available
  (`claude-cli` mode), falls back to Anthropic SDK + API key, or shows
  a clear error if neither is configured.
- `ChatPanel` header shows a green "subscription" badge in claude-cli
  mode and a grey "api key" badge in api-key mode.
- `SettingsPanel` shows a live auth-status indicator and hides the API
  key form when the claude CLI is active.
- New IPC helpers: `claudeAvailable` and `chatWithClaude`.
- Tests updated: SettingsPanel mock adds `claudeAvailable`; ChatPanel
  mock adds `mode`.

https://claude.ai/code/session_01W6AyniFKJQsw9Pyv1Q6yST
@cole-hackman
cole-hackman force-pushed the claude/follow-code-prompt-ug8T1 branch from 34b8803 to 8f44c41 Compare May 11, 2026 04:15
claude added 4 commits May 11, 2026 04:26
- Install wavesurfer.js v7.
- Enable `core:asset:allow-asset` Tauri capability so the WebView can
  load local audio files via the `asset://` protocol.
- New `useWaveform` hook creates a WaveSurfer instance pointed at the
  track's `folder_path` (converted to `asset://` URL via
  `convertFileSrc`). Renders waveform bars and overlays yellow markers
  at each cue timestamp. Syncs play/pause cursor to the rodio player.
- New `WaveformDisplay` component wraps the hook in a clean 64px-tall
  container. Replaces the "Waveform — Phase 1" placeholder.
- TrackDetailPanel now imports and renders WaveformDisplay with the
  sorted cue timestamps.
- TrackDetailPanel tests mock WaveformDisplay (WaveSurfer can't run in
  jsdom) and assert the component mounts.

https://claude.ai/code/session_01W6AyniFKJQsw9Pyv1Q6yST
Update STATUS.md to Phase 2 and add release note for v0.1.0.
All Phase 1 checklist items are now done.

https://claude.ai/code/session_01W6AyniFKJQsw9Pyv1Q6yST
- Add 8 agent tools: library search/get_track/list_playlists/list_playlist_entries/list_cues + health orphan/duplicate/broken_link scans
- Add PlaylistBrowser component with recursive folder expand/collapse
- Add usePlaylists hook with buildPlaylistTree helper
- Add Tauri commands: list_playlist_entries, get_track_by_id, health_duplicate_scan, health_broken_link_scan
- Extend types: PlaylistEntry, DuplicateGroup, BrokenTrack; fix Playlist.id to TEXT
- Add corresponding IPC wrappers and agent type payloads

https://claude.ai/code/session_01W6AyniFKJQsw9Pyv1Q6yST
Covers Custom Tags, Genre/Artist Cleanup, Smart Fixes, Sync/Write-back,
Tracks sub-views (Incoming + Archive), and Track Matcher — with data models,
Tauri command signatures, UI spec, and implementation order.

https://claude.ai/code/session_01W6AyniFKJQsw9Pyv1Q6yST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants