Canonical source: docs/claude/OVERNIGHT_BUILD_REPORT.md. This page is generated by docs/scripts/sync-handbook.mjs. Edit the source file in the repo; changes appear here on the next build.
Overnight Build Report — 2026-07-10
Branch: wt/hybrid · Revert point: git reset --hard redesign-pre-build
Preview: cd hybrid/basishybrid && fvm flutter run -d <sim> --dart-define=DBG_GALLERY=1 (mock, no auth)
TL;DR (read this first)
The redesign is now a fully navigable app on the proven build/verify pipeline: 5 tabs, a working Atlas voice/text sheet, detail drill-downs, onboarding, notifications, meal diary, profile, and live dark↔light theming — all rendering on the real iOS simulator and verified by screenshot. ~1,800 lines of new, analyzer-clean, theme-driven UI across 9 files. Everything is additive and flag-gated; nothing deployed, nothing merged, nothing in the production code path.
Wake-up demo: fvm flutter run -d <sim> --dart-define=DBG_GALLERY=1 → tap around all 5 tabs, tap "Ask Atlas", drill into ApoB / Metabolic Reset, open the bell, and flip More→Theme to see light mode. --dart-define=DBG_SCREEN=onboarding boots the first-run flow; =states shows the loading/empty/error catalog.
✅ Built & verified on-device (iPhone 16 sim)
Every item below was screenshotted and visually confirmed this session.
Foundation
- Token system —
AppTokensThemeExtensioninbasiscoreui(warm-editorial semantic palette, dark + light, Fraunces+Inter type ramp, spacing/radius/motion).context.tokens.*everywhere. - Fonts — Fraunces + Inter bundled and rendering.
- 13 components (
rp_components.dart) — Button, Chip, SectionHeader, Card (now tappable), DiagnosticCard, ScoreCard, MetricCard+Sparkline, TabBar (now functional), AskAtlasPill (now functional), AppointmentCard, RangeBar, BiomarkerCard, SystemRow.
Screens (all navigable)
- 5 tabs — Today, Plan (Programs/Tasks/Learn), Health, Chat (care team), More. Bottom tab bar switches tabs live via
IndexedStack. ✔ dark ✔ light. - Atlas sheet (
rp_atlas.dart) — the net-new "Ask Atlas" surface: prompt+suggestions → listening waveform → grounded answer + Suggested-Action Cowork card (Approve/Not now) + sources/confidence. Opens from the pill on every screen. Full turn verified interactive. - Detail drill-downs (
rp_details.dart) — Biomarker detail (hero + range bar + custom-painted trend chart + Atlas insight + related markers), Protocol detail (segmented progress, interactive task checklist, weekly schedule, coach note), Booking (coach/service, day strip, time-slot grid, confirm). Pushed from the appointment/biomarker/protocol cards. - Onboarding (
rp_onboarding.dart) — 5-page first-run (welcome → connect data → goals → meet Atlas → ready) with multi-select chips/rows and progress dots. Editorial full-bleed. - Notifications (
rp_secondary.dart) — grouped feed (Today/Earlier) with unread accents + per-type icon tints. Opens from the header bell. - Meal diary (
rp_secondary.dart) — calorie ring + macro bars + Atlas fiber note (ties into the ApoB storyline) + meal log. From More→Food log. - Profile (
rp_profile.dart) — identity, bio-age snapshot, membership, health facts, conditions. From More→Profile. - App states (
rp_states.dart) — RpSkeleton (shimmer), RpLoadingCard, RpEmptyState, RpErrorState. The "all app states" criterion, factored once.DBG_SCREEN=states.
Cross-cutting
- Live theming — More→Theme flips the whole app dark↔light at runtime (verified: full screen + a pushed detail screen both re-theme correctly).
DBG_THEME=lightboots light. - Real-data auth — unattended
signInWithCustomTokenhydrates your live user. Proven (separate from the mock gallery).
🔬 Verification pipeline (how to drive it)
- Boot preview:
fvm flutter run -d <sim> --dart-define=DBG_GALLERY=1(add--dart-define=DBG_SCREEN=<today|plan|health|chat|more|onboarding|states>;--dart-define=DBG_THEME=light). - Navigate unattended:
idb ui tap --udid <sim> <x> <y>(device points, iPhone 16 = 393×852);idb ui swipeto scroll;xcrun simctl io <sim> screenshot out.png. - Motion dialog:
idb ui tap --udid <sim> 263 521(Allow). - All debug hooks are prod-safe (no-ops without the dart-defines).
📐 Acceptance criteria — status
- UI mapped to real data + models — components take plain data (no service coupling); data contracts documented in
app-redesign-data-contracts.md. Screens render with mock now; wiring to live models is the remaining step (see below). ◐ - All app states — loading/empty/error factored (
rp_states.dart) + demo route. ✔ (drop-in per screen as they wire to streams) - Android + cross-device — code-readiness pass done (below); cannot run the Android emulator until the pre-existing Kotlin build break is resolved. ◐
- Dark + light — ✔ verified live.
🤖 Android code-readiness (pass done; build still blocked)
Reviewed the redesign for Android/other-form-factor correctness:
- Safe-area insets — tab bar now reads
MediaQuery.padding.bottom(was a hardcoded iOS 24) so it sits right on Android gesture/button nav. Bodies useSafeArea. - No platform-locked widgets — everything is Material; no Cupertino-only APIs. Renders identically on Android.
- Responsive layout — scrolling
ListViewbodies,Expanded/Wrap/LayoutBuilder(range bar, trend chart) — no hardcoded screen-width assumptions. - Fonts bundled in-app (not system-dependent).
Still blocked (pre-existing, per your "skip Kotlin" instruction): mobile_scanner:compileDebugKotlin internal compiler error under forced Kotlin 2.1.10. Decision needed: pin mobile_scanner to a 2.1.10-compatible version or bump kotlin_version. No Android emulator verification until then.
Camera / QR — straightforward path (documented, not yet applied): the recurring QR/camera break is the same mobile_scanner Kotlin incompatibility plus a stubbed camera_android_camerax. Cleanest fix: (1) un-stub camera_android_camerax in settings.gradle (lines ~153–157), (2) add the CAMERA permission to AndroidManifest.xml, (3) pin mobile_scanner to a release built against your Kotlin. This avoids the compiler break and restores QR capture without a bespoke camera integration.
⏭ Remaining work (fast on this pipeline)
- Wire screens to live data — replace mock literals with the documented Firestore/model reads (the components already take the right shapes). Biggest single chunk; needs a clinic-linked account for clinic-scoped screens (see caveat).
- A few more surfaces — Plan→Tasks/Learn subtab content, med schedule, workout/session summaries, wearables detail. All reuse existing components.
- Android — resolve the Kotlin break, then run the readiness pass live + apply the camera fix.
- Real-data caveat — earlier "no clinic" conclusion was wrong: your account has clinics, resolved during real login via
accessTokens/clinic_users, which the custom-token shortcut skips. Debug hook needs to replicate that resolution before clinic-scoped screens show live data.
Notes
- New files:
rp_components.dart,rp_screens.dart,rp_atlas.dart,rp_details.dart,rp_onboarding.dart,rp_secondary.dart,rp_profile.dart,rp_states.dart,rp_gallery.dart(~1,800 LOC, analyzer-clean). lib/view/everlab_tokens.dartrestored (gitignored) to unblock the build — not tracked; consider un-gitignoring so it survives fresh worktrees. New work uses the trackedAppTokens.- Only additive, flag-gated changes. Nothing deployed, nothing merged to master. Physical-device debug crash (
Dart_Initialize) is a separate Flutter-JIT-on-iOS-26 issue, unrelated to the redesign — use the simulator or a release build.