fix: sync-freshness banner, burst validation, and UI/UX polish - #39
Merged
Merged
Conversation
Fixes a persistent "last data > 1hr behind" regression: the freshness signal only ever read decoded_onehz's max timestamp (misses R10-lite records) and only ever refreshed at app boot; now reads the rec_ts_hw sync cursor and refreshes on every successful persist (onDataStored), foreground or background. Also makes HISTORY_END packet-count validation advisory instead of a hard gate — a mismatch used to discard an entire buffered chunk and re-request it forever, since the band's reported count and our tally don't have fully-confirmed semantics; every buffered record already passed CRC32 + plausibility checks, so a count mismatch was never real evidence of bad data. UI/UX: Profile screen gets a working back button (AppScaffold) and drops decorative icons + the Storage section; Today screen fixes a list-reflow glitch behind the freshness banner (stable keys) and adds context to the weekly steps card; MetricRow drops its per-row icon (icon spam) and fixes numeric clipping (FittedBox, never ellipsis); Journey/Timeline merge into one multi-vital lookback; workout-type icons wired through a new shared workout_types.dart seam.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AppState.lastRecordAt) only ever readdecoded_onehz's max timestamp (misses R10-lite historical records, which land insamplesinstead) and only ever refreshed once at app boot. Now reads therec_ts_hwsync cursor (the same frontier RecordGate/backfill policies already trust) and refreshes on every successful persist via the existingonDataStoredhook — covers foreground bursts, background/headless drains, and live-triggered stores uniformly, with no race window against the async commit.burstPacketCountMatchesas a small pure/testable function plus regression tests covering the real failure shape observed in the field.AppScaffold), dropped ~6 decorative/meaningless icons from personal-info rows (Sex→heart, Height→activity, etc.) and the "Storage" section (static notice, no content).Keys. Weekly steps card relabeled with context ("Steps goal (week)").MetricRow(shared "label left, value right" row powering Sleep/Heart/Respiratory/Skin-temp trend lists): dropped the per-row leading icon (repetitive across a whole screen of rows) and fixed numeric clipping — value now shrinks viaFittedBoxinstead of silently ellipsizing.lib/ui/workouts/workout_types.dartseam, replacing three divergent per-screen icon tables.pubspec.lockagainst real git-ref dependencies (was accidentally committed with local path overrides baked in — CI has never actually tested this state since the regression landed).Test plan
flutter analyzeclean (only the pre-existingglassBoxReadinessdeprecation baseline)flutter test --concurrency=1→ 376/376 pass, including 4 new regression tests for the burst-validation fixmain-branch git-ref dependencies (not local path overrides) — matches what CI resolves