Make sleep countdown visible in system media controls (#77) #93

Merged
alexander merged 8 commits from mcp/issue-77-visible-sleep-countdown into main 2026-09-26 07:56:24 +02:00
Owner

Summary

Repairs the failed physical acceptance criterion on #77: an active sleep timer was not visibly rendered in either the expanded Android media notification or the compact/minimized System UI media surface.

What changed

  • projects the active countdown into the primary title and displayTitle metadata rather than relying on a secondary artist/byline or custom-action label;
  • puts a compact clock first (12:34 · Book title, 1:05:06 · Book title) so narrow surfaces retain the timer;
  • preserves the author/byline unchanged;
  • restores the exact original title/display-title when the timer stops;
  • keeps the existing sleep-timer action and timer semantics unchanged;
  • adds deterministic tests for projection, restoration, no-prefix-compounding, title-less media, clock formatting, and sub-second rounding.

Why

The earlier implementation and CI proved the state projection logic but physical acceptance had deliberately remained open. The device result now proves that CommandButton.displayName plus an artist projection is not sufficient for the actual System UI host.

Acceptance

Automated checks can prove the metadata contract. Final acceptance still requires the physical check from #77:

  • active countdown visible in compact/minimized media controls;
  • active countdown visible in expanded notification;
  • countdown advances;
  • original book title is restored when the timer ends/cancels.

Closes no issue automatically; #77 should remain open until physical rendering is confirmed.

## Summary Repairs the failed physical acceptance criterion on #77: an active sleep timer was not visibly rendered in either the expanded Android media notification or the compact/minimized System UI media surface. ### What changed - projects the active countdown into the primary `title` and `displayTitle` metadata rather than relying on a secondary artist/byline or custom-action label; - puts a compact clock first (`12:34 · Book title`, `1:05:06 · Book title`) so narrow surfaces retain the timer; - preserves the author/byline unchanged; - restores the exact original title/display-title when the timer stops; - keeps the existing sleep-timer action and timer semantics unchanged; - adds deterministic tests for projection, restoration, no-prefix-compounding, title-less media, clock formatting, and sub-second rounding. ## Why The earlier implementation and CI proved the state projection logic but physical acceptance had deliberately remained open. The device result now proves that `CommandButton.displayName` plus an `artist` projection is not sufficient for the actual System UI host. ## Acceptance Automated checks can prove the metadata contract. Final acceptance still requires the physical check from #77: - active countdown visible in compact/minimized media controls; - active countdown visible in expanded notification; - countdown advances; - original book title is restored when the timer ends/cancels. Closes no issue automatically; #77 should remain open until physical rendering is confirmed.
Publish sleep clock in primary media metadata (#77)
Some checks failed
CI · PR verification / CI · 93 · resolve target (pull_request) Successful in 2s
CI · PR verification / CI · · Preflight · wf:93 (pull_request) Successful in 7s
CI · PR verification / CI · · verification · wf:93 (pull_request) Failing after 47s
BookWave / PR quick BookWave verification failed
CI · PR verification / CI · · publish check · wf:93 (pull_request) Successful in 2s
a61c949d08
Fix sleep metadata test formatting (#77)
Some checks failed
CI · PR verification / CI · 93 · resolve target (pull_request) Successful in 2s
CI · PR verification / CI · · Preflight · wf:93 (pull_request) Successful in 7s
CI · PR verification / CI · · verification · wf:93 (pull_request) Failing after 49s
BookWave / PR quick BookWave verification failed
CI · PR verification / CI · · publish check · wf:93 (pull_request) Successful in 2s
cab1f69b91
Apply ktlint indentation to sleep metadata test (#77)
All checks were successful
CI · PR verification / CI · 93 · resolve target (pull_request) Successful in 2s
CI · PR verification / CI · · Preflight · wf:93 (pull_request) Successful in 7s
CI · PR verification / CI · · verification · wf:93 (pull_request) Successful in 48s
BookWave / PR quick BookWave quick verification passed
CI · PR verification / CI · · publish check · wf:93 (pull_request) Successful in 2s
BookWave / PR verification BookWave standard verification passed
bcf302309d
Show only sleep countdown in system media title (#77)
Some checks failed
CI · PR verification / CI · 93 · resolve target (pull_request) Successful in 2s
CI · PR verification / CI · · Preflight · wf:93 (pull_request) Successful in 7s
CI · PR verification / CI · · publish check · wf:93 (pull_request) Has been cancelled
CI · PR verification / CI · · verification · wf:93 (pull_request) Has been cancelled
b19e66d56d
Test timer-only system media title (#77)
All checks were successful
CI · PR verification / CI · 93 · resolve target (pull_request) Successful in 2s
CI · PR verification / CI · · Preflight · wf:93 (pull_request) Successful in 7s
CI · PR verification / CI · · verification · wf:93 (pull_request) Successful in 46s
BookWave / PR quick BookWave quick verification passed
CI · PR verification / CI · · publish check · wf:93 (pull_request) Successful in 2s
BookWave / PR verification BookWave standard verification passed
5118bfc268
alexander deleted branch mcp/issue-77-visible-sleep-countdown 2026-09-26 07:56:24 +02:00
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!93
No description provided.