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.

feat(mobile): relayout Connect your computer on one left edge

tonyd1e5daeb106f
diff --git a/mobile/integration_test/first_run_journey_test.dart b/mobile/integration_test/first_run_journey_test.dart
index 4b399430a..b82a73f15 100644
--- a/mobile/integration_test/first_run_journey_test.dart
+++ b/mobile/integration_test/first_run_journey_test.dart
@@ -6,7 +6,7 @@ import 'package:harness_mobile/main.dart' as app;
/// A first-time user's walk through the real app on a fresh simulator, a screenshot at each
/// step: the welcome, Get it and its sample (hints, answering a question, Find, New with a task,
-/// the menu), leaving it, and the way in — Pair computer, then the other ways and email.
+/// the menu), leaving it, and the way in — Connect computer, then the other ways and email.
///
/// Signed out on a clean install, so nothing here can reach a real account or a real machine: the
/// sample is offline by construction (`lib/demo/`).
@@ -41,7 +41,7 @@ void main() {
}
await app.main();
- await waitFor(find.text('Connect your computer'));
+ await waitFor(find.text('Your agents\nin your pocket.'));
await shot('welcome');
// The sample, from Get it: no account, no computer.
@@ -112,7 +112,7 @@ void main() {
await wait(800);
await shot('back-to-welcome');
- // The way in: Pair computer scans the code the desktop app shows; without one, the camera's
+ // The way in: Connect computer scans the code the desktop app shows; without one, the camera's
// "Can’t scan?" has the accounts and email.
await tester.tap(find.byKey(const ValueKey('set-up-scan')));
await wait(1500);
diff --git a/mobile/lib/phone/tty_controls.dart b/mobile/lib/phone/tty_controls.dart
index 837099395..8ac9b54b9 100644
--- a/mobile/lib/phone/tty_controls.dart
+++ b/mobile/lib/phone/tty_controls.dart
@@ -49,7 +49,7 @@ class TtyPrimaryButton extends StatefulWidget {
final String label;
- /// Drawn before [label], in its ink — Pair computer's QR.
+ /// Drawn before [label], in its ink — Connect computer's QR.
final IconData? icon;
/// Null draws it disabled.
diff --git a/mobile/lib/phone/welcome/connect_computer.dart b/mobile/lib/phone/welcome/connect_computer.dart
index 2ea80af37..706be6733 100644
--- a/mobile/lib/phone/welcome/connect_computer.dart
+++ b/mobile/lib/phone/welcome/connect_computer.dart
@@ -22,18 +22,19 @@ import 'set_up_computer.dart';
///
/// ```
/// harness▌ ⚙
-/// Connect your computer
-/// Drive Claude Code and Codex from your phone.
-/// [| Signed in as ada@… Waiting for your computer…]
-/// Not you? Sign out
-/// [ ⊞ Pair computer ]
-/// HOW IT WORKS
-/// [1] Sign in on your computer
-/// With the same account.
-/// [2] Not showing up? Scan its code
-/// Mac: Harness menu · Linux: Ctrl+Shift+P, “add phone”
-/// [3] You’re connected
-/// No Harness yet? Get it › (and the sample, while it installs)
+/// Your agents
+/// in your pocket.
+/// See every session on your machines. Answer your agents from anywhere.
+/// [| Waiting for your computer… ]
+/// [email protected] · Not you? Sign out
+/// [ ⊞ Connect computer ]
+/// ① Open Harness on your computer
+/// │ Don’t have it? Get it › (and the sample, while it installs)
+/// ② Sign in on your computer
+/// │ With the same account.
+/// ③ Not showing up? Click Add Phone
+/// Mac: Harness menu
+/// Linux: Ctrl+Shift+P → add phone
/// ```
///
/// It replaces a page of its own — an email of the steps, a Terminal/Mac tab, four commands to
@@ -110,7 +111,7 @@ class _ConnectComputerPageState extends State<ConnectComputerPage> {
}
/// "No Harness on your computer yet? Get it ›": the download sent to the computer, over this
- /// page, and its "Pair computer ›" back to this page's scan. One at a time.
+ /// page, and its "Connect computer ›" back to this page's scan. One at a time.
void _openGetIt() {
if (_getIt != null) return;
final route = phoneRoute(
@@ -422,7 +423,8 @@ class _AccountLine extends StatelessWidget {
),
],
),
- textAlign: TextAlign.center,
+ // From the page's edge, with everything else on it (`set_up_computer.dart`).
+ textAlign: TextAlign.start,
style: tty.style(color: tty.faint, size: TtySize.meta),
),
),
diff --git a/mobile/lib/phone/welcome/phone_welcome.dart b/mobile/lib/phone/welcome/phone_welcome.dart
index 9d67ceaae..266b0f058 100644
--- a/mobile/lib/phone/welcome/phone_welcome.dart
+++ b/mobile/lib/phone/welcome/phone_welcome.dart
@@ -18,18 +18,19 @@ import 'set_up_computer.dart';
import 'sign_in_provider_button.dart';
/// The phone's first screen, signed out: Connect your computer ([SetUpComputerPage]) — one button,
-/// Pair computer, and Get it for somebody with no Harness on the computer yet ([GetHarnessPage]).
+/// Connect computer, and Get it for somebody with no Harness on the computer yet ([GetHarnessPage]).
///
/// ```
/// harness▌
-/// Connect your computer
-/// [ ⊞ Pair computer ] → the camera → Can’t scan? Sign in another way (a sheet)
-/// HOW IT WORKS 1 Open Add Phone… 2 Scan its code 3 You’re connected
-/// No Harness yet? Get it › → Get it → Installed? Pair computer ›
+/// Your agents in your pocket.
+/// [ ⊞ Connect computer ] → the camera → Can’t scan? Sign in another way (a sheet)
+/// ① Open Harness on your computer
+/// Don’t have it? Get it › → Get it → Installed? Connect computer ›
/// Try the sample while you wait
+/// ② Click Add Phone ③ Scan the QR code
/// ```
///
-/// **Pair computer** scans the code the desktop app shows ([ScanToConnectPage]), and the scan signs
+/// **Connect computer** scans the code the desktop app shows ([ScanToConnectPage]), and the scan signs
/// the phone in: the QR carries a one-time code the computer's own sign-in minted
/// ([AppNotifier.signInWithScan]). A QR without one — an older computer — or one that has expired
/// names the account instead: the email is filled in and its code sent, so signing in is the four
@@ -86,7 +87,7 @@ class _PhoneWelcomeState extends State<PhoneWelcome> {
/// Between a scan and the session it signs in: the scan page says so.
bool _signingInWithScan = false;
- /// Where the camera was opened from — Pair computer on the first screen, or on Get it — and so
+ /// Where the camera was opened from — Connect computer on the first screen, or on Get it — and so
/// where back from it goes ([_backFrom]).
_Step _scanFrom = _Step.hello;
diff --git a/mobile/lib/phone/welcome/scan_to_connect.dart b/mobile/lib/phone/welcome/scan_to_connect.dart
index 0e616ba8f..4763e9113 100644
--- a/mobile/lib/phone/welcome/scan_to_connect.dart
+++ b/mobile/lib/phone/welcome/scan_to_connect.dart
@@ -15,13 +15,14 @@ import '../tty.dart';
import '../tty_controls.dart';
import 'connect_code.dart';
-/// Where Add Phone… is on the computer, for somebody who has never opened it — Connect your
-/// computer's first step (`set_up_computer.dart`). The Mac keeps it in the Harness menu; the desktop
-/// app's Linux menu strip has no row for it, so there it is the command palette's
-/// (`navigation.commands`, Ctrl+Shift+P, finds the "Add phone" command).
-const kAddPhoneWhere = 'Mac: Harness menu · Linux: Ctrl+Shift+P, “add phone”';
-
-/// **Pair computer**: the camera, reading the code the desktop app shows in Add Phone
+/// Where Add Phone… is on the computer, for somebody who has never opened it — under Connect your
+/// computer's "Click Add Phone" (`set_up_computer.dart`). The Mac keeps it in the Harness menu; the
+/// desktop app's Linux menu strip has no row for it, so there it is the command palette's
+/// (`navigation.commands`, Ctrl+Shift+P, finds the "Add phone" command). A line each: one line
+/// wrapped in the middle of the Linux half.
+const kAddPhoneWhere = 'Mac: Harness menu\nLinux: Ctrl+Shift+P → add phone';
+
+/// **Connect computer**: the camera, reading the code the desktop app shows in Add Phone
/// ([ConnectCode]). The scan signs the phone in; [signingIn] says so while it does.
///
/// ```
@@ -36,9 +37,9 @@ const kAddPhoneWhere = 'Mac: Harness menu · Linux: Ctrl+Shift+P, “add phone
///
/// ⚠️ **Only the scan here (owner, 2026-10-08).** What has to happen on the computer first — get
/// Harness, open it, sign in, open Add Phone, and where that is — is the page this one is opened
-/// from (`set_up_computer.dart`, Connect your computer), and so is the line on encryption: the camera
-/// at the top and its title are the page. Centred in the room left, the camera had put every word at
-/// the foot of the screen under an empty band.
+/// from (`set_up_computer.dart`, Connect your computer): the camera at the top and its title are the
+/// page. Centred in the room left, the camera had put every word at the foot of the screen under an
+/// empty band.
///
/// The camera runs only while this page is up. A code that is not ours is ignored, so a stray QR
/// in frame does nothing. A camera refused says where to turn it on, with a link to this app's
diff --git a/mobile/lib/phone/welcome/set_up_computer.dart b/mobile/lib/phone/welcome/set_up_computer.dart
index c1e42f345..3d6770d86 100644
--- a/mobile/lib/phone/welcome/set_up_computer.dart
+++ b/mobile/lib/phone/welcome/set_up_computer.dart
@@ -15,39 +15,49 @@ import 'scan_to_connect.dart' show kAddPhoneWhere;
/// file — the Mac's, Linux's, the command line's.
const kDesktopDownloadUrl = 'https://harness.autonomous.ai/desktop';
+/// Where everything on Connect your computer starts, from either side: wider than the terminal's
+/// [Tty.origin], since the page is read, top to bottom, not scanned.
+const double _gutter = 20;
+
/// **Connect your computer** — the page a phone with no computer stands on: signed out (the first
/// screen, `phone_welcome.dart`), signed in to an account with none (`connect_computer.dart`), and
-/// Computers ▸ Set up another computer. One button, what it takes, and the way for somebody who has
-/// no Harness on the computer yet ([GetHarnessPage]).
+/// Computers ▸ Set up another computer. What Harness on a phone is for, one button, and the steps on
+/// the computer — the first with the way for somebody who has no Harness there yet ([GetHarnessPage]).
///
/// ```
/// harness▌ (⚙ once signed in: Settings)
-/// Connect your computer
-/// Drive Claude Code and Codex from your phone.
-/// [status]
-/// [ ⊞ Pair computer ]
///
-/// HOW IT WORKS
-/// [1] Open Add Phone on your computer
-/// Mac: Harness menu · Linux: Ctrl+Shift+P
-/// [2] Scan its code
-/// [3] You’re connected
-/// End-to-end encrypted.
+/// Your agents (from Computers: Set up another computer)
+/// in your pocket.
+/// See every session on your machines. Answer your agents from anywhere.
+/// [status]
+/// [ ⊞ Connect computer ]
///
-/// No Harness yet? Get it ›
+/// ① Open Harness on your computer
+/// │ Don’t have it? Get it ›
+/// ② Click Add Phone (signed in: Sign in on your computer)
+/// │ Mac: Harness menu
+/// │ Linux: Ctrl+Shift+P → add phone
+/// ③ Scan the QR code (signed in: Not showing up? Click Add Phone)
/// ```
///
+/// ⚠️ **One edge (owner, 2026-10-11).** Everything starts at [_gutter] — the wordmark, the words,
+/// the button (the page's width) and the steps' numbers. The title, a 300-wide button and "No
+/// Harness yet? Get it ›" used to be centred over steps that started at the edge, and the page read
+/// as stepping in and out. The words are the desktop's, cut down (`setup_tour.dart`, "Your agents
+/// in your pocket."): the page used to say "Harness" without ever saying what it was.
+///
/// Nothing else on it, signed out: the other ways to sign in are the camera's "Can’t scan?", where
/// a computer with no code or a phone with no camera finds out it needs them, and the sample is
/// Get it's, for somebody waiting on the computer (owner, 2026-10-09).
///
/// Short on purpose (owner, 2026-10-08): a line under a step only where the step cannot be done
-/// without it — where Add Phone is, which account.
+/// without it — where to get Harness, where Add Phone is, which account.
///
/// ⚠️ **One button, after Orca's (owner, 2026-10-08).** The first screen used to ask "Is Harness on
/// your computer?" — Yes to the camera, Not yet to a page of download rows, steps and a second scan —
/// beside Google and Apple: six ways on before anything was explained. Somebody who has Harness
-/// presses Pair computer; somebody who has not follows Get it, and comes back to the same button.
+/// presses Connect computer; somebody who has not follows Get it, and comes back to the same button.
class SetUpComputerPage extends StatelessWidget {
const SetUpComputerPage({
super.key,
@@ -61,7 +71,7 @@ class SetUpComputerPage extends StatelessWidget {
this.scanStatus,
});
- /// Pair computer: the camera, for the code the computer's Add Phone shows — it pairs this phone
+ /// Connect computer: the camera, for the code the computer's Add Phone shows — it pairs this phone
/// with it (and, signed out, signs it in).
final VoidCallback onScan;
@@ -87,133 +97,130 @@ class SetUpComputerPage extends StatelessWidget {
/// (`PhoneSettingsButton`) once signed in.
final Widget? topTrailing;
- /// What the last scan came to — pairing, or why it did not — right under Pair computer, the
+ /// What the last scan came to — pairing, or why it did not — right under Connect computer, the
/// button that started it.
final Widget? scanStatus;
- /// The steps, signed out: open Add Phone (and where it is), scan its code. Signed in: sign in on
- /// the computer with the same account — it then turns up by itself, with no code — and Add Phone,
- /// and where it is, for one that does not.
+ /// The steps after the first (Harness on the computer, with Get it). Signed out: Add Phone, and
+ /// where it is, then its code. Signed in: sign in on the computer with the same account — it then
+ /// turns up by itself, with no code — and Add Phone, and where it is, for one that does not.
///
/// ⚠️ **Where Add Phone is is said either way.** Signed in, it was left out as needed only for the
/// scan — and that is exactly when it is needed: a computer whose account already has this phone
/// does not open Add Phone by itself, and one slow to read the phone's key does not turn up.
- ({String title, String? note}) get _firstStep => switch (account) {
- null => (title: 'Open Add Phone on your computer', note: kAddPhoneWhere),
- _ when watching => (
- title: 'Sign in on your computer',
- note: 'With the same account.',
- ),
- // From Computers nothing above names the account.
- final account => (
- title: 'Sign in on your computer',
- note: 'With $account.',
- ),
+ List<({String title, String? note})> get _nextSteps => switch (account) {
+ null => const [
+ (title: 'Click Add Phone', note: kAddPhoneWhere),
+ (title: 'Scan the QR code', note: null),
+ ],
+ final account => [
+ (
+ title: 'Sign in on your computer',
+ // From Computers nothing above names the account.
+ note: watching ? 'With the same account.' : 'With $account.',
+ ),
+ (title: 'Not showing up? Click Add Phone', note: kAddPhoneWhere),
+ ],
};
- ({String title, String? note}) get _secondStep => account == null
- ? (title: 'Scan its code', note: null)
- : (title: 'Not showing up? Scan its code', note: kAddPhoneWhere);
-
@override
Widget build(BuildContext context) {
AppTheme.watch(context);
- final tty = Tty.of(context);
- final faint = tty.style(color: tty.faint, size: TtySize.meta);
- return Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- // One row whatever is in it: the back button's height, so the page starts at the same place
- // with a back or the wordmark, a trailing control or none.
- SizedBox(
- height: 44,
- child: Row(
- children: [
- if (onBack case final onBack?)
- TtyBackButton(onPressed: onBack)
- else
- const Padding(
- padding: EdgeInsets.only(left: Tty.origin),
- child: _Wordmark(),
- ),
- const Spacer(),
- ?topTrailing,
- ],
- ),
- ),
- Expanded(
- child: ListView(
- padding: const EdgeInsets.fromLTRB(Tty.origin, 32, Tty.origin, 28),
- children: [
- const _Hero(
- title: 'Connect your computer',
- body: 'Drive Claude Code and Codex from your phone.',
+ final next = _nextSteps;
+ // A tablet's width would stretch the button across the screen: a phone's column, centred.
+ return Center(
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(maxWidth: 480),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ // One row whatever is in it: the back button's height, so the page starts at the same
+ // place with a back or the wordmark, a trailing control or none.
+ SizedBox(
+ height: 44,
+ child: Row(
+ children: [
+ if (onBack case final onBack?)
+ // Its chevron sits at the terminal's origin: over to the page's edge.
+ Padding(
+ padding: const EdgeInsets.only(
+ left: _gutter - Tty.origin,
+ ),
+ child: TtyBackButton(onPressed: onBack),
+ )
+ else
+ const Padding(
+ padding: EdgeInsets.only(left: _gutter),
+ child: _Wordmark(),
+ ),
+ const Spacer(),
+ ?topTrailing,
+ ],
),
- if (status case final status?) ...[
- const SizedBox(height: 18),
- status,
- ],
- const SizedBox(height: 26),
- Center(
- child: ConstrainedBox(
- constraints: const BoxConstraints(maxWidth: 300),
- child: TtyPrimaryButton(
+ ),
+ Expanded(
+ child: ListView(
+ padding: const EdgeInsets.fromLTRB(_gutter, 36, _gutter, 28),
+ children: [
+ // From Computers the agents are on this phone already: the page is the row that
+ // was pressed.
+ if (onBack == null)
+ const _Hero(
+ title: 'Your agents\nin your pocket.',
+ body:
+ 'See every session on your machines. '
+ 'Answer your agents from anywhere.',
+ start: true,
+ )
+ else
+ const _Hero(title: 'Set up another computer', start: true),
+ if (status case final status?) ...[
+ const SizedBox(height: 18),
+ status,
+ ],
+ const SizedBox(height: 28),
+ TtyPrimaryButton(
key: const ValueKey('set-up-scan'),
icon: LucideIcons.qrCode300,
- label: 'Pair computer',
+ label: 'Connect computer',
onPressed: onScan,
),
- ),
- ),
- if (scanStatus case final scanStatus?) ...[
- const SizedBox(height: 10),
- scanStatus,
- ],
- const SizedBox(height: 40),
- Text(
- 'HOW IT WORKS',
- style: faint.copyWith(
- fontSize: 11.5,
- letterSpacing: 1.1,
- fontWeight: FontWeight.w600,
- ),
- ),
- const SizedBox(height: 4),
- _HowItWorksRow(
- number: 1,
- title: _firstStep.title,
- note: _firstStep.note,
- ),
- _HowItWorksRow(
- number: 2,
- title: _secondStep.title,
- note: _secondStep.note,
- ),
- const _HowItWorksRow(
- number: 3,
- title: 'You’re connected',
- note: 'End-to-end encrypted.',
- last: true,
- ),
- const SizedBox(height: 24),
- Center(
- child: _TextLink(
- key: const ValueKey('set-up-get-it'),
- lead: 'No Harness yet? ',
- action: 'Get it ›',
- onTap: onGetIt,
- ),
+ if (scanStatus case final scanStatus?) ...[
+ const SizedBox(height: 10),
+ scanStatus,
+ ],
+ const SizedBox(height: 36),
+ // Get it where Harness is first said: it used to be a line of its own under the
+ // steps, centred, for a question the first step raises.
+ _HowItWorksRow(
+ number: 1,
+ title: 'Open Harness on your computer',
+ link: _StepLink(
+ key: const ValueKey('set-up-get-it'),
+ lead: 'Don’t have it? ',
+ action: 'Get it ›',
+ onTap: onGetIt,
+ ),
+ ),
+ for (final (i, step) in next.indexed)
+ _HowItWorksRow(
+ number: i + 2,
+ title: step.title,
+ note: step.note,
+ last: i == next.length - 1,
+ ),
+ ],
),
- ],
- ),
+ ),
+ ],
),
- ],
+ ),
);
}
}
/// **Get it** — Harness onto the computer, from the phone: the download page's address, to type
-/// into the computer's browser (a phone cannot install it), then back to Pair computer.
+/// into the computer's browser (a phone cannot install it), then back to Connect computer.
///
/// ```
/// ‹
@@ -223,7 +230,7 @@ class SetUpComputerPage extends StatelessWidget {
/// └───────────────────────────────────┘
///
/// ⋮
-/// Installed? Pair computer › ← the foot of the screen: after the computer
+/// Installed? Connect computer › ← the foot of the screen: after the computer
/// Try the sample while you wait
/// ```
///
@@ -244,7 +251,7 @@ class GetHarnessPage extends StatelessWidget {
final VoidCallback onBack;
- /// "Pair computer ›": the camera, the same as the button on [SetUpComputerPage].
+ /// "Connect computer ›": the camera, the same as the button on [SetUpComputerPage].
final VoidCallback onPair;
/// The offline sample — what Harness is like, for somebody waiting on the computer to install.
@@ -327,7 +334,7 @@ class GetHarnessPage extends StatelessWidget {
child: _TextLink(
key: const ValueKey('get-it-pair'),
lead: 'Installed? ',
- action: 'Pair computer ›',
+ action: 'Connect computer ›',
onTap: onPair,
),
),
@@ -352,31 +359,38 @@ class GetHarnessPage extends StatelessWidget {
}
}
-/// A page's title and the sentence under it, when it has one, centred.
+/// A page's title and the sentence under it, when it has one: centred, or from the page's edge
+/// ([start]) — larger there, where it is the page's headline (Connect your computer).
class _Hero extends StatelessWidget {
- const _Hero({required this.title, this.body});
+ const _Hero({required this.title, this.body, this.start = false});
final String title;
final String? body;
+ final bool start;
@override
Widget build(BuildContext context) {
final tty = Tty.of(context);
+ final align = start ? TextAlign.start : TextAlign.center;
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
title,
- textAlign: TextAlign.center,
- style: tty
- .style(size: 24, weight: FontWeight.w600)
- .copyWith(height: 1.25, letterSpacing: -0.4),
+ textAlign: align,
+ style: start
+ ? tty
+ .style(size: 28, weight: FontWeight.w700)
+ .copyWith(height: 1.2, letterSpacing: -0.8)
+ : tty
+ .style(size: 24, weight: FontWeight.w600)
+ .copyWith(height: 1.25, letterSpacing: -0.4),
),
if (body case final body?) ...[
const SizedBox(height: 12),
Text(
body,
- textAlign: TextAlign.center,
+ textAlign: align,
style: tty.style(color: tty.faint, size: 14).copyWith(height: 1.55),
),
],
@@ -407,85 +421,165 @@ class _Wordmark extends StatelessWidget {
}
}
-/// One row of HOW IT WORKS: its number in a raised square, what to do, and a quieter line under it
-/// when one is needed — a rule between rows.
+/// 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 — or a link ([link]: Get it).
class _HowItWorksRow extends StatelessWidget {
const _HowItWorksRow({
required this.number,
required this.title,
this.note,
+ this.link,
this.last = false,
});
final int number;
final String title;
final String? note;
+ final Widget? link;
final bool last;
+ static const double _ring = 24;
+
+ /// Round a note, and a link: the same, so the steps stand the same distance apart either way.
+ static const EdgeInsets noteInsets = EdgeInsets.only(top: 2, bottom: 6);
+
@override
Widget build(BuildContext context) {
final tty = Tty.of(context);
- return Container(
- padding: const EdgeInsets.symmetric(vertical: 14),
- decoration: BoxDecoration(
- border: last
- ? null
- : Border(bottom: BorderSide(color: tty.dim.withValues(alpha: 0.6))),
- ),
+ final line = tty.dim.withValues(alpha: 0.6);
+ // As tall as its words and the space under them, so the thread runs through that space to the
+ // next ring.
+ return IntrinsicHeight(
child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
- Container(
- width: 28,
- height: 28,
- alignment: Alignment.center,
- decoration: BoxDecoration(
- color: ttyRaised(tty),
- borderRadius: BorderRadius.circular(6),
- ),
- child: Text(
- '$number',
- style: tty.style(color: tty.faint, size: TtySize.meta),
+ SizedBox(
+ width: _ring,
+ child: Column(
+ children: [
+ Container(
+ width: _ring,
+ height: _ring,
+ alignment: Alignment.center,
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ border: Border.all(color: line),
+ ),
+ child: Text(
+ '$number',
+ style: tty.style(color: tty.faint, size: TtySize.meta),
+ ),
+ ),
+ if (!last)
+ Expanded(
+ child: Container(
+ width: 1,
+ margin: const EdgeInsets.symmetric(vertical: 6),
+ color: line,
+ ),
+ ),
+ ],
),
),
const SizedBox(width: 14),
Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: [
- // Centred on the number's square while it is one line; wraps under itself after.
- ConstrainedBox(
- constraints: const BoxConstraints(minHeight: 28),
- child: Align(
- alignment: Alignment.centerLeft,
- child: Text(
- title,
- style: tty.style(
- size: TtySize.row,
- weight: FontWeight.w600,
+ child: Padding(
+ padding: EdgeInsets.only(bottom: last ? 0 : 16),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ // Centred on the ring while it is one line; wraps under itself after.
+ ConstrainedBox(
+ constraints: const BoxConstraints(minHeight: _ring),
+ child: Align(
+ alignment: Alignment.centerLeft,
+ child: Text(
+ title,
+ style: tty.style(
+ size: TtySize.row,
+ weight: FontWeight.w600,
+ ),
),
),
),
- ),
- if (note case final note?)
- Text(
- note,
- style: tty
- .style(color: tty.faint, size: TtySize.meta)
- .copyWith(height: 1.45),
+ if (note case final note?)
+ Padding(
+ padding: noteInsets,
+ child: Text(
+ note,
+ style: tty
+ .style(color: tty.faint, size: TtySize.meta)
+ .copyWith(height: 1.45),
+ ),
+ ),
+ ?link,
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+/// A step's link, where its note would be — "Don’t have it? Get it ›": faint words, and the part
+/// that acts in the terminal's green. All of it acts, with the space round it: one line of small
+/// words is little to hit.
+class _StepLink extends StatelessWidget {
+ const _StepLink({
+ super.key,
+ required this.lead,
+ required this.action,
+ required this.onTap,
+ });
+
+ final String lead;
+ final String action;
+ final VoidCallback onTap;
+
+ @override
+ Widget build(BuildContext context) {
+ final tty = Tty.of(context);
+ return Semantics(
+ button: true,
+ label: '$lead$action',
+ excludeSemantics: true,
+ child: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {
+ HapticFeedback.selectionClick();
+ onTap();
+ },
+ child: Padding(
+ padding: _HowItWorksRow.noteInsets.copyWith(right: 16),
+ child: Text.rich(
+ TextSpan(
+ children: [
+ TextSpan(text: lead),
+ TextSpan(
+ text: action,
+ style: tty.style(
+ color: tty.green,
+ size: TtySize.meta,
+ weight: FontWeight.w600,
),
+ ),
],
),
+ style: tty
+ .style(color: tty.faint, size: TtySize.meta)
+ .copyWith(height: 1.45),
),
- ],
+ ),
),
);
}
}
-/// A small centred link: faint words, and the part that acts in the terminal's green — "No Harness
-/// yet? Get it ›", "Pair computer ›". With no [lead] at all the whole link is the
-/// faint words ("Try the sample while you wait").
+/// A small centred link: faint words, and the part that acts in the terminal's green — "Installed?
+/// Connect computer ›". With no [lead] at all the whole link is the faint words ("Try the sample
+/// while you wait").
class _TextLink extends StatelessWidget {
const _TextLink({
super.key,
diff --git a/mobile/test/connect_computer_test.dart b/mobile/test/connect_computer_test.dart
index 3e69dc165..c61a9f9b5 100644
--- a/mobile/test/connect_computer_test.dart
+++ b/mobile/test/connect_computer_test.dart
@@ -107,7 +107,7 @@ void main() {
) async {
await pump(tester);
expect(find.byType(SetUpComputerPage), findsOneWidget);
- expect(find.text('Connect your computer'), findsOneWidget);
+ expect(find.text('Set up another computer'), findsOneWidget);
expect(find.text('Waiting for your computer…'), findsOneWidget);
// The sample is Get it's, for somebody waiting on the computer to install — not this page's.
expect(find.byKey(const ValueKey('get-it-sample')), findsNothing);
@@ -132,7 +132,7 @@ void main() {
tester.widget<ScanToConnectPage>(find.byType(ScanToConnectPage)).onBack();
await tester.pumpAndSettle();
expect(find.byType(ScanToConnectPage), findsNothing);
- expect(find.text('Connect your computer'), findsOneWidget);
+ expect(find.text('Set up another computer'), findsOneWidget);
expect(backs, isEmpty);
await unmount(tester);
});
diff --git a/mobile/test/first_computer_flow_test.dart b/mobile/test/first_computer_flow_test.dart
index f4adc3e85..03b73741f 100644
--- a/mobile/test/first_computer_flow_test.dart
+++ b/mobile/test/first_computer_flow_test.dart
@@ -66,7 +66,7 @@ void main() {
}
await settle();
- expect(find.text('Connect your computer'), findsOneWidget);
+ expect(find.text('Your agents\nin your pocket.'), findsOneWidget);
expect(find.text('Waiting for your computer…'), findsOneWidget);
// It appears — awake, and waiting for its phone password.
diff --git a/mobile/test/phone_edge/welcome_behavior_test.dart b/mobile/test/phone_edge/welcome_behavior_test.dart
index 5edf4bc61..affe9a8cd 100644
--- a/mobile/test/phone_edge/welcome_behavior_test.dart
+++ b/mobile/test/phone_edge/welcome_behavior_test.dart
@@ -96,7 +96,7 @@ void main() {
return (app: app, sent: sent, scans: scans);
}
- /// Pair computer, then the camera's "Can’t scan?" sheet, then its email.
+ /// Connect computer, then the camera's "Can’t scan?" sheet, then its email.
Future<void> toEmail(WidgetTester tester) async {
await tester.tap(find.byKey(const ValueKey('set-up-scan')));
await frames(tester);
@@ -153,7 +153,7 @@ void main() {
expect(find.text('Scan the code on your computer'), findsOneWidget);
await tester.binding.handlePopRoute();
await frames(tester);
- expect(find.text('Connect your computer'), findsOneWidget);
+ expect(find.text('Your agents\nin your pocket.'), findsOneWidget);
await close(tester, app);
});
@@ -171,7 +171,7 @@ void main() {
await close(tester, app);
});
- testWidgets('Get it first, then Pair computer from there, then back', (
+ testWidgets('Get it first, then Connect computer from there, then back', (
tester,
) async {
final (:app, sent: _, scans: _) = await welcome(tester);
@@ -186,7 +186,7 @@ void main() {
expect(find.text('Open this on your computer'), findsOneWidget);
await tester.tap(find.bySemanticsLabel(RegExp('Back')).first);
await frames(tester);
- expect(find.text('Connect your computer'), findsOneWidget);
+ expect(find.text('Your agents\nin your pocket.'), findsOneWidget);
await close(tester, app);
});
@@ -309,7 +309,7 @@ void main() {
),
);
await frames(tester);
- expect(find.text('Connect your computer'), findsOneWidget);
+ expect(find.text('Your agents\nin your pocket.'), findsOneWidget);
// Not watching: nothing says it is waiting for the computer.
expect(find.text('Waiting for your computer…'), findsNothing);
expect(find.text('Email me the setup link'), findsNothing);
diff --git a/mobile/test/phone_edge/welcome_layout_test.dart b/mobile/test/phone_edge/welcome_layout_test.dart
index 80015845f..d9f01684f 100644
--- a/mobile/test/phone_edge/welcome_layout_test.dart
+++ b/mobile/test/phone_edge/welcome_layout_test.dart
@@ -54,7 +54,7 @@ void main() {
final app = edgeApp(noMachines: true);
addTearDown(app.dispose);
await pump(tester, welcome(app), scale, brightness);
- expect(find.text('Connect your computer'), findsOneWidget);
+ expect(find.text('Your agents\nin your pocket.'), findsOneWidget);
await tester.drag(find.byType(ListView), const Offset(0, -2000));
await frames(tester);
});
diff --git a/mobile/test/phone_welcome_first_screen_test.dart b/mobile/test/phone_welcome_first_screen_test.dart
index 98c1755d8..da2514721 100644
--- a/mobile/test/phone_welcome_first_screen_test.dart
+++ b/mobile/test/phone_welcome_first_screen_test.dart
@@ -12,7 +12,7 @@ import 'package:harness_mobile/phone/welcome/scan_to_connect.dart';
import 'package:harness_mobile/phone/welcome/set_up_computer.dart';
import 'package:harness_mobile/state/app_state.dart';
-/// The first screen: Connect your computer — one button, Pair computer, that scans the code the
+/// The first screen: Connect your computer — one button, Connect computer, that scans the code the
/// desktop app shows; Get it behind it for a computer with no Harness yet; and the other ways to sign
/// in behind the camera's "Can’t scan?".
void main() {
@@ -120,13 +120,13 @@ void main() {
tester,
) async {
await pump(tester, onTrySample: (_) async => null);
- expect(find.text('Connect your computer'), findsOneWidget);
- expect(find.text('Pair computer'), findsOneWidget);
+ expect(find.text('Your agents\nin your pocket.'), findsOneWidget);
+ expect(find.text('Connect computer'), findsOneWidget);
for (final line in [
- 'Open Add Phone on your computer',
+ 'Open Harness on your computer',
+ 'Click Add Phone',
kAddPhoneWhere,
- 'Scan its code',
- 'You’re connected',
+ 'Scan the QR code',
]) {
expect(find.text(line), findsOneWidget, reason: line);
}
@@ -139,7 +139,7 @@ void main() {
});
testWidgets(
- 'Get it: the download page, sent to the computer, then back to Pair computer',
+ 'Get it: the download page, sent to the computer, then back to Connect computer',
(tester) async {
String? shared;
tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(
@@ -183,7 +183,7 @@ void main() {
expect(find.byType(GetHarnessPage), findsOneWidget);
await tester.tap(find.bySemanticsLabel('Back'));
await tester.pump();
- expect(find.text('Connect your computer'), findsOneWidget);
+ expect(find.text('Your agents\nin your pocket.'), findsOneWidget);
},
);
diff --git a/mobile/test/render/phone_screens_render_test.dart b/mobile/test/render/phone_screens_render_test.dart
index aca74142d..3dd8a186b 100644
--- a/mobile/test/render/phone_screens_render_test.dart
+++ b/mobile/test/render/phone_screens_render_test.dart
@@ -374,7 +374,7 @@ void main() {
scanCamera: const SizedBox(),
);
- /// Pair computer, then the camera's "Can’t scan?": the other ways to sign in, in a sheet.
+ /// Connect computer, then the camera's "Can’t scan?": the other ways to sign in, in a sheet.
Future<void> otherWays(WidgetTester tester) async {
await tester.tap(find.byKey(const ValueKey('set-up-scan')));
await tester.pump(const Duration(milliseconds: 300));