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,11 +1,43 @@
import 'package:flutter/material.dart';
class FontConstants {
// Miler Design System: Manrope typography (variable font) — a free,
// OFL-licensed geometric sans chosen as the closest legal stand-in for
// Uber Move (which is proprietary and cannot be bundled).
static const String fontFamily = 'Manrope';
static String fontFamilyFallback = 'PlusJakartaSans';
/// ── The app's typeface ──
///
/// Poppins: geometric, OFL-licensed, and the one every screen now reads from.
/// It replaced Manrope, which was itself a stand-in for Uber Move.
///
/// **Read this before changing it.** The family was already declared in
/// `pubspec.yaml` as `poppins`, with a lowercase path on every one of its
/// seven assets, while the files on disk are `assets/fonts/Poppins/Poppins-*`.
/// Asset bundling is case-sensitive on both platforms, so not one of them
/// resolved: anything asking for the family fell back to Roboto and no error
/// was raised anywhere. The declaration is fixed and all seven static weights
/// are registered — Poppins ships as separate files rather than a variable
/// font, and without explicit 800/900 entries Flutter synthesises them by
/// smearing SemiBold, which is what makes a heading look muddy at exactly the
/// size it is meant to be read from.
/// ── The weight scale is calibrated for THIS family ──
///
/// Poppins runs optically heavier than Manrope at every grade: it is
/// geometric, its bowls are wide and its stems thick, so `w800` here is far
/// darker on the page than `w800` was in a variable Manrope. The whole scale
/// was tuned against Manrope and came across a grade too heavy — headings
/// read as shouting and body copy as bold.
///
/// Every weight in `lib/` (outside `lib/xpress`, which is Proxima Nova) was
/// stepped down one grade: 900→800, 800→700, 700→600, 600→500. The *relative*
/// hierarchy is untouched — each level is still one step from its neighbour —
/// so nothing lost its rank; the whole run just sits where it should for this
/// typeface.
///
/// **If the family changes again, re-tune this.** A weight is a number, not a
/// design: what it looks like belongs to the font.
static const String fontFamily = 'Poppins';
/// Only ever reached for a glyph Poppins does not carry. Manrope covers the
/// Latin and currency sets the app uses, so this is a safety net rather than
/// a second typeface in the design.
static String fontFamilyFallback = 'Manrope';
// Typography scale
static const double displayLg = 32.0;
@@ -18,21 +50,21 @@ class FontConstants {
static TextStyle displayLgStyle = const TextStyle(
fontSize: 32,
fontWeight: FontWeight.w700,
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
fontFamily: fontFamily,
);
static TextStyle headlineMdStyle = const TextStyle(
fontSize: 24,
fontWeight: FontWeight.w700,
fontWeight: FontWeight.w600,
letterSpacing: -0.24,
fontFamily: fontFamily,
);
static TextStyle headlineSmStyle = const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w500,
letterSpacing: -0.2,
fontFamily: fontFamily,
);
@@ -51,7 +83,7 @@ class FontConstants {
static TextStyle labelBoldStyle = const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w700,
fontWeight: FontWeight.w600,
fontFamily: fontFamily,
);