Repository navigation
Restyle voice dictation feature tip - #11842
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe change adds a voice dictation visual and controlled onboarding dialog. The visual renders shortcut information, typed prompt text, waveform animation, reduced-motion behavior, and fallback shortcuts. The dialog displays localized setup content, actions, settings navigation, and the visual. The feature tips modal now uses the new dialog and opens voice settings from it. CLI tips render their visual directly. Tests cover the visual, dialog, shortcut fallback, focus behavior, and updated tip copy. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 57b8165f-1955-4384-b2e4-60592db61acf
📒 Files selected for processing (8)
src/renderer/src/components/feature-tips/FeatureTipsModal.tsxsrc/renderer/src/components/feature-tips/VoiceDictationFeatureTipVisual.test.tsxsrc/renderer/src/components/feature-tips/VoiceDictationFeatureTipVisual.tsxsrc/renderer/src/components/feature-tips/VoiceDictationTipDialog.test.tsxsrc/renderer/src/components/feature-tips/VoiceDictationTipDialog.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/shared/feature-tips.test.tssrc/shared/feature-tips.ts
Greptile SummaryThis PR replaces the old single-column voice dictation feature tip modal with a new split-layout dialog that matches Orca's established feature-tip design language. The right pane shows an animated character-by-character agent prompt preview with a waveform bar, while the left pane delivers context-aware copy (live shortcut or fallback if unassigned) and a direct Settings → Voice link.
Confidence Score: 5/5Safe to merge — the change is a self-contained UI restyling of a feature-tip modal with no data mutations or backend interactions. All logic paths are covered by focused tests (typing lifecycle, reduced-motion bypass, unassigned-shortcut fallback, focus management). The satisfies never guard in FeatureTipsModal ensures future FeatureTipAction additions won't silently fall through to the wrong dialog. Timer cleanup on unmount is correct and verified by the test suite. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/renderer/src/components/feature-tips/VoiceDictationTipDialog.tsx | New split-layout dialog for the voice dictation feature tip; focuses the primary button on open, shows live shortcut copy with a fallback for unassigned shortcuts, and delegates the visual half to VoiceDictationFeatureTipVisual. |
| src/renderer/src/components/feature-tips/VoiceDictationFeatureTipVisual.tsx | Character-by-character typing animation for the right-pane visual; correctly respects prefers-reduced-motion, cleans up timers on unmount, and uses a local counter to avoid stale-closure issues with state. |
| src/renderer/src/components/feature-tips/FeatureTipsModal.tsx | Extracts voice-tip rendering into VoiceDictationTipDialog; adds openVoiceSettings handler; narrows the final branch with an explicit enable-voice check backed by a satisfies never guard so future unhandled actions fail loudly. |
| src/renderer/src/components/feature-tips/FeatureTipActions.tsx | Adds an optional primaryButtonRef prop threaded to the primary Button so callers can manage initial focus without grabbing DOM nodes directly. |
| src/renderer/src/components/feature-tips/VoiceDictationFeatureTipVisual.test.tsx | New test file covering the full typing animation lifecycle, reduced-motion bypass, full-width layout assertion, and unassigned-shortcut visibility guard. |
| src/renderer/src/components/feature-tips/VoiceDictationTipDialog.test.tsx | New test file verifying copy content, shortcut rendering, unassigned-shortcut fallback, and programmatic focus transfer to the primary button on open. |
| src/shared/feature-tips.ts | Updates voice-dictation tip title and ctaLabel to match the new layout's copy; description is simplified as richer in-context instructions now live in VoiceDictationTipDialog. |
| src/renderer/src/i18n/locales/en.json | Adds featureTips.voice i18n keys for all new strings in the dialog and visual panel. |
| src/shared/feature-tips.test.ts | Extends the voice-dictation fixture test to assert the new title and ctaLabel values. |
Reviews (3): Last reviewed commit: "Use neutral voice dictation demo prompt" | Re-trigger Greptile
| variant="outline" | ||
| className="mb-3 rounded-md px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-muted-foreground" | ||
| > | ||
| {tip.eyebrow.toUpperCase()} |
There was a problem hiding this comment.
Eyebrow string double-uppercased
The Badge already carries a Tailwind uppercase CSS class, so the rendered text is uppercased regardless. Calling .toUpperCase() on the string value beforehand is redundant. Removing it keeps the data unchanged and lets the CSS class remain the single source of the casing behaviour.
| {tip.eyebrow.toUpperCase()} | |
| {tip.eyebrow} |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| {WAVEFORM_BAR_HEIGHTS.map((height, index) => ( | ||
| <span | ||
| key={height} | ||
| className={`block w-0.5 rounded-full bg-current ${typing ? 'animate-waveform' : ''}`} | ||
| style={{ height: `${height}%`, animationDelay: `${index * 0.1}s` }} | ||
| /> |
There was a problem hiding this comment.
Waveform bar
key uses height value instead of index
All five values in WAVEFORM_BAR_HEIGHTS are currently distinct, so there's no React warning today. Using height as a key is semantically odd for positional elements — the key identifies the bar's slot in the row, not its visual magnitude. If the array is ever edited to include a duplicate height value, React would silently reuse the DOM node for the wrong bar. index is the correct identity here.
| {WAVEFORM_BAR_HEIGHTS.map((height, index) => ( | |
| <span | |
| key={height} | |
| className={`block w-0.5 rounded-full bg-current ${typing ? 'animate-waveform' : ''}`} | |
| style={{ height: `${height}%`, animationDelay: `${index * 0.1}s` }} | |
| /> | |
| {WAVEFORM_BAR_HEIGHTS.map((height, index) => ( | |
| <span | |
| key={index} | |
| className={`block w-0.5 rounded-full bg-current ${typing ? 'animate-waveform' : ''}`} | |
| style={{ height: `${height}%`, animationDelay: `${index * 0.1}s` }} | |
| /> |
Post-review Electron validationValidated the pushed head
Mid-dictationCompleted promptExplicitly unassigned shortcutSettings navigation |
* Restyle voice dictation feature tip * Remove workspace name from dictation preview * Refine voice dictation tip instructions * Clarify voice dictation setup action * Fix voice dictation tip keyboard behavior * Use neutral voice dictation demo prompt




Summary
Validation
pnpm run typecheck:webpnpm run check:code-quality:changedScreenshots
Mid-dictation
Completed prompt