fix(insights): device-coverage advisory follows enabled+configured devices - #4
Merged
Conversation
The "Running on 2/3 devices · Missing: whoop, oura" card hardcoded a 3-device expectation (whoop/oura/apple) from before the Fitbit pivot, so it always flagged dormant WHOOP/Oura as missing. Base the advisory on the wearables actually in use — enabled AND configured (has credentials) — and only show it when you run 2+ devices and one of yours is absent today. A device you don't use no longer reads as "missing". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Bug: Dashboard showed "Running on 2/3 devices · Missing: whoop, oura" even though those devices are no longer used.
Cause:
buildInsightsForDatehardcoded a 3-device expectation (['whoop','oura','apple']) from before the Fitbit pivot.Fix: Compute the expected set from the wearables actually in use —
kind==='wearable' && enabled && configured(configured = has credentials) — and only surface the advisory when you run 2+ devices and one of yours is missing today. Labels come fromDEVICE_LABEL. Dormant WHOOP/Oura (no creds) are excluded.Verified: typecheck + lint + 20 tests green.
🤖 Generated with Claude Code