Miler rider app: surface system, visible design language, backend lifecycle

Design system
- MilerSurface ladder (canvas → working → raised → floating) with MilerPanel
  as layer 1; canvas moved to #DEE3EA so white separates at 1.290:1.
- Visible vocabulary applied across Home, Deliveries, Activity, Account and
  the sheets: hero heads (tabular numeral + small caption, clamped at 1.3x),
  canvas wells for anything that opens, small filled tags for shelf labels,
  demoted placeholders. Recorded in DESIGN_SYSTEM.md §6.
- One icon family: 222 Material glyphs migrated to Lucide; none left outside
  lib/xpress.
- Colour semantics corrected: amber only for what is genuinely owed, brand red
  reserved for the live stop, disabled primaries go neutral rather than pale.

Data and lifecycle
- lib/data/lifecycle.dart reads mutations for what they prove; route_order.dart
  makes admin sequence the single ordering authority; service_day.dart, and
  stop_area.dart rewritten against live Coimbatore addresses (digit-token
  stripping, city stoplist, street suffixes, stammer collapse).
- countLabel states the load once, in bags.

Testing
- 1440 tests passing; golden shot harnesses for Home, Deliveries, Activity,
  sheets and verify, with test/failures/ now gitignored (diff debris).
- New pins: home_gutter_test, stop_area_test, plus updated structural bounds.

Note: this commit also carries pre-existing working-tree deletions that were
present before this work (API_SPEC.md, README.md, demo test fixtures).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-22 05:40:35 +05:30
parent c8350563d9
commit d7348e253f
387 changed files with 80693 additions and 12272 deletions

View File

@@ -34,9 +34,7 @@ void main() {
),
),
);
// Not `pumpAndSettle`: the halo breathes on a repeating controller, so
// there is deliberately no steady state to settle into.
await tester.pump(const Duration(milliseconds: 300));
await tester.pumpAndSettle();
}
/// Any decoration carrying a border, anywhere in the state.
@@ -46,34 +44,45 @@ void main() {
return d is BoxDecoration && d.border != null;
});
testWidgets('names the trip the tabs name, and draws no card', (
tester,
) async {
testWidgets('one line and the artwork, and no card', (tester) async {
await pump(tester, offline: false);
expect(find.text('Trip 2 not assigned yet'), findsOneWidget);
// ── The line is fixed copy now, not the tab's name ──
//
// It read `${'$'}{tripLabel} not assigned yet` — "Trip 2 not assigned yet" —
// so each tab named itself. The user asked for one line, `Trip not
// assigned yet`, on every tab; the tab bar directly above already says
// which trip is selected, which is where that answer now lives alone.
expect(find.text('Trip not assigned yet'), findsOneWidget);
expect(borderedBoxes(), findsNothing);
});
testWidgets('says the app is still waiting rather than offering nothing', (
testWidgets('the artwork carries the wait — no paragraph, no chip', (
tester,
) async {
await pump(tester, offline: false);
expect(find.text('Waiting for your hub'), findsOneWidget);
});
testWidgets('off duty is a different sentence with the action that fixes it', (
tester,
) async {
var tapped = false;
await pump(tester, offline: true, onGoOnDuty: () => tapped = true);
expect(find.text('You are off duty'), findsOneWidget);
// Nothing is coming until he goes on duty, so the wait is not claimed.
// The illustration says "waiting for work" in one look, so the two
// sentences and the `● Waiting for your hub` pill under it are gone.
// Anything that reintroduces prose here should fail this.
expect(find.byType(Image), findsOneWidget);
expect(find.text('Waiting for your hub'), findsNothing);
await tester.tap(find.text('Go on duty'));
await tester.pump();
expect(tapped, isTrue);
expect(find.textContaining('Your hub assigns trips'), findsNothing);
});
testWidgets(
'off duty is a different sentence with the action that fixes it',
(tester) async {
var tapped = false;
await pump(tester, offline: true, onGoOnDuty: () => tapped = true);
expect(find.text('You are off duty'), findsOneWidget);
// Nothing is coming until he goes on duty, so the wait is not claimed.
expect(find.text('Waiting for your hub'), findsNothing);
await tester.tap(find.text('Go on duty'));
await tester.pump();
expect(tapped, isTrue);
},
);
}