Repository navigation
Conversation
n13
left a comment
There was a problem hiding this comment.
Verdict: Request changes
Reviewer: GPT-6.1 Sol
Reviewed head f1b59149c71187608ea9cdbc34a78d77433705c6 against base e7577af08abf2b4c4717a8416065c3f974546302.
-
[P2] Make the iOS overdue transition work without another content update — SwapLiveActivity.swift:176–180.
swapCountdownOverdueevaluatesDate.nowwhen SwiftUI builds this branch. The system timer updates its own text; it does not reevaluate the enclosing conditional whenendsAtpasses. Consequently, a card rendered before expiry still reaches0:00if the app is suspended and no new push arrives before the stale deadline. The Dart_overdueidentity change only helps when Dart runs another sync, so it cannot guarantee this lock-screen transition.Reproduction: extract the actual
SwapCountdownandSwapTimerSlotdeclarations from this head, renderSwapCountdown.bodyonce with an end time 250 ms ahead, and inspect its conditional branch after 500 ms. The output iscountdown timerbefore expiry,countdown timerafter expiry, andoverdue labelonly after explicitly rebuilding the body. This was a macOS SwiftUI probe, not a physical-device test. Apple's ActivityKit documentation describes app updates and ActivityKit pushes as the mechanisms for updating Live Activity content.Arrange an update at the estimate deadline that works while the app is suspended, or use a supported system-driven presentation that changes at that deadline. Add coverage that renders before expiry and crosses the deadline without another content update; the new Boolean helper tests do not exercise that behavior.
Validation:
- 103 focused mobile tests passed: live-activity decisions/controller, push delivery, and amount formatting. All 9 SDK
active_swap_test.darttests passed. Each invocation usedtimeout 60. - Both Swift test programs passed; the additional same-render probe reproduced the finding.
- Non-mutating workspace formatting and
git diff --checkpassed. No tracked files were changed. - Local Flutter is 3.44.4; the repository pins 3.47.7. Enforced bootstrap rejected the SDK's dependency changes. The focused tests used ignored package metadata reconstructed from the committed lockfiles and cached packages with
--no-pub. Workspace analysis was incomplete at the 10-second cap, with unresolved dependency errors in the unbootstrapped packages. Android native tests were not run because the Android SDK was unavailable. - GitHub Analyze and dependency-cooldown checks both passed for the reviewed head.
Make UX for timer more friendly instead of 0:00 when over the estimate.