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.

ux(mobile): panel round 2 — New shows its options, Settings regrouped, Stop in red, labels on the first line

deeae6d31d16cfb
diff --git a/mobile/integration_test/tour_test.dart b/mobile/integration_test/tour_test.dart
index a3aa8c875..ffe28c8a6 100644
--- a/mobile/integration_test/tour_test.dart
+++ b/mobile/integration_test/tour_test.dart
@@ -127,10 +127,6 @@ void main() {
// New.
await swipeLeft();
await shot('new');
- if (await tapIf(find.text('options'))) {
- await wait(600);
- await shot('new-options');
- }
if (await tapIf(find.text('project'))) {
await wait(900);
await shot('chooser-project');
diff --git a/mobile/lib/phone/new_agent_page.dart b/mobile/lib/phone/new_agent_page.dart
index 2fef825d1..f94a60da6 100644
--- a/mobile/lib/phone/new_agent_page.dart
+++ b/mobile/lib/phone/new_agent_page.dart
@@ -656,9 +656,6 @@ class _NewAgentPageState extends State<NewAgentPage> {
});
}
- /// Options unfolded: branch, approvals and profile shown rather than left on their defaults.
- bool _optionsOpen = false;
-
/// The last Start did not take: the button says Try Again, and every value stays.
bool _failed = false;
@@ -816,19 +813,11 @@ class _NewAgentPageState extends State<NewAgentPage> {
? null
: () => unawaited(_chooseProject()),
),
- // Options, folded as the desktop folds them: branch, approvals and profile
- // sit on their defaults until asked for.
- TtyFormRow(
- label: 'options',
- // Left as it is nearly every time: folded to `[+]`.
- value: _optionsOpen ? '[−]' : '[+]',
- chevron: false,
- onTap: () => setState(
- () => _optionsOpen = !_optionsOpen,
- ),
- ),
- if (_optionsOpen &&
- (info != null || _gitLoading || _gitFailed))
+ // ⚠️ **Open, not folded behind `[+]` as the desktop folds them.** On a
+ // phone the rows below sit over an empty half-screen, and they are the
+ // two things worth seeing before a harness starts from a couch: which
+ // branch it writes to, and what it may do without asking.
+ if (info != null || _gitLoading || _gitFailed)
TtyFormRow(
label: 'branch',
valueColor: info == null && !_gitLoading
@@ -850,7 +839,7 @@ class _NewAgentPageState extends State<NewAgentPage> {
? null
: () => unawaited(_chooseBranch(info)),
),
- if (_optionsOpen && _permissionModes.isNotEmpty)
+ if (_permissionModes.isNotEmpty)
TtyFormRow(
label: 'approvals',
value: mode?.label ?? 'Auto-approve',
@@ -862,7 +851,7 @@ class _NewAgentPageState extends State<NewAgentPage> {
? null
: () => unawaited(_chooseApprovals()),
),
- if (_optionsOpen && _showsCodexProfile)
+ if (_showsCodexProfile)
TtyFormRow(
label: 'profile',
value: _codexProfile?.label ?? 'Default',
diff --git a/mobile/lib/phone/phone_sheet.dart b/mobile/lib/phone/phone_sheet.dart
index 33d357af0..d882cdf95 100644
--- a/mobile/lib/phone/phone_sheet.dart
+++ b/mobile/lib/phone/phone_sheet.dart
@@ -33,7 +33,8 @@ class PhoneSheetAction {
final IconData icon;
final String label;
- /// Drawn small and faint, at the foot — the action least used, kept out of the way (Stop).
+ /// Drawn small at the foot — the action least used, kept out of the way (Stop). Faint, or red
+ /// when [destructive].
final bool quiet;
/// Run AFTER the sheet has closed — see [showPhoneSheet], which pops first and then calls this.
@@ -288,7 +289,13 @@ class _TmuxMenuState extends State<_TmuxMenu> {
minHeight: 44,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: Tty.origin),
- child: TtyText(action.label, color: tty.faint, size: TtySize.meta),
+ // Small either way; red when it ends something, because faint grey at the foot of a
+ // menu is how a disabled row looks, and this one is live.
+ child: TtyText(
+ action.label,
+ color: action.destructive ? tty.red : tty.faint,
+ size: TtySize.meta,
+ ),
),
);
}
diff --git a/mobile/lib/phone/settings_page.dart b/mobile/lib/phone/settings_page.dart
index f4f928cf7..7bfb8d2cf 100644
--- a/mobile/lib/phone/settings_page.dart
+++ b/mobile/lib/phone/settings_page.dart
@@ -150,9 +150,15 @@ class _Body extends StatelessWidget {
),
children: [
SettingsCaption(_sample(context) == null ? 'Account' : 'Sample'),
+ // Who you are, what you have used, the computers you reach and what they call this phone —
+ // one group, so no row stands alone under a heading that only repeats it.
SettingsGroup(
children: [
_accountRow(context),
+ // ⚠️ Usage sits right under the account, above everything that is set once and left
+ // alone, and that is deliberate: it is the only row here anybody opens twice.
+ // No Stats row: counters this app keeps about itself are nobody's daily question.
+ buildUsageSettingsRow(context, notifier),
// The computers this phone reaches — here rather than a menu of their own: linking one is
// a once-a-while errand, and Find already reaches every agent on them.
SettingsRow(
@@ -161,33 +167,17 @@ class _Body extends StatelessWidget {
phoneRoute((_) => MachinesTab(notifier: notifier, large: false)),
),
),
- ],
- ),
- // ⚠️ Usage sits SECOND, right under the account and above the appearance settings, and that
- // is deliberate: it is the only run here anybody opens twice. Everything below it is set once
- // and left alone, so burying a figure people check daily under four preferences would be
- // ordering the list by how permanent each row is rather than by how often it is read.
- // No caption: its one row says Usage, and a heading saying it again over it said nothing.
- const SizedBox(height: 22),
- SettingsGroup(
- children: [
- // No Stats row: counters this app keeps about itself are nobody's daily question.
- buildUsageSettingsRow(context, notifier),
+ // The name those computers show when this phone takes a harness over — which makes it a
+ // fact about the account's computers, not about how the terminal looks.
+ _PhoneNameRow(notifier: notifier),
],
),
const SettingsCaption('Terminal'),
SettingsGroup(
- children: [
- _FontPreview(),
- _PhoneNameRow(notifier: notifier),
- _FontRow(),
- _SizeRow(),
- _TerminalThemeRow(),
- ],
+ children: [_FontPreview(), _FontRow(), _SizeRow(), _TerminalThemeRow()],
),
// ⚠️ **Its own section, not a row under Terminal.** The rows above answer
- // what the pane LOOKS like — face, size, colours, the name this phone
- // signs its takeovers with. This one answers what the mic HEARS, which is
+ // what the pane LOOKS like — face, size, colours. This one answers what the mic HEARS, which is
// the other half of the terminal and the one people go looking for when
// the transcript comes back in the wrong language. Under a Terminal
// caption it read as another thing about the type.
diff --git a/mobile/lib/phone/terminal_page.dart b/mobile/lib/phone/terminal_page.dart
index cc676c529..cc22f84d1 100644
--- a/mobile/lib/phone/terminal_page.dart
+++ b/mobile/lib/phone/terminal_page.dart
@@ -2446,7 +2446,7 @@ class _TerminalPageState extends State<TerminalPage>
/// share the route.
PhoneSheetAction _stopAction(Agent agent) => PhoneSheetAction(
icon: LucideIcons.trash2300,
- // The least used thing here: small and faint at the foot, not a red row (it still confirms).
+ // The least used thing here: small at the foot, not a full red row (it still confirms).
label: 'Stop this harness…',
destructive: true,
quiet: true,
diff --git a/mobile/lib/phone/tty_controls.dart b/mobile/lib/phone/tty_controls.dart
index 0fcf4ea7f..6d0951f80 100644
--- a/mobile/lib/phone/tty_controls.dart
+++ b/mobile/lib/phone/tty_controls.dart
@@ -261,35 +261,49 @@ class TtyFormRow extends StatelessWidget {
padding: const EdgeInsets.fromLTRB(Tty.origin, 10, Tty.origin, 10),
child: Row(
children: [
- SizedBox(
- width: labelWidth,
- child: TtyText(label, color: tty.faint, size: TtySize.meta),
- ),
+ // The label on the value's FIRST line: centred on a value with a note under it, it
+ // sat beside the note and read as that note's label.
Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisSize: MainAxisSize.min,
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.baseline,
+ textBaseline: TextBaseline.alphabetic,
children: [
- Text(
- value,
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: tty.style(
- color: valueColor ?? tty.text,
- size: TtySize.row,
- weight: FontWeight.w600,
- ),
+ SizedBox(
+ width: labelWidth,
+ child: TtyText(label, color: tty.faint, size: TtySize.meta),
),
- if (detail case final detail? when detail.isNotEmpty) ...[
- const SizedBox(height: 2),
- // Two lines, then an ellipsis: a note like approvals' meaning is a sentence.
- Text(
- detail,
- maxLines: 2,
- overflow: TextOverflow.ellipsis,
- style: tty.style(color: tty.faint, size: TtySize.meta),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ value,
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: tty.style(
+ color: valueColor ?? tty.text,
+ size: TtySize.row,
+ weight: FontWeight.w600,
+ ),
+ ),
+ if (detail case final detail?
+ when detail.isNotEmpty) ...[
+ const SizedBox(height: 2),
+ // Two lines, then an ellipsis: a note like approvals' meaning is a sentence.
+ Text(
+ detail,
+ maxLines: 2,
+ overflow: TextOverflow.ellipsis,
+ style: tty.style(
+ color: tty.faint,
+ size: TtySize.meta,
+ ),
+ ),
+ ],
+ ],
),
- ],
+ ),
],
),
),
diff --git a/mobile/test/phone_edge/new_behavior_test.dart b/mobile/test/phone_edge/new_behavior_test.dart
index 566f7267f..8bc46f23f 100644
--- a/mobile/test/phone_edge/new_behavior_test.dart
+++ b/mobile/test/phone_edge/new_behavior_test.dart
@@ -155,9 +155,8 @@ void main() {
await choose(tester, 'agent', 'Codex');
expect(find.text('Codex', findRichText: true), findsWidgets);
- // Options unfold: the approvals and the Codex profile.
- await tapInView(tester, find.text('options'));
- await frames(tester);
+ // The approvals and the Codex profile are on the page, not folded away.
+ expect(find.text('options'), findsNothing);
await choose(tester, 'profile', 'work');
await tapInView(tester, find.text('approvals'));
await frames(tester);
@@ -198,8 +197,6 @@ void main() {
testWidgets('the branch: this folder, a new worktree, another branch, a '
'new name', (tester) async {
final (:app, :conn) = await openNew(tester);
- await tapInView(tester, find.text('options'));
- await frames(tester);
expect(find.text('branch'), findsOneWidget);
await choose(tester, 'branch', 'New Worktree');
@@ -389,8 +386,6 @@ void main() {
phoneApp(NewAgentPage(notifier: app, machineId: 'm')),
);
await frames(tester);
- await tester.tap(find.text('options'));
- await frames(tester);
expect(
find.text('No answer from the computer', findRichText: true),
findsOneWidget,
diff --git a/mobile/test/phone_edge/new_layout_test.dart b/mobile/test/phone_edge/new_layout_test.dart
index 7f940e259..269fb690d 100644
--- a/mobile/test/phone_edge/new_layout_test.dart
+++ b/mobile/test/phone_edge/new_layout_test.dart
@@ -53,7 +53,7 @@ void main() {
});
});
- testWidgets('long names everywhere, 200 agents, options open', (
+ testWidgets('long names everywhere, 200 agents, every option shown', (
tester,
) async {
await expectNoLayoutErrors(tester, (scale, brightness) async {
@@ -67,8 +67,6 @@ void main() {
);
addTearDown(app.dispose);
await pumpNew(tester, app, scale, brightness);
- await tester.tap(find.text('options'));
- await frames(tester);
});
});
diff --git a/mobile/test/render/phone_screens_render_test.dart b/mobile/test/render/phone_screens_render_test.dart
index 4cf1160ae..acf7d3a98 100644
--- a/mobile/test/render/phone_screens_render_test.dart
+++ b/mobile/test/render/phone_screens_render_test.dart
@@ -44,7 +44,7 @@ final _outDir = Platform.environment['PHONE_RENDER_DIR'];
/// Claude Code, mid-turn, the way its TUI draws on a phone-width terminal.
const _claudeOutput = [
- '\x1b[1m⏺\x1b[0m I\'ll look at how Find ranks agents first.\r\n',
+ '\x1b[1m⏺\x1b[0m I\'ll look at how Find ranks them first.\r\n',
'\r\n',
'\x1b[32m⏺\x1b[0m \x1b[1mRead\x1b[0m(lib/phone/phone_search_rank.dart)\r\n',
' ⎿ Read \x1b[1m262\x1b[0m lines\r\n',