Skip to content

Further refining live activity car - #740

Open
dewabisma wants to merge 6 commits into
mainfrom
beast/further-refining-live-activity-car
Open

dewabisma wants to merge 6 commits into
mainfrom
beast/further-refining-live-activity-car

Conversation

@dewabisma

Copy link
Copy Markdown
Collaborator

Make UX for timer more friendly instead of 0:00 when over the estimate.

@dewabisma
dewabisma requested a review from n13 November 12, 2026 12:01

@n13 n13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Request changes
Reviewer: GPT-6.1 Sol

Reviewed head f1b59149c71187608ea9cdbc34a78d77433705c6 against base e7577af08abf2b4c4717a8416065c3f974546302.

  1. [P2] Make the iOS overdue transition work without another content update — SwapLiveActivity.swift:176–180.

    swapCountdownOverdue evaluates Date.now when SwiftUI builds this branch. The system timer updates its own text; it does not reevaluate the enclosing conditional when endsAt passes. Consequently, a card rendered before expiry still reaches 0:00 if the app is suspended and no new push arrives before the stale deadline. The Dart _overdue identity change only helps when Dart runs another sync, so it cannot guarantee this lock-screen transition.

    Reproduction: extract the actual SwapCountdown and SwapTimerSlot declarations from this head, render SwapCountdown.body once with an end time 250 ms ahead, and inspect its conditional branch after 500 ms. The output is countdown timer before expiry, countdown timer after expiry, and overdue label only 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.dart tests passed. Each invocation used timeout 60.
  • Both Swift test programs passed; the additional same-render probe reproduced the finding.
  • Non-mutating workspace formatting and git diff --check passed. 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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants