[SLEEP-02] Unify missing sleep data state - #2279
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
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 |
Reviewer's GuideUnifies the handling of missing prior-night sleep data across web and mobile by centralizing web sleep cards into a new SleepOverviewCards component and gating mobile sleep summary/coach sections behind a single “Sleep Data Needed” prerequisite state, with supporting tests and Storybook stories using the server-owned missing-sleep message. Sequence diagram for unified mobile sleep data missing statesequenceDiagram
participant TodayScreen
participant dashboardData
participant SleepNeedCard
participant SleepPerformanceCard
participant SleepDataNeededCard
TodayScreen->>dashboardData: read sleepNeed
dashboardData-->>TodayScreen: sleepNeed
TodayScreen->>TodayScreen: isSleepDataMissing = sleepNeed.availability === missing_previous_night
alt sleepDataMissing
TodayScreen->>SleepDataNeededCard: render Card title Sleep Data Needed with sleepNeed.message
TodayScreen-x SleepNeedCard: skip rendering
TodayScreen-x SleepPerformanceCard: skip rendering
else sleepDataAvailable
TodayScreen->>SleepPerformanceCard: render with sleepPerformance
TodayScreen->>SleepNeedCard: render with sleepNeed
end
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
PR Summary by QodoUnify missing sleep data states across web and mobile
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Mobile PreviewScan to open on device:
To test on device:
|
|
Storybook previews for This comment updates automatically on each PR push. |
Code Review by Qodo
Context used✅ Compliance rules (platform):
178 rules✅ Skills:
fix-provider, write-tests, cloudflare 1.
|
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
Summary
Validation
pnpm exec vitest run packages/web/src/components/SleepOverviewCards.test.tsx "packages/mobile/app/(tabs)/index.test.tsx"pnpm test:changedpnpm typecheckpnpm lint:sandboxpnpm storybook:web:buildCloses #2126
Summary by Sourcery
Unify handling of missing sleep data across web and mobile by centralizing the sleep overview layout and showing a single prerequisite card when prior-night sleep is unavailable.
New Features:
Bug Fixes:
Enhancements:
Summary by cubic
Unifies the “missing previous-night sleep” state across web and mobile so users see a single “Sleep Data Needed” card with the server message when last night’s data is missing. Aligns with SLEEP-02/#2126.
New Features
Bug Fixes
MISSING_PREVIOUS_NIGHT_MESSAGEand added asleepDataUnavailabletoggle to reflect the missing-data state accurately.Written for commit d1eb70f. Summary will update on new commits.