[BW-SLEEP-02] Show sleep countdown in system media controls and add shake grace/sensitivity #77
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Product intent
Make an active sleep timer glanceable from Android system media controls, including the collapsed/background surface, and make shake-to-restart usable at the exact moment the timer expires.
Requirements
Acceptance
Primary owner: Playback & Lifecycle Agent.
Review lenses: Android System & Auto Agent; Test & Acceptance Agent.
Canonical acceptance staging — 2026-09-24
Reviewed main / acceptance APK source:
88ae231ddc01897d83e24968bed5443ea861aeddMerged implementation: PR #84, accepted head
585ab7a4586b7764d0da977150f3230de9bcd8ca, merge commitca080a875f95e7e50a3944e1810cf9c76194c167.Exact-head CI: Forgejo run #265 / backend run 1195 — success:
verifyDebug, 2597 tests / 0 failures, ktlint 0, detekt 0, Android Lint 0 errors/0 warnings, Room schemas current.Later shared-service regression evidence: PR #89 exact head passed run #270 with 2606 tests / 0 failures and the full quality gate; current-main push run #271 passed at
88ae231d....Acceptance matrix — implementation / automated evidence
SleepTimerState.remainingis the authoritative countdown source.PlaybackServiceobserves it and republishes both metadata and media-button state on every change.MediaItem/MediaMetadata, preserving/restoring the ordinary byline and replacing rather than compounding countdown ticks.SleepTimerController.What CI cannot prove
There is no trustworthy physical evidence yet for actual Android System UI rendering, real accelerometer thresholds, screen-off behavior or Bluetooth/headset behavior. Green CI is not being treated as a substitute.
Acceptance APK
Forgejo Build APK run #272 produced:
bookwave-debug-0.10.6.1-2272bookwave-debug-0.10.6.1-2272.apkorg.homebord.bookwave.debug88ae231ddc01897d83e24968bed5443ea861aeddverifyDebug.Required physical matrix
Use the APK above and record the observed value/state at each step, not only “pass”.
Host/device-dependent criteria above are all STILL REQUIRES PHYSICAL TEST. The Android 13+/System UI wording is specifically not accepted until the actual device renders it.
This matrix should be run in the same device session as #33 rather than creating a second overnight/screen-off exercise.
Result
READY FOR PHYSICAL ACCEPTANCE
Physical acceptance finding — compact/expanded countdown is not visible
Physical device acceptance has now exercised the previously unproven System UI criterion and it fails.
Observed:
This converts the prior “READY FOR PHYSICAL ACCEPTANCE” item into a concrete implementation defect. The timer itself is working; the failure is presentation/projection.
Current-main diagnosis at
134fd99e9cb617d676f279f3a88b969baa9a2cff:PlaybackServicedoes observe the playback-ownedSleepTimerStateand republishes each timer change;CommandButton.displayName, which System UI is free to render as an icon-only action;SleepTimerMediaMetadatacurrently appends the countdown only toMediaMetadata.artist;Repair direction:
12:34,0:42,1:05:06) rather than a verbose label;Implementation branch:
mcp/issue-77-visible-sleep-countdown.Sleep countdown System UI repair — PR #93 ready for physical acceptance
Repair is implemented on PR #93 at exact HEAD
bcf302309d988765dfdfd1a8b6de610159aa6b18.Behavior
12:34 · Book title;titleanddisplayTitlecarry the countdown so compact/minimized and expanded Android System UI media surfaces do not depend on a secondary byline or custom-action text;Automated evidence
Exact HEAD
bcf3023:verifyDebug: PASS;Installable physical-test APK
Privileged APK run #318 built the same exact branch HEAD:
bookwave-debug-0.10.6.1-2318;bookwave-debug-0.10.6.1-2318.apk;org.homebord.bookwave.debug;bcf30230;270b96a3214c58c0…;The PR workflow's ordinary debug signer was deliberately not used for this physical APK, avoiding the prior update-certificate mismatch.
Remaining physical acceptance
Keep #77 open until the APK proves:
PR #93 is mergeable and currently 0 commits behind main.
Physical acceptance follow-up — compact title scrolls on every countdown tick
Physical testing of PR #93's first repair shows that the countdown is now visible, but the compact/minimized System UI presentation is still not readable enough.
Observed:
Product direction from physical acceptance:
12:34or1:05:06);Repair applied on PR #93. The implementation now publishes only the timer into both
titleanddisplayTitlewhile active, specifically to avoid a long marquee restarting on every one-second update. Physical acceptance remains open until this revised presentation is tested on-device.Timer-only compact media title — revised candidate ready for physical test
Physical feedback showed that
12:34 · Book titlewas technically visible but not readable in compact System UI because the one-second metadata updates kept restarting/updating the long marquee.PR #93 has been revised accordingly.
Exact candidate HEAD:
5118bfc2683e11f28b2514e7a6f0cd56a6ad0bf1Behavior now:
titleanddisplayTitleare only the compact countdown (for example12:34or1:05:06);Verification:
5118bfc…;Physical-test APK:
bookwave-debug-0.10.6.1-2322;bookwave-debug-0.10.6.1-2322.apk;org.homebord.bookwave.debug;5118bfc2;270b96a3214c58c0…, verified against the configured BookWave keystore.Remaining acceptance is on-device readability of the timer-only compact/top surface plus normal restoration when the timer ends.