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
Agent Messages: a tab no longer shows traffic (#1241)
Deee91bd491559e
diff --git a/desktop/CLAUDE.md b/desktop/CLAUDE.mdindex 0546b481f..736b2f594 100644--- a/desktop/CLAUDE.md+++ b/desktop/CLAUDE.md@@ -447,10 +447,11 @@ add a kind there, not at the call site.with harness, machine and installed local model counts plus subscription allowance remaining at the bottom left and focused machine/repo/branch/PR at the bottom right.Tabs center their name/status group and show no shortcut hint (Command changes nothing onthem). Hovering a tab shows Agent Messages' 💬 — grey off, accent blue on — just- left of ×; while its agents message, the status slot shows an animated 💬 for 10 s instead+ left of ×; traffic between its agents shows nothing on the tab, whose status slot keeps its+ own status (owner, 2026-10-12: messages arrive when they arrive)(`lib/agent_messages/`, `AgentMessagesController` on `AppNotifier.agentMessages`, its own- notifier so traffic never rebuilds the workspace; `MessagingMark`; `SwarmTabButton` mirrors- it natively). At rest the name has the whole tab; hovered, it moves left only as far as 💬+ notifier so traffic never rebuilds the workspace; `SwarmTabButton` mirrors it natively).+ At rest the name has the whole tab; hovered, it moves left only as far as 💬and × need. Tab and pane closemarks are small and quiet, with larger click targets. Terminal panes end with matchingplain-text agent/model selectors and close at every width. Hovering the rightdiff --git a/desktop/design/workspace-status-bar.md b/desktop/design/workspace-status-bar.mdindex 147fb9c62..124009aee 100644--- a/desktop/design/workspace-status-bar.md+++ b/desktop/design/workspace-status-bar.md@@ -123,13 +123,12 @@ smaller tabs while preserving their controls.Hovering a tab reveals Agent Messages' 💬 and × at its right, 💬 just left of ×([Agent Messages](../../docs/design/2026-10-10-agent-messages.md)); its statusstays. Tabs show no shortcut hint, and holding Command changes nothing on them.-At rest a tab shows only its name and status. While its agents message each-other, the status slot shows 💬 in Agent Messages' color (the accent blue,-`AppPalette.accentOnSurface`), mirrored every half second, for 10 seconds after-the last message, then the tab's status again. The hover 💬 is grey while off and in that color+At rest a tab shows only its name and status; traffic between its agents shows+nothing on it, since messages arrive when they arrive. The hover 💬 is grey while+off and in Agent Messages' color (the accent blue, `AppPalette.accentOnSurface`)while on; its tooltip says what a clickdoes ("Agent messages off · click to turn on", "Agent messages on · click to-turn off", "Agents messaging · click to turn off"), and a click toggles that+turn off"), and a click toggles thattab's flag at once, going back — with a notice — if the backend refuses. Only atab the desk holds has a 💬 (not the Store, Devices, Companions, an orchestratoror a draft tab), and only once the daemon and backend have answered for Agentdiff --git a/desktop/lib/agent_messages/agent_messages.dart b/desktop/lib/agent_messages/agent_messages.dartindex 89b5b537a..f334ddda3 100644--- a/desktop/lib/agent_messages/agent_messages.dart+++ b/desktop/lib/agent_messages/agent_messages.dart@@ -222,8 +222,10 @@ class PaneMessageMark {final bool warning;}-/// How a tab's 💬 reads.-enum TabMessagesState { off, on, flowing }+/// How a tab's 💬 reads. Traffic is not one of them: a tab never shows it. A+/// moving 💬 sent the owner looking in the panes for messages that agents+/// take at their tool calls; they arrive when they arrive (owner, 2026-10-12).+enum TabMessagesState { off, on }typedef AgentMessageTabsRead = Future<Map<String, dynamic>?> Function();typedef AgentMessagesWrite = Future<Map<String, dynamic>> Function(@@ -246,7 +248,6 @@ class AgentMessagesController extends ChangeNotifier {required this.request,required this.nameOf,DateTime Function()? now,- this.flowingFor = const Duration(seconds: 10),this.remoteRecency = const Duration(seconds: 60),this.markLife = const Duration(seconds: 5),}) : now = now ?? DateTime.now;@@ -260,14 +261,10 @@ class AgentMessagesController extends ChangeNotifier {/// moved ([pollRemote]); lifetimes here run on timers.final DateTime Function() now;- /// How long a tab's status shows 💬 after the last message moved in it,- /// before it goes back to the tab's working, done or question mark.- final Duration flowingFor;-/// How recent another machine's message must be to count as traffic when a/// poll first sees it ([pollRemote]): longer than the remote watch's 15 s/// round, so no message falls between two rounds, yet old history does not- /// light a tab up.+ /// mark panes long after it moved.final Duration remoteRecency;/// How long a pane's mark stays, unless the pane is focused first.@@ -279,9 +276,8 @@ class AgentMessagesController extends ChangeNotifier {final _writes = <String, int>{};final _traffic = <String, int>{};final _seenMessages = <String>{};- // What has a lifetime holds the timer that ends it — a tab's 💬 stops, a- // mark goes — so nothing has to compare clocks to know it is over.- final _flowing = <String, Timer>{};+ // A mark holds the timer that ends it, so nothing has to compare clocks to+ // know it is over.final _marks = <String, (PaneMessageMark, Timer)>{};final _polling = <String>{};int _reads = 0, _account = 0;@@ -301,14 +297,8 @@ class AgentMessagesController extends ChangeNotifier {/// A turn on or off is on its way to the backend.bool isPending(String tabId) => _pending.containsKey(tabId);- /// Messages moved in [tabId] within [flowingFor].- bool isFlowing(String tabId) => _flowing.containsKey(tabId);-- TabMessagesState stateOf(String tabId) => !isOn(tabId)- ? TabMessagesState.off- : isFlowing(tabId)- ? TabMessagesState.flowing- : TabMessagesState.on;+ TabMessagesState stateOf(String tabId) =>+ isOn(tabId) ? TabMessagesState.on : TabMessagesState.off;/// Why the last turn on or off for [tabId] did not take.String? failureFor(String tabId) => _failed[tabId];@@ -417,7 +407,7 @@ class AgentMessagesController extends ChangeNotifier {}final tabId = payload['tabId'];if (tabId is! String || tabId.isEmpty) return;- _flow(tabId);+ _countTraffic(tabId);final id = payload['messageId'];// Each status change says the message again; it marks its panes once.if (id is String && _remember(id)) {@@ -432,15 +422,9 @@ class AgentMessagesController extends ChangeNotifier {_notify();}- /// [tabId]'s status shows 💬 for [flowingFor] from now — longer when the- /// traffic was only read from another machine's log — and an open log reads- /// again.- void _flow(String tabId, [Duration extra = Duration.zero]) {- _flowing.remove(tabId)?.cancel();- _flowing[tabId] = Timer(flowingFor + extra, () {- _flowing.remove(tabId);- _notify();- });+ /// A message moved in [tabId]: an open log reads again. The tab itself+ /// shows nothing of it.+ void _countTraffic(String tabId) {_traffic[tabId] = trafficFor(tabId) + 1;}@@ -457,14 +441,9 @@ class AgentMessagesController extends ChangeNotifier {/// only to the windows on its own computer (the core's `clients.windows`), so/// traffic between harnesses on other machines would never reach this one./// A message new to this window that moved within [remoteRecency] counts as- /// traffic, exactly as if its frame had arrived, and flows for one [round]- /// longer: the next round can only renew it a round later, so 💬 would- /// otherwise lapse between rounds while agents keep talking. One request at- /// a time per machine; a machine still answering the last round is skipped.- Future<void> pollRemote(- Iterable<AgentMessagesRemoteTab> tabs, {- Duration round = Duration.zero,- }) async {+ /// traffic, exactly as if its frame had arrived. One request at a time per+ /// machine; a machine still answering the last round is skipped.+ Future<void> pollRemote(Iterable<AgentMessagesRemoteTab> tabs) async {if (_disposed) return;final byMachine = <String, List<String>>{};for (final tab in tabs) {@@ -474,15 +453,11 @@ class AgentMessagesController extends ChangeNotifier {}await Future.wait([for (final MapEntry(key: machineId, value: tabIds) in byMachine.entries)- if (!_polling.contains(machineId)) _poll(machineId, tabIds, round),+ if (!_polling.contains(machineId)) _poll(machineId, tabIds),]);}- Future<void> _poll(- String machineId,- List<String> tabIds,- Duration round,- ) async {+ Future<void> _poll(String machineId, List<String> tabIds) async {final account = _account;_polling.add(machineId);try {@@ -499,7 +474,7 @@ class AgentMessagesController extends ChangeNotifier {_markPanes(message.from, message.to);}if (moved) {- _flow(tabId, round);+ _countTraffic(tabId);_notify();}}@@ -561,13 +536,9 @@ class AgentMessagesController extends ChangeNotifier {}void _stopTimers() {- for (final timer in _flowing.values) {- timer.cancel();- }for (final (_, timer) in _marks.values) {timer.cancel();}- _flowing.clear();_marks.clear();}@@ -696,7 +667,7 @@ class AgentMessagesRemoteWatch {_timer = null;if (_disposed || !foreground.value) return;final targets = tabs();- if (targets.isNotEmpty) await controller.pollRemote(targets, round: every);+ if (targets.isNotEmpty) await controller.pollRemote(targets);if (!_disposed && _started && foreground.value && _timer == null) {_timer = Timer(every, () => unawaited(poll()));}diff --git a/desktop/lib/screens/swarm_screen.dart b/desktop/lib/screens/swarm_screen.dartindex 4651f29a3..d19291aa9 100644--- a/desktop/lib/screens/swarm_screen.dart+++ b/desktop/lib/screens/swarm_screen.dart@@ -13,7 +13,6 @@ import 'package:flutter/services.dart';import 'package:url_launcher/url_launcher.dart';import 'package:xterm/xterm.dart' show TerminalTheme;-import '../agent_messages/agent_messages.dart';import '../agent_messages/agent_messages_view.dart';import '../core/runtime_platform.dart';import '../api/api_client.dart';@@ -2044,17 +2043,14 @@ class _SwarmScreenState extends State<SwarmScreen> {color: activityInk(activity),),// Agent Messages' 💬; absent where a tab has none- // (AppNotifier.agentMessagesOffered). Flowing only while on.- if (app.agentMessagesOffered(swarm.id)) ...{+ // (AppNotifier.agentMessagesOffered). The flag only: a tab+ // never shows traffic.+ if (app.agentMessagesOffered(swarm.id))'agentMessages': app.agentMessages.isOn(swarm.id),- 'agentMessagesFlowing':- app.agentMessages.stateOf(swarm.id) ==- TabMessagesState.flowing,- },},],- // Agent Messages' color: the 💬 while on, and a tab's status slot while- // its agents message. The design system's one accent, blue, as a mark.+ // Agent Messages' color: the 💬 while on. The design system's one+ // accent, blue, as a mark.'agentMessagesInk': grid.AppPalette.accentOnSurface.toARGB32(),// The File menu's Agent Messages checkmark, for the active tab.'activeAgentMessages': app.agentMessagesOffered(app.activeSwarmId)@@ -8075,17 +8071,6 @@ class _SwarmScreenState extends State<SwarmScreen> {child: ListenableBuilder(listenable: app.agentMessages,builder: (context, _) {- // While its agents message, the status slot- // shows 💬 in place of the tab's status, and- // the tooltip and screen readers say so.- final messaging =- app.agentMessagesOffered(swarm.id) &&- app.agentMessages.stateOf(swarm.id) ==- TabMessagesState.flowing;- final status = [- if (messaging) agentsMessagingLabel,- ?activity?.label,- ];final nameHint = workspaceTabTooltip(labels[index],swarm.name,@@ -8093,21 +8078,21 @@ class _SwarmScreenState extends State<SwarmScreen> {DesktopWorkspaceTab.naturalWidth(context,labels[index],- hasActivity:- activity != null || messaging,+ hasActivity: activity != null,) >_tabWidths[index],);- final tabHint = [?nameHint, ...status].join('\n');+ final tabHint = [+ ?nameHint,+ ?activity?.label,+ ].join('\n');return DesktopWorkspaceTab(id: swarm.id,onRename: () => _rename(swarm.id),label: labels[index],selected: selected,tooltip: tabHint.isEmpty ? null : tabHint,- activityLabel: status.isEmpty- ? null- : status.join(', '),+ activityLabel: activity?.label,onSelect: _shortcutsEnabled? () => app.selectSwarm(swarm.id): null,@@ -8126,17 +8111,8 @@ class _SwarmScreenState extends State<SwarmScreen> {): null,messagesColor: messagesColor,- activity: messaging- ? tabStatus(- (visible) => MessagingMark(- key: ValueKey(- 'tab-messaging:${swarm.id}',- ),- color: messagesColor,- visible: visible,- ),- )- : activity == null || activity.mark.isEmpty+ activity:+ activity == null || activity.mark.isEmpty? null: tabStatus((visible) => ActivityMark(diff --git a/desktop/lib/widgets/desktop_workspace_tab.dart b/desktop/lib/widgets/desktop_workspace_tab.dartindex 3c75e77a5..6c0d35088 100644--- a/desktop/lib/widgets/desktop_workspace_tab.dart+++ b/desktop/lib/widgets/desktop_workspace_tab.dart@@ -13,8 +13,9 @@ import 'desktop_chrome.dart';/// and, at its trailing edge, Agent Messages' 💬 and the close action.////// At rest the name and status have the whole tab. Hovering reveals 💬 — grey-/// while Agent Messages is off, [messagesColor] while on — and ×. While agents-/// message, the caller passes a [MessagingMark] as [activity].+/// while Agent Messages is off, [messagesColor] while on — and ×. Traffic+/// between its agents shows nothing on the tab: messages arrive when they+/// arrive.class DesktopWorkspaceTab extends StatefulWidget {const DesktopWorkspaceTab({super.key,@@ -47,8 +48,7 @@ class DesktopWorkspaceTab extends StatefulWidget {final VoidCallback? onToggleAgentMessages;final String? tooltip, activityLabel;- /// The status cell: an [ActivityMark], or a [MessagingMark] while agents- /// message.+ /// The status cell: an [ActivityMark].final Widget? activity;static double _measure(BuildContext context, String text, TextStyle style) {@@ -77,7 +77,6 @@ class DesktopWorkspaceTab extends StatefulWidget {static String agentMessagesTooltip(TabMessagesState state) => switch (state) {TabMessagesState.off => 'Agent messages off · click to turn on',TabMessagesState.on => 'Agent messages on · click to turn off',- TabMessagesState.flowing => 'Agents messaging · click to turn off',};static double labelWidth(BuildContext context, String label) =>diff --git a/desktop/lib/widgets/harness_activity_mark.dart b/desktop/lib/widgets/harness_activity_mark.dartindex 21a7bf6f5..93f2fc0e8 100644--- a/desktop/lib/widgets/harness_activity_mark.dart+++ b/desktop/lib/widgets/harness_activity_mark.dart@@ -3,7 +3,6 @@ import 'dart:async';import 'package:flutter/material.dart';import 'package:xterm/xterm.dart' show TerminalTheme;-import '../shared/theme/app_icons.dart';import '../shared/theme/app_theme.dart' as grid;import '../shared/theme/appearance_prefs_store.dart';import '../shared/theme/workspace_bar_style.dart';@@ -209,110 +208,6 @@ class _ActivityMarkState extends State<ActivityMark> {}}-/// What a tab says while its agents message one another.-const agentsMessagingLabel = 'Agents messaging';--/// A tab's status cell while its agents message one another (Agent Messages):-/// two chat bubbles, mirrored every half second on the same clock as the-/// spinner so the speakers trade sides; still under Reduce Motion or when-/// scrolled away.-class MessagingMark extends StatefulWidget {- const MessagingMark({- super.key,- required this.color,- this.visible = true,- this.clock,- });- final Color color;- final bool visible;- final ActivityClock? clock;-- /// The tab's status slot.- static const width = 16.0;-- /// Half a second per side: five of the spinner's 100ms frames.- static bool mirroredAt(int frame) => (frame ~/ 5).isOdd;-- @override- State<MessagingMark> createState() => _MessagingMarkState();-}--class _MessagingMarkState extends State<MessagingMark> {- ActivityClock get clock => widget.clock ?? _activityClock;- bool _listening = false;-- @override- void didChangeDependencies() {- super.didChangeDependencies();- _sync();- }-- @override- void didUpdateWidget(MessagingMark oldWidget) {- super.didUpdateWidget(oldWidget);- if (oldWidget.clock != widget.clock && _listening) {- (oldWidget.clock ?? _activityClock).removeListener(_tick);- _listening = false;- }- _sync();- }-- void _sync() {- final listen =- widget.visible &&- TickerMode.valuesOf(context).enabled &&- !MediaQuery.disableAnimationsOf(context);- if (listen == _listening) return;- _listening = listen;- if (listen) {- clock.addListener(_tick);- } else {- clock.removeListener(_tick);- }- }-- void _tick() {- if (mounted) setState(() {});- }-- @override- void dispose() {- if (_listening) clock.removeListener(_tick);- super.dispose();- }-- @override- Widget build(BuildContext context) {- final mirrored = _listening && MessagingMark.mirroredAt(clock.frame);- // The tab's 16px status slot, the glyph centered in it: mirroring then- // turns the arrows in place instead of moving them.- return Semantics(- label: agentsMessagingLabel,- child: ExcludeSemantics(- child: RepaintBoundary(- child: SizedBox(- width: MessagingMark.width,- child: Center(- child: Transform.flip(- key: ValueKey(- 'messaging-mark:${mirrored ? 'mirrored' : 'plain'}',- ),- flipX: mirrored,- // Filled, as the tab's 💬 is while Agent Messages is on.- child: Icon(- AppIcons.agentMessagesOn,- size: 13,- color: widget.color,- ),- ),- ),- ),- ),- ),- );- }-}-/// Pane headers listen to activity and acknowledgement independently of their/// cached title/controls, so a turn or unread change never rebuilds a terminal.class HarnessActivityMark extends StatelessWidget {diff --git a/desktop/macos/Runner/SwarmTitlebar.swift b/desktop/macos/Runner/SwarmTitlebar.swiftindex 7d263c7a1..76005bd4c 100644--- a/desktop/macos/Runner/SwarmTitlebar.swift+++ b/desktop/macos/Runner/SwarmTitlebar.swift@@ -2149,9 +2149,9 @@ private final class SwarmTabStrip: NSView {syncActivityAnimation()}- /// Tabs whose status slot moves: a working spinner, or agents messaging.+ /// Tabs whose status slot moves: a working spinner.private var visibleAnimatedTabs: [SwarmTabButton] {- tabs.filter { ($0.activity?.working == true || $0.messaging) && scroll.documentVisibleRect.intersects($0.frame) }+ tabs.filter { $0.activity?.working == true && scroll.documentVisibleRect.intersects($0.frame) }}private func syncActivityAnimation() {@@ -2327,8 +2327,8 @@ private final class SwarmTabStrip: NSView {let tabsFocused = state["tabsFocused"] as? Bool == truerevealActiveAfterLayout = revealActiveAfterLayout || nextActiveId != activeIdactiveId = nextActiveId- // Agent Messages' color: its 💬 when on, and the status slot while agents- // message. Flutter sends the accent blue (AppPalette.accentOnSurface).+ // Agent Messages' color: its 💬 when on. Flutter sends the accent blue+ // (AppPalette.accentOnSurface).let messagesColor = statusColor(state["agentMessagesInk"], fallback: .controlAccentColor)let ids = rows.compactMap { $0["id"] as? String }let previousOrder = tabs.map(\.swarmId)@@ -2352,9 +2352,7 @@ private final class SwarmTabStrip: NSView {tab.actionsEnabled = actionsEnabledtab.attention = (row["attention"] as? Int ?? 0) > 0tab.activity = HarnessNativeActivity(row["activity"] as? [String: Any])- tab.agentMessages = (row["agentMessages"] as? Bool).map {- SwarmTabMessages(on: $0, flowing: row["agentMessagesFlowing"] as? Bool == true)- }+ tab.agentMessages = (row["agentMessages"] as? Bool).map { SwarmTabMessages(on: $0) }tab.messagesColor = messagesColortab.emit = { [weak self, weak tab] method, args inguard let self, let tab, self.actionsEnabled,@@ -2739,9 +2737,9 @@ private final class SwarmTabButton: NSView, NSDraggingSource, NSMenuItemValidatilet swarmId: Stringvar name = "New Tab" { didSet { if name != oldValue { invalidateLabel(); updateAccessibility() } } }var displayLabel = "New Tab" { didSet { if displayLabel != oldValue { invalidateLabel() } } }- /// Agent Messages (docs/design/2026-10-10-agent-messages.md): the hover 💬,- /// and the status slot while agents message; nil where the row carries none- /// (the Store tab).+ /// Agent Messages (docs/design/2026-10-10-agent-messages.md): the hover 💬;+ /// nil where the row carries none (the Store tab). Traffic between agents+ /// shows nothing on the tab: messages arrive when they arrive.var agentMessages: SwarmTabMessages? {didSet {guard agentMessages != oldValue else { return }@@ -2750,13 +2748,10 @@ private final class SwarmTabButton: NSView, NSDraggingSource, NSMenuItemValidatiupdateAccessibility()}}- /// Agent Messages' color: the 💬 when on, and the slot while messaging.+ /// Agent Messages' color: the 💬 when on.var messagesColor = NSColor.controlAccentColor {didSet { if messagesColor != oldValue { updateMessagesControls() } }}- /// Agents in this tab messaged one another a moment ago: the status slot- /// shows 💬 in place of the status until it goes quiet.- var messaging: Bool { agentMessages?.on == true && agentMessages?.flowing == true }var foreground = NSColor(white: 0.85, alpha: 1) {didSet {if foreground != oldValue { invalidateLabel() }@@ -2764,9 +2759,9 @@ private final class SwarmTabButton: NSView, NSDraggingSource, NSMenuItemValidatiupdateMessagesControls()}}- /// The status slot: the activity mark, or 💬 while agents message.+ /// The status slot: the activity mark.private var statusSpace: CGFloat {- messaging || !(activityMark?.isEmpty ?? true) ? Self.activityWidth + Self.gap : 0+ !(activityMark?.isEmpty ?? true) ? Self.activityWidth + Self.gap : 0}private var naturalTitleWidth: CGFloat { max(labelLayout.size.width, emphasizedLabelLayout.size.width) }var minimumWidth: CGFloat { Self.restingInset * 2 + statusSpace + 16 }@@ -2778,7 +2773,7 @@ private final class SwarmTabButton: NSView, NSDraggingSource, NSMenuItemValidati}var activityFrame = 0 {didSet {- if activityFrame != oldValue, activity?.working == true || messaging { setNeedsDisplay(activityRect) }+ if activityFrame != oldValue, activity?.working == true { setNeedsDisplay(activityRect) }}}// Keep the old question payload useful for an older Flutter fixture/runner.@@ -2919,7 +2914,6 @@ private final class SwarmTabButton: NSView, NSDraggingSource, NSMenuItemValidati// A tooltip shows under the pointer, where the name has its revealed room.if naturalTitleWidth > titleRect(revealed: true).width { hints.append(displayLabel) }if !fullName.isEmpty && fullName != displayLabel { hints.append(name) }- if messaging { hints.append(SwarmTabMessages.messagingLabel) }if let activityLabel { hints.append(activityLabel) }toolTip = hints.isEmpty ? nil : hints.joined(separator: "\n")}@@ -3047,12 +3041,7 @@ private final class SwarmTabButton: NSView, NSDraggingSource, NSMenuItemValidatiwidth: titleRect.width, height: text.size.height))}let status = NSRect(x: activityRect.minX, y: contentCenterY - 8, width: activityRect.width, height: 16)- if messaging {- NSGraphicsContext.saveGraphicsState()- bounds.clip()- SwarmTabMessages.drawMessaging(in: status, frame: activityFrame, color: messagesColor)- NSGraphicsContext.restoreGraphicsState()- } else if let activityMark {+ if let activityMark {NSGraphicsContext.saveGraphicsState()bounds.clip()HarnessNativeActivity.draw(activityMark, in: status, color: activity?.color ?? .systemOrange)@@ -3067,7 +3056,7 @@ private final class SwarmTabButton: NSView, NSDraggingSource, NSMenuItemValidaticloseButton.setAccessibilityLabel("Close \(name)")closeButton.toolTip = "Close Tab"selectButton.setAccessibilityValue(selected ? "Selected" : "")- let help = [messaging ? SwarmTabMessages.messagingLabel : nil, activityLabel,+ let help = [activityLabel,keyboardFocus ? "Keyboard is on the tabs. Press Return to type in this tab." : nil].compactMap { $0 }selectButton.setAccessibilityHelp(help.isEmpty ? nil : help.joined(separator: ". "))}@@ -3143,33 +3132,9 @@ private final class SwarmTabButton: NSView, NSDraggingSource, NSMenuItemValidati/// A tab's Agent Messages, as the `update` payload's row says it.struct SwarmTabMessages: Equatable {var on: Bool- var flowing: Bool- static let messagingLabel = "Agents messaging"- /// The status slot while agents message: two chat bubbles, mirrored every- /// half second on the activity clock so the speakers trade sides; still at- /// frame 0 (Reduce Motion).- static func drawMessaging(in rect: NSRect, frame: Int, color: NSColor) {- // Filled, as the tab's 💬 is while Agent Messages is on, which it is whenever agents message.- guard let symbol = NSImage(systemSymbolName: "bubble.left.and.bubble.right.fill", accessibilityDescription: nil)?- .withSymbolConfiguration(NSImage.SymbolConfiguration(pointSize: 10, weight: .medium)) else { return }- let glyph = NSRect(x: rect.midX - symbol.size.width / 2, y: rect.midY - symbol.size.height / 2,- width: symbol.size.width, height: symbol.size.height)- NSGraphicsContext.current?.cgContext.beginTransparencyLayer(auxiliaryInfo: nil)- if (frame / 5) % 2 == 1 {- let mirror = NSAffineTransform()- mirror.translateX(by: glyph.midX * 2, yBy: 0)- mirror.scaleX(by: -1, yBy: 1)- mirror.concat()- }- symbol.draw(in: glyph)- color.setFill()- glyph.fill(using: .sourceIn)- NSGraphicsContext.current?.cgContext.endTransparencyLayer()- }/// What the 💬 says a click does; the Flutter tab says the same.var tooltip: String {- !on ? "Agent messages off · click to turn on"- : flowing ? "Agents messaging · click to turn off" : "Agent messages on · click to turn off"+ on ? "Agent messages on · click to turn off" : "Agent messages off · click to turn on"}}diff --git a/desktop/test/agent_messages_tab_test.dart b/desktop/test/agent_messages_tab_test.dartindex 9244eef80..d5a104335 100644--- a/desktop/test/agent_messages_tab_test.dart+++ b/desktop/test/agent_messages_tab_test.dart@@ -7,9 +7,7 @@ import 'package:flutter_test/flutter_test.dart';import 'package:harness/agent_messages/agent_messages.dart';import 'package:harness/shared/theme/app_icons.dart';import 'package:harness/shared/theme/app_theme.dart' as grid;-import 'package:harness/state/harness_activity.dart' show activityFrameInterval;import 'package:harness/widgets/desktop_workspace_tab.dart';-import 'package:harness/widgets/harness_activity_mark.dart';import 'support/agent_messages_api.dart';import 'swarm_screen_test.dart' show mount;@@ -17,7 +15,7 @@ import 'swarm_state_test.dart' show createApp;/// The tab's Agent Messages (docs/design/2026-10-10-agent-messages.md, "The/// tab"): hovering a tab reveals 💬 — grey while off, its color while on — and-/// ×; while agents message, the status slot shows 💬 in place of the status.+/// ×. Traffic between its agents shows nothing on the tab.typedef _Spec = ({String id, TabMessagesState? messages, bool working});const _messagesColor = Color(0xffbc3fbc);@@ -164,19 +162,6 @@ void main() {);});- testWidgets('flowing: no 💬 or × at rest — the status slot says it', (- tester,- ) async {- await tester.pumpWidget(- _host([(id: 'app', messages: TabMessagesState.flowing, working: false)]),- );- expect(_messages('app').hitTestable(), findsNothing);- expect(_close('app').hitTestable(), findsNothing);- await _hover(tester, 'app');- expect(_glyph(tester, 'app').withValues(alpha: 1), _messagesColor);- expect(_tooltip(tester, 'app'), 'Agents messaging · click to turn off');- });-testWidgets('hover reveals only its own tab', (tester) async {await tester.pumpWidget(_host([@@ -207,7 +192,7 @@ void main() {_host([(id: 'one', messages: TabMessagesState.off, working: false),- (id: 'two', messages: TabMessagesState.flowing, working: false),+ (id: 'two', messages: TabMessagesState.on, working: false),],onToggle: toggled.add,onSelect: selected.add,@@ -224,7 +209,7 @@ void main() {final semantics = tester.ensureSemantics();await tester.pumpWidget(_host([- (id: 'app', messages: TabMessagesState.flowing, working: false),+ (id: 'app', messages: TabMessagesState.on, working: false),(id: 'off', messages: TabMessagesState.off, working: false),]),);@@ -234,7 +219,7 @@ void main() {final mouse = await _hover(tester, 'app');final on = tester.getSemantics(_messages('app'));expect(on.label, 'Agent Messages');- expect(on.hint, 'Agents messaging · click to turn off');+ expect(on.hint, 'Agent messages on · click to turn off');expect(on.getSemanticsData().flagsCollection.isToggled, Tristate.isTrue);await mouse.moveTo(tester.getCenter(_label('off')));await tester.pump();@@ -249,55 +234,6 @@ void main() {semantics.dispose();});- testWidgets('the messaging mark trades sides every half second', (- tester,- ) async {- final semantics = tester.ensureSemantics();- final clock = ActivityClock(now: tester.binding.clock.now);- addTearDown(clock.dispose);- Future<void> show({bool reduce = false}) => tester.pumpWidget(- MaterialApp(- home: MediaQuery(- data: MediaQueryData(disableAnimations: reduce),- child: Center(- child: MessagingMark(color: _messagesColor, clock: clock),- ),- ),- ),- );- Finder mirrored = find.byKey(const ValueKey('messaging-mark:mirrored'));- Finder plain = find.byKey(const ValueKey('messaging-mark:plain'));- await show();- expect(clock.running, isTrue);- final seen = <bool>{};- for (var i = 0; i < 10; i++) {- expect(- mirrored.evaluate().length + plain.evaluate().length,- 1,- reason: 'one 💬 at a time',- );- seen.add(mirrored.evaluate().isNotEmpty);- expect(- mirrored.evaluate().isNotEmpty,- MessagingMark.mirroredAt(clock.frame),- );- await tester.pump(activityFrameInterval);- }- expect(seen, {true, false}, reason: 'both sides within a second');- expect(find.bySemanticsLabel(agentsMessagingLabel), findsOneWidget);- // Centered in the tab's 16px slot, so mirroring turns it in place.- final slot = tester.getRect(find.byType(MessagingMark));- expect(slot.width, MessagingMark.width);- expect(tester.getCenter(find.byType(Icon)), slot.center);- await show(reduce: true);- for (var i = 0; i < 10; i++) {- expect(plain, findsOneWidget, reason: 'Reduce Motion holds it still');- await tester.pump(activityFrameInterval);- }- await tester.pumpWidget(const SizedBox());- semantics.dispose();- });-testWidgets('the workspace strip offers 💬 only on desk tabs, once answered',(tester) async {@@ -323,7 +259,7 @@ void main() {},);- testWidgets('a messaging tab shows 💬 in its status slot, then its status', (+ testWidgets('a message moving in a tab changes nothing on it', (tester,) async {final app = createApp();@@ -333,8 +269,14 @@ void main() {api.flags[tab] = true;await app.agentMessages.refresh();await mount(tester, app);- final messaging = find.byKey(ValueKey('tab-messaging:$tab'));- expect(messaging, findsNothing);+ List<String?> tooltips() => [+ for (final tooltip in tester.widgetList<Tooltip>(+ find.ancestor(of: _label(tab), matching: find.byType(Tooltip)),+ ))+ tooltip.message,+ ];+ final label = tester.getRect(_label(tab));+ final hints = tooltips();app.agentMessages.handleEvent({'tabId': tab,'messageId': 'm0000001',@@ -345,21 +287,18 @@ void main() {],});await tester.pump();- expect(messaging, findsOneWidget);- expect(_messages(tab).hitTestable(), findsNothing, reason: 'no 💬 button');- final tooltip = tester.widget<Tooltip>(- find.ancestor(of: _label(tab), matching: find.byType(Tooltip)).first,- );- expect(tooltip.message, contains(agentsMessagingLabel));- final semantics = tester.ensureSemantics();+ expect(app.agentMessages.trafficFor(tab), 1);+ expect(app.agentMessages.stateOf(tab), TabMessagesState.on);expect(- find.bySemanticsLabel(RegExp('$agentsMessagingLabel\$')),- findsOneWidget,- reason: 'the tab says it, as the native tab does',+ tester.getRect(_label(tab)),+ label,+ reason: 'no status slot opens beside the name',);- semantics.dispose();- await tester.pump(const Duration(seconds: 10));- expect(messaging, findsNothing, reason: 'back to its status');+ expect(tooltips(), hints);+ expect(_messages(tab).hitTestable(), findsNothing, reason: 'no 💬 at rest');+ expect(find.byIcon(AppIcons.agentMessagesOn).hitTestable(), findsNothing);+ // Let the pane marks lapse before the test ends.+ await tester.pump(app.agentMessages.markLife);await tester.pumpWidget(const SizedBox());});}diff --git a/desktop/test/agent_messages_test.dart b/desktop/test/agent_messages_test.dartindex 7ac47a63e..fac52bca3 100644--- a/desktop/test/agent_messages_test.dart+++ b/desktop/test/agent_messages_test.dart@@ -230,14 +230,14 @@ void main() {messages.handleEvent(_sent());messages.reset();expect(messages.isOn('tab'), isFalse);- expect(messages.isFlowing('tab'), isFalse);+ expect(messages.trafficFor('tab'), 0);expect(messages.markFor('studio', 'lead'), isNull);expect(messages.loaded, isFalse);});});group('traffic', () {- test('a tab flows for 10 seconds after its last message', () {+ test('a message counts as traffic and leaves the tab as it was', () {fakeAsync((async) {backend.tabs = {'tab': true};final messages = controller();@@ -246,25 +246,18 @@ void main() {var notified = 0;messages.addListener(() => notified++);messages.handleEvent(_sent());- expect(messages.isFlowing('tab'), isTrue);- expect(messages.stateOf('tab'), TabMessagesState.flowing);expect(messages.trafficFor('tab'), 1);- async.elapse(const Duration(seconds: 3));+ expect(+ messages.stateOf('tab'),+ TabMessagesState.on,+ reason: 'a tab never shows traffic: messages arrive when they arrive',+ );+ expect(notified, 1, reason: 'an open log reads again');messages.handleEvent(_sent(state: 'delivered'));expect(messages.trafficFor('tab'), 2);- async.elapse(const Duration(seconds: 9));- expect(messages.isFlowing('tab'), isTrue);- final before = notified;- async.elapse(const Duration(seconds: 1));- expect(messages.isFlowing('tab'), isFalse);expect(messages.stateOf('tab'), TabMessagesState.on);- expect(- notified,- greaterThan(before),- reason: 'the status slot goes back by itself',- );- expect(async.pendingTimers, isEmpty);messages.dispose();+ expect(async.pendingTimers, isEmpty);});});@@ -317,7 +310,7 @@ void main() {final mark = messages.markFor('studio', 'lead')!;expect(mark.warning, isTrue);expect(mark.label, '→ rate limited');- expect(messages.isFlowing('tab'), isFalse);+ expect(messages.trafficFor('tab'), 0);messages.dispose();});});@@ -328,9 +321,9 @@ void main() {messages.handleEvent({'messageId': 'm0000001'});messages.handleEvent({'tabId': '', 'messageId': 'm0000001'});messages.handleEvent({'limited': 'nobody'});- expect(messages.isFlowing(''), isFalse);+ expect(messages.trafficFor(''), 0);messages.handleEvent({'tabId': 'tab', 'messageId': 'm0000003'});- expect(messages.isFlowing('tab'), isTrue);+ expect(messages.trafficFor('tab'), 1);expect(messages.markFor('studio', 'lead'), isNull);});});@@ -488,7 +481,7 @@ void main() {Map<String, dynamic> recent(String id, {required Duration ago}) =>_row(id, at: now.subtract(ago).millisecondsSinceEpoch);- test('a new message that just moved flows and marks its panes', () async {+ test('a message that just moved is traffic and marks its panes', () async {final asked = <(String, Map<String, dynamic>)>[];final messages = AgentMessagesController(read: backend.read,@@ -498,8 +491,8 @@ void main() {return {'messages': [recent('m0000001', ago: const Duration(minutes: 5)),- // Past the 10 s a tab flows, within a round of the remote- // watch's: still news when a round first sees it.+ // Within a round of the remote watch's: still news when a+ // round first sees it.recent('m0000002', ago: const Duration(seconds: 30)),],};@@ -517,7 +510,6 @@ void main() {'tabId': 'tab','limit': 20,});- expect(messages.isFlowing('tab'), isTrue);expect(messages.trafficFor('tab'), 1);expect(messages.markFor('studio', 'lead')?.label, '→ API worker');expect(messages.markFor('laptop', 'api')?.label, '← Lead');@@ -533,33 +525,6 @@ void main() {expect(messages.markFor('studio', 'lead'), isNull);});- test('remote traffic flows one round longer, so rounds renew it', () {- fakeAsync((async) {- final messages = AgentMessagesController(- read: backend.read,- write: backend.write,- request: (_, _) async => {- 'messages': [recent('m0000004', ago: const Duration(seconds: 5))],- },- nameOf: (_, _) => null,- now: () => now,- );- unawaited(- messages.pollRemote([- (tabId: 'tab', machineIds: ['laptop']),- ], round: const Duration(seconds: 15)),- );- async.flushMicrotasks();- expect(messages.isFlowing('tab'), isTrue);- async.elapse(const Duration(seconds: 24));- expect(messages.isFlowing('tab'), isTrue);- async.elapse(const Duration(seconds: 1));- expect(messages.isFlowing('tab'), isFalse);- messages.dispose();- expect(async.pendingTimers, isEmpty);- });- });-test('older messages are remembered, not announced', () async {final messages = AgentMessagesController(read: backend.read,@@ -574,7 +539,7 @@ void main() {await messages.pollRemote([(tabId: 'tab', machineIds: ['laptop']),]);- expect(messages.isFlowing('tab'), isFalse);+ expect(messages.trafficFor('tab'), 0);expect(messages.markFor('studio', 'lead'), isNull);messages.handleEvent(_sent(id: 'm0000003', state: 'delivered'));expect(@@ -703,7 +668,7 @@ void main() {],},});- expect(app.agentMessages.isFlowing(app.activeSwarmId), isTrue);+ expect(app.agentMessages.trafficFor(app.activeSwarmId), 1);expect(app.agentMessages.markFor('studio', 'lead')?.label,'→ API worker',diff --git a/desktop/test/agent_messages_view_test.dart b/desktop/test/agent_messages_view_test.dartindex 6a6ad6460..b5c9dbbb8 100644--- a/desktop/test/agent_messages_view_test.dart+++ b/desktop/test/agent_messages_view_test.dart@@ -322,9 +322,6 @@ void main() {await tester.pumpAndSettle();expect(reads, 2);expect(find.text('lead → api'), findsNWidgets(2));- // Let the tab's messaging run out before the test ends.- await tester.pump(const Duration(seconds: 11));- expect(controller.isFlowing('tab'), isFalse);});test('times read as a clock today and with the day before', () {diff --git a/desktop/test/native_toolbar_sync_test.dart b/desktop/test/native_toolbar_sync_test.dartindex a23d29348..f1d44f8ad 100644--- a/desktop/test/native_toolbar_sync_test.dart+++ b/desktop/test/native_toolbar_sync_test.dart@@ -230,12 +230,12 @@ void main() {final tab = app.activeSwarmId;Map row() => (updates().last['tabs'] as List).single as Map;- // Traffic alone rebuilds no workspace; it reaches the tab only while on,- // since a tab that is off says nothing about agents messaging.+ // Traffic rebuilds no workspace, and the row carries only the flag: a tab+ // never shows agents messaging.app.agentMessages.handleEvent({'tabId': tab, 'messageId': 'm0000001'});await tester.idle();expect(row()['agentMessages'], isFalse);- expect(row()['agentMessagesFlowing'], isFalse);+ expect(row().containsKey('agentMessagesFlowing'), isFalse);expect(updates().last['activeAgentMessages'], isFalse);Future<void> native(String method) =>@@ -251,8 +251,10 @@ void main() {await tester.pumpAndSettle();expect(api.writes, [(tab, true)]);expect(row()['agentMessages'], isTrue);- expect(row()['agentMessagesFlowing'], isTrue);expect(updates().last['activeAgentMessages'], isTrue);+ app.agentMessages.handleEvent({'tabId': tab, 'messageId': 'm0000002'});+ await tester.idle();+ expect(row().containsKey('agentMessagesFlowing'), isFalse);// A refused turn off goes back, and says so where the click was.api.writeError = StateError('offline');@@ -271,10 +273,6 @@ void main() {await tester.pumpAndSettle();expect(find.text('Before · Agent Messages'), findsNothing);- await tester.pump(const Duration(seconds: 61));- await tester.idle();- expect(row()['agentMessagesFlowing'], isFalse);-// An older CLI or backend: no 💬, no menu row.api.unsupported = true;await app.agentMessages.refresh();diff --git a/desktop/tool/agent_messages_preview.swift b/desktop/tool/agent_messages_preview.swiftindex b2b354594..dbbef1d60 100644--- a/desktop/tool/agent_messages_preview.swift+++ b/desktop/tool/agent_messages_preview.swift@@ -39,7 +39,6 @@ private let previewHover = NSEvent.mouseEvent(with: .mouseMoved, location: .zeroprivate struct PreviewTab {let id: Stringvar messages: Bool?- var flowing = falsevar activity: ((Bool) -> [String: Any])? = nil}@@ -88,10 +87,7 @@ private func previewWindow(width: CGFloat, palette: [String: Any], tabs: [Previemessenger.receive("configure", ["palette": palette])let rows: [[String: Any]] = tabs.map { tab invar row: [String: Any] = ["id": tab.id, "name": tab.id, "label": tab.id]- if let messages = tab.messages {- row["agentMessages"] = messages- row["agentMessagesFlowing"] = tab.flowing- }+ if let messages = tab.messages { row["agentMessages"] = messages }if let activity = tab.activity { row["activity"] = activity(palette["dark"] as? Int64 == 1) }return row}@@ -153,8 +149,8 @@ private func captureMenu(_ menu: NSMenu, _ name: String, dark: Bool) {if !captured { print("No menu window for \(name)") }}-private let lampTabs: [PreviewTab] = [- PreviewTab(id: "lamp", messages: true, activity: working),+private let sceneTabs: [PreviewTab] = [+ PreviewTab(id: "app", messages: true, activity: working),PreviewTab(id: "desktop", messages: true, activity: ready),PreviewTab(id: "website", messages: false, activity: needsInput),PreviewTab(id: "notes", messages: false),@@ -162,9 +158,9 @@ private let lampTabs: [PreviewTab] = [for (theme, palette) in previewPalettes {let dark = theme == "dark"- func scene(_ name: String, tabs: [PreviewTab] = lampTabs, width: CGFloat = 1280, crop: CGFloat? = nil,+ func scene(_ name: String, tabs: [PreviewTab] = sceneTabs, width: CGFloat = 1280, crop: CGFloat? = nil,after: (SwarmTabStrip) -> Void = { _ in }, _ act: (SwarmTabStrip) -> Void = { _ in }) {- let (window, titlebar) = previewWindow(width: width, palette: palette, tabs: tabs, active: "lamp",+ let (window, titlebar) = previewWindow(width: width, palette: palette, tabs: tabs, active: "app",activeMessages: tabs.first?.messages)act(titlebar.previewStrip)titlebar.previewStrip.layoutSubtreeIfNeeded()@@ -174,36 +170,26 @@ for (theme, palette) in previewPalettes {capture(window, "\(name)-\(theme)", width: crop)window.close()}- var messaging = lampTabs- messaging[0].flowing = true+ // A tab shows no traffic between its agents, so at rest there is one scene.scene("01-rest-quiet")- // The status slot's two frames: 💬, then mirrored half a second later.- scene("02-rest-messaging", tabs: messaging)- scene("02b-rest-messaging-next-frame", tabs: messaging, after: { $0.previewTabs[0].activityFrame = 5 })- // The animation, frame by frame, for the review page to play: messaging's- // two sides, then the working spinner's ten frames.- for frame in [0, 5] {- scene("anim-messaging-\(frame)", tabs: messaging, crop: 600,- after: { $0.previewTabs[0].activityFrame = frame })- }+ // The working spinner, frame by frame, for the review page to play.for frame in 0..<10 {scene("anim-working-\(frame)", crop: 600, after: { $0.previewTabs[0].activityFrame = frame })}scene("03-hover-off") { $0.previewTabs[2].mouseEntered(with: previewHover) }scene("04-hover-on-quiet") { $0.previewTabs[1].mouseEntered(with: previewHover) }- scene("05-hover-on-messaging", tabs: messaging) { $0.previewTabs[0].mouseEntered(with: previewHover) }scene("06-pointer-on-arrows-off") {$0.previewTabs[2].mouseEntered(with: previewHover)$0.previewTabs[2].previewPointOnMessages()}let crowded = (1...9).map { index in- PreviewTab(id: ["lamp", "desktop", "website", "notes", "cli", "backend", "phone", "docs", "infra"][index - 1],- messages: index % 3 != 0, flowing: index == 1, activity: index % 2 == 0 ? working : nil)+ PreviewTab(id: ["app", "desktop", "website", "notes", "cli", "backend", "phone", "docs", "infra"][index - 1],+ messages: index % 3 != 0, activity: index % 2 == 0 ? working : nil)}scene("08-crowded-rest", tabs: crowded, width: 1280)scene("09-crowded-hover", tabs: crowded, width: 1280) { $0.previewTabs[1].mouseEntered(with: previewHover) }- let (window, titlebar) = previewWindow(width: 1280, palette: palette, tabs: messaging, active: "lamp",+ let (window, titlebar) = previewWindow(width: 1280, palette: palette, tabs: sceneTabs, active: "app",activeMessages: true)let tabs = titlebar.previewStrip.previewTabscaptureMenu(tabs[0].previewMenu!, "10-tab-menu-on-\(theme)", dark: dark)diff --git a/desktop/tool/swarm_titlebar_checks.swift b/desktop/tool/swarm_titlebar_checks.swiftindex a8198fcfb..95e71c1c9 100644--- a/desktop/tool/swarm_titlebar_checks.swift+++ b/desktop/tool/swarm_titlebar_checks.swift@@ -158,8 +158,7 @@ private extension SwarmTabButton {labelFont = fonttry compareWithFresh("Change font")}- for state in [SwarmTabMessages(on: true, flowing: true), SwarmTabMessages(on: false, flowing: false),- nil, SwarmTabMessages(on: true, flowing: false)] as [SwarmTabMessages?] {+ for state in [SwarmTabMessages(on: true), SwarmTabMessages(on: false), nil] as [SwarmTabMessages?] {agentMessages = statetry compareWithFresh("Agent Messages \(String(describing: state))")}@@ -643,8 +642,8 @@ private extension SwarmTabButton {}/// Agent Messages (docs/design/2026-10-10-agent-messages.md): the hover 💬,- /// grey while off and in its color while on; the status slot while agents- /// message; a click and the tab's menu.+ /// grey while off and in its color while on; a click and the tab's menu.+ /// Traffic between agents shows nothing on the tab.func checkAgentMessages() throws {frame = NSRect(x: 0, y: 0, width: 240, height: 40)contentCenterY = 20@@ -680,7 +679,7 @@ private extension SwarmTabButton {try checkTitlebar(messagesButton.isHidden && !closeButton.isHidden, "A tab without Agent Messages shows no 💬")mouseExited(with: hover)- agentMessages = SwarmTabMessages(on: false, flowing: false)+ agentMessages = SwarmTabMessages(on: false)try checkTitlebar(rows[1...3].allSatisfy { !$0.isHidden }, "A tab with Agent Messages lists both rows")try checkTitlebar(messagesButton.isHidden && closeButton.isHidden,"Off, at rest, a tab shows nothing extra")@@ -706,8 +705,9 @@ private extension SwarmTabButton {mouseExited(with: hover)try checkTitlebar(messagesButton.isHidden && closeButton.isHidden, "Leaving hides them again")- agentMessages = SwarmTabMessages(on: true, flowing: false)- try checkTitlebar(messagesButton.isHidden && !hasMessagesInk(), "On and quiet, a tab at rest shows nothing extra")+ agentMessages = SwarmTabMessages(on: true)+ try checkTitlebar(messagesButton.isHidden && statusSpace == 0 && !hasMessagesInk(),+ "On, a tab at rest shows nothing extra")mouseEntered(with: hover)try checkTitlebar(!messagesButton.isHidden && messagesButton.foreground == messagesColor &&messagesButton.restingOpacity == 1 && drawn(messagesButton, "bubble.left.and.bubble.right.fill") &&@@ -717,32 +717,11 @@ private extension SwarmTabButton {"Hovered and on: 💬 filled in Agent Messages' color, which turns it off")mouseExited(with: hover)- agentMessages = SwarmTabMessages(on: true, flowing: true)- layoutSubtreeIfNeeded()- try checkTitlebar(messaging && messagesButton.isHidden && closeButton.isHidden && statusSpace > 0 &&- hasMessagesInk() && activityRect.minX == titleRect.maxX + 6,- "While agents message, the status slot shows 💬 in its color; no button at rest")- let still = renderedPixels()- activityFrame = 5- try checkTitlebar(renderedPixels() != still, "The slot's 💬 trades sides on the activity clock")- activityFrame = 9- let mirrored = renderedPixels()- activityFrame = 10- try checkTitlebar(renderedPixels() == still && mirrored != still, "Half a second per side")- activityFrame = 0- try checkTitlebar(toolTip?.contains("Agents messaging") == true &&- selectButton.accessibilityHelp()?.contains("Agents messaging") == true,- "The tooltip and accessibility say agents are messaging")activity = HarnessNativeActivity(["mark": "?", "label": "Needs your input", "color": Int64(0xffe5e510)])- try checkTitlebar(hasMessagesInk() && selectButton.accessibilityHelp() == "Agents messaging. Needs your input",- "Messaging takes the slot over a status, which accessibility still reads")- agentMessages = SwarmTabMessages(on: true, flowing: false)- try checkTitlebar(!messaging && !hasMessagesInk(), "Quiet again, the slot goes back to the tab's status")+ layoutSubtreeIfNeeded()+ try checkTitlebar(!hasMessagesInk() && selectButton.accessibilityHelp() == "Needs your input",+ "On, the status slot keeps the tab's own status")activity = nil- agentMessages = SwarmTabMessages(on: false, flowing: true)- try checkTitlebar(!messaging && statusSpace == 0 && messagesButton.isHidden,- "Off, a tab shows nothing even if its last traffic was recent")- agentMessages = SwarmTabMessages(on: true, flowing: true)let toggle = rows[2]_ = validateMenuItem(toggle)try checkTitlebar(toggle.state == .on, "The menu's Agent Messages row is checked while on")@@ -752,11 +731,11 @@ private extension SwarmTabButton {try checkTitlebar(events.suffix(2).map(\.0) == ["toggleAgentMessages", "showAgentMessages"] &&events.suffix(2).allSatisfy { $0.1 == swarmId },"The tab menu's rows act on this tab")- agentMessages = SwarmTabMessages(on: false, flowing: false)+ agentMessages = SwarmTabMessages(on: false)_ = validateMenuItem(toggle)try checkTitlebar(toggle.state == .off, "The row's checkmark follows the flag")actionsEnabled = false- agentMessages = SwarmTabMessages(on: true, flowing: true)+ agentMessages = SwarmTabMessages(on: true)mouseEntered(with: hover)let before = events.countmessagesButton.performClick(nil)@@ -1572,16 +1551,14 @@ private extension SwarmTabStrip {]var messageRows = rowsmessageRows[0]["agentMessages"] = true- messageRows[0]["agentMessagesFlowing"] = truemessageRows[1]["agentMessages"] = falseupdate(["enabled": true, "activeId": "work", "tabs": messageRows, "agentMessagesInk": Int64(0xffbc3fbc)])- try checkTitlebar(tabs.map(\.agentMessages) == [SwarmTabMessages(on: true, flowing: true),- SwarmTabMessages(on: false, flowing: false), nil, nil],+ try checkTitlebar(tabs.map(\.agentMessages) == [SwarmTabMessages(on: true), SwarmTabMessages(on: false), nil, nil],"Each row's Agent Messages reaches its tab; a row without one has no 💬")try checkTitlebar(tabs.allSatisfy { $0.messagesColor == statusColor(Int64(0xffbc3fbc), fallback: .clear) },"Every tab takes Agent Messages' color from the update")- try checkTitlebar(tabs[0].messaging && visibleAnimatedTabs.contains { $0 === tabs[0] },- "A messaging tab animates its status slot, as a working tab does")+ try checkTitlebar(!visibleAnimatedTabs.contains { $0 === tabs[0] },+ "A tab with Agent Messages on animates nothing; only a working tab's spinner moves")update(["enabled": true, "activeId": "work", "tabs": rows])try checkTitlebar(tabs.map(\.displayLabel) == ["New Tab", "Desktop", "1: Release planning", "Notes"],"Clean labels preserve numeric-looking custom names and omit generated prefixes")diff --git a/docs/design/2026-10-10-agent-messages.md b/docs/design/2026-10-10-agent-messages.mdindex 232b6de67..2ef40527d 100644--- a/docs/design/2026-10-10-agent-messages.md+++ b/docs/design/2026-10-10-agent-messages.md@@ -58,17 +58,15 @@ holding ⌘ changes nothing on them (owner, 2026-10-11).| State | Not hovered | Hovered | Click 💬 ||---|---|---|---|| Off (default) | `app ✓` | `app ✓ 💬 ×` (💬 a quiet outline) | turns on |-| On, quiet | `app ✓` | `app ✓ 💬 ×` (💬 filled, in color) | turns off |-| On, messages flowing | `app 💬` (the status slot, animated) | `app 💬 💬 ×` | turns off |--While agents in the tab message each other, its status slot (where the working spinner, ✓ and ? go)-shows 💬 in Agent Messages' color, its two bubbles trading sides every half second, for 10 seconds after-the last message (long enough to catch at a glance, short enough to stay a blip: replies take minutes),-then the tab's status again. Traffic read from another machine's log lasts one 15 s poll round longer. The color is the design-system's accent blue (`AppPalette.accentOnSurface`), its one color for "on" and selection; it stays-clear of the status marks' cyan, green, yellow and red, and the bubbles' shape carries the meaning too. Reduce Motion-holds it still. At rest a tab gives its name the whole width; when hovered, a name that would run into-💬 and × moves left only as far as they need, then gives up its tail.+| On | `app ✓` | `app ✓ 💬 ×` (💬 filled, in color) | turns off |++The tab shows no traffic: its status slot keeps the working spinner, ✓ or ?, and messages arrive when they+arrive. An animated 💬 there, for 10 seconds after each message, sent the owner looking in the panes for+messages that agents take at their tool calls, so it went (owner, 2026-10-12). The color of an on 💬 is the+design system's accent blue (`AppPalette.accentOnSurface`), its one color for "on" and selection; it stays+clear of the status marks' cyan, green, yellow and red, and the bubbles' shape carries the meaning too. At+rest a tab gives its name the whole width; when hovered, a name that would run into 💬 and × moves left+only as far as they need, then gives up its tail.On and off differ in shape as well as color: on, the bubbles are filled, at full strength; off, an outlineat a third of the text's strength. One outline in two tints read alike ("really hard to see on/off@@ -76,9 +74,8 @@ states", owner, 2026-10-12, who chose filled over a blue pill and a slash). 💬apart (16pt, 3pt apart, were easy to click by mistake), and the tab's × is the pane's: 7pt across with a1pt stroke (AppKit `xmark` 9pt semibold beside Lucide's 12pt `x`).-Tooltips: "Agent messages off · click to turn on", "Agent messages on · click to turn off",-"Agents messaging · click to turn off". The tab's right-click menu and the File menu gain **Agent Messages**-(a checkmark) and **Show Agent Messages**.+Tooltips: "Agent messages off · click to turn on", "Agent messages on · click to turn off". The tab's+right-click menu and the File menu gain **Agent Messages** (a checkmark) and **Show Agent Messages**.### Panes