Skip to content

Flag HR-only sleep estimates as incomplete - #2879

Open
fadkeprasad wants to merge 1 commit into
ryanbr:mainfrom
fadkeprasad:codex/hr-only-sleep-quality
Open

fadkeprasad wants to merge 1 commit into
ryanbr:mainfrom
fadkeprasad:codex/hr-only-sleep-quality

Conversation

@fadkeprasad

Copy link
Copy Markdown

What this PR does

When a night has no gravity samples, isGravitySparse returns false because there is no motion span to assess. HR-only sessions are therefore persisted as complete, and the Sleep screen hides its existing short-night warning. This misses the lower-confidence disclosure called for in #1801 and leaves short inferred windows looking authoritative.

The change adds a day-level presentation flag for HR-only sessions, preserves the detector's motion-sparsity value for staging and Rest scoring, and updates the warning copy to describe missing or incomplete motion data. iOS and Android behavior and translations are kept aligned.

Type of change

  • Bug fix

How it was tested

  • swift test --package-path Packages/StrandAnalytics --filter AnalyticsEngineHrOnlyDayTests — passed.
  • ANDROID_HOME=/Users/prasad/Library/Android/sdk ./gradlew :app:testFullDebugUnitTest --tests com.noop.analytics.AnalyticsEngineHrOnlyDayTest — passed.
  • python3 Tools/i18n_audit.py --ci origin/main — passed.
  • git diff --check — passed.

Checklist

  • Focused Swift package regression test passes.
  • Focused Android unit regression test passes.
  • No new warnings in the changed source files.
  • UI text uses existing design tokens; no colors, fonts, or spacing changed.
  • No protocol/frame changes.
  • Follows the repository contribution guidance.
  • No generated project output, secrets, or device captures committed.

Related issues

Refs #1801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant