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

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:miler/views/helpers/constants/app_theme.dart';
@@ -39,13 +40,15 @@ void main() {
height: height,
child: ElevatedButton.icon(
onPressed: () {},
icon: const Icon(Icons.arrow_forward_rounded, size: iconSize),
icon: const Icon(LucideIcons.arrowRight, size: iconSize),
label: const Text(
label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.w800, fontSize: labelFontSize),
fontWeight: FontWeight.w800,
fontSize: labelFontSize,
),
),
style: withOverrides
? ElevatedButton.styleFrom(
@@ -72,20 +75,27 @@ void main() {
// 48 − (18 + 18) of inherited vertical padding leaves a 12px content band,
// and everything in the button is crushed into it. The icon is the clean
// witness: it asked for 19px and cannot have been drawn correctly at 12.
final content = tester.getRect(find.byIcon(Icons.arrow_forward_rounded));
expect(content.height, lessThan(iconSize),
reason: 'this is the squeeze that cut the button label in half');
expect(tester.getRect(find.text(label)).height, lessThan(labelFontSize),
reason: 'the label box is shorter than one line of its own text');
final content = tester.getRect(find.byIcon(LucideIcons.arrowRight));
expect(
content.height,
lessThan(iconSize),
reason: 'this is the squeeze that cut the button label in half',
);
expect(
tester.getRect(find.text(label)).height,
lessThan(labelFontSize),
reason: 'the label box is shorter than one line of its own text',
);
});
testWidgets('overriding padding and minimumSize lets the label fit',
(tester) async {
testWidgets('overriding padding and minimumSize lets the label fit', (
tester,
) async {
await tester.pumpWidget(cta(withOverrides: true));
expect(tester.takeException(), isNull);
final button = tester.getRect(find.byType(ElevatedButton));
final icon = tester.getRect(find.byIcon(Icons.arrow_forward_rounded));
final icon = tester.getRect(find.byIcon(LucideIcons.arrowRight));
final text = tester.getRect(find.text(label));
// The SizedBox is the single source of truth for the height.
@@ -123,9 +133,11 @@ void main() {
height: height,
child: OutlinedButton.icon(
onPressed: () {},
icon: const Icon(Icons.close_rounded, size: 18),
label: const Text('Skip stop',
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w700)),
icon: const Icon(LucideIcons.x, size: 18),
label: const Text(
'Skip stop',
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w700),
),
style: withOverrides
? OutlinedButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 14),
@@ -143,8 +155,11 @@ void main() {
testWidgets('squeezes the icon without the overrides', (tester) async {
await tester.pumpWidget(outlined(withOverrides: false));
expect(tester.takeException(), isNull, reason: 'it fails silently');
expect(tester.getRect(find.byType(Icon)).height, lessThan(18),
reason: 'this is the shape that shrank the icon to 16px');
expect(
tester.getRect(find.byType(Icon)).height,
lessThan(18),
reason: 'this is the shape that shrank the icon to 16px',
);
});
testWidgets('and does not with them', (tester) async {