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(mobile): the attaching skeleton shows with Reduce Motion on

deed66ad856f273
diff --git a/mobile/lib/phone/terminal_page.dart b/mobile/lib/phone/terminal_page.dart
index 779ffc587..1a18de1d7 100644
--- a/mobile/lib/phone/terminal_page.dart
+++ b/mobile/lib/phone/terminal_page.dart
@@ -2774,7 +2774,12 @@ class _AttachingState extends State<_Attaching> with TickerProviderStateMixin {
/// Whether the sweep and the breath are running. False with the page parked
/// beside the one on screen, or with animations turned off — see
/// [didChangeDependencies] for what is drawn then.
- bool _animating = false;
+ ///
+ /// ⚠️ **Null until the first [didChangeDependencies], not false.** Starting
+ /// on false, a skeleton BUILT still — Reduce Motion on, or a page built parked
+ /// — found nothing changed, skipped the jump to the sweep's end, and drew bare
+ /// ground for the whole wait.
+ bool? _animating;
@override
void didChangeDependencies() {
diff --git a/mobile/test/phone_edge/focus_behavior_test.dart b/mobile/test/phone_edge/focus_behavior_test.dart
index b1fcbf099..66672512d 100644
--- a/mobile/test/phone_edge/focus_behavior_test.dart
+++ b/mobile/test/phone_edge/focus_behavior_test.dart
@@ -749,6 +749,40 @@ void main() {
expect(find.bySemanticsLabel('Attaching to the harness'), findsOneWidget);
// Nothing moves, so the tree settles — which a breathing skeleton never lets it do.
await tester.pumpAndSettle();
+ // ⚠️ And it is THERE: jumped to where the sweep would end. Before, a skeleton built with
+ // animations already off never ran its sweep and never jumped it either — the reveal sat at
+ // zero and the page waited on bare ground, which is the one thing the skeleton is for.
+ expect(_skeletonReveal(tester), greaterThan(0.5));
+ await tester.pumpWidget(const SizedBox());
+ await tester.pump(const Duration(seconds: 3));
+ app.dispose();
+ await tester.pump(const Duration(seconds: 30));
+ });
+
+ testWidgets('parked beside the page on screen, then brought back', (
+ tester,
+ ) async {
+ setPhone(tester, largePhone);
+ final app = edgeApp();
+ final voice = edgeVoice().voice;
+ Widget page({required bool ticking}) => phoneApp(
+ TickerMode(
+ enabled: ticking,
+ child: TerminalPage(
+ notifier: app,
+ machineId: 'm',
+ agentId: 'a',
+ voice: voice,
+ ),
+ ),
+ );
+ await tester.pumpWidget(page(ticking: true));
+ await tester.pump(const Duration(milliseconds: 300));
+ await tester.pumpWidget(page(ticking: false));
+ await tester.pump();
+ expect(_skeletonReveal(tester), greaterThan(0.5));
+ await tester.pumpWidget(page(ticking: true));
+ await tester.pump(const Duration(milliseconds: 300));
await tester.pumpWidget(const SizedBox());
await tester.pump(const Duration(seconds: 3));
app.dispose();
@@ -822,6 +856,21 @@ void main() {
/// The clipboard's contents as `Clipboard.getData` reports them.
Map<String, dynamic>? _clipboard;
+/// How far the attaching skeleton's sweep has come, 0 (nothing drawn) to its stop short of 1 —
+/// read off its painter, which is private to the page.
+double _skeletonReveal(WidgetTester tester) {
+ final painters = [
+ for (final paint in tester.widgetList<CustomPaint>(
+ find.byType(CustomPaint),
+ ))
+ if (paint.painter.runtimeType.toString() == '_SkeletonPainter')
+ paint.painter,
+ ];
+ expect(painters, hasLength(1));
+ final dynamic painter = painters.single;
+ return (painter.reveal as Animation<double>).value;
+}
+
/// Whether the mic can be pressed.
bool _micLive(WidgetTester tester) =>
tester.widget<VoiceMicButton>(find.byType(VoiceMicButton)).onPressed !=