Skip to content

Show time left as a status-bar Live Update chip (issue #19) - #20

Merged
kimptoc merged 9 commits into
mainfrom
feat/issue-19-live-update-chip
Aug 2, 2026
Merged

kimptoc merged 9 commits into
mainfrom
feat/issue-19-live-update-chip

Conversation

@kimptoc

@kimptoc kimptoc commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Issue show time left in top left home screen widget #19 was titled "show time left in top left home screen widget," but after discussion it turned out to describe Android's status-bar "Live Update" chip (the pill that appears top-left near the clock for ongoing activities on Android 16+), not a launcher home-screen widget or the existing Samsung Now Bar pill.
  • Adds a second, styleless promoted-ongoing notification path (Notifier.buildRunningPromotedNotification) used only when Notifier.canPromote(context) is true (API 36+ and the OS grants promotion). The existing MediaStyle/TimerMediaSession Now Bar path is unchanged for all other devices (notably One UI 7 / Android 15, which predates this API — MediaStyle is explicitly incompatible with the promoted-ongoing style requirements).
  • Bumped androidx.core:core-ktx to 1.18.0 for the new NotificationCompat APIs (not 1.19.0 — that version raises its own AAR-metadata floor to compileSdk 37/AGP 9.1.0, which conflicts with this project), and added the POST_PROMOTED_NOTIFICATIONS manifest permission.

See docs/superpowers/specs/2026-07-31-status-bar-live-update-chip-design.md for the full design and reasoning, and docs/superpowers/plans/2026-07-31-status-bar-live-update-chip.md for the implementation plan.

Test plan

  • Existing unit test suite passes (./gradlew testDebugUnitTest)
  • Verified on-device on a Galaxy S25 Ultra, One UI 8.5 / Android 16: dumpsys notification confirms the PROMOTED_ONGOING flag; the shade's "Live notifications" section shows the chip's chronometer ticking live (e.g. "03:49" counting down) with no ProgressStyle needed; Cancel correctly clears it (confirmed via logcat's onNotificationRemoved)
  • Verified the pre-existing MediaStyle/Now Bar fallback path still works correctly after the core-ktx bump, on the same physical device (temporarily forced canPromote() to false, rebuilt, confirmed the Now Bar pill renders correctly with progress bar and title/text, and Cancel clears it)
  • Regression-check on an actual Android 15 / One UI 7 device, if available (not available for this PR — the MediaStyle code path itself was verified unchanged and working post-bump, just not on that exact OS version)

🤖 Generated with Claude Code

kimptoc and others added 8 commits July 31, 2026 16:48
1.19.0 raises its own AAR metadata floor to compileSdk 37 / AGP 9.1.0,
which conflicts with this project's compileSdk=36 / AGP=8.9.1. Verified
via AAR metadata + bytecode inspection that 1.18.0 has the same
setRequestPromotedOngoing/setChronometerCountDown APIs and requires
exactly compileSdk=36 / AGP=8.9.1 — no other constraint changes needed.
…chip

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Update the design spec status and replace the "open verification risk"
section with the actual on-device results from the Samsung S25 Ultra
(One UI 8.5 / Android 16) test of both the promoted-ongoing chip and the
MediaStyle/Now Bar fallback. Update RunningTimerNotifier's class KDoc and
the CHANNEL_RUNNING channel comment in Notifier to describe both paths
instead of only the legacy MediaStyle mechanism. No logic changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
if (nm.getNotificationChannel(CHANNEL_RUNNING) == null) {
// LOW so it doesn't make sound on every state update. The MediaSession
// is what triggers the system to render the Now Bar / status-bar pill.
// LOW so it doesn't make sound on every state update. On Android 16+

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: You're documenting the new feature in a channel comment like it's a code archaeology note. This comment is essentially self-documenting code masquerading as a changelog entry.

🩹 The Fix: Keep it — it's actually useful context. But consider whether this belongs in code vs. the design spec.

📏 Severity: nitpick

* notification accordingly. Uses a MediaSession-backed MediaStyle
* notification so the system surfaces it in Samsung's Now Bar pill and
* the lockscreen / status-bar media chip.
* notification accordingly. Chooses between two mechanisms at runtime based on

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 The Roast: The KDoc went from a concise one-liner to a mini-essay. 'Chooses between two mechanisms at runtime based on device capability' — yes, we get it, it's adaptive, like a Pokémon.

🩹 The Fix: The detail is actually helpful for maintainers, but trim the marketing fluff. Just say it branches on canPromote() and links to the spec.

📏 Severity: nitpick

@kilo-code-bot

kilo-code-bot Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

Code Review Roast 🔥

Verdict: No Issues Found | Recommendation: Merge

Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything.

📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are.

Files Reviewed (2 files)
  • app/src/main/java/net/kimptoc/timerwithauto/alarm/Notifier.kt
  • app/src/main/java/net/kimptoc/timerwithauto/alarm/RunningTimerNotifier.kt

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Previous Review Summary (commit 28f2d36)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 28f2d36)

Verdict: No Issues Found | Recommendation: Merge

Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything.

📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are.

Files Reviewed (6 files)
  • app/src/main/java/net/kimptoc/timerwithauto/alarm/Notifier.kt - 2 issues
  • app/src/main/java/net/kimptoc/timerwithauto/alarm/RunningTimerNotifier.kt - 2 issues
  • docs/superpowers/specs/2026-07-31-status-bar-live-update-chip-design.md
  • docs/superpowers/plans/2026-07-31-status-bar-live-update-chip.md
  • app/src/main/AndroidManifest.xml
  • gradle/libs.versions.toml

Reviewed by ling-2.6-1t · Input: 98K · Output: 6.3K · Cached: 1.3M

@kimptoc
kimptoc merged commit 292bda9 into main Aug 2, 2026
2 checks passed
@kimptoc
kimptoc deleted the feat/issue-19-live-update-chip branch August 2, 2026 12:09
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