Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Update voice input handling and release notes for version 1.0.0+14

Dev jacobf4d9c5119065
diff --git a/mobile/RELEASE.md b/mobile/RELEASE.md
index 20bb0a207..c422e4d97 100644
--- a/mobile/RELEASE.md
+++ b/mobile/RELEASE.md
@@ -62,8 +62,9 @@ icon size in thirty seconds instead of in an email twenty minutes later.
| `1.0.0 (10)` | 2026-09-17 | TestFlight. Smoother swipes and scrolling: parked and keyboard-sliding terminals keep painting; the header folds over the terminal instead of resizing it |
| `1.0.0 (11)` | 2026-09-17 | TestFlight. Agents either side of the one on screen open in advance, so a swipe lands on output instead of "Attaching…" |
| `1.0.0 (12)` | 2026-09-18 | TestFlight. Named OpenHarness on the home screen and in the app; Backspace on the phone erases text typed on the desktop; Machines moved into the ⋯ sheet; hold-to-talk hardened |
+| `1.0.0 (13)` | 2026-09-18 | TestFlight. Search reads what agents said (the desktop's content index), recent first; Vietnamese Telex in the search field; terminal search has no Cancel, and the terminal holds still as it closes |
-`pubspec.yaml` is therefore at `1.0.0+13`: the repo always holds the NEXT build number, so a release
+`pubspec.yaml` is therefore at `1.0.0+14`: the repo always holds the NEXT build number, so a release
runs clean without anyone having to remember the last one.
### Why the app is iPhone-only
diff --git a/mobile/lib/phone/terminal_action_column.dart b/mobile/lib/phone/terminal_action_column.dart
index a155b00be..e3e51fcf1 100644
--- a/mobile/lib/phone/terminal_action_column.dart
+++ b/mobile/lib/phone/terminal_action_column.dart
@@ -100,7 +100,7 @@ class TerminalActionColumn extends StatelessWidget {
24)
.clamp(0, double.infinity),
),
- child: VoiceStatusPill(voice: voice, session: session),
+ child: VoiceStatusPill(voice: voice),
),
const SizedBox(width: 6),
VoiceMicFab(voice: voice, session: session),
diff --git a/mobile/lib/phone/voice_input_controller.dart b/mobile/lib/phone/voice_input_controller.dart
index cd5ed0964..383e7b778 100644
--- a/mobile/lib/phone/voice_input_controller.dart
+++ b/mobile/lib/phone/voice_input_controller.dart
@@ -102,111 +102,28 @@ class VoiceInputController extends ChangeNotifier {
/// [clear], where words arriving late would bring back what was dropped.
int _take = 0;
- /// Words already written into a terminal's prompt by [stage], waiting for the
- /// second tap to send them — and the terminal they were written into.
- ///
- /// ⚠️ **Kept apart from [transcript], and that is what stops them being typed
- /// twice.** These are ON the remote screen already; [transcript] is words
- /// held here and nowhere else. Handing these to the keyboard, or sending them
- /// as a composer turn, would put them in the prompt a second time.
- String? _staged;
- Object? _stagedIn;
-
bool get isSending => _isSending;
VoiceInputStatus get status => _status;
String get transcript => _heard;
String? get notice => _notice;
- /// The words sitting unsent in a prompt, or null. See [isStagedIn].
- String? get staged => _staged;
-
- /// Whether [staged] words are waiting in [target]'s prompt — the terminal the
- /// mic is being looked at on. A page swiped to afterwards is not it: its mic
- /// is at rest, and a take started there forgets the words left behind.
- bool isStagedIn(Object target) =>
- _staged != null && identical(_stagedIn, target);
-
- /// Nothing being recorded, heard, waiting in a prompt or sent — the mic at
- /// rest. A refused microphone is at rest too: nothing is in flight.
+ /// Nothing being recorded, heard or sent — the mic at rest. A refused
+ /// microphone is at rest too: nothing is in flight.
bool get isIdle =>
(_status == VoiceInputStatus.idle ||
_status == VoiceInputStatus.unavailable) &&
_heard.isEmpty &&
- _staged == null &&
!_isSending;
/// Drops the take in progress, the words held from a send that failed, and
/// the notice. A send already on its way is not recalled.
- ///
- /// Words already written into a prompt are FORGOTTEN here, not erased: they
- /// stay on the remote screen, where the keyboard can finish them. Erasing is
- /// [discardStaged].
void clear() {
if (_disposed) return;
_abandonTake();
_heard = '';
- _forgetStaged();
- _setStatus(VoiceInputStatus.idle);
- }
-
- /// Ends the take and writes its words into the prompt through [write] —
- /// typed, not sent. The next tap on the mic sends them ([sendStaged]); `×`
- /// takes them back out ([discardStaged]).
- ///
- /// [target] is the terminal written into — see [isStagedIn].
- ///
- /// [write] answers false when the terminal will not take input. The words are
- /// then held as [transcript] instead, and the mic offers to send them the old
- /// way, as a composer turn, once the terminal is back.
- ///
- /// Tapped while the microphone is still opening, there is no take yet: it is
- /// called off rather than written.
- Future<void> stage(Object target, bool Function(String text) write) async {
- if (_isSending || _disposed) return;
- if (_status == VoiceInputStatus.starting) {
- _abandonTake();
- _setStatus(VoiceInputStatus.idle);
- return;
- }
- if (_status != VoiceInputStatus.listening) return;
- if (await _transcribeTake() != _Take.heard) return;
- final text = _heard.trim();
- if (text.isEmpty || _disposed) return;
- if (!write(text)) {
- _setStatus(VoiceInputStatus.idle, notice: VoiceNotice.notSent);
- return;
- }
- _heard = '';
- _staged = text;
- _stagedIn = target;
_setStatus(VoiceInputStatus.idle);
}
- /// Sends the words [stage] wrote — [enter] presses Return in that prompt, and
- /// answers false when the terminal would not take it.
- void sendStaged(bool Function() enter) {
- if (_staged == null || _disposed) return;
- if (!enter()) {
- _setStatus(_status, notice: VoiceNotice.notSent);
- return;
- }
- _forgetStaged();
- _setStatus(VoiceInputStatus.idle);
- }
-
- /// Takes the words [stage] wrote back out of the prompt — [erase] is handed
- /// them, to delete as many characters — and puts the mic back at rest.
- void discardStaged(void Function(String text) erase) {
- final staged = _staged;
- if (staged != null) erase(staged);
- clear();
- }
-
- void _forgetStaged() {
- _staged = null;
- _stagedIn = null;
- }
-
Future<void> startListening() async {
if (_isSending || _disposed) return;
if (_status != VoiceInputStatus.idle &&
@@ -214,9 +131,6 @@ class VoiceInputController extends ChangeNotifier {
return;
}
final take = ++_take;
- // A new take is a new message. Words left waiting in another agent's prompt
- // stay there for its keyboard; this mic is no longer about them.
- _forgetStaged();
_setStatus(VoiceInputStatus.starting);
if (!await _micAllowed()) {
if (take != _take) return;
diff --git a/mobile/lib/phone/voice_mic_action.dart b/mobile/lib/phone/voice_mic_action.dart
index c26354b3d..51e8ab722 100644
--- a/mobile/lib/phone/voice_mic_action.dart
+++ b/mobile/lib/phone/voice_mic_action.dart
@@ -1,7 +1,6 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
-import 'package:xterm/xterm.dart' show TerminalKey;
import 'package:harness_mobile/terminal/terminal_session.dart';
@@ -29,44 +28,42 @@ VoiceMicAction voiceMicAction(
/// Tap to talk, tap Send — [VoiceMicMode.tapToToggle].
///
-/// The second tap ends the take, types what was heard into the terminal's
-/// prompt — [typeIntoPrompt] — and presses Return, the same as Enter on the
-/// keyboard. `×` in the pill beside the mic is the way out while it listens.
+/// The second tap ends the take and sends what was heard as a composer turn —
+/// the daemon pastes it into the prompt and presses Return. `×` in the pill
+/// beside the mic is the way out while it listens.
///
-/// The arrow face is only left for a Return that did not land: the words are in
-/// the prompt, and the next tap presses it again.
+/// ⚠️ **A composer turn, never keystrokes typed into the pane.** Typing the
+/// words and pressing Return from here puts both on the wire in the same
+/// instant, and a TUI reads characters arriving that fast as a PASTE: Codex's
+/// paste-burst guard and Claude Code's paste detection both turn the Return
+/// inside it into a newline. The words sat in the prompt, unsent, with the
+/// cursor on the line under them. The daemon's `message` path is the one that
+/// knows each engine: it pastes, waits as long as that engine needs, and
+/// presses Return again if the words are still in the composer afterwards.
///
/// ⚠️ Tapping while the microphone is still OPENING calls it off rather than
-/// writing: there is no take yet, and leaving the recording to start behind
+/// sending: there is no take yet, and leaving the recording to start behind
/// the person's back is worse than asking for one more tap.
VoiceMicAction _tapAction(VoiceInputController voice, TerminalSession session) {
final canSend = session.acceptsInput;
+ void send() => unawaited(voice.submit(session.sendComposerText));
if (voice.isSending) return _face(VoiceMicFace.busy);
- if (voice.isStagedIn(session)) {
- return _face(
- VoiceMicFace.send,
- onPressed: canSend
- ? () => voice.sendStaged(() => pressEnter(session))
- : null,
- );
- }
return switch (voice.status) {
VoiceInputStatus.transcribing => _face(VoiceMicFace.busy),
VoiceInputStatus.starting => _face(
VoiceMicFace.starting,
onPressed: () => unawaited(voice.stopListening()),
),
+ // Live even with the terminal gone: the take still has to end, and words
+ // that could not be sent are held for the retry face below.
VoiceInputStatus.listening => _face(
VoiceMicFace.listening,
- onPressed: () => unawaited(_writeAndSend(voice, session)),
+ onPressed: send,
),
- // Words held from a write or send that did not land: sent as a composer
- // turn, which is the one path that does not depend on the prompt.
+ // Words held from a send that did not land: the next tap sends them again.
_ when voice.transcript.isNotEmpty => _face(
VoiceMicFace.retry,
- onPressed: canSend
- ? () => unawaited(voice.submit(session.sendComposerText))
- : null,
+ onPressed: canSend ? send : null,
),
VoiceInputStatus.unavailable => _face(
VoiceMicFace.off,
@@ -79,53 +76,6 @@ VoiceMicAction _tapAction(VoiceInputController voice, TerminalSession session) {
};
}
-/// Ends the take, types its words into [session]'s prompt, and presses Return.
-///
-/// Two steps on the controller rather than one: [VoiceInputController.stage]
-/// is what leaves the words in the prompt, and a Return that does not land
-/// leaves them staged there — the arrow face — for the next tap to send.
-Future<void> _writeAndSend(
- VoiceInputController voice,
- TerminalSession session,
-) async {
- await voice.stage(session, (text) => typeIntoPrompt(session, text));
- if (voice.isStagedIn(session)) {
- voice.sendStaged(() => pressEnter(session));
- }
-}
-
-/// Types [text] into the terminal's prompt, as the keyboard would, without
-/// pressing Return. False when the terminal is not taking input.
-///
-/// Typed rather than pasted: it is what the keyboard's own path does with words
-/// said before a tap on the terminal, and it is what Backspace can take back
-/// one character at a time — see [eraseFromPrompt].
-bool typeIntoPrompt(TerminalSession session, String text) {
- if (!session.acceptsInput || text.isEmpty) return false;
- session.terminal.textInput(text);
- return true;
-}
-
-/// Presses Return in the terminal — the send for words [typeIntoPrompt] wrote.
-bool pressEnter(TerminalSession session) {
- if (!session.acceptsInput) return false;
- session.terminal.keyInput(TerminalKey.enter);
- return true;
-}
-
-/// Takes [text] back out of the prompt it was typed into: one Backspace per
-/// character, from the end, where the words were left.
-///
-/// ⚠️ Per character, counted in runes — `String.length` counts UTF-16 units,
-/// and an emoji would cost two Backspaces for the one character it is,
-/// deleting a character that was there before the words.
-void eraseFromPrompt(TerminalSession session, String text) {
- if (!session.acceptsInput) return;
- for (var i = 0; i < text.runes.length; i++) {
- session.terminal.keyInput(TerminalKey.backspace);
- }
-}
-
/// Hold to talk, release to send — [VoiceMicMode.holdToTalk].
///
/// The whole cycle is one gesture, so there is no state the person can be left
@@ -237,16 +187,8 @@ VoiceMicAction _face(
/// naming the state: the thumb is already down and holding, so "Listening…" is
/// the one thing the person can see for themselves, and what happens when they
/// let go is the thing they cannot.
-///
-/// [session] is the terminal the mic is on: words waiting in ITS prompt say
-/// how to send them. Words waiting in another agent's prompt are not this
-/// page's business.
-String? voiceActivityLabel(
- VoiceInputController voice, [
- TerminalSession? session,
-]) {
+String? voiceActivityLabel(VoiceInputController voice) {
if (voice.isSending) return 'Sending…';
- if (session != null && voice.isStagedIn(session)) return 'Tap ↑ to send';
return switch (voice.status) {
// ⚠️ "Wait" rather than "Starting…" in hold mode, and it is the difference
// between working and not. Opening the microphone is real hardware time, and
diff --git a/mobile/lib/phone/voice_mic_button.dart b/mobile/lib/phone/voice_mic_button.dart
index 8906c951b..8fdab2361 100644
--- a/mobile/lib/phone/voice_mic_button.dart
+++ b/mobile/lib/phone/voice_mic_button.dart
@@ -126,7 +126,6 @@ class _VoiceMicButtonState extends State<VoiceMicButton> {
bool get _lit => switch (_face) {
VoiceMicFace.starting ||
VoiceMicFace.listening ||
- VoiceMicFace.send ||
VoiceMicFace.cancelling ||
VoiceMicFace.retry => true,
VoiceMicFace.talk || VoiceMicFace.busy || VoiceMicFace.off => false,
@@ -138,7 +137,6 @@ class _VoiceMicButtonState extends State<VoiceMicButton> {
VoiceMicFace.starting => 'Cancel',
VoiceMicFace.listening =>
micHoldsToTalk ? 'Release to send' : 'Done talking',
- VoiceMicFace.send => 'Send',
VoiceMicFace.cancelling => 'Release to cancel',
VoiceMicFace.busy => 'Working',
VoiceMicFace.retry => 'Send again',
diff --git a/mobile/lib/phone/voice_mic_face.dart b/mobile/lib/phone/voice_mic_face.dart
index 0b6bf4e84..8f6bdb4b4 100644
--- a/mobile/lib/phone/voice_mic_face.dart
+++ b/mobile/lib/phone/voice_mic_face.dart
@@ -14,14 +14,10 @@ enum VoiceMicFace {
/// The microphone is opening: tap to call it off.
starting,
- /// Recording: tap Send, and what was said is written into the prompt and
- /// sent. It breathes while it listens.
+ /// Recording: tap Send, and what was said is sent. It breathes while it
+ /// listens.
listening,
- /// What was said is in the prompt and its Return did not land: tap to send
- /// it again.
- send,
-
/// Transcribing or sending: nothing to tap until that is back.
busy,
@@ -157,7 +153,7 @@ class _Glyph extends StatelessWidget {
// The mic stays the glyph while it listens; the blue fill is what
// says the next tap sends — see [voiceMicTint].
VoiceMicFace.listening => LucideIcons.mic300,
- VoiceMicFace.send || VoiceMicFace.retry => LucideIcons.arrowUp300,
+ VoiceMicFace.retry => LucideIcons.arrowUp300,
VoiceMicFace.cancelling => LucideIcons.x300,
VoiceMicFace.off => LucideIcons.micOff300,
VoiceMicFace.talk ||
diff --git a/mobile/lib/phone/voice_status_pill.dart b/mobile/lib/phone/voice_status_pill.dart
index 1db061798..fe33cfec3 100644
--- a/mobile/lib/phone/voice_status_pill.dart
+++ b/mobile/lib/phone/voice_status_pill.dart
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
import 'package:harness_mobile/shared/theme/app_theme.dart';
-import 'package:harness_mobile/terminal/terminal_session.dart';
import 'voice_input_controller.dart';
import 'voice_mic_action.dart';
@@ -11,29 +10,20 @@ import 'voice_mic_action.dart';
/// calls it off.
///
/// ```
-/// ( Listening… tap ✓ when done × ) (✓)
+/// ( Listening… tap to send × ) (🎤)
/// ```
///
-/// ⚠️ **The `×` is the way out of every step, and what it undoes depends on
-/// the step.** While the mic is opening, recording or transcribing, it throws
-/// the take away. Once the words are written into the prompt, it takes them
-/// back OUT of the prompt — they are on the remote screen by then, and a cancel
-/// that left them there would not be one. With a notice up, it dismisses it.
+/// The `×` is the way out of every step: while the mic is opening, recording
+/// or transcribing it throws the take away, with words held from a failed send
+/// it drops them, and with a notice up it dismisses it.
///
/// ⚠️ **Nothing at rest.** The pill exists only while there is something to
/// read; a label that stayed would sit over the terminal's newest lines.
class VoiceStatusPill extends StatelessWidget {
- const VoiceStatusPill({
- super.key,
- required this.voice,
- required this.session,
- });
+ const VoiceStatusPill({super.key, required this.voice});
final VoiceInputController voice;
- /// The terminal the mic is on — whose prompt staged words are erased from.
- final TerminalSession session;
-
/// The pill's height: the mic's visible circle, less a little, so the two
/// read as one control rather than two of a size.
static const double height = 36;
@@ -47,7 +37,7 @@ class VoiceStatusPill extends StatelessWidget {
final notice = voice.notice;
final label =
notice ??
- voiceActivityLabel(voice, session) ??
+ voiceActivityLabel(voice) ??
(voice.transcript.isNotEmpty ? 'Tap ↑ to send again' : null);
return AnimatedSwitcher(
duration: const Duration(milliseconds: 180),
@@ -65,20 +55,12 @@ class VoiceStatusPill extends StatelessWidget {
warn: notice != null,
// A send already on its way cannot be recalled, so no `×`
// offers to.
- onCancel: voice.isSending ? null : _cancel,
+ onCancel: voice.isSending ? null : voice.clear,
),
);
},
);
}
-
- void _cancel() {
- if (voice.isStagedIn(session)) {
- voice.discardStaged((text) => eraseFromPrompt(session, text));
- } else {
- voice.clear();
- }
- }
}
class _Pill extends StatelessWidget {
diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml
index ff89d64e8..4895757d8 100644
--- a/mobile/pubspec.yaml
+++ b/mobile/pubspec.yaml
@@ -2,7 +2,7 @@ name: harness_mobile
description: "Harness viewer for iOS and Android."
publish_to: 'none'
-version: 1.0.0+13
+version: 1.0.0+14
environment:
sdk: ^3.13.0
diff --git a/mobile/test/voice_input_controller_test.dart b/mobile/test/voice_input_controller_test.dart
index e76aab2eb..46a952e1e 100644
--- a/mobile/test/voice_input_controller_test.dart
+++ b/mobile/test/voice_input_controller_test.dart
@@ -331,89 +331,4 @@ void main() {
expect(backend.calls.single.lang, 'vi');
});
-
- group('staging: the words go into the prompt before they are sent', () {
- final prompt = Object();
-
- test('done talking writes the words, and nothing is sent', () async {
- backend.replies.add('run the tests');
- final written = <String>[];
- await voice.startListening();
- await voice.stage(prompt, (text) {
- written.add(text);
- return true;
- });
-
- expect(written, ['run the tests']);
- expect(voice.staged, 'run the tests');
- expect(voice.isStagedIn(prompt), isTrue);
- expect(voice.transcript, isEmpty);
- expect(voice.isIdle, isFalse);
- });
-
- test('send presses Return and puts the mic at rest', () async {
- backend.replies.add('run the tests');
- await voice.startListening();
- await voice.stage(prompt, (_) => true);
- var enters = 0;
- voice.sendStaged(() {
- enters++;
- return true;
- });
-
- expect(enters, 1);
- expect(voice.staged, isNull);
- expect(voice.isIdle, isTrue);
- });
-
- test('discarding hands the words back to be erased', () async {
- backend.replies.add('never mind');
- await voice.startListening();
- await voice.stage(prompt, (_) => true);
- final erased = <String>[];
- voice.discardStaged(erased.add);
-
- expect(erased, ['never mind']);
- expect(voice.isIdle, isTrue);
- });
-
- test('a prompt that will not take them keeps the words here', () async {
- backend.replies.add('run the tests');
- await voice.startListening();
- await voice.stage(prompt, (_) => false);
-
- expect(voice.staged, isNull);
- expect(voice.transcript, 'run the tests');
- expect(voice.notice, VoiceNotice.notSent);
- });
-
- test('done while the mic is still opening calls it off', () async {
- recorder.pendingPermission = Completer<bool>();
- final starting = voice.startListening();
- final written = <String>[];
- await voice.stage(prompt, (text) {
- written.add(text);
- return true;
- });
- recorder.pendingPermission!.complete(true);
- await starting;
-
- expect(written, isEmpty);
- expect(recorder.starts, 0);
- expect(voice.status, VoiceInputStatus.idle);
- });
-
- test(
- 'the keyboard taking over forgets them, and leaves them typed',
- () async {
- backend.replies.add('almost right');
- await voice.startListening();
- await voice.stage(prompt, (_) => true);
-
- expect(await voice.takeTranscript(), isEmpty);
- expect(voice.staged, isNull);
- expect(voice.isIdle, isTrue);
- },
- );
- });
}
diff --git a/mobile/test/voice_mic_fab_test.dart b/mobile/test/voice_mic_fab_test.dart
index 1ae0812fb..39566de12 100644
--- a/mobile/test/voice_mic_fab_test.dart
+++ b/mobile/test/voice_mic_fab_test.dart
@@ -2,14 +2,14 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:harness_mobile/phone/voice_input_controller.dart';
import 'package:harness_mobile/phone/voice_mic_fab.dart';
+import 'package:harness_mobile/phone/voice_notice.dart';
import 'package:harness_mobile/phone/voice_status_pill.dart';
import 'package:harness_mobile/terminal/terminal_session.dart';
import 'voice_fakes.dart';
-/// The mic over the terminal: tap to talk, tap when done — the words are typed
-/// into the prompt, unsent — and tap again to send them with Return. `×` in the
-/// pill beside it calls the take off, or takes the typed words back out.
+/// The mic over the terminal: tap to talk, tap to send — the words go as a
+/// composer turn. `×` in the pill beside it calls the take off.
void main() {
late FakeVoiceRecorder recorder;
late FakeTranscriber backend;
@@ -59,9 +59,7 @@ void main() {
Widget fab() => Row(
mainAxisSize: MainAxisSize.min,
children: [
- Flexible(
- child: VoiceStatusPill(voice: voice, session: session),
- ),
+ Flexible(child: VoiceStatusPill(voice: voice)),
VoiceMicFab(voice: voice, session: session),
],
);
@@ -80,7 +78,10 @@ void main() {
if (type == 'message') payload['content'],
];
- testWidgets('tap, talk, tap Send: the words are typed and Return pressed', (
+ // Never typed into the pane with a Return behind them: arriving together, a
+ // TUI reads the pair as a paste and the Return becomes a newline — Codex left
+ // the words in its prompt, unsent. See `_tapAction`.
+ testWidgets('tap, talk, tap Send: the words go as a composer turn', (
tester,
) async {
await pumpFab(tester);
@@ -93,10 +94,37 @@ void main() {
await tester.tap(mic);
await tester.pumpAndSettle();
- expect(typed, ['ship it', '\r']);
+ expect(sentTurns(), ['ship it']);
+ expect(typed, isEmpty);
+ expect(voice.isIdle, isTrue);
+ });
+
+ testWidgets('a send that cannot land keeps the words for the next tap', (
+ tester,
+ ) async {
+ await pumpFab(tester);
+ backend.replies.add('ship it');
+
+ await tester.tap(mic);
+ await tester.pump();
+ session.status = TerminalSessionStatus.takenOver;
+ session.notifyListeners();
+ await tester.pump();
+ await tester.tap(mic);
+ await tester.pumpAndSettle();
+
expect(sentTurns(), isEmpty);
+ expect(voice.transcript, 'ship it');
+ expect(voice.notice, VoiceNotice.notSent);
+
+ session.status = TerminalSessionStatus.controlling;
+ session.notifyListeners();
+ await tester.pump();
+ await tester.tap(mic);
+ await tester.pumpAndSettle();
+
+ expect(sentTurns(), ['ship it']);
expect(voice.isIdle, isTrue);
- expect(find.text('Tap ↑ to send'), findsNothing);
});
testWidgets('× while talking throws the take away', (tester) async {
@@ -124,25 +152,4 @@ void main() {
expect(recorder.starts, 0);
expect(frames, isEmpty);
});
-
- testWidgets('words typed on another agent do not arm this send', (
- tester,
- ) async {
- await pumpFab(tester);
- backend.replies.add('for the other one');
- final other = Object();
- await voice.startListening();
- await voice.stage(other, (_) => true);
- await tester.pump();
-
- // This page's mic is at rest: a tap starts a new take rather than
- // pressing Return in a prompt nobody here is looking at.
- expect(find.text('Tap ↑ to send'), findsNothing);
- await tester.tap(mic);
- await tester.pump();
- expect(voice.status, VoiceInputStatus.listening);
- expect(typed, isEmpty);
- voice.clear();
- await tester.pumpAndSettle();
- });
}