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): the tabs panel lists a tab's agents down the page
Dev jacob7854c02ef2d7
diff --git a/mobile/README.md b/mobile/README.mdindex a322b640d..63d6ef3a8 100644--- a/mobile/README.md+++ b/mobile/README.md@@ -56,8 +56,9 @@ and it is deliberately not the window's:What the person sees of it is one mark beside `⋯` in the terminal's header, which brings a panel upfrom the bottom (`lib/phone/desk_tabs_popup.dart`): the tabs as a row of names, and the agents of-the one picked as cards under it. A name changes the cards and nothing else, so another tab can be-read into without leaving the terminal you are in; a card is what opens one. The swipe then walks+the one picked as a list of rows under it — the Agents tab's own rows. A name changes the list and+nothing else, so another tab can be read into without leaving the terminal you are in; a row is+what opens an agent. The swipe then walksthat tab's agents rather than the whole account (`lib/phone/desk_groups.dart`).**The terminal keeps the screen**: a rail of tabs standing across the top was tried and taken out —diff --git a/mobile/RELEASE.md b/mobile/RELEASE.mdindex 0b3787322..b69c63dd4 100644--- a/mobile/RELEASE.md+++ b/mobile/RELEASE.md@@ -74,8 +74,9 @@ icon size in thirty seconds instead of in an email twenty minutes later.| `1.0.0 (23)` | 2026-09-21 | TestFlight. The tabs mark unrolls the account's tabs as a rail of names under the header — the tab you are in wears a bar under its name — instead of opening a sheet; picking one switches and puts the rail away || `1.0.0 (24)` | 2026-09-21 | TestFlight. The tabs mark brings a panel up from the bottom: the account's tabs as a row of names, and the agents of the one picked as cards beside each other. A name changes the cards alone — another tab can be read into without leaving the terminal you are in — and a card is what opens an agent || `1.0.0 (25)` | 2026-09-22 | TestFlight. Opening an agent takes its terminal again: no read-only stream and no "Take control" band in front of an agent a desktop has open, including the one the app opens on. The band is left for the case it is about — a terminal taken back off this phone |+| `1.0.0 (26)` | 2026-09-22 | TestFlight. The tabs panel lists a tab's agents DOWN the page, as the rows the Agents tab draws, instead of as cards read sideways through a letterbox |-`pubspec.yaml` is therefore at `1.0.0+26`: the repo always holds the NEXT build number, so a release+`pubspec.yaml` is therefore at `1.0.0+27`: the repo always holds the NEXT build number, so a releaseruns clean without anyone having to remember the last one.### Why the app is iPhone-onlydiff --git a/mobile/lib/phone/agent_tile.dart b/mobile/lib/phone/agent_tile.dartindex b4c3b8b16..2c69a2969 100644--- a/mobile/lib/phone/agent_tile.dart+++ b/mobile/lib/phone/agent_tile.dart@@ -26,6 +26,7 @@ class AgentTile extends StatelessWidget {required this.agent,required this.onTap,this.onLongPress,+ this.border,});final MachineState machine;@@ -33,6 +34,10 @@ class AgentTile extends StatelessWidget {final VoidCallback onTap;final VoidCallback? onLongPress;+ /// Overrides the card's hairline rim — the tabs panel marks the agent whose+ /// terminal is already on screen with it. Null keeps the ordinary rim.+ final BoxBorder? border;+@overrideWidget build(BuildContext context) {AppTheme.watch(context);@@ -40,6 +45,7 @@ class AgentTile extends StatelessWidget {height: kPhoneAgentCardHeight,onTap: agent.terminalAvailable ? onTap : null,onLongPress: onLongPress,+ border: border,child: Row(children: [PhoneCardGlyph(diff --git a/mobile/lib/phone/desk_tabs_popup.dart b/mobile/lib/phone/desk_tabs_popup.dartindex 7d36bf33a..394ef6a13 100644--- a/mobile/lib/phone/desk_tabs_popup.dart+++ b/mobile/lib/phone/desk_tabs_popup.dart@@ -4,13 +4,12 @@ import 'package:harness_mobile/core/last_opened_agent.dart' show AgentRef;import 'package:harness_mobile/shared/theme/app_theme.dart';import 'package:harness_mobile/state/app_state.dart';-import 'agent_context_line.dart';import 'agent_index.dart';+import 'agent_tile.dart';import 'desk_groups.dart';import 'desk_tab_strip.dart';import 'phone_card.dart';import 'phone_navigation.dart';-import 'terminal_header.dart' show BadgedEngineMark;/// The account's tabs, and the agents inside the one being read, as a panel up/// from the bottom of the terminal.@@ -19,15 +18,17 @@ import 'terminal_header.dart' show BadgedEngineMark;/// ────────────────────────────────/// Desktop Docker Other/// ───────-/// ┌────────┐┌────────┐┌───────-/// │ ◆● ││ ◆● ││ ◆●-/// │ api-3 ││ web ││ cli-/// │ harness││ site ││ tools-/// └────────┘└────────┘└───────+/// ┌──────────────────────────┐+/// │ ◆ api-3 Live › │+/// │ harness · Mac mini │+/// ├──────────────────────────┤+/// │ ◆ web Idle › │+/// │ site · Mac mini │+/// └──────────────────────────┘/// ```///-/// ⚠️ **Two moves, not one.** A tab name changes which agents the row below-/// offers and nothing else; opening happens on a card. That is what lets+/// ⚠️ **Two moves, not one.** A tab name changes which agents the list below+/// offers and nothing else; opening happens on a row. That is what lets/// somebody look into another tab — see what is running there — without losing/// the terminal they are in, which a sheet of tab names could not do.///@@ -36,8 +37,14 @@ import 'terminal_header.dart' show BadgedEngineMark;/// a list to reach into, so it comes up from the bottom edge like every other/// phone sheet here.///+/// ⚠️ **The agents scroll DOWN, and they are the Agents tab's own rows.** They+/// were cards side by side, which put a scroll across the panel at right+/// angles to the one every other list here has — and made a phone read four+/// agents through a letterbox. A column reads at a glance, takes long names+/// whole, and is the row an agent already has everywhere else ([AgentTile]).+////// [showing] is the agent on screen: it decides which tab the panel opens on-/// (see [activeDeskGroup]), and its card is the one wearing the rim.+/// (see [activeDeskGroup]), and its row is the one wearing the rim.Future<void> showDeskTabsPopup(BuildContext context,AppNotifier notifier, {@@ -50,6 +57,14 @@ Future<void> showDeskTabsPopup(useRootNavigator: true,showDragHandle: true,backgroundColor: AppPalette.panelBg,+ // A column of rows outgrows Flutter's 9/16 cap on the second tab of any+ // real desk — and short of the top on purpose, so the terminal underneath+ // stays recognisable while its own panel is open. Same two lines every+ // phone sheet here is built with; see [showPhoneSheet].+ isScrollControlled: true,+ constraints: BoxConstraints(+ maxHeight: MediaQuery.sizeOf(context).height * 0.85,+ ),builder: (sheetContext) => _DeskTabsPanel(groups: groups,initialId: active.id,@@ -65,7 +80,12 @@ Future<void> showDeskTabsPopup();}-/// The panel itself: the tab names, and the cards of whichever tab is picked.+/// The rows' own side inset: [phoneListPadding]'s 16, not the strip's 20. A+/// card carries its content 13 further in again, so rows lined up on the names+/// above them read as indented from them.+const double _sideInset = 16;++/// The panel itself: the tab names, and the rows of whichever tab is picked.class _DeskTabsPanel extends StatefulWidget {const _DeskTabsPanel({required this.groups,@@ -110,101 +130,47 @@ class _DeskTabsPanelState extends State<_DeskTabsPanel> {selectedId: group.id,onPick: (picked) => setState(() => _selectedId = picked.id),),- const SizedBox(height: 10),- SizedBox(- height: _cardHeight,- child: group.isEmpty- ? const _TabIsEmpty()- : ListView.separated(- scrollDirection: Axis.horizontal,- padding: const EdgeInsets.symmetric(- horizontal: DeskTabStrip.sideInset,- ),- itemCount: group.entries.length,- separatorBuilder: (context, index) =>- const SizedBox(width: kPhoneCardGap),- itemBuilder: (context, index) {- final entry = group.entries[index];- return SizedBox(- width: _cardWidth,- child: _AgentCard(- entry: entry,- showing:- entry.machineId == widget.showing.machineId &&- entry.agent.id == widget.showing.agentId,- onTap: () => widget.onOpen(group, entry),- ),- );- },- ),- ),- const SizedBox(height: 14),- ],- ),- );- }-}--/// A card's box. Three short lines of type, and wide enough that two and a bit-/// of them show at once — the half card at the edge is what says the row-/// scrolls, without a scrollbar on a phone that draws none.-const double _cardHeight = 104;-const double _cardWidth = 168;--/// One agent in the row: its engine and state, its name, and where it runs.-class _AgentCard extends StatelessWidget {- const _AgentCard({- required this.entry,- required this.showing,- required this.onTap,- });-- final AgentEntry entry;-- /// The agent whose terminal is already on screen. It keeps its card — it is- /// the one you came from, and the row would read as missing an agent without- /// it — and wears the accent rim instead.- final bool showing;-- final VoidCallback onTap;-- @override- Widget build(BuildContext context) {- AppTheme.watch(context);- return PhoneCard(- height: _cardHeight,- onTap: onTap,- border: showing- ? Border.all(color: AppPalette.accentOnSurface, width: 1.5)- : null,- child: Column(- mainAxisAlignment: MainAxisAlignment.center,- crossAxisAlignment: CrossAxisAlignment.start,- children: [- BadgedEngineMark(- agent: entry.agent,- status: entry.summary,- // The card's own fill, so the dot reads as notched into the mark.- ring: AppGlass.rowFill,- size: 26,- ),- const SizedBox(height: 8),- Text(- entry.agent.name,- maxLines: 1,- overflow: TextOverflow.ellipsis,- style: TextStyle(- color: AppPalette.textPrimary,- fontSize: 15,- fontWeight: FontWeight.w600,- height: 1.2,+ const SizedBox(height: 6),+ if (group.isEmpty)+ const _TabIsEmpty()+ else+ // Flexible, not Expanded: a tab of two agents makes a panel two+ // rows tall, and only a long one grows to the cap and scrolls.+ Flexible(+ child: ListView.separated(+ shrinkWrap: true,+ padding: EdgeInsets.fromLTRB(+ _sideInset,+ 4,+ _sideInset,+ MediaQuery.paddingOf(context).bottom + 8,+ ),+ itemCount: group.entries.length,+ separatorBuilder: (context, index) =>+ const SizedBox(height: kPhoneCardGap),+ itemBuilder: (context, index) {+ final entry = group.entries[index];+ final showing =+ entry.machineId == widget.showing.machineId &&+ entry.agent.id == widget.showing.agentId;+ return AgentTile(+ machine: entry.machine,+ agent: entry.agent,+ // The agent already on screen keeps its row — it is the one+ // you came from, and the list would read as missing an+ // agent without it — and wears the accent rim instead.+ border: showing+ ? Border.all(+ color: AppPalette.accentOnSurface,+ width: 1.5,+ )+ : null,+ onTap: () => widget.onOpen(group, entry),+ );+ },+ ),),- ),- const SizedBox(height: 3),- AgentContextLine(- project: entry.project,- machineName: entry.machineName,- ),+ const SizedBox(height: 4),],),);@@ -221,14 +187,11 @@ class _TabIsEmpty extends StatelessWidget {Widget build(BuildContext context) {AppTheme.watch(context);return Padding(- padding: const EdgeInsets.symmetric(horizontal: DeskTabStrip.sideInset),- child: Align(- alignment: Alignment.centerLeft,- child: Text(- 'Nothing here this phone can open — the machine these agents run on '- 'is asleep or wants its password.',- style: TextStyle(color: AppPalette.textSecondary, fontSize: 13.5),- ),+ padding: const EdgeInsets.fromLTRB(_sideInset, 10, _sideInset, 18),+ child: Text(+ 'Nothing here this phone can open — the machine these agents run on '+ 'is asleep or wants its password.',+ style: TextStyle(color: AppPalette.textSecondary, fontSize: 13.5),),);}diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yamlindex ab3347ed5..def64a608 100644--- a/mobile/pubspec.yaml+++ b/mobile/pubspec.yaml@@ -2,7 +2,7 @@ name: harness_mobiledescription: "Harness viewer for iOS and Android."publish_to: 'none'-version: 1.0.0+26+version: 1.0.0+27environment:sdk: ^3.13.0diff --git a/mobile/test/phone_desk_tabs_test.dart b/mobile/test/phone_desk_tabs_test.dartindex 56fd9b2e8..b6c448377 100644--- a/mobile/test/phone_desk_tabs_test.dart+++ b/mobile/test/phone_desk_tabs_test.dart@@ -4,7 +4,7 @@ import 'package:harness_mobile/phone/agent_home.dart';import 'package:harness_mobile/phone/agent_swipe.dart';import 'package:harness_mobile/phone/desk_groups.dart';import 'package:harness_mobile/phone/desk_tab_strip.dart';-import 'package:harness_mobile/phone/phone_card.dart';+import 'package:harness_mobile/phone/agent_tile.dart';import 'package:harness_mobile/phone/terminal_header.dart';import 'package:harness_mobile/phone/phone_shell_scope.dart';import 'package:harness_mobile/state/app_state.dart';@@ -74,11 +74,14 @@ void main() {await tester.pump();}- /// Tap an agent's card, which opens it and takes the panel away.- Future<void> openCard(WidgetTester tester, String agent) async {- await tester.tap(- find.ancestor(of: find.text(agent), matching: find.byType(PhoneCard)),- );+ /// An agent's row in the open panel.+ Finder row(String agent) => find.byWidgetPredicate(+ (widget) => widget is AgentTile && widget.agent.id == agent,+ );++ /// Tap an agent's row, which opens it and takes the panel away.+ Future<void> openRow(WidgetTester tester, String agent) async {+ await tester.tap(row(agent));await tester.pump();await tester.pump(const Duration(milliseconds: 400));}@@ -86,15 +89,10 @@ void main() {DeskTabStrip strip(WidgetTester tester) =>tester.widget<DeskTabStrip>(find.byType(DeskTabStrip));- /// The agents the panel is offering: one name per card.- ///- /// The name is the card's only plain [Text] — `AgentContextLine` draws the- /// line under it as a `Text.rich`, whose `data` is null.- List<String> cardsShown(WidgetTester tester) => [- for (final text in tester.widgetList<Text>(- find.descendant(of: find.byType(PhoneCard), matching: find.byType(Text)),- ))- if (text.data != null) text.data!,+ /// The agents the panel is offering, in the order it lists them.+ List<String> agentsShown(WidgetTester tester) => [+ for (final tile in tester.widgetList<AgentTile>(find.byType(AgentTile)))+ tile.agent.id,];List<String> swipesOver(WidgetTester tester) => [@@ -130,7 +128,7 @@ void main() {await openPanel(tester);expect(strip(tester).selectedId, 't1');- expect(cardsShown(tester), ['a', 'b']);+ expect(agentsShown(tester), ['a', 'b']);expect(strip(tester).groups.map((group) => group.name), ['Desktop','Docker',@@ -154,14 +152,14 @@ void main() {// The other tab's agents are on offer...expect(strip(tester).selectedId, 't2');- expect(cardsShown(tester), ['c', 'd']);+ expect(agentsShown(tester), ['c', 'd']);// ...and the phone is still in the tab it was in, on the agent it was on.// Looking into another tab is not leaving this one.expect(pager(tester).agentId, 'a');expect(swipesOver(tester), ['a', 'b']);});- testWidgets('a card opens its agent, and the swipe walks that tab', (+ testWidgets('a row opens its agent, and the swipe walks that tab', (tester,) async {await pumpHome(@@ -174,7 +172,7 @@ void main() {await openPanel(tester);await showTab(tester, 'Docker');- await openCard(tester, 'd');+ await openRow(tester, 'd');expect(pager(tester).agentId, 'd');expect(swipesOver(tester), ['c', 'd']);@@ -192,15 +190,15 @@ void main() {await openPanel(tester);await showTab(tester, kUntabbedGroupName);- expect(cardsShown(tester), ['c', 'd']);+ expect(agentsShown(tester), ['c', 'd']);- await openCard(tester, 'c');+ await openRow(tester, 'c');expect(pager(tester).agentId, 'c');expect(swipesOver(tester), ['c', 'd']);});- testWidgets('the agent on screen keeps its card, and wears the rim', (+ testWidgets('the agent on screen keeps its row, and wears the rim', (tester,) async {await pumpHome(@@ -213,11 +211,12 @@ void main() {await openPanel(tester);- PhoneCard cardOf(String agent) => tester.widget<PhoneCard>(- find.ancestor(of: find.text(agent), matching: find.byType(PhoneCard)),+ expect(+ tester.widget<AgentTile>(row('a')).border,+ isNotNull,+ reason: 'the agent on screen',);- expect(cardOf('a').border, isNotNull, reason: 'the agent on screen');- expect(cardOf('b').border, isNull);+ expect(tester.widget<AgentTile>(row('b')).border, isNull);});testWidgets('a tab this phone cannot reach is listed, and says why', (@@ -235,7 +234,7 @@ void main() {await openPanel(tester);await showTab(tester, 'Away');- expect(cardsShown(tester), isEmpty);+ expect(agentsShown(tester), isEmpty);expect(find.textContaining('asleep'), findsOneWidget);});