The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
feat(mobile): terminal header shows the agent's name alone
bubu-dududf307e147a9c
diff --git a/mobile/lib/phone/terminal_header.dart b/mobile/lib/phone/terminal_header.dartindex 0aef84f59..5f5d65d82 100644--- a/mobile/lib/phone/terminal_header.dart+++ b/mobile/lib/phone/terminal_header.dart@@ -12,7 +12,7 @@ import 'status_pill.dart';/// the page's controls at the right end.////// ```-/// [mark●] agent-3 · MacBooks-MacBook-Pro-6 ⋯+/// [mark●] agent-3 ⋯/// ~/…/autonomous-harness ⑂ main/// ```///@@ -33,7 +33,6 @@ class TerminalHeader extends StatelessWidget {const TerminalHeader({super.key,required this.agent,- required this.machineName,required this.status,this.trailing = const [],});@@ -41,9 +40,6 @@ class TerminalHeader extends StatelessWidget {/// The agent this terminal belongs to. Null while it is still loading.final Agent? agent;- /// The machine's name. Empty leaves it out.- final String machineName;-/// The session's state, drawn as the dot on the engine mark.final PhoneSummary status;@@ -53,7 +49,7 @@ class TerminalHeader extends StatelessWidget {/// The row's height, not counting its insets.///- /// Two lines of type: 15pt names over 12.5pt folder, with the engine mark+ /// Two lines of type: 15pt name over 12.5pt folder, with the engine mark/// centred against the pair.static const double rowHeight = 40;@@ -87,7 +83,7 @@ class TerminalHeader extends StatelessWidget {_BadgedMark(agent: agent, status: status),const SizedBox(width: 11),Expanded(- child: _Identity(agent: agent, machineName: machineName),+ child: _Identity(agent: agent),),...trailing,],@@ -131,17 +127,14 @@ class _BadgedMark extends StatelessWidget {}}-/// The two lines: *agent · machine*, then *folder ⑂ branch*.+/// The two lines: *agent*, then *folder ⑂ branch*.///-/// ⚠️ **The agent's name is what yields last.** It is the thing that says WHICH-/// terminal this is, so it takes the larger share of the first line and the-/// machine is cut first. On the second line the folder is kept whole where it-/// can be and the branch gives way — see [projectPathLabel].+/// On the second line the folder is kept whole where it can be and the branch+/// gives way — see [projectPathLabel].class _Identity extends StatelessWidget {- const _Identity({required this.agent, required this.machineName});+ const _Identity({required this.agent});final Agent? agent;- final String machineName;@overrideWidget build(BuildContext context) {@@ -154,46 +147,16 @@ class _Identity extends StatelessWidget {mainAxisAlignment: MainAxisAlignment.center,crossAxisAlignment: CrossAxisAlignment.start,children: [- Row(- children: [- Flexible(- flex: 3,- child: Text(- agent?.name ?? 'Agent',- maxLines: 1,- overflow: TextOverflow.ellipsis,- style: TextStyle(- color: AppPalette.textPrimary,- fontSize: 15,- fontWeight: FontWeight.w600,- height: 1.2,- ),- ),- ),- if (machineName.isNotEmpty) ...[- Padding(- padding: const EdgeInsets.symmetric(horizontal: 5),- child: Text(- '·',- style: TextStyle(color: AppPalette.textFaint, fontSize: 13),- ),- ),- Flexible(- flex: 2,- child: Text(- machineName,- maxLines: 1,- overflow: TextOverflow.ellipsis,- style: TextStyle(- color: AppPalette.textSecondary,- fontSize: 13,- fontWeight: FontWeight.w500,- height: 1.2,- ),- ),- ),- ],- ],+ Text(+ agent?.name ?? 'Agent',+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ style: TextStyle(+ color: AppPalette.textPrimary,+ fontSize: 15,+ fontWeight: FontWeight.w600,+ height: 1.2,+ ),),if (hasPlace) ...[const SizedBox(height: 2),diff --git a/mobile/lib/phone/terminal_page.dart b/mobile/lib/phone/terminal_page.dartindex 88e6df4e4..aaa2b9dc9 100644--- a/mobile/lib/phone/terminal_page.dart+++ b/mobile/lib/phone/terminal_page.dart@@ -738,7 +738,6 @@ class _TerminalPageState extends State<TerminalPage>children: [TerminalHeader(agent: agent,- machineName: machine?.machine.displayName ?? '',status: phoneSessionSummary(session),trailing: [// Read-only is a state to get OUT of, so its waydiff --git a/mobile/test/terminal_header_test.dart b/mobile/test/terminal_header_test.dartindex 0a737de4e..319baca0c 100644--- a/mobile/test/terminal_header_test.dart+++ b/mobile/test/terminal_header_test.dart@@ -5,7 +5,7 @@ import 'package:harness_mobile/phone/phone_status.dart';import 'package:harness_mobile/phone/status_pill.dart';import 'package:harness_mobile/phone/terminal_header.dart';-/// The terminal's top bar: *agent · machine* over *folder ⑂ branch*, with the+/// The terminal's top bar: *agent* over *folder ⑂ branch*, with the/// connection state as a dot on the engine mark.void main() {group('the folder is named by its own name, parents folded', () {@@ -43,7 +43,6 @@ void main() {home: Scaffold(body: TerminalHeader(agent: agent,- machineName: 'MacBooks-MacBook-Pro-6.local',status: (label: 'Live', tone: PhoneTone.good),),),@@ -51,7 +50,6 @@ void main() {);expect(find.text('agent-3'), findsOneWidget);- expect(find.text('MacBooks-MacBook-Pro-6.local'), findsOneWidget);expect(find.text('~/…/autonomous-harness'), findsOneWidget);expect(find.text('feat/mobile-ios-android'), findsOneWidget);// No word for the state — the dot says it, and its tooltip.