fix(train): a day's page of its own, in cards, its night and Recharge drawn in place

The night's chart threw mid-paint where Polar's last phase starts at the
night's end or after it: its right edge was clamped between left + 1 and
the row's width, the lower bound then above the upper (an ArgumentError).
A throw mid-paint leaves the canvas moved, so the rows below and the charts
after them were drawn out of place, the skin temperature's among them. Each
phase now stays within its row, a pixel wide at least.

Nightly Recharge showed Polar's marks for a figure it has none of (-1 for
the recovery and the intervals, -100 for the nervous system's status, 0 for
a baseline not yet learnt) as the person's own. Recharge.known leaves them
out, on the page and in the days' list; the figures are rows, each with the
person's usual below it, and Polar's explanation of them (the status from
-10 to +10, what each measures) is behind halkyon_ui's question mark.

The page is a screen of its own over the tabs, without the bar and with the
way back at its top left, its parts in cards (the developer's review of
3 Nov 2026; D60 had it inside Profile).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-03 21:36:34 +01:00
commit ddca423b8a
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -2825,6 +2825,8 @@ void main() {
'recovery': 4,
'rmssd': 48,
'baselineRmssd': 45,
// Polar's mark for a status it has none of.
'ansStatus': -100.0,
}),
),
);
@ -2862,16 +2864,36 @@ void main() {
await tester.tap(find.text('Tuesday, October 27'));
await tester.pumpAndSettle();
// Inside Profile, the tabs beside it (D60).
expect(find.byType(NavigationBar), findsOneWidget);
// A screen of its own over the tabs, the way back at its top left
// (the developer's review of 3 Nov 2026).
expect(find.byType(NavigationBar), findsNothing);
expect(find.byType(BackButton), findsOneWidget);
expect(find.text('Heart rate'), findsOneWidget);
expect(find.text('The night'), findsOneWidget);
expect(find.text('You slept well'), findsOneWidget);
await tester.scrollUntilVisible(find.text('Nightly Recharge'), 200);
expect(
find.text('Heart rate variability 48 ms, your usual 45 ms'),
findsOneWidget,
// The person's figures in rows, each with their usual; Polar's mark
// for no value shown nowhere, the explanation behind the question
// mark.
expect(find.text('Recovery'), findsOneWidget);
expect(find.text('4 of 6'), findsOneWidget);
expect(find.text('Heart rate variability'), findsOneWidget);
expect(find.text('48 ms'), findsOneWidget);
expect(find.text('usually 45 ms'), findsOneWidget);
expect(find.textContaining('100'), findsNothing);
expect(find.text('Autonomic nervous system'), findsNothing);
expect(find.textContaining('from −10 to +10'), findsNothing);
await tester.tap(
find.descendant(
of: find.ancestor(
of: find.text('Nightly Recharge'),
matching: find.byType(Row),
),
matching: find.byType(HelpButton),
),
);
await tester.pumpAndSettle();
expect(find.textContaining('from −10 to +10'), findsOneWidget);
});
testWidgets("Home shows today's figures from the band, even before a "