Show sleep countdown and add shake grace settings (#77) #78

Closed
alexander wants to merge 53 commits from mcp/issue-77-sleep-timer-grace into main
Owner

Implements #77.

What changes

  • projects the authoritative sleep countdown into MediaSession metadata so compact/background Android media controls show readable timer text, while preserving the existing timer action;
  • restores the original author/series byline exactly when the timer becomes idle;
  • adds a bounded post-expiry shake grace window (10 seconds by default, Off/5s/10s in Settings);
  • a grace-period shake resumes playback and starts a fresh timer session with the same mode;
  • adds Low / Normal / High shake sensitivity, with Normal preserving the previous threshold;
  • immediately re-registers active sensing when sensitivity changes and tears sensing down outside the active timer/grace window;
  • persists both settings safely in DataStore;
  • updates PLAY-008, the product decision ledger, risk register, and device acceptance procedure.

Verification added

  • metadata projection/restoration tests;
  • shake grace in-window / expired / Off tests;
  • live sensitivity re-registration test;
  • deterministic threshold test;
  • real DataStore round-trip/clamping tests.

Review lenses

Playback & Lifecycle Agent is implementation owner. Android System & Auto and Test & Acceptance are required review lenses.

Do not merge automatically; owner will review and merge manually.

Implements #77. ## What changes - projects the authoritative sleep countdown into MediaSession metadata so compact/background Android media controls show readable timer text, while preserving the existing timer action; - restores the original author/series byline exactly when the timer becomes idle; - adds a bounded post-expiry shake grace window (10 seconds by default, Off/5s/10s in Settings); - a grace-period shake resumes playback and starts a fresh timer session with the same mode; - adds Low / Normal / High shake sensitivity, with Normal preserving the previous threshold; - immediately re-registers active sensing when sensitivity changes and tears sensing down outside the active timer/grace window; - persists both settings safely in DataStore; - updates PLAY-008, the product decision ledger, risk register, and device acceptance procedure. ## Verification added - metadata projection/restoration tests; - shake grace in-window / expired / Off tests; - live sensitivity re-registration test; - deterministic threshold test; - real DataStore round-trip/clamping tests. ## Review lenses Playback & Lifecycle Agent is implementation owner. Android System & Auto and Test & Acceptance are required review lenses. Do not merge automatically; owner will review and merge manually.
alexander force-pushed mcp/issue-77-sleep-timer-grace from 95896f3f59 to 7566f4ec99 2026-09-22 00:15:06 +02:00 Compare
alexander force-pushed mcp/issue-77-sleep-timer-grace from b5d4c2a974 to 929782aaa6 2026-09-22 13:41:11 +02:00 Compare
alexander force-pushed mcp/issue-77-sleep-timer-grace from fb154c8de4 to 3443ad93bf
Some checks failed
BookWave / PR verification Selected branch does not match PR #78
2026-09-22 15:58:38 +02:00
Compare
Fix sleep metadata test formatting
Some checks failed
BookWave / PR verification BookWave PR verification failed
013e772a53
Temporarily expose playback ktlint failure
Some checks failed
BookWave / PR verification BookWave PR verification failed
cc45f23649
Remove temporary ktlint probe
Some checks failed
BookWave / PR verification BookWave PR verification failed
0d67dc1c7c
Remove temporary remaining ktlint probe
Some checks failed
BookWave / PR verification BookWave PR verification failed
1290043e05
Author
Owner

Superseded by PR #84. PR #78 became unrebaseable after the CI workflow history merged to main; #84 rebuilds the same #77 feature content cleanly on current main and excludes the temporary CI-probe commits. No feature scope was intentionally changed.

Superseded by PR #84. PR #78 became unrebaseable after the CI workflow history merged to main; #84 rebuilds the same #77 feature content cleanly on current main and excludes the temporary CI-probe commits. No feature scope was intentionally changed.
Author
Owner

CI-only follow-up at HEAD c3801e17: PR verification no longer produces/uploads APKs. The existing verifyDebug invocation now excludes only the two APK-producing assemble tasks (:app:assembleDebug and :benchmark:assembleDebug); the rest of the existing quality graph is unchanged. The explicit debug-APK artifact upload step was removed. Broader CI redesign findings are tracked in #85. No Actions run was started for this commit.

CI-only follow-up at HEAD c3801e17: PR verification no longer produces/uploads APKs. The existing verifyDebug invocation now excludes only the two APK-producing assemble tasks (:app:assembleDebug and :benchmark:assembleDebug); the rest of the existing quality graph is unchanged. The explicit debug-APK artifact upload step was removed. Broader CI redesign findings are tracked in #85. No Actions run was started for this commit.
Author
Owner

Reconciliation update: the old divergent source branch was replaced with the clean #84 branch state, then Forgejo confirmed a no-op rebase onto current main. Current #78 head is 3ebdea6061, 29 commits ahead / 0 behind main, with the same clean content as #84 including the no-APK PR-CI change. Actions run #248 was started against this exact head. Forgejo's PR-level mergeable flag is still stale/false after the branch delete/recreate cycle even though the branch comparison is clean and the identical #84 head is mergeable.

Reconciliation update: the old divergent source branch was replaced with the clean #84 branch state, then Forgejo confirmed a no-op rebase onto current main. Current #78 head is 3ebdea6061fe9a2404d67baa4b2ec80baa0bb725, 29 commits ahead / 0 behind main, with the same clean content as #84 including the no-APK PR-CI change. Actions run #248 was started against this exact head. Forgejo's PR-level mergeable flag is still stale/false after the branch delete/recreate cycle even though the branch comparison is clean and the identical #84 head is mergeable.
alexander closed this pull request 2026-09-23 06:44:12 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
alexander/Audiobookshelf-Manager-Claude!78
No description provided.