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
perf(desktop): remove idle motion and group small UI fixes (#221)
Dee2182aced1a20
diff --git a/desktop/lib/shared/theme/app_theme.dart b/desktop/lib/shared/theme/app_theme.dartindex 2859d37b9..df8eac95d 100644--- a/desktop/lib/shared/theme/app_theme.dart+++ b/desktop/lib/shared/theme/app_theme.dart@@ -1312,57 +1312,15 @@ abstract final class AppControl {EdgeInsets.symmetric(horizontal: 10 * AppFont.uiScale);}-/// How long the app's UI takes to change, and on what curve.-///-/// These aren't new numbers — they're the ones already in use, given a name. The-/// app had settled on ~130ms for a hover and `Curves.easeOut` almost everywhere-/// (31 call sites against 8 for the next most common), but every one of them-/// typed the number in by hand, and the drift had already started: 120, 130, 140-/// and 160 all appear for the same kind of change. A tile in Plugins even-/// carries a comment saying its timing "matches the job list's, so a row lifts-/// the same way everywhere in the app" — an intent with nothing enforcing it.-///-/// Motion here is for *continuity*, not decoration: it says the thing you're-/// looking at is the same thing it was a moment ago. That's why it's this short.-/// Anything long enough to notice as an animation is too long for a hover.+/// Desktop feedback is visible on the next frame. Keep these shared names so+/// hover, selection, panels, and meters cannot grow independent animation delays.+/// Progress indicators may still animate while real work is in flight.abstract final class AppMotion {- /// A surface reacting to the pointer — a row's hover fill, a chip warming up.- static const Duration hover = Duration(milliseconds: 130);-- /// Content being replaced in place: a list swapping to another set of rows.- static const Duration swap = Duration(milliseconds: 160);-- /// A panel folding or unfolding — the sidebar collapsing to its glyphs.- ///- /// Longer than [swap], and it has to be: what moves is the window's left- /// edge and everything to the right of it, over 212px. At [swap] that reads- /// as the layout jumping rather than the rail folding, which is the one thing- /// the animation exists to prevent.- static const Duration fold = Duration(milliseconds: 220);-- /// A meter filling to the figure beside it — the node panel's speed bars.- ///- /// Longer than [fold] even though what moves is 26px, because this one is not- /// a surface getting out of the way: it is a value being drawn, and a reader- /// is meant to watch it arrive. Under about a quarter second the bars read as- /// having simply appeared at their length, which is the same as no animation- /// at all.- ///- /// Still short enough to survive repetition. These panels open on hover, so- /// the fill replays every time the pointer crosses the pill — anything that- /// lingers turns into a toll on a gesture people make dozens of times an hour.- static const Duration meter = Duration(milliseconds: 300);-- /// A surface acknowledging a click while the button is still down.- ///- /// Shorter than [hover], and it has to be: hover follows a pointer that is- /// merely passing, while this one answers a press the user is *making*. A- /// dip that outlasts the click reads as lag in the click itself. Four call- /// sites had already converged on this number by hand before it had a name.- static const Duration press = Duration(milliseconds: 110);-- /// The app's curve. Fast to start, settling at the end — the thing arrives- /// under the pointer rather than drifting toward it.+ static const Duration hover = Duration.zero;+ static const Duration swap = Duration.zero;+ static const Duration fold = Duration.zero;+ static const Duration meter = Duration.zero;+ static const Duration press = Duration.zero;static const Curve curve = Curves.easeOut;}@@ -1484,6 +1442,7 @@ ButtonStyle dangerButtonStyle() => FilledButton.styleFrom();ButtonStyle _filledButtonStyle() => FilledButton.styleFrom(+ animationDuration: Duration.zero,minimumSize: Size(0, AppControl.heightScaled),padding: AppControl.paddingScaled,shape: _buttonShape,@@ -1504,6 +1463,7 @@ ButtonStyle _filledButtonStyle() => FilledButton.styleFrom(/// The secondary action: a hairline rim, no fill — Apple's "bordered" button.ButtonStyle _outlinedButtonStyle(ColorScheme scheme) =>OutlinedButton.styleFrom(+ animationDuration: Duration.zero,minimumSize: Size(0, AppControl.heightScaled),padding: AppControl.paddingScaled,shape: _buttonShape,@@ -1516,6 +1476,7 @@ ButtonStyle _outlinedButtonStyle(ColorScheme scheme) =>/// The tertiary action: text only, for the quiet way out of a dialog.ButtonStyle _textButtonStyle() => TextButton.styleFrom(+ animationDuration: Duration.zero,minimumSize: Size(0, AppControl.heightScaled),padding: AppControl.paddingSmallScaled,shape: _buttonShape,diff --git a/desktop/lib/shared/widgets/app_icon_button.dart b/desktop/lib/shared/widgets/app_icon_button.dartindex 477036e59..ec65e76c8 100644--- a/desktop/lib/shared/widgets/app_icon_button.dart+++ b/desktop/lib/shared/widgets/app_icon_button.dart@@ -108,38 +108,38 @@ class _AppIconButtonState extends State<AppIconButton>/// revolution still looks like it moved.static const Duration _spinPeriod = Duration(milliseconds: 900);- late final AnimationController _spin = AnimationController(- vsync: this,- duration: _spinPeriod,- );+ AnimationController? _spin;++ void _syncSpin() {+ if (widget.spinning && !MediaQuery.disableAnimationsOf(context)) {+ final spin = _spin ??= AnimationController(+ vsync: this,+ duration: _spinPeriod,+ );+ if (!spin.isAnimating) spin.repeat();+ } else {+ _spin?.stop();+ _spin?.value = 0;+ }+ }@override- void initState() {- super.initState();- if (widget.spinning) _spin.repeat();+ void didChangeDependencies() {+ super.didChangeDependencies();+ _syncSpin();}@overridevoid didUpdateWidget(AppIconButton oldWidget) {super.didUpdateWidget(oldWidget);if (widget.spinning == oldWidget.spinning) return;- if (widget.spinning) {- _spin.repeat();- } else {- // Let the current revolution land instead of stopping the glyph at- // whatever angle the reply happened to arrive at. A mark frozen at 200°- // reads as a failure state; one that comes to rest upright reads as done.- _spin- .animateTo(1, duration: _spinPeriod * (1 - _spin.value))- .whenComplete(() {- if (mounted && !widget.spinning) _spin.value = 0;- });- }+ // Completion is immediately visible; do not keep spinning after the I/O.+ _syncSpin();}@overridevoid dispose() {- _spin.dispose();+ _spin?.dispose();super.dispose();}@@ -196,14 +196,16 @@ class _AppIconButtonState extends State<AppIconButton>: Colors.transparent,borderRadius: BorderRadius.circular(AppIconButton._radius),),- child: RotationTransition(- turns: _spin,- child: Icon(- widget.icon,- size: widget.size,- color: pressable- ? (emphasized ? active : resting)- : AppPalette.textFaint,+ child: RepaintBoundary(+ child: RotationTransition(+ turns: _spin ?? const AlwaysStoppedAnimation(0),+ child: Icon(+ widget.icon,+ size: widget.size,+ color: pressable+ ? (emphasized ? active : resting)+ : AppPalette.textFaint,+ ),),),),diff --git a/desktop/lib/shared/widgets/pulse.dart b/desktop/lib/shared/widgets/pulse.dartindex a232c06d8..0c39cde41 100644--- a/desktop/lib/shared/widgets/pulse.dart+++ b/desktop/lib/shared/widgets/pulse.dart@@ -1,102 +1,20 @@import 'package:flutter/material.dart';-/// The app's one "still alive" rhythm.-///-/// `t` runs 0 → 1 → 0 forever on an ease-in-out curve; [builder] turns it-/// into whatever the caller is breathing — a skeleton's fill, a dot's alpha.-/// This widget owns the *timing* and nothing about the *shape*, which is what-/// lets every long-running thing in the app beat at the same tempo instead of-/// each pane hand-rolling its own `AnimationController`. That animation had-/// been written three separate times (the status LED, the login mark, the-/// model pill) and only two honoured Reduce Motion — the same heartbeat at-/// three tempos, one of them still moving for someone who had asked it to-/// stop.-///-/// Two decisions live here so no call site has to remember them:-///-/// - **Reduce Motion stops the beat at the peak (`t = 1`), not the middle.**-/// A block frozen at 40% opacity reads as *disabled*, which is the opposite-/// of what a placeholder means.-/// - **The [RepaintBoundary] is inside.** Everything built on this is-/// long-running by definition, and the shell keeps rail, bar and pane in one-/// layer — without the boundary a breathing skeleton in the sidebar repaints-/// the terminal beside it sixty times a second.-class Pulse extends StatefulWidget {- const Pulse({- super.key,- required this.builder,- this.duration = const Duration(milliseconds: 1600),- this.curve = Curves.easeInOut,- this.child,- });+/// Static activity styling. Skeletons and status dots do not need a ticker:+/// real data changes redraw them, and indeterminate progress controls convey+/// work in flight. Retaining the builder keeps their shared peak appearance.+class Pulse extends StatelessWidget {+ const Pulse({super.key, required this.builder, this.child});- /// Called with `t` in `[0, 1]`. [child] is passed through untouched so a- /// subtree that does not depend on `t` is built once.final Widget Function(BuildContext context, double t, Widget? child) builder;-- /// One half of the cycle — rest to peak. The whole breath is twice this.- ///- /// 1600ms is the status LED's blink, which is what the bare default serves.- /// A skeleton asks for 1100 explicitly; slower reads as calmer, and the two- /// are different instruments rather than one drifting.- final Duration duration;-- final Curve curve;final Widget? child;@override- State<Pulse> createState() => _PulseState();-}--class _PulseState extends State<Pulse> with SingleTickerProviderStateMixin {- late final AnimationController _controller = AnimationController(- vsync: this,- duration: widget.duration,- );- late final Animation<double> _t = CurvedAnimation(- parent: _controller,- curve: widget.curve,- );-- @override- void didChangeDependencies() {- super.didChangeDependencies();- if (MediaQuery.disableAnimationsOf(context)) {- _controller- ..stop()- ..value = 1;- } else if (!_controller.isAnimating) {- _controller.repeat(reverse: true);- }- }-- @override- void didUpdateWidget(covariant Pulse oldWidget) {- super.didUpdateWidget(oldWidget);- if (oldWidget.duration != widget.duration) {- _controller.duration = widget.duration;- if (_controller.isAnimating) _controller.repeat(reverse: true);- }- }-- @override- void dispose() {- _controller.dispose();- super.dispose();- }-- @override- Widget build(BuildContext context) => RepaintBoundary(- child: AnimatedBuilder(- animation: _t,- child: widget.child,- builder: (context, child) => widget.builder(context, _t.value, child),- ),- );+ Widget build(BuildContext context) =>+ RepaintBoundary(child: builder(context, 1, child));}-/// A soft-glowing dot that blinks to signal "live" — the status LED used by the-/// playground pill and anywhere else a thing is running.+/// A steady status dot for a running session.class PulseDot extends StatelessWidget {const PulseDot({super.key, required this.color, this.size = 6});diff --git a/desktop/lib/shared/widgets/skeleton.dart b/desktop/lib/shared/widgets/skeleton.dartindex 62e3fe8c1..7144d074a 100644--- a/desktop/lib/shared/widgets/skeleton.dart+++ b/desktop/lib/shared/widgets/skeleton.dart@@ -13,8 +13,8 @@ import 'pulse.dart';/// Four rules every skeleton in the app keeps, in order of how often they are/// broken elsewhere:///-/// 1. **The rhythm is an opacity breath, not a shimmer sweep.** [Pulse] owns-/// it; a light band wiping across a pane fights the app's quiet.+/// 1. **Placeholders are steady.** Waiting on I/O must not continuously repaint+/// the window. [Pulse] supplies their static peak appearance./// 2. **A placeholder wears the real content's metrics.** One pixel off and it/// causes the very jump it exists to prevent — which is why [SkeletonText]/// measures the line box of the style it stands in for instead of guessing.@@ -22,7 +22,7 @@ import 'pulse.dart';/// "more below" rather than a wall cut off mid-list./// 4. **Line widths differ.** Equal bars turn a cluster into one grey slab.///-/// The fill is [AppSurface.recess] breathing up to [AppSurface.recessHover]:+/// The fill is [AppSurface.recessHover]:/// a translucent *well*, not a solid. A skeleton sits on top of a card, so it/// borrows the token for a hollow rather than the card's own fill — it has to/// read as an absence — and an overlay rides any ground (page, card, dialog)@@ -63,17 +63,13 @@ class Skeleton extends StatelessWidget {// Tokens are getters against a global brightness; nothing here depends on// Theme.of, so the widget has to register for a flip itself.AppTheme.watch(context);- final rest = AppSurface.recess;final peak = AppSurface.recessHover;return Pulse(- // Stated, not inherited: [Pulse]'s bare default is the status LED's- // blink, and a placeholder breathes faster than a light does.- duration: const Duration(milliseconds: 1100),builder: (context, t, _) => Container(width: width,height: height,decoration: BoxDecoration(- color: Color.lerp(rest, peak, t),+ color: peak,borderRadius: shape == BoxShape.rectangle? BorderRadius.circular(radius): null,diff --git a/desktop/lib/store/store_explore_widgets.dart b/desktop/lib/store/store_explore_widgets.dartindex b0208fb46..3c7f6997a 100644--- a/desktop/lib/store/store_explore_widgets.dart+++ b/desktop/lib/store/store_explore_widgets.dart@@ -257,7 +257,7 @@ class _StoreExploreCardState extends State<StoreExploreCard> {return AnimatedContainer(duration: MediaQuery.disableAnimationsOf(context)? Duration.zero- : const Duration(milliseconds: 150),+ : grid.AppMotion.hover,decoration: BoxDecoration(borderRadius: radius,border: Border.all(diff --git a/desktop/lib/store/store_screen.dart b/desktop/lib/store/store_screen.dartindex c8cab18c6..bf4052f45 100644--- a/desktop/lib/store/store_screen.dart+++ b/desktop/lib/store/store_screen.dart@@ -1234,7 +1234,7 @@ class _ProductPageState extends State<_ProductPage> {unawaited(Scrollable.ensureVisible(target,- duration: const Duration(milliseconds: 600),+ duration: Duration.zero,curve: Curves.easeInOutCubic,),);diff --git a/desktop/lib/store/store_showcase.dart b/desktop/lib/store/store_showcase.dartindex 361fdfd46..711e24b08 100644--- a/desktop/lib/store/store_showcase.dart+++ b/desktop/lib/store/store_showcase.dart@@ -4,7 +4,6 @@ import 'package:lucide_icons_flutter/lucide_icons.dart';import 'package:harness/terminal/terminal_text.dart';import '../core/dsh_catalog.dart';-import '../core/test_run.dart';import '../shared/theme/app_theme.dart' as grid;import '../shared/widgets/app_icon_button.dart';import '../widgets/engine_identity.dart';@@ -18,8 +17,8 @@ import 'store_demo_dialog.dart';/// than reading about it. An example without a picture (an editorial prompt, before the package/// ships its own) is the prompt and its button alone.///-/// Each block rises into place the first time it scrolls into view — unless Reduce Motion is on, or-/// under `flutter test`, where everything is simply there.+/// Examples are visible as soon as they are laid out. Optional illustration+/// motion is reserved for explicit previews, outside the normal Store flow.class StoreExampleFlow extends StatelessWidget {const StoreExampleFlow({super.key,@@ -35,7 +34,7 @@ class StoreExampleFlow extends StatelessWidget {/// Opens New Harness with the prompt as its first message; null when there is nowhere to open it.final ValueChanged<String>? onTry;- /// Rise into view on first sight; defaults to on outside tests.+ /// Optional motion for an explicit preview. Normal Store pages are instant.final bool? animate;@override@@ -46,9 +45,8 @@ class StoreExampleFlow extends StatelessWidget {children: [for (final (i, example) in examples.indexed) ...[if (i > 0) const SizedBox(height: 132),- _Reveal(- animate: animate ?? !kUnderTest,- child: _ExampleBlock(+ _example(+ _ExampleBlock(key: ValueKey('store-example:$i'),index: i,count: examples.length,@@ -61,6 +59,9 @@ class StoreExampleFlow extends StatelessWidget {],);}++ Widget _example(Widget child) =>+ animate == true ? _Reveal(animate: true, child: child) : child;}class _ExampleBlock extends StatefulWidget {@@ -199,10 +200,10 @@ class _ExampleBlockState extends State<_ExampleBlock> {onExit: (_) => setState(() => _hovering = false),child: AnimatedScale(scale: _hovering ? 1.012 : 1,- duration: const Duration(milliseconds: 420),+ duration: grid.AppMotion.hover,curve: Curves.easeOutCubic,child: AnimatedContainer(- duration: const Duration(milliseconds: 420),+ duration: grid.AppMotion.hover,curve: Curves.easeOutCubic,decoration: BoxDecoration(borderRadius: radius,@@ -271,14 +272,6 @@ class _Output extends StatelessWidget {fit: example.video != null ? BoxFit.contain : BoxFit.cover,filterQuality: FilterQuality.medium,semanticLabel: example.caption ?? 'What ${entry.name} made',- frameBuilder: (context, child, frame, synchronous) => synchronous- ? child- : AnimatedOpacity(- opacity: frame == null ? 0 : 1,- duration: const Duration(milliseconds: 500),- curve: Curves.easeOut,- child: child,- ),loadingBuilder: (context, child, progress) =>progress == null ? child : placeholder,errorBuilder: (_, _, _) => placeholder,diff --git a/desktop/lib/widgets/bootstrapping_screen.dart b/desktop/lib/widgets/bootstrapping_screen.dartindex 6213e86ef..2c19aa8b7 100644--- a/desktop/lib/widgets/bootstrapping_screen.dart+++ b/desktop/lib/widgets/bootstrapping_screen.dart@@ -96,9 +96,7 @@ class BootstrappingScreen extends StatelessWidget {const SizedBox(width: 12),Flexible(child: AnimatedSwitcher(- duration: reduceMotion- ? Duration.zero- : const Duration(milliseconds: 180),+ duration: Duration.zero,child: Text(status,key: ValueKey(status),diff --git a/desktop/lib/widgets/environment_preflight_screen.dart b/desktop/lib/widgets/environment_preflight_screen.dartindex b2aae53f9..c9c790278 100644--- a/desktop/lib/widgets/environment_preflight_screen.dart+++ b/desktop/lib/widgets/environment_preflight_screen.dart@@ -19,7 +19,6 @@ class EnvironmentPreflightScreen extends StatelessWidget {Widget build(BuildContext context) {grid.AppTheme.watch(context);final ready = readiness.isReady;- final reduceMotion = MediaQuery.disableAnimationsOf(context);return Scaffold(backgroundColor: grid.AppPalette.panelBg,@@ -45,9 +44,7 @@ class EnvironmentPreflightScreen extends StatelessWidget {liveRegion: true,label: 'Harness setup status',child: AnimatedSwitcher(- duration: reduceMotion- ? Duration.zero- : const Duration(milliseconds: 180),+ duration: Duration.zero,child: ready? const _ReadyContent(key: ValueKey('environment-ready'),diff --git a/desktop/lib/widgets/login_fleet_map.dart b/desktop/lib/widgets/login_fleet_map.dartindex 674bdfcb2..6da5d8d10 100644--- a/desktop/lib/widgets/login_fleet_map.dart+++ b/desktop/lib/widgets/login_fleet_map.dart@@ -14,83 +14,15 @@ import '../shared/theme/app_theme.dart' as grid;/// and the old workspace preview (three agents side by side on one screen)/// never hinted that the agents could be on other computers at all.///-/// **Every motion is a packet.** One leaves a pin plain (a grey square — bytes-/// on hardware you own), rings the pin as it goes, is sealed on the way in-/// (the square turns accent and grows a halo) and lands in the pane it was-/// for, which flashes once. Nothing else moves on its own: no drifting dots,-/// no rotating rims. The four arcs fire a quarter of a cycle apart, so four-/// moving parts read as one instrument rather than four effects arguing.-///-/// Two clocks. [_entrance] runs ONCE, on first build: the window lands, the-/// pins pop in one after another, and each arc draws itself as its pin-/// arrives — "linking", said without a word. [_loop] is the heartbeat every-/// packet is a phase of, and it is the same 3.2 s the relay diagram before it-/// used, for the same reason: the aurora behind the card breathes at an exact-/// multiple, so the two never drift into a beat.-///-/// Reduce Motion (and a disabled `TickerMode`, which is how the widget tests-/// keep `pumpAndSettle` from hanging on an endless loop) parks both clocks:-/// the entrance at its end, so the field is fully drawn, and the loop at a-/// phase where one packet is sealed and another still plain — the picture-/// keeps making its point instead of becoming a diagram of nothing happening.-class LoginFleetMap extends StatefulWidget {+/// A fully drawn still shows a sealed packet and a plain packet together,+/// without an entrance delay or a continuous idle repaint loop.+class LoginFleetMap extends StatelessWidget {const LoginFleetMap({super.key});- /// The drawing's own aspect, so the caller can size it without guessing.static const double aspectRatio = 512 / 190;-- @override- State<LoginFleetMap> createState() => _LoginFleetMapState();-}--/// The shared heartbeat. Every packet, ring and pane flash is a phase of it.-const Duration _period = Duration(milliseconds: 3200);--/// How long the field takes to assemble on first sight.-const Duration _entranceLength = Duration(milliseconds: 1700);--class _LoginFleetMapState extends State<LoginFleetMap>- with TickerProviderStateMixin {- late final AnimationController _entrance = AnimationController(- vsync: this,- duration: _entranceLength,- );- late final AnimationController _loop = AnimationController(- vsync: this,- duration: _period,- );-- @override- void didChangeDependencies() {- super.didChangeDependencies();- final stilled =- MediaQuery.disableAnimationsOf(context) ||- !TickerMode.valuesOf(context).enabled;- if (stilled) {- _entrance- ..stop()- ..value = 1;- _loop- ..stop()- ..value = _reducedPhase;- } else {- if (!_entrance.isAnimating && _entrance.value < 1) _entrance.forward();- if (!_loop.isAnimating) _loop.repeat();- }- }-- /// Where the loop stops for someone who asked for less motion: a quarter- /// past the seal on one arc, so that packet glows while the next one along- /// is still a plain grey square mid-flight.+ // Show both sealed and plain packets without running a ticker while idle.static const double _reducedPhase = 0.66;- @override- void dispose() {- _entrance.dispose();- _loop.dispose();- super.dispose();- }-@overrideWidget build(BuildContext context) {grid.AppTheme.watch(context);@@ -122,16 +54,9 @@ class _LoginFleetMapState extends State<LoginFleetMap>return RepaintBoundary(child: AspectRatio(aspectRatio: LoginFleetMap.aspectRatio,- child: AnimatedBuilder(- animation: Listenable.merge([_entrance, _loop]),- builder: (context, _) => CustomPaint(- painter: _MapPainter(- entrance: Curves.easeOut.transform(_entrance.value),- t: _loop.value,- palette: palette,- ),- size: Size.infinite,- ),+ child: CustomPaint(+ painter: _MapPainter(entrance: 1, t: _reducedPhase, palette: palette),+ size: Size.infinite,),),);diff --git a/desktop/lib/widgets/login_relay_diagram.dart b/desktop/lib/widgets/login_relay_diagram.dartindex 9723a100f..d2e7883ba 100644--- a/desktop/lib/widgets/login_relay_diagram.dart+++ b/desktop/lib/widgets/login_relay_diagram.dart@@ -589,52 +589,11 @@ Shader _gradientAlong(Offset from, Offset to, Color color, double alpha) {).createShader(Rect.fromPoints(from, to));}-/// The atmosphere behind the sign-in card: two very low-alpha blobs drifting-/// on a multiple of the diagram's own clock.-///-/// It is what makes the window read as *lit* rather than printed, and it is-/// the piece that carries the design into the corners of a 1280×800 window-/// that the card itself leaves empty. Alphas are tuned per theme for the same-/// reason the packet halo is: on a near-white panel this can only ever be a-/// tint before it turns to haze, while charcoal has room for it to glow.-///-/// The period is an exact multiple of [_period] so the two never drift into a-/// beat against each other — the whole screen stays one instrument.-class LoginAurora extends StatefulWidget {+/// A static background tint. Waiting to sign in does not repaint the whole+/// window continuously; network progress is shown by the sign-in controls.+class LoginAurora extends StatelessWidget {const LoginAurora({super.key});- @override- State<LoginAurora> createState() => _LoginAuroraState();-}--class _LoginAuroraState extends State<LoginAurora>- with SingleTickerProviderStateMixin {- late final AnimationController _drift = AnimationController(- vsync: this,- duration: _period * 4,- );-- @override- void didChangeDependencies() {- super.didChangeDependencies();- final stilled =- MediaQuery.disableAnimationsOf(context) ||- !TickerMode.valuesOf(context).enabled;- if (stilled) {- _drift- ..stop()- ..value = 0.5;- } else if (!_drift.isAnimating) {- _drift.repeat();- }- }-- @override- void dispose() {- _drift.dispose();- super.dispose();- }-@overrideWidget build(BuildContext context) {grid.AppTheme.watch(context);@@ -646,12 +605,9 @@ class _LoginAuroraState extends State<LoginAurora>return IgnorePointer(child: RepaintBoundary(- child: AnimatedBuilder(- animation: _drift,- builder: (context, _) => CustomPaint(- painter: _AuroraPainter(t: _drift.value, a: a, b: b),- size: Size.infinite,- ),+ child: CustomPaint(+ painter: _AuroraPainter(t: 0.5, a: a, b: b),+ size: Size.infinite,),),);diff --git a/desktop/lib/widgets/new_harness_box.dart b/desktop/lib/widgets/new_harness_box.dartindex 7a6d8888b..bc8440a16 100644--- a/desktop/lib/widgets/new_harness_box.dart+++ b/desktop/lib/widgets/new_harness_box.dart@@ -1015,6 +1015,7 @@ class _NewHarnessBoxState extends State<NewHarnessBox> {? label: '$fieldLabel, $label',excludeSemantics: true,+ onTap: disabled ? null : onTap,child: BoxRowHighlight(terminal: true,highlighted: highlighted,diff --git a/desktop/lib/widgets/pane_header_actions.dart b/desktop/lib/widgets/pane_header_actions.dartindex ac58f5fcf..560f8a535 100644--- a/desktop/lib/widgets/pane_header_actions.dart+++ b/desktop/lib/widgets/pane_header_actions.dart@@ -107,7 +107,7 @@ class PaneHeaderActions extends StatelessWidget {alwaysIncludeSemantics: true,duration: MediaQuery.disableAnimationsOf(context)? Duration.zero- : const Duration(milliseconds: 100),+ : grid.AppMotion.hover,child: Row(mainAxisSize: MainAxisSize.min,children: [@@ -208,7 +208,7 @@ class PaneHeaderActions extends StatelessWidget {opacity: visible ? 0 : 1,duration: MediaQuery.disableAnimationsOf(context)? Duration.zero- : const Duration(milliseconds: 100),+ : grid.AppMotion.hover,child: ExcludeSemantics(excluding: visible, child: details!),),),@@ -375,7 +375,7 @@ class _ViewerToggle extends StatelessWidget {tooltip: on ? 'Hide viewer' : 'Show viewer',onPressed: onPressed,icon: AnimatedContainer(- duration: const Duration(milliseconds: 220),+ duration: grid.AppMotion.swap,curve: Curves.easeOut,decoration: BoxDecoration(shape: BoxShape.circle,diff --git a/desktop/lib/widgets/pane_resize_handle.dart b/desktop/lib/widgets/pane_resize_handle.dartindex 1d628d0a7..e65bb1913 100644--- a/desktop/lib/widgets/pane_resize_handle.dart+++ b/desktop/lib/widgets/pane_resize_handle.dart@@ -204,7 +204,7 @@ class _PaneResizeHandleState extends State<PaneResizeHandle> {child: AnimatedContainer(duration: MediaQuery.disableAnimationsOf(context)? Duration.zero- : const Duration(milliseconds: 100),+ : grid.AppMotion.hover,width: _horizontal ? 3 : 36,height: _horizontal ? 36 : 3,decoration: BoxDecoration(diff --git a/desktop/lib/widgets/pane_split_edges.dart b/desktop/lib/widgets/pane_split_edges.dartindex c6d5e241f..1b560693e 100644--- a/desktop/lib/widgets/pane_split_edges.dart+++ b/desktop/lib/widgets/pane_split_edges.dart@@ -103,7 +103,7 @@ class _PaneSplitEdgesState extends State<PaneSplitEdges> {opacity: visible ? 1 : 0,duration: MediaQuery.disableAnimationsOf(context)? Duration.zero- : const Duration(milliseconds: 100),+ : grid.AppMotion.hover,child: DecoratedBox(decoration: BoxDecoration(color: AppColors.surface,diff --git a/desktop/test/app_icon_button_spin_test.dart b/desktop/test/app_icon_button_spin_test.dartindex ad78ecacc..d93a46c6e 100644--- a/desktop/test/app_icon_button_spin_test.dart+++ b/desktop/test/app_icon_button_spin_test.dart@@ -22,9 +22,15 @@ void main() {WidgetTester tester, {required bool spinning,required VoidCallback onPressed,+ bool reduceMotion = false,}) async {await tester.pumpWidget(MaterialApp(+ builder: (context, child) => MediaQuery(+ data: MediaQuery.of(context)+ .copyWith(disableAnimations: reduceMotion),+ child: child!,+ ),home: Scaffold(body: Center(child: AppIconButton(@@ -70,6 +76,7 @@ void main() {testWidgets('the same button takes the press once it stops', (tester) async {var presses = 0;await pumpButton(tester, spinning: false, onPressed: () => presses++);+ expect(tester.binding.transientCallbackCount, 0);await tester.tap(find.byType(AppIconButton));await tester.pump();@@ -100,12 +107,14 @@ void main() {expect(tester.widget<Icon>(find.byType(Icon)).color, AppPalette.textFaint);});- testWidgets('the glyph comes to rest upright, not mid-turn', (tester) async {+ testWidgets('the glyph stops upright immediately when the work finishes', (+ tester,+ ) async {await pumpButton(tester, spinning: true, onPressed: () {});await tester.pump(const Duration(milliseconds: 300));await pumpButton(tester, spinning: false, onPressed: () {});- await tester.pumpAndSettle();+ expect(tester.binding.transientCallbackCount, 0);// Not 0.4 or wherever the reply landed: a mark frozen at an angle reads as// a failure state.@@ -114,4 +123,19 @@ void main() {moreOrLessEquals(0, epsilon: 0.001),);});++ testWidgets('Reduce Motion keeps busy feedback without a ticker', (+ tester,+ ) async {+ var presses = 0;+ await pumpButton(+ tester,+ spinning: true,+ reduceMotion: true,+ onPressed: () => presses++,+ );+ expect(tester.binding.transientCallbackCount, 0);+ await tester.tap(find.byType(AppIconButton));+ expect(presses, 0);+ });}diff --git a/desktop/test/login_screen_test.dart b/desktop/test/login_screen_test.dartindex 07701815e..f11014d73 100644--- a/desktop/test/login_screen_test.dart+++ b/desktop/test/login_screen_test.dart@@ -140,22 +140,17 @@ void main() {expect(find.text('Try again'), findsOneWidget);});- testWidgets('the diagram keeps running, frame after frame', (tester) async {+ testWidgets('the login illustration stays visible without idle frames', (+ tester,+ ) async {final app = _notifier(AppStatus.unauthenticated);await tester.pumpWidget(_host(app));-- // ⚠️ NEVER `pumpAndSettle` on this screen. The diagram and the aurora both- // repeat forever — deliberately — and `pumpAndSettle` waits for a frame- // that never comes. Pump fixed durations instead, the same way the app's- // other endless animations (`Pulse`, a `CircularProgressIndicator`) are- // tested. Reduce Motion is the one case that does settle; see below.- await tester.pump(const Duration(milliseconds: 400));+ await tester.pumpAndSettle();expect(find.text('Sign in'), findsOneWidget);-- // Still animating a full cycle later, rather than having stopped.+ expect(find.byType(LoginFleetMap), findsOneWidget);+ expect(tester.binding.hasScheduledFrame, isFalse);await tester.pump(const Duration(milliseconds: 3200));- expect(find.text('Sign in'), findsOneWidget);- expect(tester.binding.hasScheduledFrame, isTrue);+ expect(tester.binding.hasScheduledFrame, isFalse);});testWidgets('Reduce Motion still shows the picture, not a blank', (diff --git a/desktop/test/new_harness_accessibility_test.dart b/desktop/test/new_harness_accessibility_test.dartnew file mode 100644index 000000000..5bc8ca983--- /dev/null+++ b/desktop/test/new_harness_accessibility_test.dart@@ -0,0 +1,48 @@+import 'dart:ui' show SemanticsAction;++import 'package:flutter/material.dart';+import 'package:flutter/services.dart';+import 'package:flutter_test/flutter_test.dart';+import 'package:harness/state/new_harness.dart';+import 'package:harness/terminal/terminal_binary.dart';+import 'package:harness/widgets/new_harness_box.dart';++import 'keymap_host_test.dart' show MemoryKeymap, key;+import 'keymap_runtime_test.dart' show mount;+import 'support/mixed_agents.dart';+import 'swarm_screen_test.dart' show terminal;+import 'swarm_state_test.dart' show createApp;++void main() {+ testWidgets('New Harness defaults expose working accessibility actions', (+ tester,+ ) async {+ newHarnessOpensInBox = true;+ addTearDown(() => newHarnessOpensInBox = false);+ final app = createApp();+ seedMixedAgents(app);+ final map = MemoryKeymap();+ final input = <TerminalBinaryFrame>[];+ app.adoptSessionForTest(terminal('a0', input));+ await mount(tester, app, map);+ final semantics = tester.ensureSemantics();+ await key(tester, LogicalKeyboardKey.keyN, cmd: true);+ final row = tester.getSemantics(find.bySemanticsLabel('Agent, Codex'));+ expect(row.getSemanticsData().hasAction(SemanticsAction.tap), isTrue);+ tester+ .renderObject(find.bySemanticsLabel('Agent, Codex'))+ .owner!+ .semanticsOwner!+ .performAction(row.id, SemanticsAction.tap);+ await tester.pump();+ expect(+ tester.widget<NewHarnessBox>(find.byType(NewHarnessBox)).controller.field,+ NewHarnessField.agent,+ );+ expect(input, isEmpty);+ semantics.dispose();+ await tester.pumpWidget(const SizedBox());+ app.dispose();+ map.dispose();+ });+}diff --git a/desktop/test/skeleton_test.dart b/desktop/test/skeleton_test.dartindex ca42c555d..7619cb1f9 100644--- a/desktop/test/skeleton_test.dart+++ b/desktop/test/skeleton_test.dart@@ -1,5 +1,5 @@// The skeleton primitives, checked against the four rules they exist for:-// the rhythm is a breath that Reduce Motion freezes at the PEAK, a text+// placeholders stay steady without a ticker, a text// placeholder is exactly as tall as the text it stands in for, a list fades// towards its bottom, and none of it takes the pointer.import 'package:flutter/material.dart';@@ -24,16 +24,15 @@ Color _fillOf(WidgetTester tester) {}void main() {- testWidgets('breathes between recess and recessHover', (tester) async {+ testWidgets('skeleton stays visible without scheduling animation frames', (+ tester,+ ) async {await tester.pumpWidget(_host(const Skeleton(width: 40)));- // The first frame is at rest.- expect(_fillOf(tester), AppSurface.recess);- // Half a cycle later it has reached the peak.- await tester.pump(const Duration(milliseconds: 1100));expect(_fillOf(tester), AppSurface.recessHover);- // And it comes back down: a breath, not a one-shot fade.- await tester.pump(const Duration(milliseconds: 1100));- expect(_fillOf(tester), AppSurface.recess);+ expect(tester.binding.transientCallbackCount, 0);+ await tester.pump(const Duration(milliseconds: 2200));+ expect(_fillOf(tester), AppSurface.recessHover);+ expect(tester.binding.transientCallbackCount, 0);});testWidgets('Reduce Motion holds the skeleton at the peak, not the middle', (diff --git a/docs/performance/screenshots/new-harness-controls.png b/docs/performance/screenshots/new-harness-controls.pngnew file mode 100644index 000000000..d29cf342fBinary files /dev/null and b/docs/performance/screenshots/new-harness-controls.png differ