Repository navigation
Add close live activity card behavior + bump build version - #739
Conversation
n13
left a comment
There was a problem hiding this comment.
Verdict: Request changes
Reviewer: GPT-6.1 Sol
Reviewed head 8b116a298be6897d5b9b7267c9df090486e0be32.
-
[P2] Keep the same-swap revision guard when an iOS activity has ended. SwapLiveActivityBridge.swift:120–140
A completion push can end the activity while Dart still holds a settling swap (for example, its next status poll fails). The new filter excludes the ended activity before applying the terminal revision guard. A refresh after 45 seconds then reachesswapLiveOpensCard, which accepts the settling payload for the same key, dismisses the completed card, and requests a new in-progress activity. The watcher only reports.dismissed, so.endeddoes not prevent that refresh. I reproduced this with the PR's actualshowmethod in an ActivityKit test double: the revision helper rejects the payload, but the bridge producesoriginal=dismissed, active cards=1, phase=settling, key=swap-a. Retain/check the last terminal revision by swap key before creating another activity, allowing a genuinely different swap to start. Cover completion-push → ended → delayed same-swap poll at the bridge level. -
[P2] Anchor Android dismissal to completion, not the latest refresh. SwapLiveNotifications.kt:656–659
updatedAtMsis not a fixed finish time: Dart's_contentassignsupdatedAt: now.toUtc()on every sync, and the controller resends unchanged content after 45 seconds. For a successful swap whose progress screen remains open, resuming/backgrounding the app after 14 minutes therefore reposts the same terminal card with a fresh timestamp and another full 15-minute timeout. Using the actual Dart models/content builder, a swap settled at 06:00 had a deadline of 06:15 initially and 06:29 on the 06:14 redraw. Repeated refreshes can keep extending it; failed/refunded cards have the same issue with the 30-minute window. Carry a fixed completion timestamp (the model already hassettledAt) or retain the first terminal deadline per key, separately from update-order timestamps. Add a test that regenerates the terminal payload before reposting; the current repost test reuses an unchanged timestamp.
Validation:
- New Swift card-rule executable: passed.
- iOS simulator-target type-check of the actual bridge, rules, and shared attributes: passed.
- Both source-level regression reproductions above: confirmed; no device behavior claimed.
- Repository formatting check (no writes) and
git diff --check: passed. - Local Flutter tests could not start after enforced bootstrap rejected the lockfiles with installed Flutter 3.44.4 (repository pins 3.47.7). Repository analysis was incomplete at the 10-second cap.
- GitHub Analyze and dependency-cooldown checks: successful at the reviewed head.
- Android JVM/instrumentation tests were not run: this host has no Java runtime or Android SDK.
n13
left a comment
There was a problem hiding this comment.
Verdict: Approve
Reviewer: GPT-6.1 Sol
Reviewed head 23aac6ececc7777413c93f6a12cbecdaeff92edd against base 0a43004546dfa196ceb5a8b3a71e698e57027dbb, including the full diff and the follow-up fixes for both previous findings.
No blocking findings remain. The iOS opening guard now checks ended cards before accepting a delayed same-swap update. Android retains the first terminal timestamp for the stored swap, so regenerated payloads no longer extend its timeout; both push and local updates pass through this logic. The simulated-token guard and build-number changes are consistent with their callers and tests.
Validation:
- Swift card-rule tests: passed.
- Simulator-target type-check of the actual iOS bridge, rules, and shared attributes: passed.
- Real ActivityKit probe on iOS 26.1 Simulator using the PR's shared attributes and rules: an ended card remained in the activity list during its dismissal window, and a delayed same-key settling revision was rejected.
- Repository formatting check with no writes (883 files) and
git diff --check: passed. - GitHub Analyze and dependency-cooldown checks: successful at the reviewed head.
- Local Flutter tests could not start: enforced bootstrap rejected the lockfiles with installed Flutter 3.44.4 (repository pins 3.47.7). Repository analysis was incomplete at the 10-second cap.
- Android JVM/instrumentation tests were not run because this host has no Java runtime or Android SDK. Physical-device behavior and live push delivery were not exercised.
No description provided.