Skip to content

feat: added Women's Health to Data Coverage tab - #1285

Merged
KaliszS merged 1 commit into
mainfrom
coverage_women
Jul 9, 2026
Merged

KaliszS merged 1 commit into
mainfrom
coverage_women

Conversation

@KaliszS

@KaliszS KaliszS commented Jul 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added Women’s Health coverage data across the app, including menstrual-cycle support details.
    • Introduced a new Women’s Health tab in the coverage view, plus provider-level coverage stats and detail sections.
    • Expanded the coverage API to return menstrual-cycle fields for each provider.
  • Bug Fixes

    • Improved coverage validation to account for all detail field types when checking provider support.

@KaliszS KaliszS self-assigned this Jul 9, 2026
@KaliszS KaliszS added backend Tickets related to the backend (FastAPI, Celery, database) frontend Tickets related to the frontend dashboard labels Jul 9, 2026
@railway-app
railway-app Bot temporarily deployed to Open Wearables / open-wearables-pr-1285 July 9, 2026 11:24 Destroyed
@coderabbitai

coderabbitai Bot commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds menstrual cycle coverage tracking end to end: a new MenstrualCycleField schema/type, a menstrual_cycle_fields attribute on ProviderCoverage, Garmin's MENSTRUAL_CYCLE_FIELDS constant wired into its strategy, coverage-API aggregation into CoverageResponse, expanded backend tests, and new "Women's Health" UI sections in the frontend coverage components.

Changes

Menstrual Cycle Coverage

Layer / File(s) Summary
Coverage schema and provider contract
backend/app/schemas/model_crud/coverage.py, backend/app/services/providers/base_strategy.py
Adds MenstrualCycleField Pydantic model, menstrual_cycle_fields on CoverageResponse, and a menstrual_cycle_fields frozenset attribute on ProviderCoverage.
Garmin field constants and strategy wiring
backend/app/services/providers/garmin/coverage.py, backend/app/services/providers/garmin/strategy.py
Defines MENSTRUAL_CYCLE_FIELDS for Garmin and passes it into the provider's coverage property.
Coverage API aggregation
backend/app/api/routes/v1/meta.py
Builds a sorted menstrual_cycle_fields list from provider coverage and includes it in CoverageResponse.
Provider coverage tests
backend/tests/providers/test_provider_coverage.py
Refactors ALL_DETAIL_FIELDS to traverse polymorphic subclasses, adds a menstrual-cycle field helper, and extends assertions to cover the new field.
Frontend API types
frontend/src/lib/api/services/meta.service.ts, frontend/src/lib/api/index.ts
Adds MenstrualCycleField interface, extends CoverageResponse, and re-exports the new type.
Women's Health UI
frontend/src/components/pages/coverage/coverage-matrix.tsx, frontend/src/components/pages/coverage/provider-cards.tsx, frontend/src/components/pages/coverage/provider-detail.tsx
Adds a Women's Health tab/matrix, a stat bar on provider cards, and a fields card/stat on provider detail pages.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested reviewers: bartmichalak, czajkub

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding Women’s Health coverage to the Data Coverage tab.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch coverage_women

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.

@KaliszS
KaliszS merged commit b813913 into main Jul 9, 2026
19 of 20 checks passed
@KaliszS
KaliszS deleted the coverage_women branch July 9, 2026 11:26

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/components/pages/coverage/coverage-matrix.tsx`:
- Around line 118-119: The destructuring assignment in coverage-matrix.tsx
exceeds the frontend TypeScript 80-character limit. Reformat the `data`
destructuring in the `CoverageMatrix` component so it wraps onto multiple lines
while preserving the same `providers`, `timeseries`, `workout_fields`,
`sleep_fields`, `menstrual_cycle_fields`, and `health_scores` bindings.

In `@frontend/src/components/pages/coverage/provider-cards.tsx`:
- Around line 46-47: The destructuring in the provider-cards component exceeds
the frontend TypeScript 80-character line limit. Reformat the object
destructuring in the provider-cards.tsx component by splitting the properties
across multiple lines so the statement stays within the width guideline while
preserving the existing variables providers, timeseries, workout_fields,
sleep_fields, menstrual_cycle_fields, and health_scores.

In `@frontend/src/components/pages/coverage/provider-detail.tsx`:
- Line 89: Update the provider detail card title in provider-detail.tsx to
follow the project quote style and consistent capitalization: change the
WomensHealth title string in the relevant card definition to use single quotes
and capitalize Health so it matches the existing Womens Health stat label.
Locate the entry with the chips value womensHealth and adjust that title text
accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ad43862c-cf4f-40ee-b8a7-89fa0c70b0fc

📥 Commits

Reviewing files that changed from the base of the PR and between bd45d3e and 0664e8b.

📒 Files selected for processing (11)
  • backend/app/api/routes/v1/meta.py
  • backend/app/schemas/model_crud/coverage.py
  • backend/app/services/providers/base_strategy.py
  • backend/app/services/providers/garmin/coverage.py
  • backend/app/services/providers/garmin/strategy.py
  • backend/tests/providers/test_provider_coverage.py
  • frontend/src/components/pages/coverage/coverage-matrix.tsx
  • frontend/src/components/pages/coverage/provider-cards.tsx
  • frontend/src/components/pages/coverage/provider-detail.tsx
  • frontend/src/lib/api/index.ts
  • frontend/src/lib/api/services/meta.service.ts

Comment on lines +118 to +119
const { providers, timeseries, workout_fields, sleep_fields, menstrual_cycle_fields, health_scores } =
data;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Line 118 exceeds the 80-character line width limit.

The destructuring line is ~90 characters. As per coding guidelines, frontend TypeScript files should use an 80-character line width.

♻️ Proposed fix
-  const { providers, timeseries, workout_fields, sleep_fields, menstrual_cycle_fields, health_scores } =
-    data;
+  const {
+    providers,
+    timeseries,
+    workout_fields,
+    sleep_fields,
+    menstrual_cycle_fields,
+    health_scores,
+  } = data;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const { providers, timeseries, workout_fields, sleep_fields, menstrual_cycle_fields, health_scores } =
data;
const {
providers,
timeseries,
workout_fields,
sleep_fields,
menstrual_cycle_fields,
health_scores,
} = data;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/pages/coverage/coverage-matrix.tsx` around lines 118
- 119, The destructuring assignment in coverage-matrix.tsx exceeds the frontend
TypeScript 80-character limit. Reformat the `data` destructuring in the
`CoverageMatrix` component so it wraps onto multiple lines while preserving the
same `providers`, `timeseries`, `workout_fields`, `sleep_fields`,
`menstrual_cycle_fields`, and `health_scores` bindings.

Source: Coding guidelines

Comment on lines +46 to +47
const { providers, timeseries, workout_fields, sleep_fields, menstrual_cycle_fields, health_scores } =
data;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Line 46 exceeds the 80-character line width limit.

The destructuring line is ~90 characters. As per coding guidelines, frontend TypeScript files should use an 80-character line width.

♻️ Proposed fix
-  const { providers, timeseries, workout_fields, sleep_fields, menstrual_cycle_fields, health_scores } =
-    data;
+  const {
+    providers,
+    timeseries,
+    workout_fields,
+    sleep_fields,
+    menstrual_cycle_fields,
+    health_scores,
+  } = data;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const { providers, timeseries, workout_fields, sleep_fields, menstrual_cycle_fields, health_scores } =
data;
const {
providers,
timeseries,
workout_fields,
sleep_fields,
menstrual_cycle_fields,
health_scores,
} = data;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/pages/coverage/provider-cards.tsx` around lines 46 -
47, The destructuring in the provider-cards component exceeds the frontend
TypeScript 80-character line limit. Reformat the object destructuring in the
provider-cards.tsx component by splitting the properties across multiple lines
so the statement stays within the width guideline while preserving the existing
variables providers, timeseries, workout_fields, sleep_fields,
menstrual_cycle_fields, and health_scores.

Source: Coding guidelines

})),
{ title: 'Workout fields', chips: workout },
{ title: 'Sleep fields', chips: sleep },
{ title: "Women's health fields", chips: womensHealth },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Use single quotes and fix capitalization inconsistency.

Line 89 uses double quotes ("Women's health fields") instead of single quotes, violating the coding guidelines. Additionally, "health" is lowercase here while the stat label on line 105 uses "Women's Health" with uppercase 'H'. For consistency, the card title should use "Women's Health fields".

♻️ Proposed fix
-    { title: "Women's health fields", chips: womensHealth },
+    { title: 'Women\'s Health fields', chips: womensHealth },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{ title: "Women's health fields", chips: womensHealth },
{ title: 'Women\'s Health fields', chips: womensHealth },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/pages/coverage/provider-detail.tsx` at line 89,
Update the provider detail card title in provider-detail.tsx to follow the
project quote style and consistent capitalization: change the WomensHealth title
string in the relevant card definition to use single quotes and capitalize
Health so it matches the existing Womens Health stat label. Locate the entry
with the chips value womensHealth and adjust that title text accordingly.

Source: Coding guidelines

This branch was successfully deployed

No deployments
Open Wearables / open-wearables-pr-1285 — 0664e8be Deployed Jul 9, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Tickets related to the backend (FastAPI, Celery, database) frontend Tickets related to the frontend dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant