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 harness verdict in the pane header
dee9357769b61d1
diff --git a/desktop/lib/widgets/terminal_panel.dart b/desktop/lib/widgets/terminal_panel.dartindex a34dee92b..f61534b07 100644--- a/desktop/lib/widgets/terminal_panel.dart+++ b/desktop/lib/widgets/terminal_panel.dart@@ -9,6 +9,7 @@ import 'package:flutter/services.dart';import 'package:xterm/xterm.dart';import '../clipboard/native_clipboard.dart';+import '../core/models.dart';import '../state/app_state.dart';import 'agent_drag.dart';@@ -1337,6 +1338,10 @@ class _TerminalPanelState extends State<TerminalPanel>machine: machine?.machine,local: machine?.isLocalMachine,agent: agent,+ // Named on its own even though `agent` is already here: an Agent has no+ // equality, so a frame that changed nothing but the verdict must still+ // be seen as a change by the one field that can say so.+ verdict: agent?.verdict,project: agent == null ? null : machine?.projectOf(agent),compact: widget.compactHeader,close: widget.onClose != null,@@ -1630,6 +1635,14 @@ class _TerminalHeader extends StatelessWidget {),),const SizedBox(width: 8),+ // The harness's verdict on this workspace, when it has one:+ // ready, or how far from it. Beside the connection status, not+ // instead of it — the two answer different questions.+ if (agent?.verdict != null)+ Padding(+ padding: const EdgeInsets.only(right: 6),+ child: _VerdictChip(verdict: agent!.verdict!),+ ),// Which of the three paths carries this pane's bytes. Absent for a local machine's own// terminal, which has no such distinction and so gets no badge.//@@ -1736,6 +1749,70 @@ class _TerminalHeader extends StatelessWidget {}}+/// A domain harness's verdict on the agent's workspace, in one word or one count.+///+/// Green "Ready" is the harness's one machine fact — fab-ready, every gate passed. Red carries the+/// error count, amber the warning count when nothing blocks, grey "Checked" a clean run that the+/// harness still would not call ready. The summary rides in the tooltip; the findings themselves+/// live in the harness's own viewer, which is the pane beside this one.+class _VerdictChip extends StatelessWidget {+ const _VerdictChip({required this.verdict});++ final AgentVerdict verdict;++ @override+ Widget build(BuildContext context) {+ final (label, color, icon) = verdict.ready+ ? ('Ready', AppColors.success, LucideIcons.circleCheck)+ : verdict.errors > 0+ ? (+ '${verdict.errors} ${verdict.errors == 1 ? 'error' : 'errors'}',+ AppColors.danger,+ LucideIcons.circleX,+ )+ : verdict.warnings > 0+ ? (+ '${verdict.warnings} ${verdict.warnings == 1 ? 'warning' : 'warnings'}',+ AppColors.warning,+ LucideIcons.triangleAlert,+ )+ : ('Checked', AppColors.mutedStrong, LucideIcons.circleDashed);+ return Tooltip(+ message: verdict.summary ?? label,+ child: Semantics(+ label: 'Verdict: $label',+ child: Container(+ key: const ValueKey('pane-verdict-chip'),+ padding: const EdgeInsets.symmetric(horizontal: 7, vertical: 3),+ decoration: BoxDecoration(+ color: color.withValues(alpha: .12),+ borderRadius: BorderRadius.circular(999),+ border: Border.all(color: color.withValues(alpha: .35)),+ ),+ child: Row(+ mainAxisSize: MainAxisSize.min,+ children: [+ Icon(icon, size: 12, color: color),+ const SizedBox(width: 5),+ Text(+ label,+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ style: TextStyle(+ color: color,+ fontFamily: AppFonts.sans,+ fontSize: 11,+ fontWeight: FontWeight.w600,+ ),+ ),+ ],+ ),+ ),+ ),+ );+ }+}+/// The pane header's transport badge: a compact topology for the path carrying terminal bytes.////// The three shapes describe one hop, an intermediate hop, and a central server respectively. Thatdiff --git a/desktop/test/terminal_panel_header_test.dart b/desktop/test/terminal_panel_header_test.dartindex 4eb1486d9..cb5f3f372 100644--- a/desktop/test/terminal_panel_header_test.dart+++ b/desktop/test/terminal_panel_header_test.dart@@ -196,4 +196,132 @@ void main() {expect(find.byIcon(LucideIcons.server), findsOneWidget);expect(tester.getCenter(find.byIcon(LucideIcons.server)), position);});++ // ── the harness verdict chip ─────────────────────────────────────────────++ Future<AppNotifier> pumpWithAgent(+ WidgetTester tester,+ TerminalSession session,+ Agent agent, {+ AppNotifier? app,+ }) async {+ tester.view.physicalSize = const Size(1200, 800);+ tester.view.devicePixelRatio = 1;+ addTearDown(tester.view.reset);+ final notifier =+ app ??+ AppNotifier(+ config: AppConfig.dev,+ authSession: AuthSession(),+ configStore: null,+ );+ if (app == null) addTearDown(notifier.dispose);+ notifier.machineStates['local'] = MachineState(+ const Machine(+ machineId: 'local',+ authMode: MachineAuthMode.remote,+ name: 'This Mac',+ ),+ )..agents = [agent];+ await tester.pumpWidget(+ MaterialApp(+ home: Scaffold(+ body: SizedBox(+ width: 900,+ height: 320,+ child: TerminalPanel(+ notifier: notifier,+ session: session,+ focused: true,+ ),+ ),+ ),+ ),+ );+ await tester.pump();+ return notifier;+ }++ Agent agentWith(AgentVerdict? verdict) => Agent(+ id: 'agent-1',+ name: 'a',+ engine: 'claude',+ dsh: 'autonomous/circuit',+ dshName: 'Circuit',+ terminalAvailable: true,+ verdict: verdict,+ );++ testWidgets('the verdict chip says ready, or how far from it', (+ tester,+ ) async {+ final chip = find.byKey(const ValueKey('pane-verdict-chip'));+ final cases = <(AgentVerdict, String, Color)>[+ (+ const AgentVerdict(ready: true, summary: 'Board is fab-ready'),+ 'Ready',+ AppColors.success,+ ),+ (+ const AgentVerdict(ready: false, errors: 3, warnings: 2),+ '3 errors',+ AppColors.danger,+ ),+ (+ const AgentVerdict(ready: false, errors: 0, warnings: 1),+ '1 warning',+ AppColors.warning,+ ),+ (const AgentVerdict(ready: false), 'Checked', AppColors.mutedStrong),+ ];+ for (final (verdict, label, color) in cases) {+ final session = sessionNamed('a');+ addTearDown(session.dispose);+ await pumpWithAgent(tester, session, agentWith(verdict));+ expect(chip, findsOneWidget, reason: label);+ expect(+ find.descendant(of: chip, matching: find.text(label)),+ findsOneWidget,+ );+ expect(+ tester+ .widget<Text>(find.descendant(of: chip, matching: find.text(label)))+ .style+ ?.color,+ color,+ );+ if (verdict.summary != null) {+ expect(find.byTooltip(verdict.summary!), findsOneWidget);+ }+ }+ // A harness agent is drawn as its harness, with its base engine beside it.+ expect(+ find.byKey(const ValueKey('engine-icon-autonomous/circuit')),+ findsOneWidget,+ );+ expect(+ find.byKey(const ValueKey('pane-header-base-engine')),+ findsOneWidget,+ );+ });++ testWidgets('no verdict, no chip — and a verdict arriving later is drawn', (+ tester,+ ) async {+ final chip = find.byKey(const ValueKey('pane-verdict-chip'));+ final session = sessionNamed('a');+ addTearDown(session.dispose);+ final notifier = await pumpWithAgent(tester, session, agentWith(null));+ expect(chip, findsNothing);+ // The same panel rebuilt over a frame that changed nothing but the+ // verdict: the header is memoized on its inputs, and this is one of them.+ await pumpWithAgent(+ tester,+ session,+ agentWith(const AgentVerdict(ready: false, errors: 2)),+ app: notifier,+ );+ expect(chip, findsOneWidget, reason: 'the verdict is a header input');+ expect(find.text('2 errors'), findsOneWidget);+ });}