Skip to content

HRV Time Domain Integration#36

Open
Mr-Imperium wants to merge 9 commits intom2b3:mainfrom
Mr-Imperium:hrv-time
Open

HRV Time Domain Integration#36
Mr-Imperium wants to merge 9 commits intom2b3:mainfrom
Mr-Imperium:hrv-time

Conversation

@Mr-Imperium
Copy link
Contributor

  • Integrated HRV time domain computation using HrvTimeDomain.compute(), storing complete results per breathing rate, computing HRV after recordings, and persisting winning/session results to DB
  • Enhanced Polar streaming to buffer RR intervals, compute HRV on stop.
  • Added HrvResultCard with collapsed (7 key metrics) and expandable (26 metrics, grouped) views; displayed in Record screen bottom sheet and Resonance Trainer results.
  • Persisted winning HRV from Resonance Trainer and enabled automatic UI rendering after test completion.

Mr-Imperium and others added 5 commits February 27, 2026 01:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Integrates time-domain HRV computation and persistence into the app, and adds UI to display summarized and detailed HRV metrics after recordings and resonance testing.

Changes:

  • Added time-domain HRV computation (HrvTimeDomain.compute) and result model (HrvTimeDomainResult).
  • Buffered RR intervals during Polar HR streaming, computed HRV on stop, and persisted HRV results to SQLite.
  • Added HrvResultCard UI and surfaced winning HRV results in the resonance trainer completion screen.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
breath_state/lib/widgets/hrv_result_card.dart New UI card for essential + expanded HRV metrics display.
breath_state/lib/services/resonance_service/rf_trainer.dart Saves and displays the winning HRV result after the resonance test completes.
breath_state/lib/services/resonance_service/res_freq.dart Computes and stores full HRV results per breathing rate (replacing RMSSD-only computation).
breath_state/lib/services/hrv_analysis/hrv_time_domain.dart New time-domain HRV computation implementation and result container.
breath_state/lib/services/heart_rate/polar_connect.dart Buffers RR intervals per session; computes + persists HRV at recording stop.
breath_state/lib/services/db_service/database_service.dart Adds DB schema + migration for HRV table and insert/get helpers.
breath_state/lib/constants/db_constants.dart Adds HRV_TABLE_NAME constant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Mr-Imperium and others added 4 commits March 4, 2026 11:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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