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(super-tabs): allowance figures sit right after their mark, at the agents' size

bitcoinbuilder8685117b98d1
diff --git a/desktop/integration_test/super_tab_native_test.dart b/desktop/integration_test/super_tab_native_test.dart
index 127f6b569..f46f0a6a6 100644
--- a/desktop/integration_test/super_tab_native_test.dart
+++ b/desktop/integration_test/super_tab_native_test.dart
@@ -336,10 +336,10 @@ void main() {
.isNotEmpty) {
expect(chip('codex', '88%'), findsOneWidget);
// The Codex-only machine's figure lines up with Studio Mac's.
- double figureRight(String id) => tester
- .getRect(find.byKey(ValueKey('super-machine-figure-$id-codex')))
- .right;
- expect(figureRight('m-codex'), closeTo(figureRight('m'), .01));
+ double figureLeft(String id) => tester
+ .getTopLeft(find.byKey(ValueKey('super-machine-figure-$id-codex')))
+ .dx;
+ expect(figureLeft('m-codex'), closeTo(figureLeft('m'), .01));
}
expect(
find.byKey(const ValueKey('super-machine-figure-m-codex-claude')),
diff --git a/desktop/lib/super_tabs/machines.dart b/desktop/lib/super_tabs/machines.dart
index 4a1557479..8a25af8a3 100644
--- a/desktop/lib/super_tabs/machines.dart
+++ b/desktop/lib/super_tabs/machines.dart
@@ -1345,7 +1345,10 @@ class _MachineLine extends StatelessWidget {
static double get ringed => _avatar + 2 * _ring;
+ /// The allowance figures and the agent count, in tabular figures, at the scale of the 16 px avatars beside
+ /// them.
static TextStyle get countStyle => DesktopChrome.metadata().copyWith(
+ fontSize: 11,
fontFeatures: const [FontFeature.tabularFigures()],
);
@@ -1381,12 +1384,11 @@ class _MachineLine extends StatelessWidget {
const SizedBox(width: gap),
EngineMark(engine: engine, size: mark),
const SizedBox(width: markGap),
- // Right-aligned in tabular figures, so every row's % sign lines up.
+ // Right after its mark, so every row's figure starts at the same x.
Expanded(
child: Text(
a.figure,
key: ValueKey('super-machine-figure-${v.id}-$engine'),
- textAlign: TextAlign.right,
maxLines: 1,
softWrap: false,
overflow: TextOverflow.clip,
diff --git a/desktop/test/super_tab_machines_test.dart b/desktop/test/super_tab_machines_test.dart
index f76921442..10d9a7fdb 100644
--- a/desktop/test/super_tab_machines_test.dart
+++ b/desktop/test/super_tab_machines_test.dart
@@ -707,10 +707,13 @@ void main() {
];
expect(shown.toSet(), hasLength(1), reason: '$engine $reason');
if (shown.first) {
- // The % signs line up, whichever rows leave the other column blank.
+ // The figures start at one x, right after the mark, whichever rows leave the other column blank.
final edges = {
for (final id in owners)
- right('super-machine-figure-$id-$engine').toStringAsFixed(2),
+ tester
+ .getTopLeft(key('super-machine-figure-$id-$engine'))
+ .dx
+ .toStringAsFixed(2),
};
expect(edges, hasLength(1), reason: '$engine $reason');
}
diff --git a/docs/swarms.md b/docs/swarms.md
index 440ff35d8..cfe7cda5f 100644
--- a/docs/swarms.md
+++ b/docs/swarms.md
@@ -101,7 +101,7 @@ status dot where the project chevrons sit, the name where project names start (a
real hostname without `.local`, such as `MacBookPro2021`, or the name a person gave it), then three
columns every row shares, so their figures line up down the list: Claude's allowance, Codex's,
and the agents, whose avatars stand 16 points clear of the figures. An allowance is the engine's mark and the share left of its tightest window,
-right-aligned so the % signs line up; only a known, unexpired allowance shows, and a machine
+each figure right after its mark, so the figures start at one x down the list; only a known, unexpired allowance shows, and a machine
without one, or an offline or unreachable machine, leaves its slot blank. The share is amber
below 20% and red below 10%, and hovering it shows its windows ("5-hour: 48% remaining ·
resets in 1h 59m"). The agents column shows up to three overlapping avatars, then +N, and