feat(mobile): add Android agents widget and live update - #5585
Open
iscekic wants to merge 14 commits into
Open
Conversation
This was referenced Aug 27, 2026
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (10 files)
Previous Review Summaries (5 snapshots, latest commit a26d710)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit a26d710)Status: No Issues Found | Recommendation: Merge Files Reviewed (9 files)
Previous review (commit f2a2901)Status: No Issues Found | Recommendation: Merge Files Reviewed (87 files)
Previous review (commit 87a9643)Status: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Previous review (commit 6b17fcd)Status: 3 Issues Found | Recommendation: Address before merge Fix these issues in Kilo Cloud Overview
Issue Details (click to expand)WARNING
Files Reviewed (10 files)
Previous review (commit 464e031)Status: 7 Issues Found | Recommendation: Address before merge Fix these issues in Kilo Cloud Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (15 files)
Reviewed by grok-4.6 · Input: 228K · Output: 26.9K · Cached: 858.9K Review guidance: REVIEW.md from base branch |
…activities-3cf8-s3
…activities-3cf8-s3
…activities-3cf8-s3
…activities-3cf8-s3
Gate the promoted-ongoing check behind SDK_INT >= 36 before reading SDK_INT_FULL. Replace the custom widget click action with an OPEN_URI deep link to the agents tab. Show the notification permission alert on app foreground and retry a pending start when permission is granted. Dismiss a leftover ongoing notification for an ineligible snapshot. Drop four dead exports and register the Android widget task entry with knip.
…activities-3cf8-s3
…activities-3cf8-s3
…activities-3cf8-s3
…activities-3cf8-s3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
ActiveAgentsLiveUpdatenative module posts one ongoing notification under a fixed id through a dedicatedactive-agentschannel that is silent, has no vibration, uses default importance, is public on the lock screen, and setsonlyAlertOnce. It promotes the notification to a Live Update only whenSDK_INT_FULLis at least36_001_000andNotificationManager.canPostPromotedNotifications()is true, settingFLAG_PROMOTED_ONGOINGplus aProgressStyle; older devices fall back to an ordinary ongoing notification. The JS wrapper forwards translated copy and the promotion gate result, so no private identifier reaches the notification.Files
apps/mobile/modules/active-agents-live-update/android/src/main/java/com/kilocode/activeagentsliveupdate/ActiveAgentsLiveUpdateModule.kt(added, +104) — exposesstart,update,end, andisPromotionCapable; owns the fixed notification id, channel creation, and the promotion gate.apps/mobile/src/glanceable-android/live-update.ts(added, +36) — the JS wrapper; passesisPromotionCapable()to the native functions and no-ops when the module is absent.apps/mobile/modules/active-agents-live-update/android/build.gradle(added, +22) — new Android library module applying the Expo Modules Core plugin.apps/mobile/modules/active-agents-live-update/expo-module.config.json(modified, +2/−2) — registers the module class for Android autolinking.The
androidSinkimplementsGlanceableSinkfor Android:publishrenders the widget from the newest snapshot and schedules one future redraw atexpiresAtthat zeroes the counts, whilestartOrUpdatestarts or updates a single ongoing notification guarded by snapshot revision and a notification-permission check. A denied permission records the latest eligible snapshot as pending so a later widget tap can start it, and an epoch guard drops a concurrent start whose permission check outlived anendImmediate.endImmediatecancels the notification but keeps the widget props, so the Home widget stays truthful after the work ends.Files
apps/mobile/src/glanceable-android/android-sink.ts(added, +199) — the sink implementation: widget render, expiry timer, revision guard, pending retry, epoch guard, and_resetAndroidSinkForTests.The
AndroidWidgetPropstype is the only payload the widget host receives, andbuildAndroidWidgetPropsis its only producer; it maps the snapshot through the shared presentation layer to a translated status line, ranked non-zero count lines, a compact primary count, an "Open agents" affordance flag, and a spoken accessibility label.buildExpiredWidgetPropszeroes the counts and forces the expired status for the expiry redraw,buildGenericWidgetPropssupplies the gallery placeholder, andbuildOngoingNotificationTextbuilds the single-line notification copy. None of the builders emits a title, organization name, or id.Files
apps/mobile/src/glanceable-android/widget-props.ts(added, +114) — theAndroidWidgetPropsandAndroidWidgetCounttypes and the four builders.The
ActiveAgentsWidgetrenders distinct light and dark layouts, showing only the primary count below 150dp wide and every non-zero count line plus the "Open agents" affordance at wider sizes, and it puts aOPEN_AGENTSclick action on the surface. The widget declaration makes it resizable from 110×40dp up to 360×120dp across 2×1 target cells in both directions.Files
apps/mobile/src/glanceable-android/active-agents-widget.tsx(added, +131) —renderActiveAgentsWidget, the compact threshold, the light and dark palettes, and the click-action constant.apps/mobile/src/glanceable-android/widget-config.json(added, +16) — the widget declaration with name, label, description, and resize bounds.Importing the widget module registers
androidSinkat module load and installs the widget task handler, which opens the agents view on the custom click action and otherwise re-renders from the last published props or an empty gallery placeholder.Files
apps/mobile/src/glanceable-android/register.ts(added, +36) — sink registration and the task handler with click routing.Notification permission is read through a lazy expo-notifications loader so the pure unit suite never pulls in React Native, and a test hook replaces the reader. A denied permission surfaces a one-time Open Settings alert only from a widget tap that cannot start the ongoing notification, never from a publisher start.
Files
apps/mobile/src/glanceable-android/permission.ts(added, +33) —isNotificationPermissionGrantedand the test-only reader injection.apps/mobile/src/glanceable-android/permission-alert.ts(added, +27) —showAndroidPermissionAlertOncewith the once-per-missing-permission latch and the Settings deep link.The pure vitest project now includes the glanceable-android test directory, so the widget, sink, and props suites run in the node environment without React mounting and stay out of the mounted-test harness.
Files
apps/mobile/vitest.pure.config.ts(modified, +1) — addssrc/glanceable-android/**/*.test.tsto the include list.Test: 3 new suites added,
apps/mobile/src/glanceable-android/active-agents-widget.test.ts(+150),android-sink.test.ts(+246), andwidget-props.test.ts(+115).Generated: none.
Verification
Visual Changes
Visual Changes: N/A
Reviewer Notes
agentnotification channel is unchanged; this level only adds theactive-agentschannel at default importance.Stacked PRs — merge bottom to top. Each level shows only its own diff.
Runtime verification (E2E, user advocacy, simplify) runs on the tip PR over every level.
Every level keeps its own checks, its own bot review, and its own threads; each one is answered on its own PR.
Each level is its own deliverable: it builds and passes its own checks alone.
A finding on a level is repaired on that level, then carried upward with stack.sh forward.
audit-w8b-live-activities-3cf8— feat(mobile): add glanceable agents snapshot contract #5535audit-w8b-live-activities-3cf8-s2— feat(mobile): add iOS Live Activity and widgets #5553audit-w8b-live-activities-3cf8-s3— feat(mobile): add Android agents widget and live update #5585 ← this PRaudit-w8b-live-activities-3cf8-s4— feat(mobile): deliver glanceable snapshot updates #5620 (tip)