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
Desktop left pane: a + on My agents, no status marks, one right edge (#4645) (#3572)
0xken15aa870398e2f0
diff --git a/desktop/design/desktop-design-system.md b/desktop/design/desktop-design-system.mdindex 9ab3e96da..2163e40f6 100644--- a/desktop/design/desktop-design-system.md+++ b/desktop/design/desktop-design-system.md@@ -509,7 +509,7 @@ on it (anh Dee, 2026-11-07, task #4465). Every element below follows them.## Swarm left pane-The Desktop's Swarm left pane (anh Dee, 2026-11-07, task #4466) follows the+The Desktop's Swarm left pane (anh Dee, 2026-11-07, tasks #4466 and #4645) follows theSwarm's six rules: grey everywhere, colour only on agent faces; blue only forthe main action, red only for failed; 14 chat, 13 names, 12 details, and in alist bold means unread; every row a face, a name and one quiet detail on the@@ -520,21 +520,23 @@ decide. Top to bottom:autonomous.ai ⌄ org name, semibold 13 primary; ⌄ only on hover⊡ Decisions 3 inbox icon; the waiting count is the detail▦ Projects 1 grid icon; opens the grid; the detail counts tags of you- My agents ⌄ quiet heading; ⌄ only on hover; folds, remembered- ◉ Buddy ⠋ the Buddy first, by its own name and face- ◎ River harness ? a Lead's detail is the project it leads- ◉ Leftquiet offline a down agent's detail is "offline"- + New agent the last row, opens Cmd-N+ My agents ⌄ + quiet heading; ⌄ only on hover; folds, remembered; + opens Cmd-N+ ◉ Buddy the Buddy first, by its own name and face+ ◎ River harness a Lead's detail is the project it leads+ ◉ Leftquiet offline a down agent's detail is "offline"+ ◉ Kai bold: something new from it+ + New agent only while the person has no agents of their own; opens Cmd-NHumans quiet heading; opens the Leaderboard- D dee 120 the board's top 8 by points; a tap opens it+ D dee 120 the board's top 8 by points; a tap opens it⚙ Manage at the foot```| Element | Implementation | Rule || --- | --- | --- || Quiet row | `SuperTabQuietRow` (`super_tabs/buddy_rows.dart`) | 30 high, 2 under it. A 20 face (`SuperTabQuietRow.faceSize`) or a 16 icon centred in the 32 column, so every name starts on one line. Name 13 (`DesktopChrome.control`): read `textSecondary` regular, unread `textPrimary` semibold, the open row `SidebarInk.selected` with a primary name. One detail, 12 (`DesktopChrome.metadata`) in the tertiary grey (`SidebarInk.faint`, `textFaint`), right-aligned, tabular figures, no brackets; it keeps up to 40% of a row whose name is long, and is cut first. |-| Status mark | `SuperTabQuietRow.mark`, `superTabAgentMark` | My agents only, in one 20 column at the right edge after the detail, kept on every agent row so details line up. A mark only while the agent works (the spinner), needs you (`?`) or failed: grey, failed in the error ink. Idle and finished show nothing; a finished agent's unread reply is its semibold name. |-| Quiet heading | `SuperTabQuietHeading` | 12 `textSecondary`, its text level with the faces' left edge. A group that folds shows `chevronDown` (`chevronRight` folded) only while hovered or focused. |+| Shared edges | `SuperTabQuietRow`, gallery check "the left pane's details end at one edge" | Every section's rows share the left edge (the faces' and icons' column), the right edge (every detail ends `AppDesktop.controlGap` from the row's right, with no column kept for anything after it) and the baselines (30 high rows). A heading's + ends on that right edge. |+| No status marks | — | The left pane draws no spinner, check, `?` or failed mark (anh Dee 22:25, task #4645): status lives on the Tasks cards. An agent with something new is its row's semibold primary name, like an unread Slack channel; read rows stay regular, and the open row keeps its fill. |+| Quiet heading | `SuperTabQuietHeading` | 12 `textSecondary`, its text level with the faces' left edge. A group that folds shows `chevronDown` (`chevronRight` folded) only while hovered or focused. `onAdd` puts the `plus` button at its right, as on every section heading: My agents' opens New agent. || Org name | `SuperTabQuietHeading.org` | Semibold 13 primary, no icon; its chevron only on hover; opens the Swarm menu. || Person | `SuperTabAvatar.person` at 20 | A photo, or an initial on the neutral grey disc. || Projects grid | `SuperTabProjectsPage` (`super_tabs/projects_page.dart`) | Every project as a card, as repositories under a GitHub org, most recent first (the latest message in its chat or tasks). Cards at least 260 wide with 12 between them, transparent with a hairline (`DesktopChrome.rim`) and the hover fill; the name semibold 13 primary, one line 12 tertiary: its repository's `owner/name`, or Private. New project is the page's one blue button. A card opens its project's Board, which lights Projects in the left pane. |diff --git a/desktop/lib/super_tabs/buddy_rows.dart b/desktop/lib/super_tabs/buddy_rows.dartindex ffbe3d7ed..391ffcecb 100644--- a/desktop/lib/super_tabs/buddy_rows.dart+++ b/desktop/lib/super_tabs/buddy_rows.dart@@ -4,9 +4,8 @@ import 'package:flutter/material.dart';import '../shared/theme/app_icons.dart';import '../shared/theme/app_theme.dart' as grid;-import '../state/harness_activity.dart';+import '../shared/widgets/app_icon_button.dart';import '../widgets/desktop_chrome.dart';-import '../widgets/harness_activity_mark.dart';import 'buddy_chat.dart';import 'identity.dart';import 'section_heading.dart';@@ -56,8 +55,6 @@ class SuperTabQuietRow extends StatelessWidget {this.selected = false,this.unread = false,this.tooltip,- this.mark,- this.markColumn = false,});static const double height = 30;@@ -93,20 +90,10 @@ class SuperTabQuietRow extends StatelessWidget {final String? tooltip;final VoidCallback? onTap;- /// An agent's status mark, after the detail (anh Dee 11-07): only while it works, needs you or failed.- final Widget? mark;-- /// Whether the row keeps the marks' column at its right edge, so a list's marks and details line up.- final bool markColumn;-- /// The marks' column.- static const double markWidth = AppIcons.controlSize;-@overrideWidget build(BuildContext context) {grid.AppTheme.watch(context);final strong = unread || selected;- final markColumn = this.markColumn || mark != null;final nameStyle = DesktopChrome.control(color: strong? grid.SidebarInk.foreground(context)@@ -132,8 +119,7 @@ class SuperTabQuietRow extends StatelessWidget {_leadingStart -SuperTabSectionHeading.actionWidth -gap -- (detail == null ? 0 : gap) -- (markColumn ? markWidth : 0),+ (detail == null ? 0 : gap),);return ConstrainedBox(constraints: const BoxConstraints(minHeight: height),@@ -168,11 +154,6 @@ class SuperTabQuietRow extends StatelessWidget {),),],- if (markColumn)- SizedBox(- width: markWidth,- child: Center(child: mark),- ),// Unread is a semibold name, and heard in words: the row says what its face, name and detail say.if (unread) Semantics(label: 'unread'),const SizedBox(width: gap),@@ -206,24 +187,6 @@ class SuperTabQuietRow extends StatelessWidget {}}-/// An agent's status mark in the Desktop's My agents (anh Dee 11-07): the shared activity mark, grey, but failed in the-/// error ink. Only working, needs you and failed are ever drawn (`superTabAgentMark`).-class SuperTabAgentMark extends StatelessWidget {- const SuperTabAgentMark(this.activity, {super.key});- final HarnessActivity activity;-- @override- Widget build(BuildContext context) {- grid.AppTheme.watch(context);- return ActivityMark(- activity: activity,- color: activity == HarnessActivity.failed- ? Theme.of(context).colorScheme.error- : grid.SidebarInk.muted(context),- );- }-}-/// A heading of the Desktop's left pane (task #4466): 12 and secondary, its text level with the faces' left edge. A/// group that folds ([collapsed] given) shows its chevron only while hovered or focused, as every dropdown does;/// [SuperTabQuietHeading.org] is the org name, semibold 13 primary, whose chevron opens the Swarm menu.@@ -233,10 +196,16 @@ class SuperTabQuietHeading extends StatefulWidget {super.key,required this.onTap,this.collapsed,+ this.onAdd,+ this.addTooltip,+ this.addKey,}) : _org = false;const SuperTabQuietHeading.org(this.title, {super.key, required this.onTap}): collapsed = false,+ onAdd = null,+ addTooltip = null,+ addKey = null,_org = true;final String title;@@ -244,6 +213,11 @@ class SuperTabQuietHeading extends StatefulWidget {/// Whether a group that folds is folded; null for a heading that only opens a page, which has no chevron.final bool? collapsed;++ /// The + at the heading's right (task #4645), as on every section heading ([SuperTabSectionHeading.onAdd]).+ final VoidCallback? onAdd;+ final String? addTooltip;+ final Key? addKey;final bool _org;@override@@ -262,7 +236,8 @@ class _SuperTabQuietHeadingState extends State<SuperTabQuietHeading> {.copyWith(fontWeight: grid.AppFont.semibold): DesktopChrome.metadata(color: grid.SidebarInk.muted(context));final collapsed = widget.collapsed;- return MouseRegion(+ final onAdd = widget.onAdd;+ final heading = MouseRegion(onEnter: (_) => setState(() => _hovered = true),onExit: (_) => setState(() => _hovered = false),child: Semantics(@@ -303,6 +278,19 @@ class _SuperTabQuietHeadingState extends State<SuperTabQuietHeading> {),),);+ if (onAdd == null) return heading;+ // The + ends where the rows' details end, so the heading's right edge is theirs.+ return Row(+ children: [+ Expanded(child: heading),+ AppIconButton(+ key: widget.addKey,+ icon: AppIcons.plus,+ tooltip: widget.addTooltip ?? widget.title,+ onPressed: onAdd,+ ),+ ],+ );}}diff --git a/desktop/lib/super_tabs/project_sidebar.dart b/desktop/lib/super_tabs/project_sidebar.dartindex 6b2acbce9..c39f1749f 100644--- a/desktop/lib/super_tabs/project_sidebar.dart+++ b/desktop/lib/super_tabs/project_sidebar.dart@@ -577,8 +577,6 @@ class ProjectSidebar extends StatelessWidget {leading: _face(agent, name),name: name,tooltip: 'Your Buddy · ${project.name}',- mark: _quietMark(agent),- markColumn: true,detail:_detail(agent) ??switch ((agent, controller.buddyStart(project.id))) {@@ -626,13 +624,6 @@ class ProjectSidebar extends StatelessWidget {String? _detail(SuperTabAgent? agent, {String? leads}) =>superTabAgentDetail(_activity(agent), leads: leads);- /// An agent's mark in My agents ([superTabAgentMark]).- Widget? _quietMark(SuperTabAgent? agent) =>- switch (superTabAgentMark(_activity(agent))) {- final activity? => SuperTabAgentMark(activity),- null => null,- };-Widget _iconRow({required String key,required IconData icon,@@ -812,8 +803,6 @@ class ProjectSidebar extends StatelessWidget {name: name,tooltip: 'Your Buddy',detail: _detail(agent),- mark: _quietMark(agent),- markColumn: true,selected: _chatLit(chat),unread: chat != null && !muted && controller.unreadShown(chat),onTap: switch (chat) {@@ -837,10 +826,11 @@ class ProjectSidebar extends StatelessWidget {}/// My agents (Swarm v3, task #4118): the person's Buddy first, then the agents they brought, each with its face and- /// name, a Lead's naming the project it leads (task #4421), the name bold while its chat has unread, and + New agent- /// as the last row.+ /// name, a Lead's naming the project it leads (task #4421), the name bold while its chat has unread. The heading's ++ /// opens New agent (task #4645); a person with no agents of their own also gets it as a row, to start from.List<Widget> _myAgents(SuperTabSnapshot? snapshot, _SidebarReading reading) {if (snapshot == null) return const [];+ final newAgent = controller.canWrite ? onNewAgent : null;return [SuperTabQuietHeading('My agents',@@ -848,6 +838,9 @@ class ProjectSidebar extends StatelessWidget {// It folds, remembered (task #4192); its chevron shows on hover.collapsed: !controller.agentsGroupOpen,onTap: controller.toggleAgentsGroup,+ onAdd: newAgent,+ addTooltip: 'New agent',+ addKey: const ValueKey('project-sidebar-agents-add'),),if (controller.agentsGroupOpen) ...[if (controller.oneBuddy)@@ -856,13 +849,13 @@ class ProjectSidebar extends StatelessWidget {..._buddies([...snapshot.projects], reading),for (final (agent, chat) in reading.myAgents)_agentRow(snapshot, agent, chat),- // The last row opens the creation dialog, where Regular or PM is chosen.- if (controller.canWrite && onNewAgent != null)+ // With no agents yet, a row says where to start; the creation dialog chooses Regular or PM.+ if (newAgent != null && reading.myAgents.isEmpty)_iconRow(key: 'super-new-agent-row',icon: AppIcons.plus,name: 'New agent',- onTap: onNewAgent,+ onTap: newAgent,),],const SizedBox(height: grid.AppDesktop.groupGap),@@ -888,8 +881,6 @@ class ProjectSidebar extends StatelessWidget {agent,leads: pm ? snapshot.leadProjectForAgent(agent.id)?.name : null,),- mark: _quietMark(agent),- markColumn: true,selected: _chatLit(chat),unread: chat != null && controller.unreadShown(chat),onTap: switch ((chat, onOpenAgentTerminal)) {@@ -1374,13 +1365,3 @@ Set<String> superTabHiddenProjects(/// An agent's one quiet detail in the Desktop's My agents (task #4466): "offline", else the project a Lead [leads].String? superTabAgentDetail(HarnessActivity? activity, {String? leads}) =>activity == HarnessActivity.offline ? 'offline' : leads;--/// The status a My agents row marks (anh Dee 11-07): only while its agent works, needs the person or failed. Idle,-/// finished and the rest show nothing; a finished agent's unread reply is its name in semibold.-HarnessActivity? superTabAgentMark(HarnessActivity? activity) =>- switch (activity) {- HarnessActivity.working ||- HarnessActivity.needsInput ||- HarnessActivity.failed => activity,- _ => null,- };diff --git a/desktop/test/goldens/swarm-elements-dark.png b/desktop/test/goldens/swarm-elements-dark.pngindex 3de71bac0..72a04e510 100644Binary files a/desktop/test/goldens/swarm-elements-dark.png and b/desktop/test/goldens/swarm-elements-dark.png differdiff --git a/desktop/test/goldens/swarm-elements-light.png b/desktop/test/goldens/swarm-elements-light.pngindex e2eb8d04b..36ed2b5e6 100644Binary files a/desktop/test/goldens/swarm-elements-light.png and b/desktop/test/goldens/swarm-elements-light.png differdiff --git a/desktop/test/super_tab_quiet_rows_test.dart b/desktop/test/super_tab_quiet_rows_test.dartindex 5ebfb27c1..e21aa8cf1 100644--- a/desktop/test/super_tab_quiet_rows_test.dart+++ b/desktop/test/super_tab_quiet_rows_test.dart@@ -155,41 +155,34 @@ void main() {expect(styleOf(tester, 'Open').fontWeight, FontWeight.w400);});- testWidgets('marks sit in one column at the right edge, after the detail, '- 'and a row without one keeps the column', (tester) async {- const mark = SizedBox.square(key: ValueKey('mark'), dimension: 12);+ // Task #4645: no marks' column, so every row's detail ends at one right inset.+ testWidgets('every detail ends at the row\'s one right inset', (+ tester,+ ) async {await pump(tester, [SuperTabQuietRow(- key: const ValueKey('working'),+ key: const ValueKey('lead'),leading: face,name: 'River',detail: 'harness',- mark: mark,onTap: () {},),SuperTabQuietRow(- key: const ValueKey('idle'),+ key: const ValueKey('person'),leading: face,- name: 'Kestrel',- detail: 'web',- markColumn: true,+ name: 'dee',+ detail: '120',onTap: () {},),]);- final markRect = tester.getRect(find.byKey(const ValueKey('mark')));- expect(- markRect.left,- greaterThan(tester.getRect(find.text('harness')).right),- );expect(- tester.getRect(find.byKey(const ValueKey('working'))).right -- markRect.right,- lessThan(SuperTabQuietRow.markWidth),+ tester.getRect(find.byKey(const ValueKey('lead'))).right -+ tester.getTopRight(find.text('harness')).dx,+ grid.AppDesktop.controlGap,);- // Details end on one line whether the row has a mark or not.expect(tester.getTopRight(find.text('harness')).dx,- tester.getTopRight(find.text('web')).dx,+ tester.getTopRight(find.text('120')).dx,);});diff --git a/desktop/test/super_tab_v3_left_test.dart b/desktop/test/super_tab_v3_left_test.dartindex 445f3ebaa..296777184 100644--- a/desktop/test/super_tab_v3_left_test.dart+++ b/desktop/test/super_tab_v3_left_test.dart@@ -13,13 +13,16 @@ import 'package:harness/super_tabs/controller.dart';import 'package:harness/super_tabs/leaderboard/reader.dart';import 'package:harness/super_tabs/model.dart' show SuperTabAgent;import 'package:harness/super_tabs/places.dart';-import 'package:harness/state/harness_activity.dart' show HarnessActivity;+import 'package:harness/core/models.dart' show Agent;+import 'package:harness/state/harness_activity.dart'+ show HarnessActivity, harnessActivity;import 'package:harness/super_tabs/project_sidebar.dart';import 'package:harness/super_tabs/view.dart';import 'package:harness/widgets/harness_activity_mark.dart' show ActivityMark;import 'package:flutter/gestures.dart' show PointerDeviceKind;+import 'harness_activity_test.dart' show activityQuestion;import 'super_tab_activity_lists_test.dart' show load, swarm, wait;import 'support/capture.dart';import 'support/super_tab_fixture.dart';@@ -76,14 +79,15 @@ void main() {SwarmPage? page,String? boardProjectId,SuperTabLeaderboardReader? leaderboard,+ AppNotifier? withApp,}) async {final server = swarm();if (agents != null) server.state['agents'] = agents;setup?.call(server);final activity = (await tester.runAsync(() => load(server)))!;final c = activity.controller;- final AppNotifier app = createApp();- addTearDown(app.dispose);+ final app = withApp ?? createApp();+ if (withApp == null) addTearDown(app.dispose);// The design tokens follow the app's brightness, which main.dart sets from the theme.final previous = grid.AppTheme.brightness.value;grid.AppTheme.brightness.value = brightness;@@ -656,19 +660,6 @@ void main() {}});- // anh Dee 11-07 (1.3.90): idle showed a hollow circle and finished a check on every row.- test('a mark only while an agent works, needs you or failed', () {- for (final activity in HarnessActivity.values) {- expect(superTabAgentMark(activity), switch (activity) {- HarnessActivity.working ||- HarnessActivity.needsInput ||- HarnessActivity.failed => activity,- _ => null,- }, reason: '$activity');- }- expect(superTabAgentMark(null), isNull);- });-// Audit finding 9 of task #4436 (task #4444): working, waiting, offline and starting all looked the same. Since// task #4466 a state is the row's one quiet word on the right, grey, with no coloured mark.testWidgets('a row says "offline" on the right when its agent is down, '@@ -714,14 +705,17 @@ void main() {of: key('super-agent-kestrel'),matching: find.text('Kestrel Windows crew agent'),);- // No empty columns at the right: the name runs to the row's last 40 px (its mark and inset).- expect(tester.getRect(name).right, greaterThan(row.right - 40));+ // No empty columns at the right: the name runs to the row's inset (task #4645: no marks' column).+ expect(+ tester.getRect(name).right,+ greaterThan(row.right - grid.AppDesktop.controlGap - 1),+ );double? size(Finder f) => tester.widget<Text>(f).style?.fontSize;- final newAgent = find.descendant(- of: key('super-new-agent-row'),- matching: find.text('New agent'),+ final buddyName = find.descendant(+ of: key('super-swarm-buddy'),+ matching: find.text('Buddy'),);- expect(size(name), size(newAgent));+ expect(size(name), size(buddyName));expect(tester.takeException(), isNull);});@@ -838,31 +832,6 @@ void main() {expect(find.byTooltip('Kestrel'), findsNothing);});- testWidgets('+ New agent is the last row, below the agents, and hands on '- 'to the creation dialog', (tester) async {- final created = <String>[];- await show(tester, agents: mine, setup: agents, created: created);- expect(find.byTooltip('New agent'), findsNothing);- expect(- top(tester, 'super-new-agent-row'),- greaterThan(top(tester, 'super-agent-orion')),- );- expect(- top(tester, 'super-new-agent-row'),- lessThan(top(tester, 'project-sidebar-humans')),- );- expect(- find.descendant(- of: key('super-new-agent-row'),- matching: find.text('New agent'),- ),- findsOneWidget,- );- await tester.tap(key('super-new-agent-row'));- await tester.pumpAndSettle();- expect(created, ['new']);- });-// Task #4192: My agents folds with the same chevron as Projects, and the choice is remembered.testWidgets('its heading folds and unfolds it, and the choice is saved', (tester,@@ -879,11 +848,7 @@ void main() {expect(key('super-agent-kestrel'), findsOneWidget);await tester.tap(key('project-sidebar-agents'));await tester.pump();- for (final row in [- 'super-swarm-buddy',- 'super-agent-kestrel',- 'super-new-agent-row',- ]) {+ for (final row in ['super-swarm-buddy', 'super-agent-kestrel']) {expect(key(row), findsNothing, reason: row);}expect(key('project-sidebar-agents'), findsOneWidget);@@ -943,6 +908,162 @@ void main() {});});+ // Task #4645 (anh Dee 19:50 and 22:25): the left pane is calm and exactly aligned. A + on the My agents heading adds+ // an agent, rows carry no status marks, and every row's right-side detail ends at one edge in every section.+ group('a calm left pane', () {+ final buddy = {+ ..._agent('buddy', 'Buddy'),+ 'buddyScope': 'swarm',+ 'buddyOf': {'personId': 'owner'},+ };+ void agents(ConversationServer server) {+ server.state['swarmBuddy'] = true;+ (server.state['conversations'] as List)+ .cast<Map<String, dynamic>>()+ .firstWhere((g) => g['id'] == 'lead')['leadId'] =+ 'orion';+ (server.state['people'] as List).add({+ 'id': 'dee',+ 'email': '[email protected]',+ 'role': 'collaborator',+ });+ }++ SuperTabLeaderboardReader board() {+ final reader = SuperTabLeaderboardReader(+ tabId: 'tab',+ request: (method, path, {body}) async => {+ 'projectId': 'lead',+ 'week': 0,+ 'people': [+ {'personId': 'dee', 'points': 120, 'rank': 1},+ ],+ },+ );+ addTearDown(reader.dispose);+ return reader;+ }++ final heading = find.byKey(const ValueKey('project-sidebar-agents-add'));++ testWidgets('a + on the My agents heading opens New agent, and the New '+ 'agent row is gone while the person has agents', (tester) async {+ final created = <String>[];+ await show(+ tester,+ agents: [buddy, _agent('kestrel', 'Kestrel')],+ setup: agents,+ created: created,+ );+ expect(+ find.descendant(+ of: key('project-sidebar-agents'),+ matching: find.byIcon(AppIcons.plus),+ ),+ findsOneWidget,+ );+ expect(find.byTooltip('New agent'), findsOneWidget);+ // On the heading's line, at the pane's right.+ expect(+ tester.getCenter(heading).dy,+ moreOrLessEquals(tester.getCenter(key('project-sidebar-agents')).dy),+ );+ expect(+ tester.getRect(heading).right,+ greaterThan(tester.getRect(key('project-sidebar-agents')).right - 8),+ );+ expect(key('super-new-agent-row'), findsNothing);+ await tester.tap(heading);+ await tester.pump();+ expect(created, ['new']);+ });++ testWidgets('with no agents of their own, the New agent row shows too', (+ tester,+ ) async {+ await show(tester, agents: [buddy], setup: agents);+ expect(heading, findsOneWidget);+ expect(key('super-new-agent-row'), findsOneWidget);+ });++ // The old mark test went with the marks: an agent that works, needs you or failed still draws none.+ testWidgets('a working, waiting or failed agent\'s row draws no mark', (+ tester,+ ) async {+ final app = createApp(connected: true);+ addTearDown(app.dispose);+ final machine = app.stateOf('m')!;+ machine.agents = const [+ Agent(id: 'busy', name: 'Busy', engine: 'codex'),+ Agent(id: 'asks', name: 'Asks', engine: 'codex'),+ Agent(+ id: 'broke',+ name: 'Broke',+ engine: 'codex',+ launchState: 'failed',+ ),+ ];+ machine.processingAgentIds.add('busy');+ machine.blockedAgents['asks'] = activityQuestion('asks');+ for (final (id, activity) in [+ ('busy', HarnessActivity.working),+ ('asks', HarnessActivity.needsInput),+ ('broke', HarnessActivity.failed),+ ]) {+ expect(harnessActivity(app, 'm', id), activity, reason: id);+ }+ await show(+ tester,+ withApp: app,+ agents: [+ buddy,+ for (final id in ['busy', 'asks', 'broke'])+ {..._agent(id, id), 'machineId': 'm', 'harnessId': id},+ ],+ setup: agents,+ );+ for (final id in ['busy', 'asks', 'broke']) {+ expect(key('super-agent-$id'), findsOneWidget, reason: id);+ }+ expect(find.byType(ActivityMark), findsNothing);+ expect(find.byType(CircularProgressIndicator), findsNothing);+ });++ testWidgets('every right-side detail ends at one edge: a Lead\'s project '+ 'in My agents, a person\'s points in Humans', (tester) async {+ final reader = board();+ await tester.runAsync(() => reader.show('lead'));+ await show(+ tester,+ agents: [buddy, _agent('orion', 'Orion')],+ setup: agents,+ leaderboard: reader,+ );+ final project = find.descendant(+ of: key('super-agent-orion'),+ matching: find.byWidgetPredicate(+ (w) => w is Text && w.textAlign == TextAlign.right,+ ),+ );+ final points = find.descendant(+ of: key('super-human-dee'),+ matching: find.text('120'),+ );+ expect(project, findsOneWidget);+ expect(points, findsOneWidget);+ // The texts are right-aligned in their boxes: their boxes' right edges are where the words end.+ expect(+ tester.getRect(project).right,+ moreOrLessEquals(tester.getRect(points).right),+ );+ expect(+ tester.getRect(key('super-agent-orion')).right -+ tester.getRect(project).right,+ moreOrLessEquals(grid.AppDesktop.controlGap),+ );+ });+ });+// Task #4196: + New agent opens the workspace's Cmd-N form, so the view// offers it only when its workspace can open one.group('the view offers + New agent only with Cmd-N to open', () {@@ -982,13 +1103,11 @@ void main() {return c;}- testWidgets('the last row of My agents is + New agent, which opens Cmd-N', (- tester,- ) async {+ testWidgets('the + on My agents opens Cmd-N', (tester) async {var opened = 0;final c = await view(tester, withApp: true, onNewAgent: () => opened++);- expect(key('super-new-agent-row'), findsOneWidget);- await tester.tap(key('super-new-agent-row'));+ expect(key('project-sidebar-agents-add'), findsOneWidget);+ await tester.tap(key('project-sidebar-agents-add'));await tester.pump();expect(opened, 1);expect(find.text('Create agent'), findsNothing);@@ -998,6 +1117,7 @@ void main() {testWidgets('without Cmd-N to open it has none', (tester) async {final c = await view(tester, withApp: true);+ expect(key('project-sidebar-agents-add'), findsNothing);expect(key('super-new-agent-row'), findsNothing);await tester.pumpWidget(const SizedBox());c.dispose();diff --git a/desktop/test/swarm_elements_gallery_test.dart b/desktop/test/swarm_elements_gallery_test.dartindex 12e10129a..cb86a5dbe 100644--- a/desktop/test/swarm_elements_gallery_test.dart+++ b/desktop/test/swarm_elements_gallery_test.dart@@ -97,6 +97,32 @@ void main() {});}+ // Task #4645 (anh Dee 22:25): every row's right-side detail ends at one edge, in every section of the left pane, and+ // the + on a heading ends there too.+ testWidgets('the left pane\'s details end at one edge', (tester) async {+ final bars = await _show(tester, Brightness.light);+ final details = find.descendant(+ of: find.byKey(_Gallery.leftPane),+ matching: find.byWidgetPredicate(+ (w) => w is Text && w.textAlign == TextAlign.right,+ ),+ );+ final rights = {+ for (final e in details.evaluate())+ tester.getRect(find.byWidget(e.widget)).right,+ };+ expect(details.evaluate().length, greaterThan(2));+ expect(rights, hasLength(1), reason: '$rights');+ // The heading's +: its glyph's box ends on the same edge.+ final plus = find.descendant(+ of: find.byKey(_Gallery.leftPane),+ matching: find.byIcon(AppIcons.plus),+ );+ expect(plus, findsOneWidget);+ expect(tester.getRect(plus).right, moreOrLessEquals(rights.single));+ await _close(tester, bars);+ });+// Review of task #4461: a whole-image tolerance let a changed element pass. Ellis has Kai's colour with another// tilt: only its eyes and smile move.testWidgets('one changed face fails the gallery', (tester) async {@@ -214,7 +240,6 @@ List<GalleryRegion> _regions(WidgetTester tester) {of: find.byType(SuperTabTaskStatusMark),matching: find.byType(Icon),);- final agentMarks = find.byType(SuperTabAgentMark);return [for (var i = 0; i < faces.evaluate().length; i++)if (tester.widget<SuperTabAvatarFace>(faces.at(i)) case final face)@@ -244,13 +269,6 @@ List<GalleryRegion> _regions(WidgetTester tester) {rect: tester.getRect(marks.at(i)),limit: _glyph,),- for (var i = 0; i < agentMarks.evaluate().length; i++)- (- name:- 'agent mark ${tester.widget<SuperTabAgentMark>(agentMarks.at(i)).activity.name}',- rect: tester.getRect(agentMarks.at(i)),- limit: _glyph,- ),];}@@ -427,6 +445,7 @@ class _Gallery extends StatelessWidget {/// A Swarm with no tasks: the Tasks pane empty.final SuperTabController empty;+ static const leftPane = ValueKey('gallery-left-pane');/// Whose answers the decision cards read.final SuperTabDecisions decisions;@@ -516,10 +535,11 @@ class _Gallery extends StatelessWidget {crossAxisAlignment: CrossAxisAlignment.start,children: [SizedBox(+ key: _Gallery.leftPane,width: 280,child: Column(children: [- // The Desktop left pane (task #4466).+ // The Desktop left pane (tasks #4466, #4645).SuperTabQuietHeading.org('autonomous.ai', onTap: () {}),SuperTabQuietRow(leading: const Icon(@@ -535,19 +555,16 @@ class _Gallery extends StatelessWidget {'My agents',collapsed: false,onTap: () {},+ onAdd: () {},+ addTooltip: 'New agent',),- for (final (name, lead, detail, mark, selected) in [- ('River', true, 'harness', null, false),- ('Quinn', false, null, null, true),- ('Kai', false, null, HarnessActivity.working, false),- (- 'Sage',- false,- 'offline',- HarnessActivity.needsInput,- false,- ),- ('Lark', false, null, HarnessActivity.failed, false),+ // No status marks (task #4645): an agent with something new is its bold name.+ for (final (name, lead, detail, unread, selected) in [+ ('River', true, 'harness', false, false),+ ('Quinn', false, null, false, true),+ ('Kai', false, null, true, false),+ ('Sage', false, 'offline', false, false),+ ('Lark', false, null, false, false),])SuperTabQuietRow(leading: SuperTabAvatar.agent(@@ -559,8 +576,7 @@ class _Gallery extends StatelessWidget {name: name,detail: detail,selected: selected,- mark: mark == null ? null : SuperTabAgentMark(mark),- markColumn: true,+ unread: unread,onTap: () {},),SuperTabQuietHeading('Humans', onTap: () {}),