Skip to content

Fix sleep edits not preserving the wake calendar date - #1059

Merged
ryanbr merged 3 commits into
ryanbr:mainfrom
Creanathan:fix/issue-970-sleep-wake-date-clean
Aug 5, 2026
Merged

Fix sleep edits not preserving the wake calendar date#1059
ryanbr merged 3 commits into
ryanbr:mainfrom
Creanathan:fix/issue-970-sleep-wake-date-clean

Conversation

@Creanathan

Copy link
Copy Markdown

Summary

Design decision

The wake date is user-selectable to fix #970, but a date change must not silently create an unbounded multi-day sleep. A maximum 24-hour edit window preserves normal long sleep/nap corrections while preventing stages and totals from being re-bucketed across unrelated days, addressing the design conflict raised in review for #406.

Validation

  • git diff --check passes.
  • Focused diff is based directly on upstream main and contains only the eight sleep editor/guard/test files.
  • Android full debug unit tests were attempted, but this Windows environment has no Android SDK configured.
  • Swift package tests were attempted, but Swift tooling is not installed on this Windows environment.
  • Static parity review confirms Android and Swift guards and tests use the same 24-hour rule.

🤖 Generated with Claude Code

Creanathan and others added 2 commits August 3, 2026 09:46
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@Creanathan

Copy link
Copy Markdown
Author

CI is currently blocked before any jobs start: Android CI, Swift Packages CI, App build, Source Hygiene, and i18n Coverage all show action_required with zero jobs. This is GitHub's fork-workflow approval gate, not a test failure. Please approve the pending workflows so the full validation suite can run.

The branch is based directly on upstream main and the PR diff is focused to 8 sleep editor/guard/test files (+117/-74).

Co-Authored-By: Claude <noreply@anthropic.com>
@ryanbr
ryanbr merged commit 7c7b3f0 into ryanbr:main Aug 5, 2026
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.

Allow editing sleep start and end date/time

2 participants