Repository navigation
feat(mobile): add morning briefings for overnight agent activity - #7602
Conversation
Adds backend-scheduled overnight reports for cloud and CLI coding sessions, a Home card that temporarily replaces live status, report history, schedule settings, an optional paid AI summary with finite safeguards, and a separate opt-in briefing notification.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe only PR-owned change since the previous review is the default briefing summary model swap to the Overview
What Changed Since The Last Review
Note: the merge also pulled in unrelated Files Reviewed (7 files)
Previous Review Summaries (5 snapshots, latest commit a00239e)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit a00239e)Status: No Issues Found | Recommendation: Merge Executive SummarySince the previous review the branch merged Files Reviewed (7 files)
The merge of Fix these issues in Kilo Cloud Previous review (commit 7f1a3a2)Status: No Issues Found | Recommendation: Merge Executive SummaryThis incremental commit fixes every finding from the previous review (NOT_FOUND no longer treated as access denial, the evidence flush now honors the retry backoff and clears its pending flag, the session scan is bounded to active sessions plus ancestors, group status merges all sessions, the gateway counts all request text, and the charging Files Reviewed (21 changed files plus 12 locale catalogs and 7 test files)
Previous review (commit 07ed6e3)Status: 10 Issues Found | Recommendation: Address before merge Executive SummaryThe accidental 1,478-file duplicate of the mobile source under Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (3 changed files plus 1,478 deleted duplicate files)
Fix these issues in Kilo Cloud Previous review (commit 5539807)Status: 11 Issues Found | Recommendation: Address before merge Executive SummaryThis follow-up commit accidentally commits a full 1,478-file duplicate of the mobile app source under Overview
Issue Details (click to expand)CRITICAL
WARNING
SUGGESTION
Files Reviewed (98 changed files plus the 1,478-file duplicate)
Fix these issues in Kilo Cloud Previous review (commit a83f36a)Status: 10 Issues Found | Recommendation: Address before merge Executive SummaryThe highest-risk findings are in the session-ingest evidence outbox (an ingest-driven flush that bypasses its own retry backoff) and in the mobile briefing client ( Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (71 files)
Reviewed by deepseek-v4.1-flash · Input: 98.4K · Output: 26K · Cached: 2.4M Review guidance: REVIEW.md from base branch |
…rting Fixes device-found briefing defects, native module import boundaries in mounted tests, coverage computation from evidence, seed topic, and translations for all briefing keys.
5539807 to
d928d7e
Compare
…off and cost ceiling - bound the briefing evidence read path to active sessions and their ancestors - derive merged group status from every session in the group - count all request text in the gateway spend ceiling, not only messages - honor the evidence flush backoff on ingest, clear the pending flag once drained - withhold paid summary generation and consent mutations from the MCP catalog
…p, keep cache on missing report
…iefing # Conflicts: # .kilo/skills/kilo-mcp/SKILL.md # packages/db/src/migrations/meta/0280_snapshot.json # packages/db/src/migrations/meta/_journal.json # services/kilo-mcp/catalog.json
…iefing # Conflicts: # .kilo/skills/kilo-mcp/SKILL.md # packages/db/src/migrations/meta/0281_snapshot.json # packages/db/src/migrations/meta/_journal.json
| '[redacted key]' | ||
| ) | ||
| .replace( | ||
| /(?:bearer\s+|(?:api[_-]?key|token|password|secret)\s*[:=]\s*)[^\s,;"}]+/gi, |
There was a problem hiding this comment.
bot: Compound cloud-secret labels can bypass excerpt redaction
Suggested fix: This pattern only redacts secret when it is immediately followed by : or =. A common value such as AWS_SECRET_ACCESS_KEY=<40-character-value> does not match that branch, and the generic long-value rule does not catch a 40-character value. The raw value can therefore pass through redactBriefingExcerpt and be stored as session evidence, then surfaced in a report or sent in an AI prompt. Recognize compound environment/JSON credential labels and add regression cases for AWS secret access keys and similar formats before persisting excerpts.
| return [ | ||
| { | ||
| kind: 'status', | ||
| identity: `status:${item.data.transitionId ?? `${occurredAt}:${status}`}`, |
There was a problem hiding this comment.
bot: Fallback status identity can merge distinct transitions
Suggested fix: When transitionId is absent, the identity uses only normalized occurredAt and status; persistence uses the same timestamp/status components for the event ID and ignores conflicts. Two distinct same-status transitions at the same timestamp with different predecessor statuses therefore collapse to one event, potentially losing a blocker onset or other state transition. Include predecessor information or another stable discriminator in the fallback identity, and add a test for same-time, same-status transitions without IDs that have different predecessors.
…iefing # Conflicts: # packages/db/src/migrations/meta/0283_snapshot.json # packages/db/src/migrations/meta/_journal.json # packages/db/src/schema.ts







Summary
Adds a morning briefing for cloud and CLI coding sessions. The backend prepares one report per Personal or organization context from timestamped overnight evidence. Each morning, the mobile Home card shows the briefing in place of live status until the user dismisses it or the morning ends.
Behavior
Implementation notes
status_transition_idordering marker keeps an older, delayed status from overwriting a newer one.agent_briefing_*tables and a nullablecli_sessions_v2.status_transition_idcolumn.apps/web/vercel.json.@expo/ui57 communitydatetime-picker, which is already installed, so the PR adds no new dependency. There is no time zone picker in the existing UI library, so the app keeps a validated IANA text field with a "Use device time zone" action.Dependency
Verification
I ran the following on an isolated VM with a fake database and fake accounts. No real pushes and no paid model calls were made.
app-shared,dbandweb-shared. Lint, the catalog and plural checks, the unused-code check and the formatter passed for the changed packages.