Skip to content

fix(overlay): stop the countdown bar timeline once it elapses - #1218

Merged
altic-dev merged 1 commit into
altic-dev:mainfrom
nickbecker:fix/countdown-bar-idle-cpu
Oct 22, 2026
Merged

altic-dev merged 1 commit into
altic-dev:mainfrom
nickbecker:fix/countdown-bar-idle-cpu

Conversation

@nickbecker

Copy link
Copy Markdown
Contributor

Description

TransientOverlayCountdownBar drives its progress with TimelineView(.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 sets paused. A new startedAt (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

  • 🐞 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 🧹 Chore
  • 📝 Documentation update

Related Issue or Discussion

Closes #1217

Testing

Reproduction from #1217 on the same Mac, Release builds, idle CPU as the mean of 1-second top samples:

Build Idle before card Idle after card hid
main <1% 8.2%, never drops
this PR <1% 0.7%, then 0.5% 30 s later

Steps: set FluidDebugRemoteToggleEnabled, relaunch, wait a minute, post com.FluidApp.debug.showPasteFailure, wait 14 s, measure. The countdown bar still animates normally while the card is visible.

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version: 27.0.1
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources Tests Package.swift (SwiftLint 0.65.1: 0 violations in the changed file; 10 pre-existing aspectRatio violations in other files)
  • Ran formatter locally: swiftformat --config .swiftformat Sources (run with --lint on the changed file: the new lines are clean; 4 findings remain on existing lines, same as main)
  • Ran tests locally: no automated test; verified with the reproduction above.

Screenshots / Video

  • No UI/visual changes; screenshots/video are not applicable.

The bar looks the same and only stops redrawing once it is empty. Diagnostic output:

main, after card hid:      top -pid  0.0 7.4 10.7 8.6 9.0 7.9 10.1 8.9 9.5 9.1 9.2  mean=8.2%
this PR, after card hid:   top -pid  0.0 0.7 0.0 1.0 0.0 1.1 0.0 0.8 0.0 1.2 0.3   mean=0.5%
Instruments SwiftUI, main: UpdateFilter<AnimationTimelineSchedule, GeometryReader<ZStack>>  239.7/s

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.

  • A human created this PR or reviewed and approved it before submission, understands the full diff, and takes responsibility for the change.

🤖 Generated with Claude Code

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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T05:37:31.017918Z 186ee94 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Pauses TransientOverlayCountdownBar after its countdown ends, so retained hidden panels stop requesting animation updates.

  • Overlay countdown bars stop animating once their time runs out.

Reviews (1) · Last reviewed commit: "fix(overlay): stop the countdown bar tim..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown

FluidVoice PR build ready

Download 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

  1. Extract the downloaded artifact, then extract FluidVoice-PR-1218.app.zip.

  2. Move FluidVoice fix(overlay): stop the countdown bar timeline once it elapses #1218.app into the /Applications folder.

  3. Open Terminal and remove the download quarantine marker:

    xattr -dr com.apple.quarantine "/Applications/FluidVoice #1218.app"
    
  4. In Applications, Control-click FluidVoice fix(overlay): stop the countdown bar timeline once it elapses #1218.app and choose Open.

  5. If macOS still blocks it, open System Settings → Privacy & Security, click Open Anyway, and confirm.

This build has its own app identity, so its permissions are separate from the release version of FluidVoice.

View workflow run

@altic-dev
altic-dev merged commit a4bdb46 into altic-dev:main Oct 22, 2026
6 checks passed
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.

Idle CPU stays at ~8% after the "Text wasn't inserted" card is shown once

2 participants