feat(mobile): keep glanceable session counts fresh on foreground and Android background - #6112
Open
iscekic wants to merge 1 commit into
Open
feat(mobile): keep glanceable session counts fresh on foreground and Android background#6112iscekic wants to merge 1 commit into
iscekic wants to merge 1 commit into
Conversation
…Android background Surface: the mobile app (apps/mobile), and the backend (services/notifications and the session-ingest triggers that feed it) only where it needs to change. Improve the freshness of the glanceable state — the iOS Live Activity and widgets, and the Android ongoing notification and home widget — so it reflects the current session states with much lower staleness. Today the aggregate is often stale: it shows, for example, 5 in progress and 1 idle while the truth when the app is opened is 3 in progress and 3 idle. After this change a glanceable surface must show the current counts rather than the counts from the last time the app happened to be opened. Definitions that govern every design decision and the PR description: - Scalable: the change must not incur additional battery cost for the user. Do not add polling, new background timers, shorter refresh intervals, or any new device wakeups. The set of pushes and wakeups the device already receives must not grow; freshness may only ride work the system already does. - Performant: the glanceable state must be as fresh as we can make it without breaking the battery rule. Never buy freshness at the cost of battery; when a fresher option would add a wakeup, take the battery-neutral option. How freshness is delivered (this is the shape of the system; do not replace it with polling): - Background: the existing server-triggered aggregate snapshot. A real session-status change refreshes the snapshot once per user+org and a data-only p
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the mobile foreground-refresh plumbing, the Agents-list refresh feedback and retry idempotence, and the Android FCM Files Reviewed (11 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
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.
Changelog for users
Changelog for maintainers
highpriority; iOS staysdefaultbecause APNs background pushes use priority 5 and the Live Activity rides the direct APNs path. Start review atbuildGlanceableExpoMessagesanddeliverGlanceableSnapshot.AppStatechangeand schedules one'foreground'refresh on transition to active. It rides the existing wakeup and adds no poll; cleanup removes the subscription with the sync.'foreground'joins the existing refresh-reason set, so superseded deliveries stay revision-fenced by the current fetch queue.retryableRowsFailureto the reserved status line, not the load-failure block; a ref lock keeps the inline Retry idempotent.LiveSessionFeedbackallocates amin-h-5slot for the refresh status whenever rows are shown, so a failure replaces empty space instead of pushing kept rows down. The count eyebrow is withheld while the list is unresolved or in error.services/notifications/vitest.config.mtspinsPUSH_SINK_MODE=''so unit tests no longer inherit a developer.dev.varssink override..dev.vars.exampledocumentsKILO_WEB_API_BASE_URLfor the local glanceable-snapshot route.E2E proof
p1-recording.mp4
e2-clear.mp4
e2-bg-clear.mp4
p2-terminal.mp4
p2-empty-raw.mp4
p1-background-fresh2.mp4
E2E proof — log excerpts
/home/igor_kilocode_ai/.local/share/kwf/sections/glanceable-updates-staleness-e460/e2e-mobile-app/e1-run.log/home/igor_kilocode_ai/.local/share/kwf/sections/glanceable-updates-staleness-e460/e2e-mobile-app/scripted-e1.log/home/igor_kilocode_ai/.local/share/kwf/sections/glanceable-updates-staleness-e460/e2e-mobile-app/e1d-run.log/home/igor_kilocode_ai/.local/share/kwf/sections/glanceable-updates-staleness-e460/e2e-mobile-app/e2-run.log/home/igor_kilocode_ai/.local/share/kwf/sections/glanceable-updates-staleness-e460/e2e-mobile-app/backend-priority-thisrun.logOwner request
Owner manual verification
The workflow skipped these checks. Owner verification is pending; these checks did not pass automatically.