Repository navigation
feat(backend): add recovery summary endpoint - #1027
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughImplements the recovery summaries endpoint end-to-end: repository cursor-query for RECOVERY HealthScore rows, service filtering/mapping to RecoverySummary objects with pagination, API route wiring to parse dates and forward params, tests covering behavior and pagination, and docs + client example. ChangesRecovery Summaries Feature
Sequence DiagramsequenceDiagram
participant Client
participant Route
participant Service
participant Repository
participant Database
Client->>Route: GET /users/{user_id}/summaries/recovery?start_date&end_date&cursor&limit
Route->>Service: get_recovery_summaries(user_id, start, end, cursor, limit)
Service->>Repository: get_recovery_summaries(db_session, user_id, start, end, cursor, limit)
Repository->>Database: Execute RECOVERY query (date window, cursor tuple)
Database-->>Repository: rows
Repository-->>Service: list[dict(metrics, recorded_at, id, provider)]
Service->>Service: filter by priority, map to RecoverySummary, build cursors
Service-->>Route: PaginatedResponse[RecoverySummary]
Route-->>Client: 200 JSON response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
🚅 Deployed to the open-wearables-pr-1027 environment in Open Wearables
|
Resolves #198
Summary by CodeRabbit
New Features
Documentation
Tests