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: the chat header, Buddy card and My agents rows fit, follow renames and say what they do (#4444) (#3531)
0xken1518e98c51136a
diff --git a/desktop/lib/super_tabs/buddies.dart b/desktop/lib/super_tabs/buddies.dartindex 3c7aacf60..d72081d24 100644--- a/desktop/lib/super_tabs/buddies.dart+++ b/desktop/lib/super_tabs/buddies.dart@@ -12,6 +12,7 @@ import 'controller.dart';import 'buddy_machines.dart';import 'buddy_model.dart';import 'buddy_engine.dart';+import 'buddy_restart.dart' show readerBuddy;import 'dialog_scope.dart';import 'identity.dart';import 'model.dart';@@ -312,34 +313,122 @@ Future<void> confirmRemoveBuddy(SuperTabController c,String projectId, {String? conversationId,-}) async {- final remove = await showAppDialog<bool>(+}) {+ final chat = conversationId == null+ ? null+ : c.snapshot?.conversation(conversationId);+ final buddy = chat == null+ ? readerBuddy(c, projectId)+ : chat.agentIds+ .map((id) => c.snapshot?.agent(id))+ .whereType<SuperTabAgent>()+ .where((a) => a.isMainBuddy)+ .firstOrNull;+ return showAppDialog<void>(context: context,builder: (context) => _BuddyDialogScope(controller: c,projectId: projectId,+ child: _RemoveBuddyDialog(+ controller: c,+ projectId: projectId,+ conversationId: conversationId,+ // Named as the dialog opens: once removed, the Buddy is gone.+ name: buddy == null ? null : buddy.displayName ?? buddy.name,+ ),+ ),+ );+}++class _RemoveBuddyDialog extends StatefulWidget {+ const _RemoveBuddyDialog({+ required this.controller,+ required this.projectId,+ required this.conversationId,+ required this.name,+ });+ final SuperTabController controller;+ final String projectId;+ final String? conversationId;++ /// The Buddy's shown name; null when it is not known.+ final String? name;++ @override+ State<_RemoveBuddyDialog> createState() => _RemoveBuddyDialogState();+}++class _RemoveBuddyDialogState extends State<_RemoveBuddyDialog> {+ SuperTabController get c => widget.controller;+ bool _busy = false;+ String? _error;++ Future<void> _remove() async {+ if (_busy) return;+ setState(() {+ _busy = true;+ _error = null;+ });+ final removed = await c.removeBuddy(+ widget.projectId,+ conversationId: widget.conversationId,+ );+ if (!mounted) return;+ if (removed) {+ Navigator.pop(context);+ return;+ }+ setState(() {+ _busy = false;+ _error = c.operationError ?? "Couldn't remove the Buddy. Try again.";+ });+ }++ @override+ Widget build(BuildContext context) {+ grid.AppTheme.watch(context);+ final name = widget.name;+ return PopScope(+ canPop: !_busy,child: AlertDialog(- title: const Text('Remove Buddy?'),- content: Text(- 'Its session stops. Your chat stays, and adding a Buddy here again '- 'picks it up.',- style: DesktopChrome.text(),+ title: Text('Remove ${name ?? 'your Buddy'}?'),+ content: SizedBox(+ width: 400,+ child: Column(+ mainAxisSize: MainAxisSize.min,+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Text(+ '${name ?? 'Your Buddy'} stops. Your chat stays, and your '+ 'next Buddy here picks it up.',+ style: DesktopChrome.text(),+ ),+ if (_error case final error?) ...[+ const SizedBox(height: 12),+ Text(+ error,+ key: const ValueKey('super-buddy-remove-error'),+ style: DesktopChrome.control(+ color: grid.AppPalette.dangerFill,+ ),+ ),+ ],+ ],+ ),),actions: [TextButton(- onPressed: () => Navigator.pop(context, false),+ onPressed: _busy ? null : () => Navigator.pop(context),child: const Text('Cancel'),),FilledButton(- onPressed: () => Navigator.pop(context, true),- child: const Text('Remove'),+ style: grid.dangerButtonStyle(),+ onPressed: _busy ? null : () => unawaited(_remove()),+ child: Text(_busy ? 'Removing…' : 'Remove'),),],),- ),- );- if (remove == true) {- await c.removeBuddy(projectId, conversationId: conversationId);+ );}}diff --git a/desktop/lib/super_tabs/buddy_card.dart b/desktop/lib/super_tabs/buddy_card.dartindex 49df55466..dc23c3083 100644--- a/desktop/lib/super_tabs/buddy_card.dart+++ b/desktop/lib/super_tabs/buddy_card.dart@@ -76,6 +76,8 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {}Agent? get _agent => buddyMachineAgent(c, widget.projectId, app);+ AgentRestartAttempt? get _unconfirmed =>+ unconfirmedBuddyRestart(c, widget.projectId, app);void _open() {final box = context.findRenderObject() as RenderBox?;@@ -93,8 +95,11 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {_flagsFocused = false;if (_busy) return;_words = [...?_agent?.launchArgs];- _marked = _message = null;- _warning = false;+ _marked = null;+ // A restart whose answer was lost is still unconfirmed when it reopens.+ final unconfirmed = _unconfirmed != null;+ _message = unconfirmed ? BuddyRestartResult.unconfirmed.message : null;+ _warning = unconfirmed;});_portal.show();// The card takes the focus from the button so Esc and Tab act in it.@@ -119,12 +124,14 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {return KeyEventResult.ignored;}- Future<void> _restart(Agent agent) async {+ /// Restarts the Buddy with the card's flags, or with [check] asks the+ /// machine whether that unconfirmed restart happened.+ Future<void> _restart(Agent agent, {AgentRestartAttempt? check}) async {final app = this.app;if (_busy || app == null) return;// Text typed but not yet a chip is part of the flags.final field = _fieldKey.currentState;- final words = field == null ? _words : field.takePending();+ final words = field == null || check != null ? _words : field.takePending();if (words == null) {setState(() {_marked = null;@@ -144,6 +151,7 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {app,text: launchArgsLine(words),saved: launchArgsLine(agent.launchArgs),+ check: check,);// The card may have been closed meanwhile: the result is kept for the// next open.@@ -156,7 +164,9 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {setState(() {_busy = false;_message = result.message;- _warning = result.outcome == BuddyRestartOutcome.ignored;+ _warning =+ result.outcome == BuddyRestartOutcome.ignored ||+ result.outcome == BuddyRestartOutcome.unconfirmed;_marked = result.outcome == BuddyRestartOutcome.refused? _named(result.message): null;@@ -285,7 +295,17 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {Widget _card(BuildContext context) {final highContrast = MediaQuery.highContrastOf(context);final buddy = readerBuddy(c, widget.projectId);- final agent = _agent;+ final state = buddy == null ? null : app?.stateOf(buddy.machineId);+ // What an offline computer last listed, or a list not read yet, says+ // nothing true of the Buddy now: neither Running nor Stopped.+ final unreachable =+ buddy != null &&+ app != null &&+ (state == null ||+ state.isOffline ||+ state.needsLink ||+ state.agentLoadStatus != AgentLoadStatus.loaded);+ final agent = unreachable ? null : _agent;final editable = c.canWrite && !c.saving && !c.hasPendingAction;final canRestart =editable &&@@ -304,7 +324,11 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {? grid.AppPalette.online: DesktopChrome.hint;final status = _busy- ? 'Restarting…'+ ? _unconfirmed != null+ ? 'Checking…'+ : 'Restarting…'+ : unreachable+ ? "Can't reach $machine": live? 'Running': 'Stopped';@@ -374,7 +398,15 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {child: const SizedBox.square(dimension: _gap),),const SizedBox(width: _gap),- Text(status, style: DesktopChrome.metadata()),+ // A long computer name ends in an ellipsis.+ Flexible(+ child: Text(+ status,+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ style: DesktopChrome.metadata(),+ ),+ ),],),],@@ -383,6 +415,14 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {],),fact('Runs on', machine),+ if (unreachable) ...[+ const SizedBox(height: _gap),+ Text(+ 'Restart and launch flags come back when $machine '+ 'answers.',+ style: DesktopChrome.metadata(),+ ),+ ],if (canRestart) ..._flags(agent, engine, machine),if (_message case final message?) ...[const SizedBox(height: _gap),@@ -440,6 +480,8 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {required bool editable,}) {final stopped = agent?.isStopped ?? true;+ // Another restart could restart it twice: the button checks this one.+ final unconfirmed = _unconfirmed;return Row(children: [// Restart and Rename on the left; Remove is pushed to the right edge.@@ -452,7 +494,9 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {if (canRestart)FilledButton.icon(key: const ValueKey('super-buddy-card-restart'),- onPressed: _busy ? null : () => unawaited(_restart(agent!)),+ onPressed: _busy+ ? null+ : () => unawaited(_restart(agent!, check: unconfirmed)),icon: _busy? const SizedBox.square(dimension: AppIcons.inlineSize,@@ -464,7 +508,11 @@ class _BuddyCardButtonState extends State<BuddyCardButton> {),label: Text(_busy- ? 'Restarting'+ ? unconfirmed != null+ ? 'Checking'+ : 'Restarting'+ : unconfirmed != null+ ? 'Check status': stopped? 'Start': 'Restart',diff --git a/desktop/lib/super_tabs/buddy_model.dart b/desktop/lib/super_tabs/buddy_model.dartindex 356e8249e..8b1eb31dd 100644--- a/desktop/lib/super_tabs/buddy_model.dart+++ b/desktop/lib/super_tabs/buddy_model.dart@@ -135,6 +135,8 @@ class _BuddyModelLineState extends State<BuddyModelLine> {request.gridModel == null? 'Switching to your subscription…': 'Switching to ${request.name ?? nameOf(request.gridModel!)}…',+ maxLines: 1,+ overflow: TextOverflow.ellipsis,style: DesktopChrome.metadata(),): _anchor(@@ -161,7 +163,13 @@ class _BuddyModelLineState extends State<BuddyModelLine> {),const SizedBox(width: grid.AppDesktop.controlGap),],- KeyedSubtree(key: const ValueKey('super-buddy-model'), child: picker),+ // The model gives way with "…" in a narrow header, not the Buddy's name or ⋮ (#4444).+ Flexible(+ child: KeyedSubtree(+ key: const ValueKey('super-buddy-model'),+ child: picker,+ ),+ ),// A picked shared model that stopped is a failure the reader acts on, so it stays (review 4 of #3464).if (request == null && current != null && on == null) ...[const SizedBox(width: grid.AppDesktop.menuInset),@@ -258,6 +266,8 @@ class _BuddyModelLineState extends State<BuddyModelLine> {Flexible(child: Text(label,+ maxLines: 1,+ overflow: TextOverflow.ellipsis,style: DesktopChrome.metadata(color: DesktopChrome.foreground,),diff --git a/desktop/lib/super_tabs/buddy_restart.dart b/desktop/lib/super_tabs/buddy_restart.dartindex f592e3419..0c69329bc 100644--- a/desktop/lib/super_tabs/buddy_restart.dart+++ b/desktop/lib/super_tabs/buddy_restart.dart@@ -127,7 +127,35 @@ Agent? buddyMachineAgent(.firstOrNull;}-enum BuddyRestartOutcome { done, ignored, refused, notStarted, failed }+/// The reader's Buddy's last restart in [projectId] while its answer is lost+/// or still pending: the machine may have restarted it, so another restart+/// could restart it twice. Checking this one finds out.+AgentRestartAttempt? unconfirmedBuddyRestart(+ SuperTabController c,+ String projectId,+ AppNotifier? app,+) {+ final buddy = readerBuddy(c, projectId);+ if (buddy == null) return null;+ final attempt = app?.pendingAgentRestart(buddy.machineId, buddy.harnessId);+ final result = attempt?.result;+ return attempt != null &&+ attempt.awaitingConfirmation &&+ result?.error != null &&+ result!.retryable &&+ !result.engineNotStarted+ ? attempt+ : null;+}++enum BuddyRestartOutcome {+ done,+ ignored,+ refused,+ notStarted,+ unconfirmed,+ failed,+}class BuddyRestartResult {const BuddyRestartResult(this.outcome, [this.message]);@@ -135,16 +163,23 @@ class BuddyRestartResult {/// The exact line to show; null on [BuddyRestartOutcome.done].final String? message;++ static const unconfirmed = BuddyRestartResult(+ BuddyRestartOutcome.unconfirmed,+ "The restart isn't confirmed yet.",+ );}/// Restart (or resume) the reader's Buddy in [projectId] with the flags in-/// [text]; [saved] is the line the machine holds now.+/// [text]; [saved] is the line the machine holds now. With [check], asks the+/// machine about that unconfirmed restart instead of sending another.Future<BuddyRestartResult> restartBuddyWithFlags(SuperTabController c,String projectId,AppNotifier app, {required String text,required String saved,+ AgentRestartAttempt? check,}) async {final buddy = readerBuddy(c, projectId);if (buddy == null) {@@ -153,15 +188,19 @@ Future<BuddyRestartResult> restartBuddyWithFlags('Restart is not available here.',);}+ // Every press of Restart is a new intent: an earlier attempt that never+ // confirmed must not turn this one into a status check without the flags.+ final attempt =+ check ??+ app.restartAttempt(buddy.machineId, buddy.harnessId, fresh: true);// Nothing to clear and nothing to add is a plain restart, which an older- // daemon does as well as a new one.+ // daemon does as well as a new one. A check sends no flags: they went with+ // the restart it asks about, and words the card holds now may not be those.final result = await app.restartAgent(buddy.machineId,buddy.harnessId,- // Every press is a new intent: an earlier attempt that never confirmed- // must not turn this one into a status check without the flags.- attempt: app.restartAttempt(buddy.machineId, buddy.harnessId, fresh: true),- launchArgs: text.isEmpty && saved.isEmpty ? null : text,+ attempt: attempt,+ launchArgs: check != null || text.isEmpty && saved.isEmpty ? null : text,);if (result.error == null && !result.launchArgsIgnored) {return const BuddyRestartResult(BuddyRestartOutcome.done);@@ -183,6 +222,9 @@ Future<BuddyRestartResult> restartBuddyWithFlags('restart.',);}+ if (attempt.awaitingConfirmation && result.retryable) {+ return BuddyRestartResult.unconfirmed;+ }return BuddyRestartResult(BuddyRestartOutcome.failed, result.error);}diff --git a/desktop/lib/super_tabs/buddy_rows.dart b/desktop/lib/super_tabs/buddy_rows.dartindex f30b474b0..050f903af 100644--- a/desktop/lib/super_tabs/buddy_rows.dart+++ b/desktop/lib/super_tabs/buddy_rows.dart@@ -8,6 +8,7 @@ import 'buddy_chat.dart';import 'identity.dart';import 'model.dart';import 'section_heading.dart';+import 'swarm_type.dart';/// A sidebar count of what is for the reader, such as the tags waiting in/// Notifications or in a conversation: Slack's red number, white on the@@ -62,6 +63,7 @@ class SuperTabBuddyRow extends StatelessWidget {this.detail,this.status,this.crown = false,+ this.compact = false,});/// The Buddy, for its avatar; null while none runs.@@ -92,10 +94,13 @@ class SuperTabBuddyRow extends StatelessWidget {final bool crown;/// A line under the name, such as where a Buddy runs, with [status], its- /// activity mark, before it.+ /// activity mark, before it. Without one the mark sits at the row's right.final String? detail;final Widget? status;+ /// A phone's sidebar, whose rows keep the app's sizes ([SwarmType.sidebar]).+ final bool compact;+static const _column = SuperTabSectionHeading.actionWidth;@override@@ -175,9 +180,11 @@ class SuperTabBuddyRow extends StatelessWidget {name,maxLines: 1,overflow: TextOverflow.ellipsis,- // Unread is the name in bold, no dot (Dee, 2026-10-29).+ // Unread is the name in bold, no dot (Dee, 2026-10-29). The pane's one+ // row size, as + New agent and the projects (#4444).style:- DesktopChrome.control(+ SwarmType.sidebar(+ compact: compact,medium: selected,color: color,).copyWith(@@ -252,19 +259,19 @@ class SuperTabBuddyRow extends StatelessWidget {child: SuperTabCountBadge(badge, tooltip: badgeTooltip),),),- SizedBox(- width: _column,- // Unread is drawn as a bold name and heard in words. A row with no detail line has its status here,- // quiet, at its end (task #4220).- child: Semantics(- label: unread ? 'Unread messages' : null,- child: switch ((detail, status)) {- (null, final status?) => Center(child: status),- _ => null,- },- ),- ),- const SizedBox(width: _column),+ // Unread is drawn as a bold name and heard in words.+ Semantics(label: unread ? 'Unread messages' : null),+ // With no second line the activity mark is at the right, where two empty columns cut names+ // early (audit finding 9 of #4436).+ if (detail == null && status != null)+ Padding(+ padding: const EdgeInsets.symmetric(+ horizontal: grid.AppDesktop.controlGap,+ ),+ child: status,+ )+ else+ const SizedBox(width: 12),],),),diff --git a/desktop/lib/super_tabs/chat/agent_chat_header.dart b/desktop/lib/super_tabs/chat/agent_chat_header.dartindex 3c2deca2b..978714d53 100644--- a/desktop/lib/super_tabs/chat/agent_chat_header.dart+++ b/desktop/lib/super_tabs/chat/agent_chat_header.dart@@ -59,28 +59,23 @@ class SuperTabAgentChatHeader extends StatelessWidget {Widget label(String text) => Text(text,maxLines: 1,+ overflow: TextOverflow.ellipsis,style: DesktopChrome.metadata(color: DesktopChrome.foreground),);- return SizedBox(- key: const ValueKey('super-agent-chat-header'),- height: 44,- child: Row(- children: [- const SizedBox(width: grid.AppDesktop.controlGap),- if (title case final title?)- Expanded(- child: Align(alignment: Alignment.centerLeft, child: title(name)),- )- else if (agent != null) ...[- SuperTabAvatar.agent(- agent,- size: SuperTabAvatar.rowSize,- engineBadge: false,- ),- const SizedBox(width: grid.AppDesktop.menuInset),- ],- if (title == null)- Expanded(+ final left =+ title?.call(name) ??+ Row(+ mainAxisSize: MainAxisSize.min,+ children: [+ if (agent != null) ...[+ SuperTabAvatar.agent(+ agent,+ size: SuperTabAvatar.rowSize,+ engineBadge: false,+ ),+ const SizedBox(width: grid.AppDesktop.menuInset),+ ],+ Flexible(child: Text(name,maxLines: 1,@@ -90,23 +85,48 @@ class SuperTabAgentChatHeader extends StatelessWidget {),),),- if (buddy != null && group.isSwarmBuddyChat)- BuddyModelLine(- controller: c,- agent: buddy,- machine: buddyMachineName(c, buddy.machineId, app: app),- )- else if (agent != null) ...[- label(engineIdentity(agent.engine).label),- if (model != null) ...[- const SizedBox(width: grid.AppDesktop.controlGap),- label(model),+ ],+ );+ final right = buddy != null && group.isSwarmBuddyChat+ ? BuddyModelLine(+ controller: c,+ agent: buddy,+ machine: buddyMachineName(c, buddy.machineId, app: app),+ )+ : agent != null+ ? Row(+ mainAxisSize: MainAxisSize.min,+ children: [+ label(engineIdentity(agent.engine).label),+ if (model != null) ...[+ const SizedBox(width: grid.AppDesktop.controlGap),+ Flexible(child: label(model)),+ ],],+ )+ : null;+ return SizedBox(+ key: const ValueKey('super-agent-chat-header'),+ height: 44,+ // The name comes first, up to half the row; the engine and model take the rest, the model giving way with+ // "…", so a long model id never pushes the name or ⋮ out (#4444).+ child: LayoutBuilder(+ builder: (context, box) => Row(+ children: [+ const SizedBox(width: grid.AppDesktop.controlGap),+ ConstrainedBox(+ constraints: BoxConstraints(maxWidth: box.maxWidth / 2),+ child: left,+ ),+ const SizedBox(width: grid.AppDesktop.controlGap),+ Expanded(+ child: Align(alignment: Alignment.centerRight, child: right),+ ),+ const SizedBox(width: grid.AppDesktop.menuInset),+ ?menu,+ const SizedBox(width: grid.AppDesktop.menuInset),],- const SizedBox(width: grid.AppDesktop.menuInset),- ?menu,- const SizedBox(width: grid.AppDesktop.menuInset),- ],+ ),),);}diff --git a/desktop/lib/super_tabs/launch_flags_field.dart b/desktop/lib/super_tabs/launch_flags_field.dartindex 9300edb3e..10cb3c323 100644--- a/desktop/lib/super_tabs/launch_flags_field.dart+++ b/desktop/lib/super_tabs/launch_flags_field.dart@@ -223,9 +223,23 @@ class _Chip extends StatelessWidget {child: Row(mainAxisSize: MainAxisSize.min,children: [- Padding(- padding: const EdgeInsets.only(left: grid.AppDesktop.controlGap),- child: Text(word, style: grid.AppType.mono(color: ink)),+ // A chip is at most as wide as the field: a long flag ends in "…" and is whole on hover, and its × stays+ // inside (#4444).+ Flexible(+ child: Tooltip(+ message: word,+ child: Padding(+ padding: const EdgeInsets.only(+ left: grid.AppDesktop.controlGap,+ ),+ child: Text(+ word,+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ style: grid.AppType.mono(color: ink),+ ),+ ),+ ),),InkResponse(key: removeKey,diff --git a/desktop/lib/super_tabs/project_sidebar.dart b/desktop/lib/super_tabs/project_sidebar.dartindex 0eb19b57f..535bf4ad4 100644--- a/desktop/lib/super_tabs/project_sidebar.dart+++ b/desktop/lib/super_tabs/project_sidebar.dart@@ -578,6 +578,7 @@ class ProjectSidebar extends StatelessWidget {key: ValueKey('super-buddy-${project.id}'),agentId: agent?.id,name: name,+ compact: compact,project: named ? project.name : null,tooltip: 'Your Buddy · ${project.name}',// Where it runs, as the Agents list once showed every Buddy: only its@@ -626,11 +627,17 @@ class ProjectSidebar extends StatelessWidget {if (board) {final muted =chat != null && controller.notifyOf(chat.id) == SuperTabNotify.muted;+ // Its own name and face, as the header draws it (audit finding 8 of #4436).return SuperTabBuddyRow(key: const ValueKey('super-swarm-buddy'),agentId: agent?.id,- name: 'Buddy',+ agent: agent,+ name: agent == null+ ? chat?.buddyName ?? 'Buddy'+ : controller.snapshot!.agentName(agent.id, fallback: agent.name),tooltip: 'Your Buddy',+ compact: compact,+ note: agent?.downSince != null ? 'offline' : null,status: agent == null ? null : _buddyMark(agent),selected: _chatLit(chat),unread: chat != null && !muted && controller.unreadShown(chat),@@ -710,7 +717,12 @@ class ProjectSidebar extends StatelessWidget {? '$name · opens its terminal': '$name · no chat yet',crown: pm,- note: pm ? snapshot.leadProjectForAgent(agent.id)?.name : null,+ compact: compact,+ note: agent.downSince != null+ ? 'offline'+ : pm+ ? snapshot.leadProjectForAgent(agent.id)?.name+ : null,status: _buddyMark(agent),selected: _chatLit(chat),unread: chat != null && controller.unreadShown(chat),diff --git a/desktop/lib/super_tabs/view.dart b/desktop/lib/super_tabs/view.dartindex d1dad0d6c..4c285869d 100644--- a/desktop/lib/super_tabs/view.dart+++ b/desktop/lib/super_tabs/view.dart@@ -20,6 +20,8 @@ import '../widgets/desktop_chrome.dart';import '../widgets/finger_target.dart';import '../widgets/new_harness_attachments.dart';import '../widgets/new_harness_paste.dart';+import '../widgets/terminal_name_prompt.dart';+import '../widgets/terminal_prompt.dart';import '../core/local_key_value_store.dart';import '../state/app_state.dart';import '../state/harness_attachments.dart';@@ -3317,9 +3319,33 @@ class _SuperTabViewState extends State<SuperTabView>// A Buddy's name is its person's and long: a phone's one line says Buddy.return _phone ? 'Message Buddy' : 'Message $buddy';}+ // An agent's own chat keeps the title it was opened with; a rename changes the agent (audit finding 8 of #4436).+ if (_ownAgent(group) case final agent?) {+ return 'Message ${snapshot.agentName(agent.id, fallback: agent.name)}';+ }return 'Message ${group.title}';}+ /// The agent whose own chat [group] is (#4116), not a project's PM, whose chat is its project's.+ SuperTabAgent? _ownAgent(SuperTabConversation group) =>+ c.snapshot?.isProjectLead(group.id) == true+ ? null+ : c.snapshot?.agents.where((a) => a.chatId == group.id).firstOrNull;++ /// Renames [agent] for everyone in the Swarm, in the app's one rename prompt.+ void _renameAgent(SuperTabAgent agent) => unawaited(+ showTerminalPrompt<void>(+ context,+ builder: (_) => TerminalNamePrompt(+ title: 'Rename agent',+ name: c.snapshot!.agentName(agent.id, fallback: agent.name),+ fieldKey: const Key('agent-rename-input'),+ fieldLabel: 'Agent name',+ save: (name) => c.renameAgent(agent.id, name),+ ),+ ),+ );+/// On a phone the header's bar holds Chat and ⋮, each a finger's size, and/// ⋮ names the rest (terminals, pull requests, people) instead of five bare/// icons. Desktop, which sets no [WorkspaceChrome.compactBelow], never.@@ -3649,23 +3675,46 @@ class _SuperTabViewState extends State<SuperTabView>padding: const EdgeInsetsDirectional.only(end: grid.AppDesktop.listRowGap,),- child: TextButton(- key: ValueKey(key),- onPressed: selected ? null : open,- style: TextButton.styleFrom(- backgroundColor: selected ? grid.AppSurface.selectedFill : null,- foregroundColor: selected- ? DesktopChrome.foreground- : DesktopChrome.muted,- // The tab shown has no action, so a disabled button would grey it: it reads as selected instead.- disabledForegroundColor: DesktopChrome.foreground,+ child: _withTasksCount(+ project,+ open,+ show: !board && key == 'super-board-tab-board',+ TextButton(+ key: ValueKey(key),+ onPressed: selected ? null : open,+ style: TextButton.styleFrom(+ backgroundColor: selected ? grid.AppSurface.selectedFill : null,+ foregroundColor: selected+ ? DesktopChrome.foreground+ : DesktopChrome.muted,+ // The tab shown has no action, so a disabled button would grey it: it reads as selected instead.+ disabledForegroundColor: DesktopChrome.foreground,+ ),+ child: Text(label),),- child: Text(label),),),],);+ /// The Board tab seen from the chat wears the Tasks icon's count, the icon it replaces there (audit finding 18).+ Widget _withTasksCount(+ SuperTabProject project,+ VoidCallback open,+ Widget tab, {+ required bool show,+ }) {+ if (!show) return tab;+ final count = _tasksNeedingYou(project);+ return _withCountBadge(+ tab,+ count,+ key: const ValueKey('super-tasks-badge'),+ tooltip: count == 1 ? '1 task needs you' : '$count tasks need you',+ onTap: open,+ );+ }+/// The project's chat in the middle, as before the Board: the Chat tab. Its/// Tasks icon brings the Board back with projects and the Buddy.void _openProjectChat(SuperTabProject project) {@@ -4067,6 +4116,16 @@ class _SuperTabViewState extends State<SuperTabView>Widget _header(SuperTabConversation? group, bool narrow) {final isProject =group != null && c.snapshot?.isProjectLead(group.id) == true;+ // A project's chat on the Board: its Board / Chat tabs follow its name on this one row, at the Board header's height+ // and inset so they stay put on Board → Chat, and the Board tab is its one way to the Board (audit finding 18).+ final tabsOf =+ isProject &&+ widget.board &&+ !_manageVisible &&+ !_notificationsVisible &&+ _pageShown == null+ ? c.snapshot!.projectFor(group.id)+ : null;// The one Buddy has one chat, as a project does; it has no pull requests.final oneBuddy = group?.isSwarmBuddyChat == true;final restsOnChat = isProject || oneBuddy;@@ -4078,11 +4137,13 @@ class _SuperTabViewState extends State<SuperTabView>!group.isBuddyChat &&c.snapshot?.projectById(group.projectId) != null;return Container(- constraints: const BoxConstraints(minHeight: 52),+ constraints: BoxConstraints(minHeight: tabsOf != null ? 44 : 52),// A phone's rows line up (Huy, 2026-11-02): the sidebar icon starts at// the top bar's edge, and the people icon sits under its avatar.padding: _phone? kPhoneBarRowPadding+ : tabsOf != null+ ? const EdgeInsets.symmetric(horizontal: grid.AppDesktop.menuInset): const EdgeInsets.symmetric(horizontal: 20, vertical: 6),decoration: BoxDecoration(border: Border(bottom: BorderSide(color: DesktopChrome.rim)),@@ -4131,6 +4192,14 @@ class _SuperTabViewState extends State<SuperTabView>),],)+ else if (tabsOf case final project?)+ Row(+ children: [+ Flexible(child: _title(group)),+ const SizedBox(width: 12),+ _projectTabs(project, board: false),+ ],+ )else_title(group),if (!_devicesVisible && !_listViewHoldsThePane)@@ -4200,7 +4269,7 @@ class _SuperTabViewState extends State<SuperTabView>),),],- if (isProject || isTask) ...[+ if ((isProject && tabsOf == null) || isTask) ...[const SizedBox(width: 4),_tasksButton(group, task: isTask),],@@ -4527,7 +4596,11 @@ class _SuperTabViewState extends State<SuperTabView>if (group.audience == null)item('Work details', () => _groupAction('work', group)),if (editable) ...[- item('Rename', () => _groupAction('rename', group)),+ // An agent's own chat renames the agent, whose name its header shows (audit finding 16 of #4436).+ item('Rename', switch (_ownAgent(group)) {+ final agent? => () => _renameAgent(agent),+ null => () => _groupAction('rename', group),+ }),item(group.archived ? 'Reopen conversation' : 'Archive',group.assignment == null ||@@ -4548,7 +4621,14 @@ class _SuperTabViewState extends State<SuperTabView>builder: (context, menu, _) => AppIconButton(key: const ValueKey('super-group-options'),icon: AppIcons.ellipsisVertical,- tooltip: _isBuddyChat(group) ? 'Buddy options' : 'Workgroup options',+ // On the Board the Buddy card holds the Buddy's own options, so this one is the chat's (audit finding 15).+ tooltip: _isBuddyChat(group)+ ? widget.board+ ? 'Chat options'+ : 'Buddy options'+ : _ownAgent(group) != null+ ? 'Agent options'+ : 'Workgroup options',onPressed: () => menu.isOpen ? menu.close() : menu.open(),),);@@ -6394,31 +6474,8 @@ class _SuperTabViewState extends State<SuperTabView>children: [if (boardProject != null)_boardHeader(c.snapshot!.projectById(boardProject)!)- else ...[- if (widget.board &&- !_manageVisible &&- !_notificationsVisible &&- _pageShown == null)- if (c.snapshot?.projects- .where(- (p) =>- p.leadConversationId ==- c.selectedId,- )- .firstOrNull- case final project?)- Padding(- padding: const EdgeInsetsDirectional.only(- start: grid.AppDesktop.controlGap,- top: grid.AppDesktop.listRowGap,- ),- child: Align(- alignment: Alignment.centerLeft,- child: _projectTabs(project, board: false),- ),- ),+ else_header(c.selected, narrow),- ],if (_manageOpen)Align(alignment: Alignment.centerLeft,diff --git a/desktop/test/launch_flags_field_test.dart b/desktop/test/launch_flags_field_test.dartindex f57af332c..6aede65aa 100644--- a/desktop/test/launch_flags_field_test.dart+++ b/desktop/test/launch_flags_field_test.dart@@ -1,9 +1,17 @@+import 'dart:io';+import 'package:flutter/material.dart';+import 'package:flutter/rendering.dart';import 'package:flutter/services.dart';import 'package:flutter_test/flutter_test.dart';import 'package:harness/shared/theme/app_theme.dart' as grid;+import 'package:harness/super_tabs/buddy_card.dart';import 'package:harness/super_tabs/launch_flags_field.dart';+import 'support/capture.dart';++final shots = Platform.environment['HARNESS_SUPER_TAB_CAPTURE'];+/// The Buddy card's launch flags as chips (spec 2026-11-06-board-buddy-card).void main() {final input = find.byKey(const ValueKey('launch-flag-input'));@@ -174,4 +182,86 @@ void main() {expect(rim(1), grid.AppPalette.dangerFill);expect(rim(0), isNot(grid.AppPalette.dangerFill));});++ group('a long flag in the Buddy card (#4444)', () {+ setUpAll(() async {+ await loadCaptureFonts(shots);+ if (shots == null || !Platform.isMacOS) return;+ // A flag is set in the terminal's mono face, which the capture fonts leave out.+ for (final (family, path) in [+ ('.AppleSystemUIFontMonospaced', '/System/Library/Fonts/SFNSMono.ttf'),+ ('Menlo', '/System/Library/Fonts/Menlo.ttc'),+ ]) {+ final bytes = ByteData.sublistView(await File(path).readAsBytes());+ await (FontLoader(family)..addFont(Future.value(bytes))).load();+ }+ });++ testWidgets('ends in … inside the field, whole in a tooltip, and its × '+ 'removes it', (tester) async {+ final word = '--add-dir=/Users/${'a' * 300}'.substring(0, 200);+ final changes = <List<String>>[];+ for (final (brightness, mode) in [+ (Brightness.light, 'light'),+ (Brightness.dark, 'dark'),+ ]) {+ // 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;+ addTearDown(() => grid.AppTheme.brightness.value = previous);+ await tester.binding.setSurfaceSize(+ const Size(BuddyCardButton.cardWidth, 160),+ );+ addTearDown(() => tester.binding.setSurfaceSize(null));+ await tester.pumpWidget(+ MaterialApp(+ debugShowCheckedModeBanner: false,+ theme: grid.buildAppTheme(brightness: brightness),+ home: Scaffold(+ body: Padding(+ // The card's inner width: its padding on both sides.+ padding: const EdgeInsets.all(grid.AppDesktop.groupGap),+ child: LaunchFlagsField(+ words: ['--chrome', word],+ onChanged: changes.add,+ ),+ ),+ ),+ ),+ );+ // The theme animates from the last pump's brightness.+ await tester.pumpAndSettle();+ expect(tester.takeException(), isNull);+ final field = tester.getRect(find.byType(LaunchFlagsField));+ final remove = tester.getRect(+ find.byKey(const ValueKey('launch-flag-remove-1')),+ );+ expect(+ field.left <= remove.left && remove.right <= field.right,+ isTrue,+ reason: 'the × $remove is outside the field $field',+ );+ expect(+ tester+ .renderObject<RenderParagraph>(+ find.descendant(+ of: find.text(word),+ matching: find.byType(RichText),+ ),+ )+ .didExceedMaxLines,+ isTrue,+ reason: 'the flag has no …',+ );+ expect(+ find.byWidgetPredicate((w) => w is Tooltip && w.message == word),+ findsOneWidget,+ );+ await captureWindow(tester, shots, '07-long-launch-flag-$mode');+ }+ await tester.tap(find.byKey(const ValueKey('launch-flag-remove-1')));+ await tester.pump();+ expect(changes.single, ['--chrome']);+ });+ });}diff --git a/desktop/test/super_tab_agent_chat_header_test.dart b/desktop/test/super_tab_agent_chat_header_test.dartindex a818d6609..078c9be38 100644--- a/desktop/test/super_tab_agent_chat_header_test.dart+++ b/desktop/test/super_tab_agent_chat_header_test.dart@@ -1,4 +1,7 @@+import 'dart:io';+import 'package:flutter/material.dart';+import 'package:flutter/rendering.dart';import 'package:flutter_test/flutter_test.dart';import 'package:harness/core/runtime_model_name.dart';import 'package:harness/shared/theme/app_theme.dart' as grid;@@ -11,18 +14,28 @@ import 'package:harness/widgets/engine_identity.dart';import 'super_tab_personal_tasks_pane_test.dart' show TasksFixture;import 'support/buddy_engine_fixture.dart';+import 'support/capture.dart';++final shots = Platform.environment['HARNESS_SUPER_TAB_CAPTURE'];Future<void> show(WidgetTester t,SuperTabController c, {bool tasks = false,+ double width = 1600,+ Brightness brightness = Brightness.dark,}) async {t.view.devicePixelRatio = 1;- t.view.physicalSize = const Size(1600, 900);+ t.view.physicalSize = Size(width, 900);addTearDown(t.view.reset);+ // 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;+ addTearDown(() => grid.AppTheme.brightness.value = previous);await t.pumpWidget(MaterialApp(- theme: grid.buildAppTheme(brightness: Brightness.dark),+ debugShowCheckedModeBanner: false,+ theme: grid.buildAppTheme(brightness: brightness),home: WorkspaceChromeScope(chrome: WorkspaceChrome(compactBelow: 720),child: Scaffold(@@ -155,4 +168,122 @@ void main() {await show(t, c);expect(inHeader(find.text('not served now')), findsOneWidget);});++ // The header sits between the left pane and the Tasks pane, so at 880 it is far narrower than the window.+ group('at 880 wide the model gives way, not the name or ⋮ (#4444)', () {+ const long = 'openrouter/qwen/qwen3-coder-480b-a35b-instruct';+ setUpAll(() => loadCaptureFonts(shots));++ bool cut(WidgetTester t, Finder text) => t+ .renderObject<RenderParagraph>(+ find.descendant(of: text, matching: find.byType(RichText)).first,+ )+ .didExceedMaxLines;++ // [title] is what holds the name: the name itself, or the Buddy card's button.+ void fits(+ WidgetTester t, {+ required Finder name,+ Finder? title,+ required Finder engine,+ required Finder model,+ }) {+ expect(t.takeException(), isNull);+ final row = t.getRect(header);+ final menu = t.getRect(+ inHeader(find.byKey(const ValueKey('super-group-options'))),+ );+ expect(+ row.left <= menu.left && menu.right <= row.right,+ isTrue,+ reason: '⋮ $menu is outside the header $row',+ );+ expect(cut(t, name), isFalse, reason: 'the name is cut');+ expect(cut(t, model), isTrue, reason: 'the model has no …');+ expect(+ t.getRect(engine).left - t.getRect(title ?? name).right,+ greaterThanOrEqualTo(grid.AppDesktop.controlGap),+ reason: 'no gap between the name and the engine',+ );+ }++ testWidgets("a member agent's name and ⋮ stay; its model ends in …", (+ t,+ ) async {+ final f = TasksFixture();+ addTearDown(f.controller.dispose);+ // The fixture's reads, with Hugo's model a long OpenRouter id.+ final c = SuperTabController(+ tabId: f.controller.tabId,+ accountId: f.controller.accountId,+ initial: {+ 'tabId': f.controller.tabId,+ 'accountId': f.controller.accountId,+ 'selectedId': 'lead5701',+ },+ pollInterval: Duration.zero,+ save: (_) async {},+ request: (method, path, {body}) async {+ final result = await f.controller.request(method, path, body: body);+ for (final row in (result['agents'] as List? ?? const [])) {+ final agent = (row as Map)['data'] as Map;+ if (agent['id'] == '0540') {+ agent['configuration'] = {+ ...agent['configuration'] as Map,+ 'model': long,+ };+ }+ }+ return result;+ },+ );+ addTearDown(c.dispose);+ await c.refresh();+ await c.select('aeef');+ for (final (brightness, mode) in [+ (Brightness.light, 'light'),+ (Brightness.dark, 'dark'),+ ]) {+ await show(t, c, tasks: true, width: 880, brightness: brightness);+ fits(+ t,+ name: inHeader(find.text('Hugo')),+ engine: inHeader(find.text(engineIdentity('claude').label)),+ model: inHeader(find.text(modelDisplayName(long))),+ );+ await captureWindow(t, shots, '06-chat-header-880-$mode');+ }+ });++ testWidgets("the Buddy's name and ⋮ stay; its model ends in …", (t) async {+ final server = buddyEngineSwarm();+ // A model nobody serves is named by its id, and said not to be served.+ (server.state['agents'] as List).cast<Map>().firstWhere(+ (a) => a['id'] == 'wren',+ )['gridModel'] = long;+ final c = server.controller(account: 'peer');+ addTearDown(c.dispose);+ await c.refresh();+ await c.select('swarm-buddy-peer');+ final agent = c.snapshot!.agent('wren')!;+ for (final (brightness, mode) in [+ (Brightness.light, 'light'),+ (Brightness.dark, 'dark'),+ ]) {+ await show(t, c, width: 880, brightness: brightness);+ fits(+ t,+ name: inHeader(+ find.text(c.snapshot!.agentName('wren', fallback: agent.name)),+ ),+ title: inHeader(+ find.byKey(const ValueKey('super-board-buddy-button')),+ ),+ engine: inHeader(find.byKey(const ValueKey('super-buddy-engine'))),+ model: inHeader(find.byKey(const ValueKey('super-buddy-model'))),+ );+ await captureWindow(t, shots, '06-buddy-header-880-$mode');+ }+ });+ });}diff --git a/desktop/test/super_tab_board_buddy_card_test.dart b/desktop/test/super_tab_board_buddy_card_test.dartindex 3d1cb5103..261979c4b 100644--- a/desktop/test/super_tab_board_buddy_card_test.dart+++ b/desktop/test/super_tab_board_buddy_card_test.dart@@ -1,3 +1,4 @@+import 'dart:async';import 'dart:io';import 'package:flutter/material.dart';@@ -22,6 +23,11 @@ import 'swarm_state_test.dart' show createApp;void main() {late RestartConnection connection;late AppNotifier app;+ late ConversationServer server;++ // Writes nothing unless HARNESS_SUPER_TAB_CAPTURE names a folder.+ final shots = Platform.environment['HARNESS_SUPER_TAB_CAPTURE'];+ if (shots != null) setUpAll(() => loadCaptureFonts(shots));Finder key(String k) => find.byKey(ValueKey(k));final button = key('super-board-buddy-button');@@ -64,7 +70,7 @@ void main() {final before = grid.AppTheme.brightness.value;grid.AppTheme.brightness.value = brightness;addTearDown(() => grid.AppTheme.brightness.value = before);- final server = swarm();+ server = swarm();server.state['buddies'] = true;giveBuddy(server, person: 'owner', machineId: machineId);(server.state['conversations'] as List)@@ -88,6 +94,7 @@ void main() {await tester.pumpWidget(MaterialApp(theme: grid.buildAppTheme(brightness: brightness),+ debugShowCheckedModeBanner: false,home: Scaffold(body: SuperTabView(controller: c,@@ -364,7 +371,8 @@ void main() {await tester.tap(find.descendant(of: key('super-middle-chat'),- matching: find.byTooltip('Buddy options'),+ // The chat's own options; the card is the Buddy's (audit finding 15 of #4436).+ matching: find.byTooltip('Chat options'),),);await settle(tester);@@ -682,15 +690,142 @@ void main() {await end(tester, c);});- testWidgets('Remove opens the remove confirm', (tester) async {+ for (final brightness in Brightness.values) {+ testWidgets('Remove names the Buddy, is red, and a refusal keeps the '+ 'dialog open with the reason (${brightness.name})', (tester) async {+ final c = await show(tester, brightness: brightness);+ await open(tester);+ await tester.tap(key('super-buddy-card-remove'));+ await settle(tester);+ expect(find.text('Remove Wren?'), findsOneWidget);+ expect(+ find.text(+ 'Wren stops. Your chat stays, and your next Buddy here picks it up.',+ ),+ findsOneWidget,+ );+ final confirm = find.widgetWithText(FilledButton, 'Remove');+ expect(+ tester+ .widget<FilledButton>(confirm)+ .style+ ?.backgroundColor+ ?.resolve({}),+ grid.AppPalette.dangerFill,+ );+ await captureWindow(+ tester,+ shots,+ '15-buddy-remove-confirm-${brightness.name}',+ );+ server.refuse = {+ 'code': 'BUDDY_BUSY',+ 'message': 'Wren is answering. Try again in a moment.',+ };+ await tester.tap(confirm);+ await settle(tester);+ expect(find.text('Remove Wren?'), findsOneWidget);+ expect(+ tester+ .widget<Text>(+ find.descendant(+ of: find.byType(AlertDialog),+ matching: find.text(+ 'Wren is answering. Try again in a moment.',+ ),+ ),+ )+ .style+ ?.color,+ grid.AppPalette.dangerFill,+ );+ server.refuse = null;+ await tester.tap(confirm);+ await settle(tester);+ expect(find.text('Remove Wren?'), findsNothing);+ expect(c.buddy('lead'), isNull);+ await end(tester, c);+ });+ }++ for (final brightness in Brightness.values) {+ testWidgets("a Buddy whose computer is offline says it can't reach it, "+ 'not Running or Stopped (${brightness.name})', (tester) async {+ app.stateOf('m')!.nodeOnline = false;+ final c = await show(tester, brightness: brightness);+ await open(tester);+ expect(find.text("Can't reach Test host"), findsOneWidget);+ expect(+ find.text('Restart and launch flags come back when Test host answers.'),+ findsOneWidget,+ );+ expect(find.text('Running'), findsNothing);+ expect(find.text('Stopped'), findsNothing);+ expect(restart, findsNothing);+ expect(input, findsNothing);+ await captureWindow(+ tester,+ shots,+ '15-buddy-card-cant-reach-${brightness.name}',+ );+ await end(tester, c);+ });+ }++ testWidgets("a Buddy whose computer hasn't listed its agents says it can't "+ 'reach it', (tester) async {+ app.stateOf('m')!+ ..agents = []+ ..agentLoadStatus = AgentLoadStatus.loading;final c = await show(tester);await open(tester);- await tester.tap(key('super-buddy-card-remove'));- await settle(tester);- expect(find.text('Remove Buddy?'), findsOneWidget);+ expect(find.text("Can't reach Test host"), findsOneWidget);+ expect(find.text('Stopped'), findsNothing);+ expect(restart, findsNothing);await end(tester, c);});+ for (final brightness in Brightness.values) {+ testWidgets('a restart whose answer was lost offers Check status, which '+ 'checks that restart and sends no second one (${brightness.name})', (+ tester,+ ) async {+ final c = await show(tester, brightness: brightness);+ await open(tester);+ await tester.tap(restart);+ await tester.pump();+ final first = creationId();+ connection.restartReplies.single.completeError(TimeoutException('lost'));+ await settle(tester);+ expect(find.text("The restart isn't confirmed yet."), findsOneWidget);+ expect(find.textContaining('close this prompt'), findsNothing);+ // The card knows it after closing and opening again.+ await tester.sendKeyEvent(LogicalKeyboardKey.escape);+ await settle(tester);+ await open(tester);+ expect(find.text("The restart isn't confirmed yet."), findsOneWidget);+ expect(+ find.descendant(of: restart, matching: find.text('Check status')),+ findsOneWidget,+ );+ await captureWindow(+ tester,+ shots,+ '15-buddy-card-check-status-${brightness.name}',+ );+ await tester.tap(restart);+ await tester.pump();+ expect(connection.types, ['agent_restart']);+ expect(connection.checks.single['creationId'], first);+ connection.checkReplies.single.complete(+ restartReceipt(first, agentId: 'h-wren'),+ );+ await settle(tester);+ expect(card, findsNothing);+ await end(tester, c);+ });+ }+testWidgets('a Buddy whose machine agent is unknown shows Stopped and no ''flags', (tester) async {app.stateOf('m')!.agents = [];@@ -704,9 +839,6 @@ void main() {await end(tester, c);});- // Writes nothing unless HARNESS_SUPER_TAB_CAPTURE names a folder.- final shots = Platform.environment['HARNESS_SUPER_TAB_CAPTURE'];- if (shots != null) setUpAll(() => loadCaptureFonts(shots));testWidgets('the open card in the light theme', (tester) async {final c = await show(tester);await open(tester);diff --git a/desktop/test/super_tab_board_layout_test.dart b/desktop/test/super_tab_board_layout_test.dartindex 32e711259..7ca84cb5a 100644--- a/desktop/test/super_tab_board_layout_test.dart+++ b/desktop/test/super_tab_board_layout_test.dart@@ -181,9 +181,10 @@ void main() {find.text('The project chat line nobody should see'),findsOneWidget,);- // The Chat view keeps its header, Project options and Tasks icon.+ // The Chat view keeps its header and Project options; the Board tab is its one way back (audit finding 18 of #4436).expect(_key('super-tasks-lead'), findsNothing);- expect(_key('super-tasks'), findsOneWidget);+ expect(_key('super-project-menu'), findsOneWidget);+ expect(_key('super-tasks'), findsNothing);expect(_key('super-left-pane'), findsOneWidget);await tester.tap(_key('super-board-tab-board'));await _settle(tester);@@ -383,14 +384,14 @@ void main() {);// Every way into the Board shows the same three panes (Scholes, task #3863).- testWidgets('the Tasks icon of a project chat opens the Board with projects, '+ testWidgets('the Board tab of a project chat opens the Board with projects, ''the wide Buddy chat and the project kept', (tester) async {final (c, _) = await show(tester, width: 1500);// A person lands in the project's own chat, no Board open: that Chat- // view's header has the Tasks icon.+ // view's header has the Board tab, in place of a Tasks icon (#4444).expect(c.selectedId, 'lead');expect(_key('super-tasks-lead'), findsNothing);- await tester.tap(_key('super-tasks'));+ await tester.tap(_key('super-board-tab-board'));await _settle(tester);expect(_key('super-tasks-lead'), findsOneWidget);expect(c.selectedId, 'buddy-owner-lead');diff --git a/desktop/test/super_tab_one_buddy_test.dart b/desktop/test/super_tab_one_buddy_test.dartindex d9b1048a7..2c9a098c3 100644--- a/desktop/test/super_tab_one_buddy_test.dart+++ b/desktop/test/super_tab_one_buddy_test.dart@@ -257,7 +257,7 @@ void main() {await tester.pumpAndSettle();expect(find.text(unavailable), findsNothing);- expect(find.text('Remove Buddy?'), findsOneWidget);+ expect(find.text('Remove Wren?'), findsOneWidget);expect(commands(server, 'buddy.remove'), isEmpty);await tester.tap(find.widgetWithText(FilledButton, 'Remove'));await tester.pumpAndSettle();diff --git a/desktop/test/super_tab_v3_agent_chat_test.dart b/desktop/test/super_tab_v3_agent_chat_test.dartnew file mode 100644index 000000000..42b768997--- /dev/null+++ b/desktop/test/super_tab_v3_agent_chat_test.dart@@ -0,0 +1,226 @@+import 'dart:io';++import 'package:flutter/material.dart';+import 'package:flutter_test/flutter_test.dart';+import 'package:harness/shared/theme/app_theme.dart' as grid;+import 'package:harness/state/app_state.dart';+import 'package:harness/super_tabs/controller.dart';+import 'package:harness/super_tabs/view.dart';++import 'super_tab_activity_lists_test.dart' show swarm;+import 'support/capture.dart';+import 'support/super_tab_fixture.dart';+import 'swarm_state_test.dart' show createApp;++/// Set to a folder to write the PR's screenshots there.+final shots = Platform.environment['HARNESS_SUPER_TAB_CAPTURE'];++Map<String, dynamic> _agent(String id, String name, String kind, String chat) =>+ {+ 'id': id,+ 'projectId': 'lead',+ 'name': name,+ 'displayName': name,+ 'machineId': 'host',+ 'harnessId': 'session-$id',+ 'contributorId': 'owner',+ 'configuration': {'engine': 'codex'},+ 'kind': kind,+ 'chatId': chat,+ 'myAgent': true,+ };++/// Audit findings 8, 16 and 18 of the Desktop 1.3.89 audit (#4436; task #4444): an agent's chat in Swarm v3's middle,+/// opened from My agents. Its composer, its ⋮ and a PM's header.+void main() {+ setUpAll(() => loadCaptureFonts(shots));+ Finder key(String k) => find.byKey(ValueKey(k));++ late ConversationServer server;++ Future<SuperTabController> open(+ WidgetTester tester,+ String agent, {+ Brightness brightness = Brightness.light,+ }) async {+ await tester.binding.setSurfaceSize(const Size(1500, 800));+ addTearDown(() => tester.binding.setSurfaceSize(null));+ final before = grid.AppTheme.brightness.value;+ grid.AppTheme.brightness.value = brightness;+ addTearDown(() => grid.AppTheme.brightness.value = before);+ server = swarm();+ server.state['agents'] = [+ _agent('kestrel', 'Kestrel', 'regular', 'agent-chat-kestrel'),+ _agent('orion', 'Orion', 'pm', 'lead'),+ ];+ final groups = (server.state['conversations'] as List)+ .cast<Map<String, dynamic>>();+ groups.firstWhere((g) => g['id'] == 'lead')['leadId'] = 'orion';+ groups.add({+ ...conversationFixture('agent-chat-kestrel', 'Kestrel'),+ 'kind': 'agent-chat',+ 'agentIds': ['kestrel'],+ });+ final c = server.controller(+ account: 'owner',+ initial: {'tabId': 'tab', 'accountId': 'owner', 'selectedId': 'lead'},+ );+ addTearDown(c.dispose);+ await tester.runAsync(c.refresh);+ final AppNotifier app = createApp();+ addTearDown(app.dispose);+ addTearDown(() => tester.pumpWidget(const SizedBox()));+ await tester.pumpWidget(+ MaterialApp(+ debugShowCheckedModeBanner: false,+ theme: grid.buildAppTheme(brightness: brightness),+ home: Scaffold(+ body: SuperTabView(+ controller: c,+ app: app,+ onNewSwarm: () {},+ onInvite: () {},+ onAddAgent: (_) {},+ onOpenTerminal: (_) {},+ machineName: (_) => 'Mac Studio',+ board: true,+ rightPane: (_) => const SizedBox.expand(),+ ),+ ),+ ),+ );+ await settle(tester);+ await tester.tap(key('super-agent-$agent'));+ await settle(tester);+ return c;+ }++ // Finding 8: after a rename the header and messages said "Atlas", the composer still "Message Kestrel".+ testWidgets('an agent\'s composer follows its rename', (tester) async {+ final c = await open(tester, 'kestrel');+ expect(find.text('Message Kestrel'), findsOneWidget);+ expect(+ await tester.runAsync(() => c.renameAgent('kestrel', 'Atlas')),+ isNull,+ );+ await settle(tester);+ expect(find.text('Message Atlas'), findsOneWidget);+ expect(find.text('Message Kestrel'), findsNothing);+ });++ // Finding 16: the ⋮ said "Workgroup options" and its Rename renamed the chat, so the header kept the agent's name.+ testWidgets('an agent\'s ⋮ is Agent options, and its Rename renames the '+ 'agent', (tester) async {+ await open(tester, 'kestrel');+ final menu = find.descendant(+ of: key('super-middle-chat'),+ matching: key('super-group-options'),+ );+ expect(find.byTooltip('Workgroup options'), findsNothing);+ expect(+ find.descendant(of: menu, matching: find.byTooltip('Agent options')),+ findsOneWidget,+ );+ await tester.tap(menu);+ await settle(tester);+ await tester.tap(find.text('Rename'));+ await settle(tester);+ final field = key('agent-rename-input');+ expect(tester.widget<TextField>(field).controller!.text, 'Kestrel');+ await tester.enterText(field, 'Atlas');+ await tester.testTextInput.receiveAction(TextInputAction.done);+ await settle(tester);+ final agent = (server.state['agents'] as List).cast<Map>().firstWhere(+ (a) => a['id'] == 'kestrel',+ );+ expect(agent['displayName'], 'Atlas');+ // The chat keeps its own title; the agent's name is what changed.+ expect(+ (server.state['conversations'] as List).cast<Map>().firstWhere(+ (g) => g['id'] == 'agent-chat-kestrel',+ )['title'],+ 'Kestrel',+ );+ expect(+ find.descendant(+ of: key('super-agent-chat-header'),+ matching: find.text('Atlas'),+ ),+ findsOneWidget,+ );+ });++ // Finding 18: the Board / Chat tabs sat alone on a row above "# web-project ▾", jumped on Board → Chat, and the Tasks+ // icon opened the Board as the Board tab did.+ testWidgets('a PM\'s chat has one header row, and one way to the Board', (+ tester,+ ) async {+ await open(tester, 'orion');+ final board = key('super-board-tab-board');+ final chat = key('super-board-tab-chat');+ final title = key('super-project-menu');+ expect(board, findsOneWidget);+ double row(Finder f) => tester.getRect(f.first).center.dy;+ expect((row(board) - row(title)).abs(), lessThan(4));+ expect((row(chat) - row(title)).abs(), lessThan(4));+ expect((row(key('super-members-button')) - row(title)).abs(), lessThan(4));+ expect(+ tester.getRect(board).left,+ greaterThan(tester.getRect(title.first).right),+ );+ expect(key('super-tasks'), findsNothing);+ final chatTab = tester.getRect(board);+ await tester.tap(board);+ await settle(tester);+ // The Board's own header: its tabs on the same line as in the chat.+ expect(+ (tester.getRect(board).center.dy - chatTab.center.dy).abs(),+ lessThan(4),+ );+ await tester.tap(chat);+ await settle(tester);+ expect(key('super-tasks'), findsNothing);+ expect((row(board) - row(title)).abs(), lessThan(4));+ // The tabs' tooltips and the Board's settle timers run out.+ await tester.pumpWidget(const SizedBox());+ await tester.pump(const Duration(seconds: 5));+ });++ testWidgets('screenshots, light and dark', (tester) async {+ for (final brightness in Brightness.values) {+ final c = await open(tester, 'kestrel', brightness: brightness);+ await tester.runAsync(() => c.renameAgent('kestrel', 'Atlas'));+ await settle(tester);+ await captureWindow(+ tester,+ shots,+ '08-composer-renamed-${brightness.name}',+ );+ await tester.tap(+ find.descendant(+ of: key('super-middle-chat'),+ matching: key('super-group-options'),+ ),+ );+ await settle(tester);+ await captureWindow(tester, shots, '16-agent-menu-${brightness.name}');+ await tester.pumpWidget(const SizedBox());+ await open(tester, 'orion', brightness: brightness);+ await captureWindow(+ tester,+ shots,+ '18-pm-chat-one-row-${brightness.name}',+ );+ await tester.pumpWidget(const SizedBox());+ }+ }, skip: shots == null);+}++Future<void> settle(WidgetTester tester) async {+ for (var i = 0; i < 3; i++) {+ await tester.runAsync(+ () => Future<void>.delayed(const Duration(milliseconds: 30)),+ );+ await tester.pump(const Duration(milliseconds: 50));+ }+}diff --git a/desktop/test/super_tab_v3_left_test.dart b/desktop/test/super_tab_v3_left_test.dartindex e3fcffdf1..fe2716c4e 100644--- a/desktop/test/super_tab_v3_left_test.dart+++ b/desktop/test/super_tab_v3_left_test.dart@@ -5,6 +5,7 @@ import 'package:flutter/rendering.dart' show RenderParagraph;import 'package:flutter_test/flutter_test.dart';import 'package:harness/shared/theme/app_theme.dart' as grid;import 'package:harness/widgets/desktop_chrome.dart';+import 'package:harness/state/harness_activity.dart' show HarnessActivity;import 'package:harness/state/app_state.dart';import 'package:harness/shared/theme/app_icons.dart';import 'package:harness/super_tabs/buddy_rows.dart' show SuperTabCountBadge;@@ -370,6 +371,124 @@ void main() {expect(cut('Orion Lead'), isFalse);});+ /// The Buddy's own chat, which is how the controller finds the reader's Buddy.+ void buddyChat(ConversationServer server) {+ agents(server);+ // A Swarm's one Buddy belongs to no project.+ for (final agent in (server.state['agents'] as List).cast<Map>()) {+ if (agent['id'] == 'buddy') agent.remove('projectId');+ }+ (server.state['conversations'] as List).add({+ ...conversationFixture('swarm-buddy-owner', 'Buddy'),+ 'kind': 'swarm-buddy',+ 'buddyOwnerId': 'owner',+ 'agentIds': ['buddy'],+ });+ }++ // Audit finding 8 of task #4436 (task #4444): the row read "Buddy" with a pink "B" while the header said "Wren".+ testWidgets('the Buddy row wears the Buddy\'s own name and face', (+ tester,+ ) async {+ await show(+ tester,+ agents: [+ {...buddy, 'name': 'Wren', 'displayName': 'Wren'},+ ],+ setup: buddyChat,+ );+ final row = key('super-swarm-buddy');+ expect(find.descendant(of: row, matching: find.text('Wren')), findsOne);+ expect(+ find.descendant(of: row, matching: find.text('Buddy')),+ findsNothing,+ );+ final avatar = tester.widget<SuperTabAvatar>(+ find.descendant(of: row, matching: find.byType(SuperTabAvatar)),+ );+ expect(avatar.name, 'Wren');+ expect(avatar.identity, 'agent:buddy');+ // The agent's own pattern, as every other row draws it, not a letter.+ expect(avatar.pattern, isTrue);+ });++ // Audit finding 9 of task #4436 (task #4444): working, waiting, offline and starting all looked the same.+ testWidgets('each row shows its activity mark beside its name, and '+ '"offline" when its agent is down', (tester) async {+ await show(+ tester,+ agents: [+ {...buddy, 'downSince': '2026-11-07T01:00:00.000Z'},+ _agent('kestrel', 'Kestrel'),+ {+ ..._agent('orion', 'Orion'),+ 'downSince': '2026-11-07T01:00:00.000Z',+ },+ ],+ setup: buddyChat,+ );+ ActivityMark mark(String row) => tester.widget<ActivityMark>(+ find.descendant(of: key(row), matching: find.byType(ActivityMark)),+ );+ for (final (row, name) in [+ ('super-swarm-buddy', 'Buddy'),+ ('super-agent-kestrel', 'Kestrel'),+ ('super-agent-orion', 'Orion'),+ ]) {+ final shown = tester.getRect(+ find.descendant(of: key(row), matching: find.text(name)),+ );+ final at = tester.getRect(+ find.descendant(of: key(row), matching: find.byType(ActivityMark)),+ );+ expect(+ (at.center.dy - shown.center.dy).abs(),+ lessThan(4),+ reason: row,+ );+ expect(at.left, greaterThan(shown.right), reason: row);+ }+ expect(mark('super-swarm-buddy').activity, HarnessActivity.offline);+ expect(mark('super-agent-orion').activity, HarnessActivity.offline);+ expect(+ mark('super-agent-kestrel').activity,+ isNot(HarnessActivity.offline),+ );+ expect(text('orion', 'offline'), findsOne);+ expect(+ find.descendant(+ of: key('super-swarm-buddy'),+ matching: find.text('offline'),+ ),+ findsOne,+ );+ expect(text('kestrel', 'offline'), findsNothing);+ });++ testWidgets('names use the whole row in the narrowest left pane, in the '+ 'pane\'s one row size', (tester) async {+ await show(+ tester,+ agents: [buddy, _agent('kestrel', 'Kestrel Windows crew agent')],+ setup: buddyChat,+ width: 180,+ );+ final row = tester.getRect(key('super-agent-kestrel'));+ final name = find.descendant(+ 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));+ 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'),+ );+ expect(size(name), size(newAgent));+ expect(tester.takeException(), isNull);+ });+testWidgets('screenshots of My agents, light and dark', (tester) async {await tester.runAsync(() => loadCaptureFonts(shots));for (final (brightness, name) in [@@ -382,6 +501,38 @@ void main() {}}, skip: shots == null);+ testWidgets('screenshots of My agents rows at the narrowest and a wide '+ 'left pane, light and dark (#4444)', (tester) async {+ await tester.runAsync(() => loadCaptureFonts(shots));+ for (final (brightness, name) in [+ (Brightness.light, 'light'),+ (Brightness.dark, 'dark'),+ ]) {+ for (final width in [180.0, 300.0]) {+ await show(+ tester,+ agents: [+ {...buddy, 'name': 'Wren', 'displayName': 'Wren'},+ _agent('kestrel', 'Kestrel Windows crew'),+ {+ ..._agent('orion', 'Orion'),+ 'downSince': '2026-11-07T01:00:00.000Z',+ },+ ],+ setup: buddyChat,+ brightness: brightness,+ width: width,+ );+ await captureWindow(+ tester,+ shots,+ '09-my-agents-${width.round()}-$name',+ );+ await tester.pumpWidget(const SizedBox());+ }+ }+ }, skip: shots == null);+testWidgets('unread is a bold name, with no dot and no number', (tester,) async {diff --git a/desktop/test/support/capture.dart b/desktop/test/support/capture.dartindex e773ff83b..b3439388d 100644--- a/desktop/test/support/capture.dart+++ b/desktop/test/support/capture.dart@@ -21,6 +21,13 @@ Future<void> loadCaptureFonts(String? captureDir) async {);await (FontLoader(family)..addFont(Future.value(bytes))).load();}+ // The activity marks' fallback face, as in the app: without it they draw as empty boxes.+ await (FontLoader('Apple Symbols')..addFont(+ File('/System/Library/Fonts/Apple Symbols.ttf')+ .readAsBytes()+ .then(ByteData.sublistView),+ ))+ .load();final manifest =jsonDecode(await rootBundle.loadString('FontManifest.json')) as List;for (final entry in manifest.cast<Map<String, dynamic>>()) {diff --git a/docs/plans/2026-11-07-v3-header-card-rows-plan.md b/docs/plans/2026-11-07-v3-header-card-rows-plan.mdnew file mode 100644index 000000000..3724b4433--- /dev/null+++ b/docs/plans/2026-11-07-v3-header-card-rows-plan.md@@ -0,0 +1,126 @@+# The chat header, Buddy card and My agents rows fit, follow renames and say what they do: implementation plan++> This plan is carried out by the project's Engineer way of working (test first, task by task, one pull request), not+> subagent-driven-development. There is no execution handoff.++**Goal:** Fix findings 6, 7, 8, 9, 15, 16 and 18 of the Desktop 1.3.89 audit (task #4436,+`docs/audits/2026-11-07-desktop-1.3.89.md` on PR #3526): the most visible problems a person hits in 1.3.89's Swarm v3+screens. This is task #4444.++**Architecture:** Desktop only, each fix in the widget that draws it, with the components and styles already there:++- 6: `SuperTabAgentChatHeader` gives the name its width first; the engine and model labels shrink with "…" after it,+ and ⋮ never leaves the row. The Buddy's model line does the same.+- 7: a launch-flag chip (`launch_flags_field.dart` `_Chip`) is as wide as the field at most, its word cut with "…"+ and whole in a tooltip, and its × inside.+- 8: the Board's Buddy row in My agents takes the Buddy's own name and agent, as the other agent rows do; an agent's+ composer says "Message <agent name>", not the chat's title.+- 9: `SuperTabBuddyRow` draws the activity mark beside the name when it has no second line, says "offline" for an+ agent that is down, drops its two empty right columns and uses the sidebar's row text (`SwarmType.sidebar`), as+ + New agent and the projects do.+- 15: the Buddy card says "Can't reach <computer>" when the computer's list isn't there, and why Restart isn't offered;+ an unconfirmed restart turns Restart into Check status, which checks the same attempt instead of restarting again,+ with copy that fits the card; Remove asks "Remove <name>?" with a red button and shows a failure in the dialog;+ the Board Buddy chat's ⋮ is "Chat options", not a second "Buddy options".+- 16: an agent's own chat's ⋮ is "Agent options", and its Rename renames the agent (`controller.renameAgent`) in the+ app's one rename prompt (`TerminalNamePrompt`).+- 18: a PM's chat on the Board has one header row: its name, Board / Chat, then its icons. The Tasks icon leaves that+ row, its count moving to the Board tab, so the Board has one way in.++**Tech Stack:** Flutter, widget tests with the memory-store fixtures and real fonts; screenshots with+`HARNESS_SUPER_TAB_CAPTURE=<dir>`.++**Spec:** the audit's findings 6, 7, 8, 9, 15, 16 and 18 and their rows in its Proposed tasks.++## Global Constraints++- Desktop only (`desktop/lib/`, `desktop/test/`); no server change is needed: `agent.rename` already exists.+- Change only what the findings name; reuse the existing components, text styles and theme tokens.+- Tests use a memory store and a fake sign-in; nobody signs in and no login is read.+- Light and dark screenshots of every changed screen in `docs/plans/assets/v3-header-card-rows/`.+- Windows rules: no process is started.++## Review Focus++- The header keeps the name and ⋮ on screen at 880 with a long model name, for an agent and for the Buddy.+- Check status reuses the unconfirmed attempt, so a second press never restarts the Buddy twice.+- Agent Rename sends `agent.rename` for the agent, not a chat rename.+- My agents rows on the phone (`compact`) keep their sizes.++---++### Task 1: The chat header keeps the name and ⋮ on screen (finding 6)++**Files:** Modify `desktop/lib/super_tabs/chat/agent_chat_header.dart`, `desktop/lib/super_tabs/buddy_model.dart`;+test `desktop/test/super_tab_agent_chat_header_test.dart`.++**Interfaces:** none new.++- [ ] Test: at 880 with `openrouter/qwen/qwen3-coder-480b-a35b-instruct`, the name is whole or shows more than its+ first letters, the model ends in "…", there is a gap before the engine, and ⋮ is inside the header; the same for the+ Buddy at 880. Light and dark shots.+- [ ] Run it and watch it fail.+- [ ] Implement; run the header test and the Buddy model tests.+- [ ] Commit and push.++### Task 2: A long launch flag stays inside the Buddy card (finding 7)++**Files:** Modify `desktop/lib/super_tabs/launch_flags_field.dart`; test `desktop/test/launch_flags_field_test.dart`.++- [ ] Test: a 200-character flag fits the field with "…", its full text is in a tooltip, its × is inside the field and+ removes it, and nothing overflows. Light and dark shots of the card.+- [ ] Run it and watch it fail.+- [ ] Implement; run the field and Buddy card tests.+- [ ] Commit and push.++### Task 3: My agents rows show the agent's own name, status and the full row (findings 8 and 9)++**Files:** Modify `desktop/lib/super_tabs/project_sidebar.dart`, `desktop/lib/super_tabs/buddy_rows.dart`,+`desktop/lib/super_tabs/view.dart` (`_messageHint`); test `desktop/test/super_tab_v3_left_test.dart`.++**Interfaces:** `SuperTabBuddyRow(..., bool compact = false)`.++- [ ] Test: the Buddy row shows the Buddy's name and avatar; after a rename the composer says the new name; a row+ shows its activity mark beside the name and "offline" when down; names reach the row's right edge; row text is+ the size of + New agent's. Shots at 880 and 1500, light and dark.+- [ ] Run it and watch it fail.+- [ ] Implement; run the left pane, Buddy row and composer tests.+- [ ] Commit and push.++### Task 4: The Buddy card's status, Restart and Remove say what is true (finding 15)++**Files:** Modify `desktop/lib/super_tabs/buddy_card.dart`, `desktop/lib/super_tabs/buddy_restart.dart`,+`desktop/lib/super_tabs/buddies.dart`, `desktop/lib/super_tabs/view.dart` (the ⋮ tooltip); tests+`desktop/test/super_tab_board_buddy_card_test.dart`, `desktop/test/super_tab_buddy_restart_test.dart`.++**Interfaces:** `restartBuddyWithFlags(..., check)` or an equivalent that reuses the pending attempt.++- [ ] Test: with the computer's list missing the card says "Can't reach <computer>" and why Restart isn't there; an+ unconfirmed restart shows card copy and Check status, which sends a status check, not a second restart; Remove says+ "Remove <name>?", its button is red, and a refused remove keeps the dialog open with the reason; the two menus are+ named apart. Light and dark shots.+- [ ] Run it and watch it fail.+- [ ] Implement; run the Buddy card, restart and remove tests.+- [ ] Commit and push.++### Task 5: An agent's ⋮ acts on the agent (finding 16)++**Files:** Modify `desktop/lib/super_tabs/view.dart` (`_options`); test `desktop/test/super_tab_agent_chat_header_test.dart`.++- [ ] Test: an agent chat's ⋮ is "Agent options"; Rename opens the rename prompt with the agent's name and sends+ `agent.rename` for that agent; the header then shows the new name. Light and dark shot of the menu.+- [ ] Run it and watch it fail.+- [ ] Implement; run the header and group menu tests.+- [ ] Commit and push.++### Task 6: A PM's chat has one header row (finding 18)++**Files:** Modify `desktop/lib/super_tabs/view.dart` (`_header`, the full view's column); test+`desktop/test/super_tab_v3_left_test.dart` or a new `desktop/test/super_tab_pm_chat_header_test.dart`.++- [ ] Test: a PM's chat on the Board shows its name, Board / Chat and its icons on one row; there is no Tasks icon+ beside the Board tab; the Board tab carries the needs-you count; Board → Chat keeps the tabs on the same line.+ Light and dark shots.+- [ ] Run it and watch it fail.+- [ ] Implement; run the PM chat, Board and project tab tests.+- [ ] Commit and push.diff --git a/docs/plans/assets/v3-header-card-rows/06-buddy-header-880-dark.png b/docs/plans/assets/v3-header-card-rows/06-buddy-header-880-dark.pngnew file mode 100644index 000000000..b48127cf4Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/06-buddy-header-880-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/06-buddy-header-880-light.png b/docs/plans/assets/v3-header-card-rows/06-buddy-header-880-light.pngnew file mode 100644index 000000000..42da0d9faBinary files /dev/null and b/docs/plans/assets/v3-header-card-rows/06-buddy-header-880-light.png differdiff --git a/docs/plans/assets/v3-header-card-rows/06-chat-header-880-dark.png b/docs/plans/assets/v3-header-card-rows/06-chat-header-880-dark.pngnew file mode 100644index 000000000..a7dc5db4bBinary files /dev/null and b/docs/plans/assets/v3-header-card-rows/06-chat-header-880-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/06-chat-header-880-light.png b/docs/plans/assets/v3-header-card-rows/06-chat-header-880-light.pngnew file mode 100644index 000000000..97e81d169Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/06-chat-header-880-light.png differdiff --git a/docs/plans/assets/v3-header-card-rows/07-long-launch-flag-dark.png b/docs/plans/assets/v3-header-card-rows/07-long-launch-flag-dark.pngnew file mode 100644index 000000000..2a418ddaeBinary files /dev/null and b/docs/plans/assets/v3-header-card-rows/07-long-launch-flag-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/07-long-launch-flag-light.png b/docs/plans/assets/v3-header-card-rows/07-long-launch-flag-light.pngnew file mode 100644index 000000000..e42b5556dBinary files /dev/null and b/docs/plans/assets/v3-header-card-rows/07-long-launch-flag-light.png differdiff --git a/docs/plans/assets/v3-header-card-rows/08-composer-renamed-dark.png b/docs/plans/assets/v3-header-card-rows/08-composer-renamed-dark.pngnew file mode 100644index 000000000..bdae3aba1Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/08-composer-renamed-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/08-composer-renamed-light.png b/docs/plans/assets/v3-header-card-rows/08-composer-renamed-light.pngnew file mode 100644index 000000000..bbac02362Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/08-composer-renamed-light.png differdiff --git a/docs/plans/assets/v3-header-card-rows/09-my-agents-180-dark.png b/docs/plans/assets/v3-header-card-rows/09-my-agents-180-dark.pngnew file mode 100644index 000000000..21196a95eBinary files /dev/null and b/docs/plans/assets/v3-header-card-rows/09-my-agents-180-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/09-my-agents-180-light.png b/docs/plans/assets/v3-header-card-rows/09-my-agents-180-light.pngnew file mode 100644index 000000000..275d1dbb1Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/09-my-agents-180-light.png differdiff --git a/docs/plans/assets/v3-header-card-rows/09-my-agents-300-dark.png b/docs/plans/assets/v3-header-card-rows/09-my-agents-300-dark.pngnew file mode 100644index 000000000..40ba23d91Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/09-my-agents-300-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/09-my-agents-300-light.png b/docs/plans/assets/v3-header-card-rows/09-my-agents-300-light.pngnew file mode 100644index 000000000..fcf4bfc52Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/09-my-agents-300-light.png differdiff --git a/docs/plans/assets/v3-header-card-rows/15-buddy-card-cant-reach-dark.png b/docs/plans/assets/v3-header-card-rows/15-buddy-card-cant-reach-dark.pngnew file mode 100644index 000000000..069ed5ad8Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/15-buddy-card-cant-reach-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/15-buddy-card-cant-reach-light.png b/docs/plans/assets/v3-header-card-rows/15-buddy-card-cant-reach-light.pngnew file mode 100644index 000000000..42253a9ddBinary files /dev/null and b/docs/plans/assets/v3-header-card-rows/15-buddy-card-cant-reach-light.png differdiff --git a/docs/plans/assets/v3-header-card-rows/15-buddy-card-check-status-dark.png b/docs/plans/assets/v3-header-card-rows/15-buddy-card-check-status-dark.pngnew file mode 100644index 000000000..0313159beBinary files /dev/null and b/docs/plans/assets/v3-header-card-rows/15-buddy-card-check-status-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/15-buddy-card-check-status-light.png b/docs/plans/assets/v3-header-card-rows/15-buddy-card-check-status-light.pngnew file mode 100644index 000000000..0db54691eBinary files /dev/null and b/docs/plans/assets/v3-header-card-rows/15-buddy-card-check-status-light.png differdiff --git a/docs/plans/assets/v3-header-card-rows/15-buddy-remove-confirm-dark.png b/docs/plans/assets/v3-header-card-rows/15-buddy-remove-confirm-dark.pngnew file mode 100644index 000000000..66c6ea0beBinary files /dev/null and b/docs/plans/assets/v3-header-card-rows/15-buddy-remove-confirm-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/15-buddy-remove-confirm-light.png b/docs/plans/assets/v3-header-card-rows/15-buddy-remove-confirm-light.pngnew file mode 100644index 000000000..38b8004d0Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/15-buddy-remove-confirm-light.png differdiff --git a/docs/plans/assets/v3-header-card-rows/16-agent-menu-dark.png b/docs/plans/assets/v3-header-card-rows/16-agent-menu-dark.pngnew file mode 100644index 000000000..14f1355e8Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/16-agent-menu-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/16-agent-menu-light.png b/docs/plans/assets/v3-header-card-rows/16-agent-menu-light.pngnew file mode 100644index 000000000..355fc4c26Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/16-agent-menu-light.png differdiff --git a/docs/plans/assets/v3-header-card-rows/18-pm-chat-one-row-dark.png b/docs/plans/assets/v3-header-card-rows/18-pm-chat-one-row-dark.pngnew file mode 100644index 000000000..0f5f7828bBinary files /dev/null and b/docs/plans/assets/v3-header-card-rows/18-pm-chat-one-row-dark.png differdiff --git a/docs/plans/assets/v3-header-card-rows/18-pm-chat-one-row-light.png b/docs/plans/assets/v3-header-card-rows/18-pm-chat-one-row-light.pngnew file mode 100644index 000000000..1acae94c0Binary files /dev/null and b/docs/plans/assets/v3-header-card-rows/18-pm-chat-one-row-light.png differ