Conversation
📝 WalkthroughWalkthroughRemoves the model-selection onboarding step in WelcomeModal and auto-selects the QuantizedSmall STT model when continuing from LLM or custom endpoint, then navigates directly to download-progress. Simplifies back-navigation and analytics. Updates localization source references for "Back" in English and Korean .po files. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant WM as WelcomeModal
participant STT as selectSTTModel (mutation)
participant SS as sessionStorage
participant R as Router
participant A as Analytics
U->>WM: Continue from LLM selection
WM->>A: track("onboarding_reached_llm_selection"/continue)
WM->>STT: mutateAsync(select QuantizedSmall STT)
STT-->>WM: success
WM->>SS: set("model-download-dismiss", "true")
WM->>R: navigate("download-progress")
sequenceDiagram
participant U as User
participant WM as WelcomeModal
participant STT as selectSTTModel (mutation)
participant SS as sessionStorage
participant R as Router
U->>WM: Continue from custom-endpoint
WM->>STT: mutateAsync(select QuantizedSmall STT)
STT-->>WM: success
WM->>SS: set("model-download-dismiss", "true")
WM->>R: navigate("download-progress")
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Possibly related PRs
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (6)
apps/desktop/src/components/welcome-modal/index.tsx (6)
75-75: Remove commented-out stateDead/commented code adds noise. Please delete it.
- // const [cameFromLlmSelection, setCameFromLlmSelection] = useState(false);
244-251: Delete the commented-out handleModelSelected blockThis legacy block is no longer used. Rely on git history instead of keeping commented code.
- /* - const handleModelSelected = (model: WhisperModel) => { - selectSTTModel.mutate(model); - setSelectedSttModel(model); - sessionStorage.setItem("model-download-toast-dismissed", "true"); - setCurrentStep("download-progress"); - }; - */
262-271: DRY the auto-select-small STT flow and add a pending guardThe same sequence appears here and in handleCustomEndpointContinue. Extract to a helper to reduce duplication and avoid double-triggering while the mutation is pending.
- if (selection === "hyprllm") { - // Automatically select the 'small' model and proceed to download - const smallModel = "QuantizedSmall" as WhisperModel; - await selectSTTModel.mutateAsync(smallModel); - setSelectedSttModel(smallModel); - sessionStorage.setItem("model-download-toast-dismissed", "true"); - setCurrentStep("download-progress"); - } else { + if (selection === "hyprllm") { + await autoSelectSmallSttAndProceed(); + } else { // setCameFromLlmSelection(false); setCurrentStep("custom-endpoint"); }Add this helper inside the component (outside of the handlers):
const autoSelectSmallSttAndProceed = async () => { if (selectSTTModel.isPending) return; const smallModel: WhisperModel = "QuantizedSmall"; await selectSTTModel.mutateAsync(smallModel); setSelectedSttModel(smallModel); sessionStorage.setItem("model-download-toast-dismissed", "true"); setCurrentStep("download-progress"); };
272-274: Remove leftover commented lineLeftover reference to removed state. Safe to delete.
- // setCameFromLlmSelection(false);
277-284: Reuse the helper to avoid duplicationApply the same helper here.
- // Automatically select the 'small' model and proceed to download - const smallModel = "QuantizedSmall" as WhisperModel; - await selectSTTModel.mutateAsync(smallModel); - setSelectedSttModel(smallModel); - sessionStorage.setItem("model-download-toast-dismissed", "true"); - setCurrentStep("download-progress"); + await autoSelectSmallSttAndProceed();
265-266: Keep comments minimal and about “why”These comments state “what” the code does. Either remove them (code is self-explanatory) or briefly explain “why” small is auto-selected (e.g., fastest initial setup to minimize time-to-value).
Also applies to: 278-279
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/desktop/src/components/welcome-modal/index.tsx(3 hunks)apps/desktop/src/locales/en/messages.po(1 hunks)apps/desktop/src/locales/ko/messages.po(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}
⚙️ CodeRabbit Configuration File
**/*.{js,ts,tsx,rs}: 1. No error handling.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".
Files:
apps/desktop/src/components/welcome-modal/index.tsx
🧬 Code Graph Analysis (1)
apps/desktop/src/components/welcome-modal/index.tsx (1)
plugins/local-stt/js/bindings.gen.ts (1)
WhisperModel(68-68)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: ci (windows, windows-latest)
- GitHub Check: ci (macos, macos-latest)
🔇 Additional comments (2)
apps/desktop/src/locales/en/messages.po (1)
446-449: Anchor update looks correct"Back" now references index.tsx:349, matching the new button location in the simplified flow.
apps/desktop/src/locales/ko/messages.po (1)
446-449: Anchor update looks correct"Back" now references index.tsx:349, aligned with the updated onboarding flow.
Summary by cubic
Simplified the onboarding flow by removing the manual model selection step and automatically selecting the default model for users.