Skip to content

Quiet hours for the buzz, and adjustable nap times - #18

Merged
sayed0am merged 2 commits into
mainfrom
quiet-hours-naps
Oct 29, 2026
Merged

sayed0am merged 2 commits into
mainfrom
quiet-hours-naps

Conversation

@sayed0am

Copy link
Copy Markdown
Owner

Quiet hours

Phone alerts gets a Quiet hours switch under the buzz pattern. It's off by default and set to 22:00 to 07:00 once on. From and To open the alarms' clock, and the hours can run past midnight. Calls still ring during quiet hours unless Calls too is on. The settings are backed up and kept when the strap is forgotten.

Nap times

Each nap on the Naps detail gets an Adjust times button (pencil icon). Its sheet shows:

  • the heart rate from an hour before to an hour after the strap's nap, to find where it drops and rises
  • Fell asleep and Woke up, picked on the clock to the minute, with the nap's length
  • Use the strap's times once a nap has been changed

It refuses naps under 5 minutes or over 4 hours, ends later than now, and times more than 3 hours from what the strap saw.

A sync deletes and rewrites the day's naps, so the user's times live in a new nap_edit table keyed by the strap's start (database 24, auto migration). NapTimes applies them for the Naps detail, Recovery's nap minutes, calories and the Health Connect export, and trims the stages to the new times. A nap stays on the day the strap gave it.

Checks

  • 1026 unit tests pass, with new QuietHoursTest and NapTimesTest.
  • On the Fold: quiet hours switch, rows, clock and saving. The nap sheet, saving an edit (detail, stages and heart rate followed it) and Use the strap's times, on a temporary test nap that was removed afterwards.
  • Not checked: the strap actually staying quiet for a real notification during quiet hours.

Known gap: changing an old nap may not reach Health Connect until that day is exported again.

🤖 Generated with Claude Code

sayed0am and others added 2 commits October 30, 2026 02:02
Phone alerts gets a Quiet hours switch, off by default and 22:00 to
07:00 once on, with From and To picked on the alarms' clock. Hours
can run past midnight. Calls still ring unless Calls too is on.
The settings are backed up and kept when the strap is forgotten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Naps gets an Adjust times button under each nap. Its sheet shows the
heart rate from an hour before to an hour after the strap's nap, to
find the drop into sleep, and Fell asleep and Woke up on the clock.
The strap's times stay one tap away.

The user's times live in a nap_edit table keyed by the strap's start
(database 24), since a sync rewrites the day's naps. The Naps detail,
Recovery's nap minutes, calories and the Health Connect export read
naps through NapTimes; stages are trimmed to the new times.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sayed0am
sayed0am merged commit 5e1c73d into main Oct 29, 2026
1 check passed
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