Repository navigation
fix(relay): Live Activity leaves Connecting when the agent starts working - #15349
techparamveer wants to merge 1 commit into
Conversation
…indow starting→running was dropped by the 15s throttle and never retried, so iOS cards stayed on Connecting while agents worked. Co-authored-by: Cursor <cursoragent@cursor.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped relay bug fix that delivers existing Live Activity phase transitions without weakening throttling for timestamp-only updates. It adds focused regression coverage and does not alter schemas, defaults, deployment, or sensitive code. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughLive Activity delivery now bypasses the 15-second throttle when aggregate activity counts or row phases change. A test covers a transition from ChangesLive Activity phase updates
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Live Activity phase and row changes can receive timely updates, while other changes remain throttled. No merge-blocking issue was identified. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Note Written by Hi! We are cleaning up open PRs, and this one does not say which model or harness was used to create it. If this change is really important, we recommend rebuilding the PR with a newer model and noting the model and harness in the PR description. |
|
Note Written by Reopening, this was closed by mistake. Sorry for the noise! |
Dismissing prior approval to re-evaluate 7a45828
Fixes #12668
Problem
Accepted bug #12668. After a provider session boots, the environment publishes
startingand thenrunninga few seconds later, and stays silent while the phase holds. The relay throttles Live Activity updates to one per 15s unlessactiveCountchanged, a row needs attention, or a row went terminal.starting→runningkeepsactiveCountat 1 and is not attention or terminal, so the running update is suppressed and never retried. The lock-screen card stays on Connecting for the whole turn even though an agent is working.Julius confirmed this in triage and asked for a small relay PR that exempts phase changes and adds a starting→running regression.
#12699 and #12798 already attempt this. This PR is the same suggested fix on current
main(not stacked on #12029), with the verification evidence requested on #12798.Change
shouldUpdateLiveActivitynow also delivers when any row entered, left, or changed phase. Timestamp and ordering churn stay throttled.rowPhasesChangedlives next tonewlyTerminalRowsand reuses the same row identity.Regression: a delivered
startingaggregate followed by arunningaggregate 4s later queueslive_activity_update.Scope and approval
One problem: #12668, accepted and triaged. The change matches the suggested fix in the triage comment. No mobile, contract, or Android FCM change.
Verification
On macOS, Node 24.21.0, at this head (based on
main@a21702d0e).Before the production change, the new test failed:
Result:
expected undefined to be 'live_activity_update'.sendForTargetreturned null, so the running update was throttled away.After the change:
Result: Test Files 1 passed (1), Tests 51 passed (51).
Focused checks:
throttles updates for changed aggregates with stable counts): 1 passedResult:
tsc --noEmitexited 0 and printed no diagnostics.Could not send through APNs or a physical iPhone Live Activity.