Skip to content

fix bugs - #33

Merged
abdulsaheel merged 2 commits into
mainfrom
fix/bugs
Aug 2, 2026
Merged

fix bugs#33
abdulsaheel merged 2 commits into
mainfrom
fix/bugs

Conversation

@abdulsaheel

@abdulsaheel abdulsaheel commented Aug 1, 2026

Copy link
Copy Markdown
Contributor
  • raise nap cap to 6h so long secondary sleep isn't dropped

Summary by CodeRabbit

  • Bug Fixes
    • Nap detection now recognizes qualifying naps lasting up to 6 hours, instead of limiting them to 3 hours.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@abdulsaheel, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 51d2e7f6-d957-4870-983c-1cb4bb842555

📥 Commits

Reviewing files that changed from the base of the PR and between e60e2a1 and 1b6f7d4.

📒 Files selected for processing (1)
  • test/onehz/coaching_test.dart
📝 Walkthrough

Walkthrough

detectNaps now accepts detected sleep sessions with durations up to six hours. The minimum duration and other filtering logic remain unchanged.

Changes

Nap detection

Layer / File(s) Summary
Nap duration filter
lib/src/onehz/human/coaching.dart
The maximum qualifying nap duration increases from three hours to six hours. Other filtering rules remain unchanged.

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

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too vague and does not identify the nap duration change. Use a specific title such as "Increase maximum qualifying nap duration to 6 hours".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 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 `@lib/src/onehz/human/coaching.dart`:
- Around line 47-52: Update the nap-duration tests in the coaching test suite to
reflect the six-hour maxNapSec contract: revise the existing 20-minute–3-hour
comment and assertion, add a fixture accepted at exactly six hours, and add
coverage rejecting a duration above six hours so a three-hour cap regression
fails.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cf4716c4-9616-409a-9a8a-33212efe843b

📥 Commits

Reviewing files that changed from the base of the PR and between 656b33f and e60e2a1.

📒 Files selected for processing (1)
  • lib/src/onehz/human/coaching.dart

Comment thread lib/src/onehz/human/coaching.dart
@abdulsaheel
abdulsaheel merged commit 4be9473 into main Aug 2, 2026
3 checks passed
@abdulsaheel
abdulsaheel deleted the fix/bugs branch August 2, 2026 05:47
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.

1 participant