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.

Align pane header spacing and long model labels (#576)

Dee2eb9eb2ca1ed
diff --git a/desktop/design/desktop-design-system.md b/desktop/design/desktop-design-system.md
index 6f283cd1f..38f569a5d 100644
--- a/desktop/design/desktop-design-system.md
+++ b/desktop/design/desktop-design-system.md
@@ -343,8 +343,12 @@ Agent and model share `PaneHeaderTextButton`: plain 13-point workspace text,
regular weight, matching padding and a 28-point target height. No pill, border or
chevron. Both brighten on hover and keyboard focus without changing weight or
geometry; use a hand cursor and Change agent / Change model tooltips. Their labels
-rest at 75% foreground (85% with Increase Contrast). Keep them close together,
-then leave an 8-point gap before close. Remove a coding-agent logo
+rest at 75% foreground (85% with Increase Contrast). Both selectors use 8-point
+horizontal padding, matching the close glyph's inset within its target. Their
+targets meet without an extra gap, leaving 16 points between adjacent contents.
+The agent keeps its natural width up to 140 points; the model uses the remaining
+selector space. Long names truncate with an ellipsis and show their full text on
+hover, without wrapping or reducing the font size. Remove a coding-agent logo
that repeats the agent selector; keep a distinct domain-harness mark on the left.
The session name and its activity/status remain on the left.
diff --git a/desktop/design/desktop-ui-migration.md b/desktop/design/desktop-ui-migration.md
index bda3f7929..3cd54c901 100644
--- a/desktop/design/desktop-ui-migration.md
+++ b/desktop/design/desktop-ui-migration.md
@@ -38,6 +38,26 @@ The standalone MachinesManager, old machine-link dialog, and generic
team-creation presenter have no production caller in this tree. They are not
counted as completed user journeys. Shared controls still serve their tests.
+## Pane header spacing and long names — 2026-10-02
+
+The refinement builds on main's shared plain-text agent and model controls.
+They use 8-point horizontal padding, matching the close glyph's inset, without
+an extra gap before close. A short agent leaves its unused width for the model;
+the model can use that space beyond the former 220-point text cap. Longer agent
+names stay bounded so the model remains visible. Both names truncate on one line
+and expose their full text on hover; the close target remains fixed at 28 points.
+
+Real-font widget renders were inspected in four- and nine-pane layouts in both
+appearances, including long session, agent and model labels. Header crops show
+the [four-pane dark layout](images/pane-header-long-names-dark.png) and
+[nine-pane light layout](images/pane-header-long-names-narrow-light.png).
+Validation passed on the rebased source: 110 targeted Flutter tests and static
+analysis of the changed Dart files. Checks cover plain-text controls, narrow
+headers, existing picker actions, tooltips, stable standalone context, close
+geometry, and text-scale isolation. Four additional temporary fixture cases
+supplied the long-name renders. These are synthetic widget captures; the running
+desktop app was not exercised.
+
## Footer spacing refinement — 2026-10-02
Resource totals now show their available number without a ≥ prefix; partial
diff --git a/desktop/design/images/pane-header-long-names-dark.png b/desktop/design/images/pane-header-long-names-dark.png
new file mode 100644
index 000000000..58a9f53fc
Binary files /dev/null and b/desktop/design/images/pane-header-long-names-dark.png differ
diff --git a/desktop/design/images/pane-header-long-names-narrow-light.png b/desktop/design/images/pane-header-long-names-narrow-light.png
new file mode 100644
index 000000000..8f4670c59
Binary files /dev/null and b/desktop/design/images/pane-header-long-names-narrow-light.png differ
diff --git a/desktop/lib/widgets/pane_header_text_button.dart b/desktop/lib/widgets/pane_header_text_button.dart
index 1a0cda0e1..1c53782a2 100644
--- a/desktop/lib/widgets/pane_header_text_button.dart
+++ b/desktop/lib/widgets/pane_header_text_button.dart
@@ -19,8 +19,7 @@ class PaneHeaderTextButton extends StatelessWidget {
this.onPressed,
});
- static const horizontalPadding = 6.0;
- static const maxTextWidth = 220.0;
+ static const horizontalPadding = grid.AppDesktop.controlGap;
final String text, label;
final String? fullText, tooltip;
@@ -38,10 +37,7 @@ class PaneHeaderTextButton extends StatelessWidget {
return LayoutBuilder(
builder: (context, constraints) {
final padding = math.min(horizontalPadding, constraints.maxWidth / 2);
- final textWidth = math.max(
- 0.0,
- math.min(maxTextWidth, constraints.maxWidth - padding * 2),
- );
+ final textWidth = math.max(0.0, constraints.maxWidth - padding * 2);
return WorkspaceBarControl(
label: label,
tooltip: [
diff --git a/desktop/lib/widgets/terminal_panel.dart b/desktop/lib/widgets/terminal_panel.dart
index 721856e82..349e10ac3 100644
--- a/desktop/lib/widgets/terminal_panel.dart
+++ b/desktop/lib/widgets/terminal_panel.dart
@@ -2754,10 +2754,7 @@ class _TerminalHeader extends StatelessWidget {
final controlsWidth = onClose != null
? PaneHeaderButton.width
: 0.0;
- final controlsGap = controlsWidth > 0 && pickerWidth > 0
- ? 8.0
- : 0.0;
- final actionsWidth = pickerWidth + controlsGap + controlsWidth;
+ final actionsWidth = pickerWidth + controlsWidth;
// At the smallest widths, connection state takes the leading
// mark's place so the pane name survives beside the fixed tools.
final leadingStatus =
@@ -2815,7 +2812,6 @@ class _TerminalHeader extends StatelessWidget {
final desiredRightWidth = narrow
? math.max(
controlsWidth +
- controlsGap +
(showModelPicker ? 96.0 : 0.0) +
(agent != null ? 90.0 : 0.0) +
badgeWidth,
@@ -3001,10 +2997,7 @@ class _TerminalHeader extends StatelessWidget {
),
ConstrainedBox(
constraints: BoxConstraints(
- maxWidth: math.max(
- 0,
- rightWidth - controlsWidth - controlsGap,
- ),
+ maxWidth: math.max(0, rightWidth - controlsWidth),
),
child: PaneHeaderActions(
agentPicker: agent == null
@@ -3107,7 +3100,6 @@ class _TerminalHeader extends StatelessWidget {
),
),
),
- if (controlsGap > 0) SizedBox(width: controlsGap),
if (onClose != null) PaneCloseButton(onPressed: onClose!),
],
);
diff --git a/desktop/test/terminal_panel_header_test.dart b/desktop/test/terminal_panel_header_test.dart
index 5b2bcfdd3..254d5f089 100644
--- a/desktop/test/terminal_panel_header_test.dart
+++ b/desktop/test/terminal_panel_header_test.dart
@@ -173,7 +173,7 @@ void main() {
);
expect(rect.right, closeTo(agent.left, 1));
expect(agent.right, closeTo(model.left, 1));
- expect(model.right + 8, closeTo(controls.first.left, 1));
+ expect(model.right, closeTo(controls.first.left, 1));
for (var i = 1; i < controls.length; i++) {
expect(controls[i - 1].right, closeTo(controls[i].left, 1));
}