Skip to content

Restyle voice dictation feature tip - #11842

Merged
brennanb2025 merged 6 commits into
mainfrom
brennanb2025/voice-dictation-modal-restyle
Aug 1, 2026
Merged

brennanb2025 merged 6 commits into
mainfrom
brennanb2025/voice-dictation-modal-restyle

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • restyle the voice dictation education modal to match Orca's newer split feature-tip layout
  • demonstrate dictation with a one-shot, character-by-character agent prompt preview
  • use the full prompt width before wrapping and respect reduced-motion preferences
  • show the live platform shortcut and provide a direct Settings → Voice path

Validation

  • 36 focused feature-tip tests passed
  • pnpm run typecheck:web
  • pnpm run check:code-quality:changed
  • localization catalog and extraction checks
  • max-lines ratchet
  • launched the real Electron app from this worktree and attached over CDP
  • verified the prompt types to completion, uses the full available line width, and opens Voice settings from the inline link

Screenshots

Mid-dictation

Voice dictation feature tip while the sample prompt is being transcribed

Completed prompt

Voice dictation feature tip after the sample prompt finishes transcribing

@coderabbitai

coderabbitai Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The 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)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the summary, screenshots, and validation, but omits the required Testing, AI Review Report, Security Audit, and Notes sections. Add the missing required sections and document test results, AI review risks, cross-platform checks, security findings, and platform-specific notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: restyling the voice dictation feature tip.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between adc56a7 and 3ec5c9a.

📒 Files selected for processing (8)
  • src/renderer/src/components/feature-tips/FeatureTipsModal.tsx
  • src/renderer/src/components/feature-tips/VoiceDictationFeatureTipVisual.test.tsx
  • src/renderer/src/components/feature-tips/VoiceDictationFeatureTipVisual.tsx
  • src/renderer/src/components/feature-tips/VoiceDictationTipDialog.test.tsx
  • src/renderer/src/components/feature-tips/VoiceDictationTipDialog.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/shared/feature-tips.test.ts
  • src/shared/feature-tips.ts

@greptile-apps

greptile-apps Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Greptile Summary

This 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.

  • VoiceDictationTipDialog — new dedicated dialog component extracted from FeatureTipsModal; shifts initial focus to the primary button via primaryButtonRef and handles the unassigned-shortcut fallback.
  • VoiceDictationFeatureTipVisual — self-contained typing animation built with a local counter (avoiding stale-closure issues), proper cleanup on unmount, and a prefers-reduced-motion bypass that skips all timers and shows the full prompt immediately.
  • FeatureTipsModal — final branch is now guarded with an explicit enable-voice action check backed by a satisfies never assertion, so any future unhandled FeatureTipAction produces a compile-time error rather than silently rendering voice-specific UI.

Confidence Score: 5/5

Safe 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.

Important Files Changed

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()}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
{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!

Comment on lines +95 to +100
{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` }}
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
{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` }}
/>

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Post-review Electron validation

Validated the pushed head 69e70b94da in the real Electron app from this worktree over CDP.

  • The prompt animates once from a partial to completed sentence and uses the available row width.
  • Initial focus lands on Set up voice dictation.
  • An explicitly unassigned shortcut shows actionable assignment copy and no inactive shortcut chip.
  • Settings → Voice opens the Voice settings pane.
  • Reduced-motion emulation showed the complete prompt immediately with zero animated waveform elements.

Mid-dictation

Voice dictation feature tip mid-animation

Completed prompt

Voice dictation feature tip after the prompt completes

Explicitly unassigned shortcut

Voice dictation feature tip with an explicitly unassigned shortcut

Settings navigation

Voice settings pane opened from the feature tip

@brennanb2025
brennanb2025 merged commit 377b580 into main Aug 1, 2026
42 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* 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
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.

1 participant