Skip to content

Reduce updater progress UI churn - #119

Merged
bifrost-proxy merged 1 commit into
mainfrom
codex/fix-update-download-ui-lag
Aug 29, 2026
Merged

bifrost-proxy merged 1 commit into
mainfrom
codex/fix-update-download-ui-lag

Conversation

@bifrost-proxy

Copy link
Copy Markdown
Owner

Summary

  • coalesce archive download callbacks to the same whole-percent precision shown in the update UI
  • suppress duplicate update activity assignments and preserve immediate verifying/preparing transitions
  • isolate the menu-bar availability badge from download progress so progress no longer invalidates the root app scenes
  • add a regression test covering 10,001 raw callbacks and all post-download phase transitions

User-visible impact

Opening or interacting with the main window and menu-bar dropdown remains responsive while an application update is downloading. Download progress still advances from 0% through 100%, and update availability, verification, preparation, installation, retry, and restart behavior are unchanged.

Compatibility and risk

No download URL, archive, checksum, signature, architecture, installer helper, persisted data, permissions, or network behavior changes. Progress rendering is intentionally limited to whole percentages, which matches the existing percentage label. The change can be rolled back by reverting commit ea7b068.

Validation

  • make check — passed
  • swiftc -typecheck -parse-as-library VoiceInk/Update/*.swift — passed
  • isolated type-check of the new MenuBarUpdateLabel against the real updater types — passed
  • source-extracted coalescer exercise — 10,001 raw callbacks produced 101 download UI updates; verifying/preparing transitions preserved
  • git diff --check — passed
  • required local xcodebuild test -project VoiceInk.xcodeproj -scheme VoiceInk -destination 'platform=macOS,arch=arm64' -only-testing:VoiceInkTests -parallel-testing-enabled NO CODE_SIGNING_ALLOWED=NO ENABLE_TESTABILITY=YES — not runnable on this host because only Command Line Tools are installed (xcode-select points to /Library/Developer/CommandLineTools); PR CI provides Xcode 26.5 arm64 and x86_64 coverage

Performance measurement scope

This is a deterministic event-count regression rather than a wall-clock benchmark: 10,001 monotonically increasing raw download progress callbacks are reduced to 101 visible whole-percent updates. No CPU, latency, memory, or power claim is made without Instruments data.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea7b068cd6

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +227 to +229
case .downloading(nil):
if case .downloading(.some) = lastEmitted {
return nil

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve indeterminate progress for lengthless downloads

When the archive response omits a valid Content-Length, UpdateDownload reports .downloading(nil) for the entire transfer, but prepareOffMain first emits .downloading(0). This guard therefore discards the initial nil and every subsequent one, leaving the update UI on a determinate 0% bar until verification rather than showing its existing indeterminate spinner. Coalesce duplicate nil values without suppressing the transition from the initial placeholder zero when the server cannot provide progress.

AGENTS.md reference: AGENTS.md:L48-L48

Useful? React with 👍 / 👎.

@bifrost-proxy
bifrost-proxy merged commit 61b0d66 into main Aug 29, 2026
3 checks passed
@bifrost-proxy
bifrost-proxy deleted the codex/fix-update-download-ui-lag branch August 29, 2026 04:31
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.

1 participant