Skip to content

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.

fix: match Devices artwork to the connected screen shape (#591)

Dee69490b21d570
diff --git a/desktop/assets/devices/README.md b/desktop/assets/devices/README.md
index 6868abc9e..624298e6b 100644
--- a/desktop/assets/devices/README.md
+++ b/desktop/assets/devices/README.md
@@ -11,6 +11,12 @@ representations of a separate Pro enclosure or a connected device's live display
Bundled for offline device management. Presentation crops happen in
`DeviceArtwork`; the original images are unchanged.
+`harness-square.png` is the square-unit photograph supplied by the user on
+2026-10-02, copied unchanged. Connected-device cards and details select it from
+the firmware's `round: false` setting or the explicit `harness-pro` hardware ID
+when settings are unavailable. Resolution and user-selected model labels do
+not determine the enclosure artwork. This photograph is not a live display.
+
## Devices navigation mark
`harness-mark.png` is a transparent product illustration generated with the
diff --git a/desktop/assets/devices/harness-square.png b/desktop/assets/devices/harness-square.png
new file mode 100644
index 000000000..7b3fd60cf
Binary files /dev/null and b/desktop/assets/devices/harness-square.png differ
diff --git a/desktop/lib/devices/device_artwork.dart b/desktop/lib/devices/device_artwork.dart
index fe488fe60..37980b252 100644
--- a/desktop/lib/devices/device_artwork.dart
+++ b/desktop/lib/devices/device_artwork.dart
@@ -24,33 +24,35 @@ class DeviceMark extends StatelessWidget {
);
}
-/// Product photography from autonomous.ai/harness-device. Bundled so the
-/// library remains useful when the computer is offline.
+/// Bundled product photography, selected using the connected screen's shape.
class DeviceArtwork extends StatelessWidget {
const DeviceArtwork({
super.key,
this.desk = false,
this.side = false,
this.closeUp = false,
+ this.square = false,
});
- final bool desk, side, closeUp;
+ final bool desk, side, closeUp, square;
@override
Widget build(BuildContext context) => ExcludeSemantics(
child: ClipRect(
child: Transform.scale(
- scale: closeUp ? 1.85 : 1,
+ scale: closeUp && !square ? 1.85 : 1,
alignment: const Alignment(-.22, .12),
child: Image.asset(
- 'assets/devices/harness-${desk
- ? 'desk'
- : side
- ? 'side'
- : 'front'}.webp',
+ square
+ ? 'assets/devices/harness-square.png'
+ : 'assets/devices/harness-${desk
+ ? 'desk'
+ : side
+ ? 'side'
+ : 'front'}.webp',
fit: BoxFit.cover,
width: double.infinity,
height: double.infinity,
- alignment: const Alignment(-.22, .12),
+ alignment: square ? Alignment.center : const Alignment(-.22, .12),
filterQuality: FilterQuality.medium,
),
),
diff --git a/desktop/lib/devices/devices_controller.dart b/desktop/lib/devices/devices_controller.dart
index a8b5fc848..d7b413773 100644
--- a/desktop/lib/devices/devices_controller.dart
+++ b/desktop/lib/devices/devices_controller.dart
@@ -36,6 +36,13 @@ class HarnessDevice {
final DialStatus status;
final String machineId, machineName;
final bool hostOnline, hostAvailable, local;
+
+ /// Use the reported screen shape, not its resolution or the saved model
+ /// label. Older Pro firmware identifies itself before it reports settings.
+ bool get hasSquareDisplay => status.settings?.round != null
+ ? !status.settings!.round
+ : status.hw == 'harness-pro';
+
bool get canEdit =>
hostOnline &&
hostAvailable &&
diff --git a/desktop/lib/devices/devices_screen.dart b/desktop/lib/devices/devices_screen.dart
index bc7885fb0..0eda788e1 100644
--- a/desktop/lib/devices/devices_screen.dart
+++ b/desktop/lib/devices/devices_screen.dart
@@ -394,7 +394,13 @@ class _DeviceCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
- const SizedBox(height: 116, child: DeviceArtwork(closeUp: true)),
+ SizedBox(
+ height: 116,
+ child: DeviceArtwork(
+ closeUp: true,
+ square: device.hasSquareDisplay,
+ ),
+ ),
Padding(
padding: const EdgeInsets.fromLTRB(15, 13, 15, 14),
child: Column(
@@ -461,9 +467,13 @@ class _DeviceShowcase extends StatelessWidget {
children: [
ClipRRect(
borderRadius: BorderRadius.circular(18),
- child: const SizedBox(
+ child: SizedBox(
height: 205,
- child: DeviceArtwork(side: true, closeUp: true),
+ child: DeviceArtwork(
+ side: true,
+ closeUp: true,
+ square: device.hasSquareDisplay,
+ ),
),
),
const SizedBox(height: 16),
diff --git a/desktop/test/devices_screen_test.dart b/desktop/test/devices_screen_test.dart
index 21a7a450c..324b3f1e0 100644
--- a/desktop/test/devices_screen_test.dart
+++ b/desktop/test/devices_screen_test.dart
@@ -6,6 +6,7 @@ import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:harness/devices/device_settings.dart';
+import 'package:harness/devices/device_artwork.dart';
import 'package:harness/devices/device_hosts.dart';
import 'package:harness/devices/devices_controller.dart';
import 'package:harness/devices/devices_screen.dart';
@@ -74,6 +75,10 @@ void main() {
AssetImage('assets/devices/harness-$image.webp'),
context,
),
+ precacheImage(
+ const AssetImage('assets/devices/harness-square.png'),
+ context,
+ ),
]);
});
await tester.pumpAndSettle();
@@ -122,6 +127,90 @@ void main() {
}
for (final brightness in Brightness.values) {
+ testWidgets('${brightness.name} two round devices and one square device', (
+ tester,
+ ) async {
+ final dial = DialState();
+ final controller = DevicesController(
+ dial: dial,
+ accountId: 'mixed-hardware',
+ sendSettings: (_, _) async => true,
+ );
+ await controller.load();
+ final first = deviceStatus('round-one');
+ final second = deviceStatus('round-two');
+ // The connected square unit's older firmware sends its explicit hardware
+ // identity without settings. It must still get the correct photograph.
+ const square = DialStatus(
+ attached: true,
+ id: 'square',
+ mac: '00:11:22:33:44:55',
+ hw: 'harness-pro',
+ );
+ report(dial, [first, second, square]);
+ // A user-selected retail label must not turn a reported round screen
+ // into a square enclosure.
+ controller.rename(
+ controller.devices[1].key,
+ 'Round two',
+ HarnessDeviceModel.pro,
+ );
+ final key = GlobalKey();
+ await pump(tester, controller, brightness: brightness, capture: key);
+ for (var i = 0; i < 3; i++) {
+ final card = find.byKey(
+ ValueKey('device-card-${controller.devices[i].key}'),
+ );
+ final artwork = tester.widget<DeviceArtwork>(
+ find.descendant(of: card, matching: find.byType(DeviceArtwork)),
+ );
+ expect(artwork.square, i == 2);
+ }
+ await tester.tap(
+ find.byKey(ValueKey('device-card-${controller.devices.last.key}')),
+ );
+ await tester.pumpAndSettle();
+ expect(
+ find.image(const AssetImage('assets/devices/harness-square.png')),
+ findsNWidgets(2),
+ );
+ expect(tester.takeException(), isNull);
+ controller.rename(
+ controller.devices[1].key,
+ 'Round two',
+ HarnessDeviceModel.harness,
+ );
+ controller.rename(
+ controller.devices.last.key,
+ 'Square unit',
+ HarnessDeviceModel.pro,
+ );
+ await tester.pumpAndSettle();
+ await capture(tester, key, '${brightness.name}-mixed-hardware');
+
+ // Shape also works without a retail SKU, using the same resolution as
+ // the round units. Firmware's explicit shape is the authority.
+ report(dial, [
+ first,
+ second,
+ DialStatus.fromJson({
+ 'attached': true,
+ 'id': square.id,
+ 'mac': square.mac,
+ 'hw': 'unknown-board',
+ 'settings': {...first.settings!.toJson(), 'round': false},
+ }),
+ ]);
+ await tester.pumpAndSettle();
+ expect(
+ find.image(const AssetImage('assets/devices/harness-square.png')),
+ findsNWidgets(2),
+ );
+ await tester.pumpWidget(const SizedBox());
+ controller.dispose();
+ dial.dispose();
+ });
+
for (final empty in [false, true]) {
testWidgets(
'${brightness.name} ${empty ? 'empty' : 'five-device'} product view',
diff --git a/docs/research/2026-10-02-devices-artwork/dark.png b/docs/research/2026-10-02-devices-artwork/dark.png
new file mode 100644
index 000000000..d225321e2
Binary files /dev/null and b/docs/research/2026-10-02-devices-artwork/dark.png differ
diff --git a/docs/research/2026-10-02-devices-artwork/light.png b/docs/research/2026-10-02-devices-artwork/light.png
new file mode 100644
index 000000000..f4dc83475
Binary files /dev/null and b/docs/research/2026-10-02-devices-artwork/light.png differ