Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

feat(mobile): have the voice assistant onboarding fill in the draft's blanks (#2548)

Chad Pihadf15d95ca146
diff --git a/openwhispr-mobile/src/screens/onboarding/steps/VoiceAgentStep.tsx b/openwhispr-mobile/src/screens/onboarding/steps/VoiceAgentStep.tsx
index a2de7c6e7..c984cad08 100644
--- a/openwhispr-mobile/src/screens/onboarding/steps/VoiceAgentStep.tsx
+++ b/openwhispr-mobile/src/screens/onboarding/steps/VoiceAgentStep.tsx
@@ -19,11 +19,13 @@ import { addKeyboardStatusChangedListener } from '../../../../modules/app-group-
type Phase = 'start' | 'asking' | 'first-draft' | 'refined' | 'done';
-// What users say in the live try, and what the example shows when the live try can't run.
+// What users say in the live try, and what the example shows when the live try can't run. It's kept
+// short so it's easy to repeat, and names the company and when so the draft leaves nothing to fill
+// in but the sender's name, which the follow-up adds.
const REQUEST =
- 'I cancelled my subscription last month but got charged again. Draft an email asking them to refund it.';
+ 'I cancelled Netflix last month but got charged again. Draft a message asking for a refund.';
const EXAMPLE_DRAFT =
- 'Hi,\n\nI cancelled my subscription last month, but I was charged again this month. Could you please refund this charge?\n\nThanks';
+ 'Hi Netflix Support,\n\nI cancelled my subscription last month, but I was charged again this month. Could you please refund this charge?\n\nThanks';
// The field is focused on arrival, so the first instruction points straight at the keyboard's agent
// button, drawn with the same glyph the keyboard uses.
@@ -35,7 +37,7 @@ const INSTRUCTIONS: Record<Phase, ReactNode> = {
</>
),
asking: `Say: “${REQUEST}”`,
- 'first-draft': 'Now tap Ask for changes and say: “Make it firmer.”',
+ 'first-draft': 'Now tap Ask for changes and add your name. Say: “My name is …”',
refined: 'Tap ✓ to insert it.',
done: 'That’s your voice assistant.',
};
diff --git a/openwhispr-mobile/src/screens/onboarding/steps/__tests__/VoiceAgentStep.test.tsx b/openwhispr-mobile/src/screens/onboarding/steps/__tests__/VoiceAgentStep.test.tsx
index 6d55b9444..5113a0b9b 100644
--- a/openwhispr-mobile/src/screens/onboarding/steps/__tests__/VoiceAgentStep.test.tsx
+++ b/openwhispr-mobile/src/screens/onboarding/steps/__tests__/VoiceAgentStep.test.tsx
@@ -59,8 +59,8 @@ jest.mock('@/store/useAuthStore', () => ({
// The field is focused on arrival, and the glyph is the keyboard's own agent button.
const START = 'Tap the [wand.and.stars] button on your keyboard.';
const ASK =
- 'Say: “I cancelled my subscription last month but got charged again. Draft an email asking them to refund it.”';
-const FOLLOW_UP = 'Now tap Ask for changes and say: “Make it firmer.”';
+ 'Say: “I cancelled Netflix last month but got charged again. Draft a message asking for a refund.”';
+const FOLLOW_UP = 'Now tap Ask for changes and add your name. Say: “My name is …”';
const INSERT = 'Tap ✓ to insert it.';
const DONE = 'That’s your voice assistant.';
const ACCOUNT_REQUIRED =
@@ -124,7 +124,7 @@ it('shows the refund request and a drafted email when the live try is unavailabl
const screen = render(<VoiceAgentStep />);
expect(
screen.getByText(
- '“I cancelled my subscription last month but got charged again. Draft an email asking them to refund it.”',
+ '“I cancelled Netflix last month but got charged again. Draft a message asking for a refund.”',
),
).toBeTruthy();
expect(screen.getByText(/Could you please refund this charge\?/)).toBeTruthy();