Skip to content

Conversation

@yujonglee
Copy link
Contributor

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Oct 17, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR standardizes plugin versioning by removing v0/v1 feature gates across multiple Tauri plugins, deletes the entire connector plugin, introduces a new Zustand-based listener store for managing audio session state, replaces the OngoingSessionStore with the new ListenerStore throughout the app, and removes database persistence from listener session management.

Changes

Cohort / File(s) Summary
Connector Plugin Removal
plugins/connector/Cargo.toml, plugins/connector/build.rs, plugins/connector/js/index.ts, plugins/connector/package.json, plugins/connector/src/commands.rs, plugins/connector/src/error.rs, plugins/connector/src/ext.rs, plugins/connector/src/lib.rs, plugins/connector/src/store.rs, plugins/connector/src/types.rs, plugins/connector/tsconfig.json, plugins/connector/.gitignore
Entire connector plugin deleted, including all command handlers for LLM model/API key management, error types, store keys, TypeScript bindings, and plugin initialization.
Plugin Version Standardization
plugins/local-llm/Cargo.toml, plugins/local-stt/Cargo.toml, plugins/notification/Cargo.toml, plugins/tray/Cargo.toml, plugins/windows/Cargo.toml
Removed v0 and v1 feature flags from Cargo manifests, standardizing on default features without version branching.
Plugin Import Path Updates
apps/desktop2/src/components/chat/index.tsx, apps/desktop2/src/components/main/sidebar/profile/index.tsx, apps/desktop2/src/components/settings/developers.tsx, apps/desktop2/src/devtool/index.tsx, apps/desktop2/src/routes/__root.tsx, apps/desktop2/src/routes/app/onboarding.tsx
Updated Windows plugin imports from "@hypr/plugin-windows/v1" to "@hypr/plugin-windows" across multiple components.
Listener Store & Context
apps/desktop2/src/store/zustand/listener.ts, apps/desktop2/src/contexts/listener.tsx
Added new Zustand-based listener store managing audio session state (loading, status, amplitude) with async start/stop actions; added ListenerProvider and useListener hook for context-based access.
Store & Route Updates
apps/desktop2/src/types/index.ts, apps/desktop2/src/main.tsx, apps/desktop2/src/routes/app.tsx
Replaced OngoingSessionStore2 imports and usage with new ListenerStore; updated loader context and component provider from OngoingSessionProvider2 to ListenerProvider.
Transcript & Word Types
apps/desktop2/src/components/main/body/sessions/transcript.tsx
Renamed Word2 type to Word, updated state declarations and JSX expressions from word.text to word.word, and adjusted type guards accordingly.
Listener Event Updates
plugins/listener/src/events.rs, plugins/listener/src/error.rs
Renamed FinalWords event variant to StreamResponse; removed DatabaseError and ConnectorError variants from listener error enum.
Listener Actor & Database Removal
plugins/listener/src/actors/session.rs
Removed database read/write operations from session pre_start and post_stop; replaced dynamic database-driven configuration with hardcoded stubs (languages=[English], onboarding=false, record_enabled=false).
Plugin Dependencies & Config
plugins/listener/Cargo.toml, apps/desktop2/src-tauri/Cargo.toml, Cargo.toml
Removed tauri-plugin-connector dependency from workspace and apps; removed database-related workspace crates from listener plugin; removed tauri-plugin-listener explicit "v1" feature flags.
UI & Capability Updates
apps/desktop2/src/components/main/body/sessions/floating/generate.tsx, apps/desktop2/src/components/main/body/sessions/floating/listen.tsx, apps/desktop2/src/components/main/body/sessions/note-input/transcript.tsx, apps/desktop2/src-tauri/capabilities/default.json
Removed inline zIndex from FloatingButton; refactored ListenButton to use useListener hook with start/stop state management; simplified transcript editor to JSON display; added "listener:default" permission capability.
Dependencies & Config
.vscode/settings.json, apps/desktop2/package.json, package.json, plugins/windows/src/lib.rs, plugins/windows/src/window/mod.rs, plugins/windows/src/window/v0.rs, crates/am/src/model.rs, apps/desktop2/src/store/tinybase/persisted.ts
Removed rust-analyzer cargo features setting; added mutative dependency; updated pnpm version; removed v0 feature-gated window implementations; consolidated AppWindow to v1 only; added guard for undefined table rows in store persistence.

Sequence Diagram(s)

sequenceDiagram
    participant Component as ListenButton Component
    participant Hook as useListener Hook
    participant Store as Listener Store (Zustand)
    participant Commands as Listener Commands
    participant Events as Listener Events

    Component->>Hook: useListener (selector)
    Hook->>Store: retrieve store from context
    Store-->>Hook: return selected state (status, loading, start, stop)
    Hook-->>Component: status, loading, start, stop

    rect rgba(100, 150, 200, 0.3)
    Note over Component,Events: User clicks to start listening
    Component->>Hook: handleClick() → start()
    Hook->>Store: start action
    Store->>Store: set loading = true
    Store->>Commands: listenerCommands.startSession("")
    Commands-->>Store: session started
    Store->>Events: subscribe to listener events
    Events-->>Store: audioAmplitude event → update amplitude
    Events-->>Store: running_active event → set status, loading = false
    Store-->>Hook: updated state (running_active, amplitude)
    Hook-->>Component: re-render with active state & amplitude
    end

    rect rgba(150, 100, 200, 0.3)
    Note over Component,Events: User clicks to stop listening
    Component->>Hook: handleClick() → stop()
    Hook->>Store: stop action
    Store->>Store: set loading = true
    Store->>Commands: listenerCommands.stopSession()
    Commands-->>Store: session stopped
    Store->>Store: reset to initialState
    Store-->>Hook: updated state (inactive, zero amplitude)
    Hook-->>Component: re-render with inactive state
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

The PR involves significant scope with heterogeneous changes: complete removal of a plugin (connector) with cascading dependency updates across the workspace; standardized versioning across multiple plugins; substantial state management refactoring (replacing OngoingSessionStore with new ListenerStore); type/event renames with propagation through multiple files; removal of database integration from the listener actor with implications for session persistence; and new async control flow in the listener store's start/stop actions. While many import path changes are repetitive, the overall change requires understanding plugin architecture, state management patterns, and the implications of removing database persistence.

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch listener-in-desktop2

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 29444af and 68b711c.

⛔ Files ignored due to path filters (41)
  • Cargo.lock is excluded by !**/*.lock
  • plugins/connector/js/bindings.gen.ts is excluded by !**/*.gen.ts
  • plugins/connector/permissions/autogenerated/commands/get_custom_llm_connection.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_custom_llm_enabled.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_custom_llm_model.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_gemini_api_key.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_gemini_model.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_hyprcloud_enabled.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_llm_connection.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_local_llm_connection.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_openai_api_key.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_openai_model.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_openrouter_api_key.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_openrouter_model.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_others_api_base.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_others_api_key.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_others_model.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_provider_source.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/get_stt_connection.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/list_custom_llm_models.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_custom_llm_connection.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_custom_llm_enabled.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_custom_llm_model.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_gemini_api_key.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_gemini_model.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_hyprcloud_enabled.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_openai_api_key.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_openai_model.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_openrouter_api_key.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_openrouter_model.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_others_api_base.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_others_api_key.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_others_model.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/commands/set_provider_source.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/autogenerated/reference.md is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/default.toml is excluded by !plugins/**/permissions/**
  • plugins/connector/permissions/schemas/schema.json is excluded by !plugins/**/permissions/**
  • plugins/listener/js/bindings.gen.ts is excluded by !**/*.gen.ts
  • plugins/windows/js/bindings.gen.ts is excluded by !**/*.gen.ts
  • plugins/windows/js/bindings.v1.gen.ts is excluded by !**/*.gen.ts
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (47)
  • .vscode/settings.json (1 hunks)
  • Cargo.toml (0 hunks)
  • apps/desktop2/package.json (1 hunks)
  • apps/desktop2/src-tauri/Cargo.toml (2 hunks)
  • apps/desktop2/src-tauri/capabilities/default.json (1 hunks)
  • apps/desktop2/src/components/chat/index.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/floating/generate.tsx (0 hunks)
  • apps/desktop2/src/components/main/body/sessions/floating/listen.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/note-input/transcript.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/transcript.tsx (4 hunks)
  • apps/desktop2/src/components/main/sidebar/profile/index.tsx (1 hunks)
  • apps/desktop2/src/components/settings/developers.tsx (1 hunks)
  • apps/desktop2/src/contexts/listener.tsx (1 hunks)
  • apps/desktop2/src/devtool/index.tsx (1 hunks)
  • apps/desktop2/src/main.tsx (2 hunks)
  • apps/desktop2/src/routes/__root.tsx (1 hunks)
  • apps/desktop2/src/routes/app.tsx (1 hunks)
  • apps/desktop2/src/routes/app/onboarding.tsx (1 hunks)
  • apps/desktop2/src/store/tinybase/persisted.ts (1 hunks)
  • apps/desktop2/src/store/zustand/listener.ts (1 hunks)
  • apps/desktop2/src/types/index.ts (1 hunks)
  • crates/am/src/model.rs (1 hunks)
  • package.json (1 hunks)
  • plugins/connector/.gitignore (0 hunks)
  • plugins/connector/Cargo.toml (0 hunks)
  • plugins/connector/build.rs (0 hunks)
  • plugins/connector/js/index.ts (0 hunks)
  • plugins/connector/package.json (0 hunks)
  • plugins/connector/src/commands.rs (0 hunks)
  • plugins/connector/src/error.rs (0 hunks)
  • plugins/connector/src/ext.rs (0 hunks)
  • plugins/connector/src/lib.rs (0 hunks)
  • plugins/connector/src/store.rs (0 hunks)
  • plugins/connector/src/types.rs (0 hunks)
  • plugins/connector/tsconfig.json (0 hunks)
  • plugins/listener/Cargo.toml (0 hunks)
  • plugins/listener/src/actors/session.rs (1 hunks)
  • plugins/listener/src/error.rs (0 hunks)
  • plugins/listener/src/events.rs (1 hunks)
  • plugins/local-llm/Cargo.toml (0 hunks)
  • plugins/local-stt/Cargo.toml (0 hunks)
  • plugins/notification/Cargo.toml (0 hunks)
  • plugins/tray/Cargo.toml (0 hunks)
  • plugins/windows/Cargo.toml (0 hunks)
  • plugins/windows/src/lib.rs (0 hunks)
  • plugins/windows/src/window/mod.rs (1 hunks)
  • plugins/windows/src/window/v0.rs (0 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@yujonglee yujonglee merged commit 0ed8b15 into main Oct 17, 2025
2 of 4 checks passed
@yujonglee yujonglee deleted the listener-in-desktop2 branch October 17, 2025 00:28
@coderabbitai coderabbitai bot mentioned this pull request Nov 12, 2025
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