Repository navigation
fix(overlay): stop the countdown bar timeline once it elapses - #1218
Conversation
TransientOverlayCountdownBar drives its progress with an animation TimelineView, which ticks at 30 Hz for as long as the view exists. The delivery-failure card orders its panel out without releasing it, so after one card the hidden bar redrew forever and idle CPU stayed near 8%. Pause the timeline when the countdown ends. The task is keyed on startedAt, so the next card or notice restarts it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] This PR appears safe to merge. SummaryPauses
Reviews (1) · Last reviewed commit: "fix(overlay): stop the countdown bar tim..." · Reviewed by Greptile |
FluidVoice PR build readyDownload FluidVoice-PR-1218-186ee941ed56 The artifact contains the ad-hoc-signed app ZIP, Xcode archive, build manifest, and installation instructions. It expires 5 days after the build. Install the app
This build has its own app identity, so its permissions are separate from the release version of FluidVoice. |
Description
TransientOverlayCountdownBardrives its progress withTimelineView(.animation), which ticks at 30 Hz for as long as the view exists, visible or not.DeliveryFailureOverlayController.hide()orders its panel out but keeps it, so after one delivery-failure card the hidden bar redraws forever and idle CPU stays near 8%.This pauses the bar's timeline once the countdown ends. A
.task(id: startedAt)waits out the remaining time and setspaused. A newstartedAt(the next card or notice) restarts it. The fix sits in the shared bar, so both overlays that use it are covered, and the delivery card keeps parking its panel between presentations as before.Type of Change
Related Issue or Discussion
Closes #1217
Testing
Reproduction from #1217 on the same Mac, Release builds, idle CPU as the mean of 1-second
topsamples:Steps: set
FluidDebugRemoteToggleEnabled, relaunch, wait a minute, postcom.FluidApp.debug.showPasteFailure, wait 14 s, measure. The countdown bar still animates normally while the card is visible.swiftlint --strict --config .swiftlint.yml Sources Tests Package.swift(SwiftLint 0.65.1: 0 violations in the changed file; 10 pre-existingaspectRatioviolations in other files)swiftformat --config .swiftformat Sources(run with--linton the changed file: the new lines are clean; 4 findings remain on existing lines, same as main)Screenshots / Video
The bar looks the same and only stops redrawing once it is empty. Diagnostic output:
Notes
If a card is dismissed early, the bar keeps ticking until its countdown would have ended, then stops: at most 10 seconds.
Claude profiled the app (
sample, Instruments SwiftUI trace, live window list), found the cause, and drafted the fix. I reviewed the diff, reproduced the bug, and verified the fix on macOS 27.0.1 / Apple Silicon. I did not test on Intel.🤖 Generated with Claude Code