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.

fix(mobile): the tabs panel keeps one height whatever the tab holds

Dev jacobd861b701b2c9
diff --git a/mobile/RELEASE.md b/mobile/RELEASE.md
index b69c63dd4..6e55e80a7 100644
--- a/mobile/RELEASE.md
+++ b/mobile/RELEASE.md
@@ -75,8 +75,9 @@ icon size in thirty seconds instead of in an email twenty minutes later.
| `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 |
+| `1.0.0 (27)` | 2026-09-22 | TestFlight. The tabs panel keeps one height — half the screen — whatever the tab holds, so reading a tab of one agent after a tab of six no longer moves the names along its top |
-`pubspec.yaml` is therefore at `1.0.0+27`: the repo always holds the NEXT build number, so a release
+`pubspec.yaml` is therefore at `1.0.0+28`: the repo always holds the NEXT build number, so a release
runs clean without anyone having to remember the last one.
### Why the app is iPhone-only
diff --git a/mobile/lib/phone/desk_tabs_popup.dart b/mobile/lib/phone/desk_tabs_popup.dart
index 394ef6a13..30287fa5b 100644
--- a/mobile/lib/phone/desk_tabs_popup.dart
+++ b/mobile/lib/phone/desk_tabs_popup.dart
@@ -57,14 +57,10 @@ 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].
+ // A column of rows outgrows Flutter's 9/16 cap, which is not a height
+ // anything here asked for — see [_DeskTabsPanelState.build] for the one
+ // this panel keeps.
isScrollControlled: true,
- constraints: BoxConstraints(
- maxHeight: MediaQuery.sizeOf(context).height * 0.85,
- ),
builder: (sheetContext) => _DeskTabsPanel(
groups: groups,
initialId: active.id,
@@ -131,46 +127,48 @@ class _DeskTabsPanelState extends State<_DeskTabsPanel> {
onPick: (picked) => setState(() => _selectedId = picked.id),
),
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: 4),
+ // ⚠️ **One height, whatever the tab holds.** Sized to its contents,
+ // the panel stood up and sat down as tabs were read — a tab of one
+ // agent, then a tab of six — and the names along the top moved with
+ // it, so the next tab was somewhere else by the time the thumb got
+ // there. Half the screen: enough for four rows, and the terminal
+ // keeps the other half.
+ SizedBox(
+ height: MediaQuery.sizeOf(context).height * 0.5,
+ child: group.isEmpty
+ ? const _TabIsEmpty()
+ : ListView.separated(
+ 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.
+ border: showing
+ ? Border.all(
+ color: AppPalette.accentOnSurface,
+ width: 1.5,
+ )
+ : null,
+ onTap: () => widget.onOpen(group, entry),
+ );
+ },
+ ),
+ ),
],
),
);
diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml
index def64a608..78e3194d7 100644
--- a/mobile/pubspec.yaml
+++ b/mobile/pubspec.yaml
@@ -2,7 +2,7 @@ name: harness_mobile
description: "Harness viewer for iOS and Android."
publish_to: 'none'
-version: 1.0.0+27
+version: 1.0.0+28
environment:
sdk: ^3.13.0
diff --git a/mobile/test/phone_desk_tabs_test.dart b/mobile/test/phone_desk_tabs_test.dart
index b6c448377..ae8470424 100644
--- a/mobile/test/phone_desk_tabs_test.dart
+++ b/mobile/test/phone_desk_tabs_test.dart
@@ -198,6 +198,26 @@ void main() {
expect(swipesOver(tester), ['c', 'd']);
});
+ testWidgets('the panel stays put whatever the tab holds', (tester) async {
+ await pumpHome(
+ tester,
+ tabs: [
+ deskTab('t1', 'Desktop', ['a', 'b', 'c']),
+ deskTab('t2', 'Docker', ['d']),
+ ],
+ );
+
+ await openPanel(tester);
+ final names = tester.getTopLeft(find.byType(DeskTabStrip)).dy;
+
+ await showTab(tester, 'Docker');
+
+ // A tab of one agent after a tab of three: the panel is the same height,
+ // so the names are where the thumb left them.
+ expect(agentsShown(tester), ['d']);
+ expect(tester.getTopLeft(find.byType(DeskTabStrip)).dy, names);
+ });
+
testWidgets('the agent on screen keeps its row, and wears the rim', (
tester,
) async {