Skip to content

copy: describe the HRV headline and hrv_cv as computed - #553

Merged
abdulsaheel merged 2 commits into
OpenStrap:mainfrom
DropTabl:fix/hrv-copy
Oct 9, 2026
Merged

abdulsaheel merged 2 commits into
OpenStrap:mainfrom
DropTabl:fix/hrv-copy

Conversation

@DropTabl

@DropTabl DropTabl commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Why: three descriptions said something the code does not do.

  • HRV method: it said "RMSSD over the longest artefact-free window … Lipponen–Tarvainen". The headline is the mean of RMSSD over the session's 5-min windows that hold ≥ 20 clean differences, cleaned by a 300–2000 ms range filter and a 20 % local-median ectopic filter. On noisy nights only windows that pass the jitter check on their own, or sit on a steady breathing line, count, and over-counted windows or nights are left out.
  • HRV blurb: "cleanest window" is now "Mean RMSSD across the night's 5-minute windows".
  • hrv_cv: it was labelled night-to-night variation. It is within-night SDNN of the Lipponen–Tarvainen-corrected beats as a % of mean NN.

Blurbs updated in all six locales. Copy only: no output change, no bump.

User-visible before → after: the method sheets and catalogue blurbs above.

Depends on: analytics OpenStrap/analytics#88/OpenStrap/analytics#89 (the 20-difference floor and the over-count rule) and edge #552 (single estimator). It should land with or after them and the repin.

🤖 Generated with Claude Code

Summary by Sourcery

Align localized HRV metric copy with the current analytics definitions without changing outputs.

Bug Fixes:

  • Correct the HRV and hrv_cv descriptions so they accurately reflect the metrics produced by the application.

Enhancements:

  • Clarify the HRV calculation scope and filtering criteria in the metric details.
  • Clarify that hrv_cv represents within-night SDNN relative to mean beat interval rather than night-to-night variation.

Documentation:

  • Update HRV and hrv_cv catalogue and method descriptions across all six supported locales.

Three descriptions said something the code does not do:

- The HRV method text said "RMSSD over the longest artefact-free window
  during sleep … corrected by the Lipponen–Tarvainen method". The nightly
  headline is the MEAN of RMSSD across the sleep session's 5-minute
  windows that hold at least 20 clean successive differences, cleaned by
  a 300–2000 ms range filter and a 20 % local-median ectopic filter, not
  by correctRr; on a night whose beat timing looks noisy only windows
  that pass the jitter check on their own, or sit on a steady breathing
  line, count; and a window or night whose beats add up to more time
  than passed is left out. Citation: Task Force 1996, with the ectopic
  filter credited as after Malik (it compares each beat to its
  neighbours' median, not to the previous beat).
- The Health catalogue blurb said "RMSSD over the cleanest window of
  sleep": now "Mean RMSSD across the night's 5-minute windows".
- hrv_cv was labelled "night-to-night coefficient of variation of RMSSD"
  / "how much that swings from night to night". It is computed WITHIN
  one night: SDNN of the night's Lipponen–Tarvainen-corrected beat
  intervals as a percentage of their mean. The chart shows how that
  per-night figure moves across nights, which is now what the method
  says, and the blurb reads "SDNN as a share of the average beat
  interval, within one night".

Blurbs updated in all six locales (en, de, es, fr, hi, zh), with the en
@descriptions to match. Copy only: no stored output changes, no
kAlgoVersion bump. The 20-difference floor and the over-count rule are
the analytics window-floor and RR over-count changes, and the single
nightly estimator is the companion edge change; this text should land
with or after them. A real night-to-night HRV CV would change a stored
series' meaning and is left for separate work.
@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Copy-only PR aligning HRV and hrv_cv method sheets, catalogue blurbs, citations, and localized descriptions with the current analytics and edge computations; it does not change outputs or versions.

File-Level Changes

Change Details Files
Correct the HRV metric documentation to describe its computed RMSSD aggregation and filtering rules.
  • Replace the longest-clean-window description with the mean across qualifying 5-minute sleep windows.
  • Document the clean-difference threshold, interval and local-median filters, jitter/breathing-line checks, and over-count exclusions.
  • Update the citation to reflect the ectopic-filter description.
lib/ui2/screens/metric_detail.dart
Clarify that hrv_cv is an intra-night SDNN-derived percentage rather than night-to-night variation.
  • Describe SDNN over corrected beat intervals normalized by mean NN.
  • Explain that the chart compares per-night values across nights, without defining the metric as a night-to-night coefficient of variation.
  • Update the citation and catalogue blurb.
lib/ui2/screens/metric_detail.dart
lib/ui2/screens/health_screen.dart
Synchronize the revised HRV copy across supported locales.
  • Update HRV and hrv_cv descriptions in German, English, Spanish, French, Hindi, and Chinese localization resources.
lib/l10n/app_de.arb
lib/l10n/app_en.arb
lib/l10n/app_es.arb
lib/l10n/app_fr.arb
lib/l10n/app_hi.arb
lib/l10n/app_zh.arb

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: OpenStrap/edge/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 3c4f8a57-badc-49d3-bcd7-f3824b574601
📥 Commits

Reviewing files that changed from the base of the PR and between 5b9b435 and 2b74e6b.

📒 Files selected for processing (8)
  • lib/l10n/app_de.arb
  • lib/l10n/app_en.arb
  • lib/l10n/app_es.arb
  • lib/l10n/app_fr.arb
  • lib/l10n/app_hi.arb
  • lib/l10n/app_zh.arb
  • lib/ui2/screens/health_screen.dart
  • lib/ui2/screens/metric_detail.dart
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

abdulsaheel added a commit that referenced this pull request Oct 9, 2026
v110: one nightly HRV estimator, personal-quiet strain, gap-aware respiration and sleep (integrates #552 #551 #553)
@abdulsaheel
abdulsaheel merged commit 8b28d77 into OpenStrap:main Oct 9, 2026
2 checks passed
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.

2 participants