Repository navigation
feat(sleep): add a sleep planner card (tonight's target at three goals and the bedtime each implies) - #2819
Open
LeonardSEO wants to merge 1 commit into
Open
feat(sleep): add a sleep planner card (tonight's target at three goals and the bedtime each implies)#2819LeonardSEO wants to merge 1 commit into
LeonardSEO wants to merge 1 commit into
Conversation
…time each implies Pure math in StrandAnalytics SleepPlanner with a Kotlin twin and mirrored fixtures. A new reorderable Sleep section on Android and Apple. Display-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Adds a Sleep planner card to the Sleep tab on Android and macOS/iOS: tonight's sleep target at three goals (70 / 85 / 100 % of tonight's need), the time in bed each one takes at the user's typical efficiency, and the bedtime that implies for the next wake.
SleepPlanner(StrandAnalytics) with a Kotlin twin and mirrored fixtures. Display-only: nothing feeds a score, a baseline or a stored value.sleepPlanneron both platforms (not in the.noopbakwhitelist, like the other section keys).The 70/85/100 ladder and the three-night gate follow the shape of the official app's sleep planner (seen in its shipped resources; facts only, no code or strings). The goal names are NOOP's own: Minimum / Solid / Full.
Type of change
How it was tested
SleepPlannerTests/SleepPlannerTest(same fixtures on both platforms: three-night gate, nap credit only repaying debt, efficiency median and clamp, bedtime wrap past midnight);SleepLayoutPrefsTests/SleepLayoutPrefsTestandSleepSectionReorderTestupdated for the new section.swift testinPackages/StrandAnalytics: 2149 tests pass../gradlew testFullDebugUnitTest: 6697 tests, all pass apart from the 2RecoveryDriversTesthalf-tie cases that fail the same way on unmodifiedmain.Tools/i18n_audit.py --ci,Tools/doc_comment_lint.py,docs/protocol-exampleschecks andTools/parity_ledger.py --refresh-derived(derived snapshots included): pass.Toolsunit tests, the parity acceptance suite and the R-R contract: pass apart from the 4test_check_source_referencescases (/varvs/private/vartemp path on macOS) that fail the same way on unmodifiedmain.Strand) builds with this change on my development branch;StrandTestsand the iOS target were not run locally for this branch.app-build.ymlcovers both.Checklist
android/(apart from the 2RecoveryDriversTesthalf-tie cases that fail the same way on unmodifiedmain)StrandDesign/Palette/Metricstokensdocs/CONTRIBUTING.mdStrand.xcodeproj/) or any secrets/keystoresRelated issues
None.
🤖 Generated with Claude Code