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.

test(mobile): the fixture's pairing client takes the label, and password pairing sends this phone's name

dee347134a52abb
diff --git a/mobile/test/app_state_pairing_test.dart b/mobile/test/app_state_pairing_test.dart
index 947642c89..323a4e1d2 100644
--- a/mobile/test/app_state_pairing_test.dart
+++ b/mobile/test/app_state_pairing_test.dart
@@ -56,6 +56,8 @@ void main() {
expect(error, isNull);
expect(rig.links.passwords.single, ('m', 'hunter2'));
+ // The computer files the pairing under this phone's own name ("Dee's iPhone").
+ expect(rig.links.labels.single, rig.app.phoneClientDescriptor().name);
expect(stages, ['connecting']);
final machine = rig.app.stateOf('m')!;
expect(machine.needsLink, isFalse);
diff --git a/mobile/test/viewer_app_fixture.dart b/mobile/test/viewer_app_fixture.dart
index fe3b5033a..5a7e61a54 100644
--- a/mobile/test/viewer_app_fixture.dart
+++ b/mobile/test/viewer_app_fixture.dart
@@ -316,6 +316,9 @@ class FakeLinks implements PeerLinkClient {
final List<(String, String)> passwords = [];
final List<(String, String, String)> codes = [];
final List<String> unlinked = [];
+
+ /// What each password pairing named this phone ("Dee's iPhone").
+ final List<String?> labels = [];
int lists = 0;
@override
@@ -324,8 +327,10 @@ class FakeLinks implements PeerLinkClient {
String password, {
void Function(String stage)? onProgress,
String? displayName,
+ String? label,
}) async {
passwords.add((machineId, password));
+ labels.add(label);
onProgress?.call('connecting');
return connectResult;
}