Repository navigation
Audit Dashboard, Focus Card, Onboarding & Mobile Shell: fix P0-P3 defects - #1780
Merged
Merged
Conversation
Contributor
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no new actionable issue was established. SummaryThis PR adds disclosure checks for Light AI, strengthens Focus Card cache checks and cancellation, and fixes dashboard lifecycle details.
Reviews (5) · Last reviewed commit: "Regenerate MODULE_MAP.md after rebasing ..." · Reviewed by Greptile |
elkimek
force-pushed
the
audit/dashboard-focus-onboarding-mobile
branch
from
December 5, 2026 08:10
f23550a to
0d81a9e
Compare
Contributor
|
…and Tips catalog failure
elkimek
force-pushed
the
audit/dashboard-focus-onboarding-mobile
branch
from
December 6, 2026 13:35
b75662d to
afe54a1
Compare
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
Implements the Tier 3.4 audit fixes for Dashboard, Focus Card, Onboarding & Mobile Shell in getbased (P0–P3).
P0
js/sun-onboarding-ai.ts&js/light-today-ai.ts: Gate onboarding AI context, fingerprint,canAnalyze, andshouldAutoFireonisLightSunContextEnabled(); wraphealthGoalsandsleepRestserialization inisInsightContextCardsEnabled(); filter Vitamin D lab entries throughcreateLabContextDisclosure().entries(...)in bothsun-onboarding-ai.tsandlight-today-ai.tsso lab master toggles, lab group toggles, and date/panel/marker tombstones are consistently enforced.P1
js/data-core.ts&js/focus-card.ts: ExtendgetFocusCardFingerprint()withlabPanelTombstones,_deleted,_deletedAt,_deletedClearedAt,customMarkers,markerPlacements,unitSystem,rangeMode, andgetContextDisclosureFingerprint()(while keepingjs/data-core.tscompact under the line budget). Short-circuitprojectFocusCard()andloadFocusCard()before reading cached/demo prefills when!isLabMarkersContextEnabled(). Add monotonic sequence tracking (focusCardRequestSeq) andAbortControllercancellation for concurrentloadFocusCard()calls, forwardingsignaltoqueryLensandcallAssistantFeatureAI.js/dashboard-lab-widget-renderers.ts: Skipnull/empty draw values indashboardPearson()before numeric coercion so sparse draw dates do not fabricate correlations from coerced0s.js/mobile-dashboard.ts,types/mobile-dashboard.ts,js/dashboard-view-composition.ts,js/dashboard-view-shell.ts: Add and wireloadFocusCardintomobileDashboardDeps, callingloadFocusCard({ refreshStale: false })after mobile dashboard hydration (guarded byrequest.isCurrent()).js/mobile-dashboard.ts: Defer addingmobile-dashboard-activeuntil right before mounting (disposeDashboardPage()) afterrequest.isCurrent()succeeds, and callsyncMobileBottomNav('dashboard')so#mobile-bottom-tabsandmobile-tabs-activeare cleared on both sync and async mobile dashboard renders.P2
js/dashboard-page-view.ts: Guard the 100msstartEmptyTourtimeout callback ononboardingGeneration,currentProfile,importedData, connected#main-content, andempty-dashboard-active.js/dashboard-quick-marker-core.ts: Compare toggled pin storage ID against the resolved storage ID ofstate._activeDetailMarkerIdand re-open the modal usingstate._activeDetailMarkerIdso moved/re-categorized markers refresh cleanly.js/dashboard-recommendation-widget.ts,js/dashboard-page-view.ts,js/mobile-dashboard.ts: Track failed catalog loads so the recommendations widget renders an empty state instead of looping loading whenloadCatalog()fails/returnsnull(resetting on explicit retry or cache population), attach rejection handlers to catalog preload chains, and includedeviceSessionsalongsidesunSessionsin recent light session checks.js/dashboard-widget-renderers.ts: Fast-path zero-genetics profiles to{ kind: 'empty', contributionHref: null }when DNA helpers are not loaded yet (avoiding "Loading 0 SNPs" flash and unnecessary module fetches), guard async DOM refreshes on current profile/data ownership, and queue/run follow-up loads whenneedsMtdnaarrives mid-load.P3
js/dashboard-widget-controls.ts: CleardraggingWidgetId = nullon document'dragend'so cancelled drags cannot reorder widgets later.js/onboarding-view.ts: GuardsetOnboardingFocus('cards')asyncopenChatPanelcontinuation and scroll timer on profile/data ownership and attach.catch(() => {}).Verification
npm run typescript:build&npm run architecture:build(regeneratedMODULE_MAP.md)npm run typecheck,npm run typecheck:migration,npm run typecheck:migration-tests,npm run typecheck:checkjs,npm run typecheck:strict-null(0 diagnostics)npm run architecture:check(2133 modules, 0 cyclic)npm run quality(17/17 checks passed)node tests/verify-modules.js(161/161 passed)tests/dashboard-focus-onboarding-mobile-audit.test.ts(16 tests covering all P0–P3 fixes) and maintained contract tests (tests/dashboard-owned-quick-contract.test.ts,tests/dashboard-owned-notes-contract.test.ts,tests/dashboard-genome-rows-presentation.test.ts,tests/dashboard-current-zero-sink-ledger.test.ts,tests/mobile-dashboard-presentation.test.ts,tests/dashboard-composition-contract.test.ts,tests/dashboard-renderer-lifecycle.test.ts,tests/dashboard-onboarding-route.test.ts,tests/dom-sink-audit.test.ts)tests/test-onboarding-view-runtime.js(7/7),tests/test-recommendations.js(140/140),tests/test-correctness-phase2.js,tests/test-sun-defaults.js,tests/test-audit.js(385/385)