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.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
feat(mobile): match the QR camera's first step to On your computer, go to
tony2d5db2d13743
diff --git a/mobile/lib/phone/welcome/onboarding_copy.dart b/mobile/lib/phone/welcome/onboarding_copy.dartindex aa88838d9..e841a3193 100644--- a/mobile/lib/phone/welcome/onboarding_copy.dart+++ b/mobile/lib/phone/welcome/onboarding_copy.dart@@ -45,7 +45,8 @@ abstract final class OnboardingCopy {/// phone"): this phone needs an account before it can approve one.static const signInFirst = 'Sign in first, then approve your computer.';- /// ② The headline over the address.+ /// ② The headline over the address — and, under the camera, the first step's title, over the+ /// same address (`set_up_computer.dart`'s [computerSteps]).static const goToHeadline = 'On your computer, go to';/// ② The address, as written on the button that sends it: short enough to type off the phone.@@ -61,7 +62,7 @@ abstract final class OnboardingCopy {/// ② The first step under the link: installing Harness — the link above it is the download, so/// the step need not say so (`set_up_computer.dart`'s [goToSteps]; the second is signing in with- /// this account).+ /// this account). Under the camera, the note under the first step's address.static const installStep = 'Install Harness';/// ② Right under the account the steps name, at home: the question, and the way out after it.diff --git a/mobile/lib/phone/welcome/scan_to_connect.dart b/mobile/lib/phone/welcome/scan_to_connect.dartindex c14da99c8..81a729876 100644--- a/mobile/lib/phone/welcome/scan_to_connect.dart+++ b/mobile/lib/phone/welcome/scan_to_connect.dart@@ -30,8 +30,9 @@ const kAddPhoneWhere = 'Harness menu → Add Phone';/// │ [ camera view ] │/// └──────────────────────────────┘/// How to get the QR code ([steps]; "Signing in…" over them while it does)-/// (1) Go to autonomous.ai/go-/// Download and install on your computer+/// (1) On your computer, go to+/// autonomous.ai/go ⇪ ②'s address as words, sending the link+/// Install Harness/// (2) Sign in/// (3) Click "Add Phone"/// Harness menu → Add Phonediff --git a/mobile/lib/phone/welcome/set_up_computer.dart b/mobile/lib/phone/welcome/set_up_computer.dartindex aea5c7246..f4ce4646e 100644--- a/mobile/lib/phone/welcome/set_up_computer.dart+++ b/mobile/lib/phone/welcome/set_up_computer.dart@@ -6,6 +6,7 @@ import '../tty.dart';import '../tty_controls.dart';import 'onboarding_copy.dart';import 'scan_to_connect.dart' show kAddPhoneWhere;+import 'your_computer.dart' show GoAddressButton;/// The steps on a computer, as a timeline ([StepsTimeline]): under "On your computer, go to"'s link/// (`your_computer.dart`) — [goToSteps] — and under the camera opened from Computers —@@ -20,18 +21,18 @@ import 'scan_to_connect.dart' show kAddPhoneWhere;/// One step: what to do, and a quieter line under it when one is needed — its lines split on `\n`.typedef ComputerStep = ({String title, String? note});-/// The first step on the computer, for the camera: getting Harness there from ②'s address,-/// [OnboardingCopy.goAddress] — the download for whatever computer opens it (owner, 2026-10-14).-/// No link stands over the camera's steps, so the step names it.+/// The first step on the computer, for the camera: ②'s headline and, under it, ②'s address — as+/// words in the step, not ②'s green button ([ComputerSteps] hands it to [StepsTimeline.link]) —+/// then installing Harness, in the words ② says them in (owner, 2026-10-15). The address is the+/// download for whatever computer opens it, and a tap sends it there.////// ⚠️ **"On your computer" is said once on a screen** (owner, 2026-10-12: three times on one screen/// read as noise) — by the title over ②'s steps ("On your computer, go to"), and under the camera/// by this first step: the camera has no title of its own, and a step on its own, on a phone-/// already in Harness, read as being about this phone. The address is the title and the rest its-/// note: a title is one line ending in "…" ([StepsTimeline]).+/// already in Harness, read as being about this phone.const ComputerStep _getHarness = (- title: 'Go to ${OnboardingCopy.goAddress}',- note: 'Download and install on your computer',+ title: OnboardingCopy.goToHeadline,+ note: OnboardingCopy.installStep,);/// The steps under "On your computer, go to"'s link: get Harness from it, and sign in — with@@ -73,7 +74,7 @@ ComputerStep _signIn(String? account) =>const _howToGetCode = 'How to get the QR code';/// The steps on the computer under the camera ([computerSteps]) as a [StepsTimeline], under a-/// quiet line that says what they are for.+/// quiet line that says what they are for — with ②'s address, as words, under the first.class ComputerSteps extends StatelessWidget {const ComputerSteps({super.key, required this.account});@@ -95,7 +96,10 @@ class ComputerSteps extends StatelessWidget {),),const SizedBox(height: 12),- StepsTimeline(steps: computerSteps(account)),+ StepsTimeline(+ steps: computerSteps(account),+ link: const GoAddressButton(inline: true),+ ),],);}@@ -115,10 +119,15 @@ class ComputerSteps extends StatelessWidget {/// [heightOf] is exact: "On your computer, go to" holds that much room under its link, and the/// picture under the steps stays put.class StepsTimeline extends StatelessWidget {- const StepsTimeline({super.key, required this.steps, this.under});+ const StepsTimeline({super.key, required this.steps, this.under, this.link});final List<ComputerStep> steps;+ /// Under the first step's title, over its note, with no room of its own round it — it brings+ /// its own: under the camera, ②'s address as words ([ComputerSteps]). Not counted by [heightOf] —+ /// only ②'s own steps, which have none, are measured.+ final Widget? link;+/// Under the last step's note, as one more line of it: at home, "Not you? Sign out" under the/// account the sign-in names (`your_computer.dart`'s NotYouSignOut). Set in [noteStyle], and/// counted by [heightOf] as one line of it.@@ -167,6 +176,7 @@ class StepsTimeline extends StatelessWidget {number: i + 1,title: step.title,note: step.note,+ link: i == 0 ? link : null,under: i == steps.length - 1 ? under : null,last: i == steps.length - 1,),@@ -175,12 +185,14 @@ class StepsTimeline extends StatelessWidget {}/// One step: its number in a ring, a thread down to the next one's, what to do, and under it a-/// quieter line when one is needed — and [under] it, the last step's [StepsTimeline.under].+/// quieter line when one is needed — between them the first step's [StepsTimeline.link], and+/// [under] the note, the last step's [StepsTimeline.under].class _HowItWorksRow extends StatelessWidget {const _HowItWorksRow({required this.number,required this.title,this.note,+ this.link,this.under,this.last = false,});@@ -188,6 +200,7 @@ class _HowItWorksRow extends StatelessWidget {final int number;final String title;final String? note;+ final Widget? link;final Widget? under;final bool last;@@ -271,6 +284,7 @@ class _HowItWorksRow extends StatelessWidget {),),),+ ?link,// A line each, ending in "…" rather than wrapping: a long account wrapping onto// another would stand the steps taller than [StepsTimeline.heightOf] says.if (note case final note?)diff --git a/mobile/lib/phone/welcome/your_computer.dart b/mobile/lib/phone/welcome/your_computer.dartindex c325d1051..bf88c4e84 100644--- a/mobile/lib/phone/welcome/your_computer.dart+++ b/mobile/lib/phone/welcome/your_computer.dart@@ -285,12 +285,26 @@ class _ComputerWatchState extends State<ComputerWatch> {////// While it is up it also offers the page to a Mac nearby by Handoff ([Handoff]): signed in to the/// same Apple account, the Mac shows it in its Dock, and nothing is typed at all.+///+/// [inline], it is words in a step instead — under the camera's "On your computer, go to"+/// (`set_up_computer.dart`'s ComputerSteps): the address in green, underlined, the share mark after+/// it, and no fill (owner, 2026-10-15). The full button there outweighed the camera, the one thing+/// that page is for, and stood the first step three times as tall as the others.class GoAddressButton extends StatefulWidget {- const GoAddressButton({super.key, this.onSent});+ const GoAddressButton({super.key, this.onSent, this.inline = false});/// The share sheet sent the address somewhere — not merely opened and dismissed.final VoidCallback? onSent;+ /// Words in a step rather than the green button: see the class's note.+ final bool inline;++ /// [inline]'s height: one line of words to the eye, more than that to a thumb.+ ///+ /// ⚠️ Not 44: the room round the words is the gap between "On your computer, go to" and the+ /// address, and at 44 the two read as two lines apart rather than one sentence.+ static const double inlineHeight = 36;+@overrideState<GoAddressButton> createState() => _GoAddressButtonState();}@@ -342,7 +356,6 @@ class _GoAddressButtonState extends State<GoAddressButton> {@overrideWidget build(BuildContext context) {final tty = Tty.of(context);- final ink = tty.onFill(tty.theme.black);return Semantics(button: true,label: '${OnboardingCopy.goAddress}, Send link',@@ -357,44 +370,81 @@ class _GoAddressButtonState extends State<GoAddressButton> {HapticFeedback.lightImpact();unawaited(_send());},- child: Container(- // At least this tall, and taller when the text is larger — never clipped.- constraints: const BoxConstraints(minHeight: TtyPrimaryButton.height),- padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 10),- decoration: BoxDecoration(- // Pressed, it darkens on the finger's way DOWN, as the phone's other buttons do.- color: _down- ? Color.alphaBlend(- Colors.black.withValues(alpha: 0.18),- tty.green,- )- : tty.green,- borderRadius: BorderRadius.circular(14),- ),- child: Row(- children: [- // One line on any phone: a narrow one shrinks it rather than breaking the address.- Expanded(- child: FittedBox(- fit: BoxFit.scaleDown,- alignment: Alignment.centerLeft,- child: Text(- OnboardingCopy.goAddress,- maxLines: 1,- softWrap: false,- style: tty.style(- size: TtySize.title,- weight: FontWeight.w600,- color: ink,- ),+ child: widget.inline ? _words(tty) : _button(tty),+ ),+ );+ }++ /// Pressed, a fill or the words darken on the finger's way DOWN, as the phone's other buttons do.+ Color _pressed(Color color) => _down+ ? Color.alphaBlend(Colors.black.withValues(alpha: 0.18), color)+ : color;++ /// [GoAddressButton.inline]: the address and the share mark, in green, at the step's size — as+ /// tall as [GoAddressButton.inlineHeight], the words centred in it.+ Widget _words(Tty tty) {+ final ink = _pressed(tty.green);+ return ConstrainedBox(+ constraints: const BoxConstraints(+ minHeight: GoAddressButton.inlineHeight,+ ),+ child: Row(+ mainAxisSize: MainAxisSize.min,+ children: [+ Flexible(+ child: Text(+ OnboardingCopy.goAddress,+ maxLines: 1,+ softWrap: false,+ overflow: TextOverflow.ellipsis,+ style: tty+ .style(size: TtySize.row, weight: FontWeight.w600, color: ink)+ .copyWith(+ decoration: TextDecoration.underline,+ decorationColor: ink.withValues(alpha: 0.45),),+ ),+ ),+ const SizedBox(width: 8),+ Icon(LucideIcons.share300, size: 16, color: ink),+ ],+ ),+ );+ }++ /// The green button: the address at its left edge, the share mark at its right.+ Widget _button(Tty tty) {+ final ink = tty.onFill(tty.theme.black);+ return Container(+ // At least this tall, and taller when the text is larger — never clipped.+ constraints: const BoxConstraints(minHeight: TtyPrimaryButton.height),+ padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 10),+ decoration: BoxDecoration(+ color: _pressed(tty.green),+ borderRadius: BorderRadius.circular(14),+ ),+ child: Row(+ children: [+ // One line on any phone: a narrow one shrinks it rather than breaking the address.+ Expanded(+ child: FittedBox(+ fit: BoxFit.scaleDown,+ alignment: Alignment.centerLeft,+ child: Text(+ OnboardingCopy.goAddress,+ maxLines: 1,+ softWrap: false,+ style: tty.style(+ size: TtySize.title,+ weight: FontWeight.w600,+ color: ink,),),- const SizedBox(width: 12),- Icon(LucideIcons.share300, size: 20, color: ink),- ],+ ),),- ),+ const SizedBox(width: 12),+ Icon(LucideIcons.share300, size: 20, color: ink),+ ],),);}diff --git a/mobile/test/phone_welcome_first_screen_test.dart b/mobile/test/phone_welcome_first_screen_test.dartindex 132119bc0..511132048 100644--- a/mobile/test/phone_welcome_first_screen_test.dart+++ b/mobile/test/phone_welcome_first_screen_test.dart@@ -1,4 +1,5 @@import 'package:flutter/material.dart';+import 'package:flutter/services.dart';import 'package:flutter_test/flutter_test.dart';import 'package:harness_mobile/auth/auth_session.dart';import 'package:harness_mobile/auth/sign_in_provider.dart';@@ -10,6 +11,7 @@ import 'package:harness_mobile/phone/welcome/onboarding_picture.dart';import 'package:harness_mobile/phone/welcome/phone_welcome.dart';import 'package:harness_mobile/phone/welcome/scan_to_connect.dart';import 'package:harness_mobile/phone/welcome/set_up_computer.dart';+import 'package:harness_mobile/phone/welcome/your_computer.dart';import 'package:harness_mobile/phone/welcome/sign_in_provider_button.dart';import 'package:harness_mobile/state/app_state.dart';@@ -335,7 +337,7 @@ void main() {// ②'s address, signed in, then Add Phone — in that order.expect(find.text('How to get the QR code'), findsOneWidget);final steps = [- find.text('Go to autonomous.ai/go'),+ find.text(OnboardingCopy.goToHeadline),find.text('Sign in'),find.text('Click "Add Phone"'),];@@ -348,10 +350,40 @@ void main() {lessThan(tester.getTopLeft(steps[i]).dy),);}+ // The first step is ②'s words (owner, 2026-10-15): "On your computer, go to", the address,+ // then "Install Harness" — all above the sign-in. The address is words in the step, not ②'s+ // green button, which outweighed the camera.+ final address = find.byKey(const ValueKey('go-address'));+ final install = find.text(OnboardingCopy.installStep);+ expect(address, findsOneWidget);+ expect(install, findsOneWidget);expect(- find.text('Download and install on your computer'),+ tester.widget<GoAddressButton>(find.byType(GoAddressButton)).inline,+ isTrue,+ );+ expect(+ find.descendant(+ of: address,+ matching: find.text(OnboardingCopy.goAddress),+ ),findsOneWidget,);+ expect(+ tester.getBottomLeft(steps[0]).dy,+ lessThanOrEqualTo(tester.getTopLeft(address).dy),+ );+ expect(+ tester.getBottomLeft(address).dy,+ lessThanOrEqualTo(tester.getTopLeft(install).dy),+ );+ expect(+ tester.getBottomLeft(install).dy,+ lessThanOrEqualTo(tester.getTopLeft(steps[1]).dy),+ );+ // Indented with the step's words, not out at the ring.+ expect(tester.getTopLeft(address).dx, tester.getTopLeft(steps[0]).dx);+ expect(find.text('Go to autonomous.ai/go'), findsNothing);+ expect(find.text('Download and install on your computer'), findsNothing);expect(find.text(kAddPhoneWhere), findsOneWidget);// Signed out, there is no account for the sign-in to name.expect(find.textContaining('Use '), findsNothing);@@ -362,10 +394,80 @@ void main() {expect(email, findsOneWidget);});+ testWidgets(+ 'QR code: the address under the camera\'s first step sends the link',+ (tester) async {+ final shared = <String?>[];+ final messenger =+ TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger;+ const share = MethodChannel('dev.fluttercommunity.plus/share');+ messenger.setMockMethodCallHandler(share, (call) async {+ shared.add((call.arguments as Map)['uri'] as String?);+ return 'dev.fluttercommunity.plus/share/dismissed';+ });+ addTearDown(() => messenger.setMockMethodCallHandler(share, null));++ await pump(tester);+ await tester.tap(scan);+ await tester.pump();+ await tester.tap(find.byKey(const ValueKey('go-address')));+ await tester.pump();+ expect(shared, [OnboardingCopy.goUrl]);+ },+ );++ test('the camera\'s first step is ②\'s headline and install step', () {+ final first = computerSteps(null).first;+ expect(first.title, OnboardingCopy.goToHeadline);+ expect(first.note, OnboardingCopy.installStep);+ expect(first.note, goToSteps(null).first.title);+ });++ testWidgets('StepsTimeline: the link stands under the first title, over its note', (+ tester,+ ) async {+ const steps = <ComputerStep>[+ (title: 'First', note: 'First note'),+ (title: 'Second', note: 'Second note'),+ ];+ await tester.pumpWidget(+ const MaterialApp(+ home: Scaffold(+ body: StepsTimeline(+ steps: steps,+ link: SizedBox(key: ValueKey('link'), height: 40),+ ),+ ),+ ),+ );+ final link = find.byKey(const ValueKey('link'));+ expect(link, findsOneWidget);+ expect(+ tester.getBottomLeft(find.text('First')).dy,+ lessThanOrEqualTo(tester.getTopLeft(link).dy),+ );+ expect(+ tester.getBottomLeft(link).dy,+ lessThanOrEqualTo(tester.getTopLeft(find.text('First note')).dy),+ );+ expect(+ tester.getTopLeft(find.text('Second')).dy,+ greaterThan(tester.getBottomLeft(find.text('First note')).dy),+ );++ // With none, nothing stands between a title and its note.+ await tester.pumpWidget(+ const MaterialApp(+ home: Scaffold(body: StepsTimeline(steps: steps)),+ ),+ );+ expect(link, findsNothing);+ });+test('the camera\'s sign-in step names the account, when there is one', () {final signedIn = computerSteps('[email protected]');expect(signedIn.map((s) => s.title), [- 'Go to autonomous.ai/go',+ OnboardingCopy.goToHeadline,'Sign in','Click "Add Phone"',]);diff --git a/mobile/test/your_computer_test.dart b/mobile/test/your_computer_test.dartindex d6bf0a3ec..2bbee472b 100644--- a/mobile/test/your_computer_test.dart+++ b/mobile/test/your_computer_test.dart@@ -3,6 +3,7 @@ import 'package:flutter/services.dart';import 'package:flutter_test/flutter_test.dart';import 'package:harness_mobile/auth/auth_session.dart';import 'package:harness_mobile/core/models.dart';+import 'package:harness_mobile/phone/tty.dart';import 'package:harness_mobile/phone/welcome/onboarding_copy.dart';import 'package:harness_mobile/phone/welcome/onboarding_picture.dart';import 'package:harness_mobile/phone/welcome/your_computer.dart';@@ -101,6 +102,23 @@ void main() {OnboardingScene scene(WidgetTester tester) =>tester.widget<OnboardingPicture>(find.byType(OnboardingPicture)).scene;+ final address = find.byKey(const ValueKey('go-address'));++ /// Whether the address stands on a fill — the green button — rather than as words.+ bool filled(WidgetTester tester) => tester+ .widgetList<Container>(+ find.descendant(of: address, matching: find.byType(Container)),+ )+ .any(+ (box) =>+ box.decoration is BoxDecoration &&+ (box.decoration! as BoxDecoration).color != null,+ );++ Text words(WidgetTester tester) => tester.widget<Text>(+ find.descendant(of: address, matching: find.text(OnboardingCopy.goAddress)),+ );+testWidgets('On your computer, go to: the address, and the phone looking', (tester,) async {@@ -125,6 +143,55 @@ void main() {await unmount(tester);});+ testWidgets('② keeps the green button: the address on a fill', (+ tester,+ ) async {+ await pump(tester);+ expect(+ tester.widget<GoAddressButton>(find.byType(GoAddressButton)).inline,+ isFalse,+ );+ expect(filled(tester), isTrue);+ expect(words(tester).style!.decoration, isNot(TextDecoration.underline));+ await unmount(tester);+ });++ testWidgets(+ 'inline, the address is words: green, underlined, no fill — and it sends the link',+ (tester) async {+ setPhone(tester, largePhone);+ final semantics = tester.ensureSemantics();+ await tester.pumpWidget(+ phoneApp(+ const Scaffold(body: Center(child: GoAddressButton(inline: true))),+ ),+ );+ final tty = Tty.of(tester.element(address));+ expect(filled(tester), isFalse);+ expect(words(tester).style!.color, tty.green);+ expect(words(tester).style!.decoration, TextDecoration.underline);+ // As wide as its words, and a thumb's height all the same.+ final size = tester.getSize(address);+ expect(size.height, greaterThanOrEqualTo(GoAddressButton.inlineHeight));+ expect(size.width, lessThan(300));+ expect(+ find.bySemanticsLabel('${OnboardingCopy.goAddress}, Send link'),+ findsOneWidget,+ );++ // Pressed, the words darken on the finger's way down, and come back on its way up.+ final finger = await tester.startGesture(tester.getCenter(address));+ await tester.pump();+ expect(words(tester).style!.color, isNot(tty.green));+ await finger.up();+ await tester.pump();+ expect(words(tester).style!.color, tty.green);+ expect(shared, [OnboardingCopy.goUrl]);+ semantics.dispose();+ await unmount(tester);+ },+ );+testWidgets('the account is asked for its computers every five seconds', (tester,) async {