Skip to content

fix(desktop): show Sparkle update progress in chat-first UI (#11108) - #11142

Merged
kodjima33 merged 7 commits into
BasedHardware:mainfrom
aryanorastar:fix/11108-update-progress-ui
Aug 8, 2026
Merged

kodjima33 merged 7 commits into
BasedHardware:mainfrom
aryanorastar:fix/11108-update-progress-ui

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

Sparkle update progress was only rendered in SidebarView.updateAvailableWidget, which chat-first never mounts (showsPrimarySidebar is false). Auto-updates could download and relaunch with no UI, and Settings → About only disabled "Check Now" with a tooltip. Fixes #11108 by binding existing UpdaterViewModel state into DesktopTopBar and the Software Updates card, plus restart/deferred-recording flags so silent install waits are visible.

Product invariants affected

none

How it was verified

cd desktop/macos
xcrun swift test --package-path Desktop --filter DesktopUpdateStatusPresentationTests/
# 7 passed
xcrun swift test --package-path Desktop --filter UpdaterViewModelTests/
# 3 passed

Could not exercise a live Sparkle download in this environment; status mapping and chat-first wiring are covered by unit + source-inspection tests.

Tests

  • DesktopUpdateStatusPresentationTests — status kind mapping + drift guard that top bar/Settings host the chip (sidebar no longer owns a private widget)
  • Existing UpdaterViewModelTests still green

Failure class (fixes)

Failure-Class: none

Scoped cleanups (optional)

Legacy sidebar now reuses DesktopUpdateStatusBanner instead of a duplicated private widget.

Review in cubic

…dware#11108)

The only progress surface lived in the legacy sidebar, which chat-first never
renders. Surface Checking/Downloading/restart-ready state on the top bar and
Settings → About, including when install waits for recording silence.

Co-authored-by: Cursor <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…dHardware#11108)

Clearing progress flags on abort/supersede left DeferredUpdateInstall scheduled,
so a quiet-moment wait could still fire and re-stick "Update waiting…". Cancel
and nil the waiter on every terminal transition.

Co-authored-by: Cursor <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Addressed the stale deferredForRecording edge from review:

Real gap (slightly worse than flag-only): clearing updateDeferredForActiveRecording on abort/didNotFind/didFind/willInstall left DeferredUpdateInstall still scheduled. The quiet-moment waiter could fire later, call installationBlock(), and flip the chip back to restart/waiting.

Fix: DeferredUpdateInstall.cancel() + discardDeferredInstall() on found / not-found / abort / willInstall / immediate install / before replacing a deferred wait. Install completion nils the waiter. Unit test: testCancelPreventsDeferredInstallFromFiring.

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@Git-on-my-level Git-on-my-level added macOS needs-maintainer-review Needs a human maintainer to sign off before merge labels Aug 5, 2026

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the focused follow-up on the chat-first Sparkle status surface. The direction is good and the new shared status presentation/tests are useful, but I still see a couple of blockers on the current head before this should merge:

  1. The new top-bar chip and reused sidebar banner still call checkForUpdates() when canCheckForUpdates is true, but they do not also require !updateSessionInProgress. UpdaterViewModel already exposes canManuallyCheckForUpdates for that combined guard, and Settings uses it for disabling the manual button. Please use that same manual-check guard for the chip/banner actions so tapping a visible in-progress status cannot start an overlapping Sparkle check.

  2. willInstallUpdate currently clears updateRestartImminent and updateAvailable right after Sparkle enters the install path. That can make the chat-first chip and Settings status disappear at the exact moment the app is about to relaunch. Please keep the restart-imminent state visible through the install/relaunch handoff, and only clear it on a real terminal non-install outcome or after the relaunched app starts cleanly.

Also, the Settings button label now says “Checking…” for any active session, including the downloading/restart-ready states that the new card labels differently. That is lower risk than the two items above, but it should be aligned with the same status mapping so the controls do not contradict each other.

I did not run the macOS test suite locally in this Linux review environment; this is a static review against the current diff and the reported Desktop Swift CI results.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

…Hardware#11108)

Use canManuallyCheckForUpdates on chip/banner taps, keep restart-imminent
through willInstallUpdate, align Settings Check Now labels with status
kind, and hide Checking… on automatic background polls.

Co-authored-by: Cursor <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Addressed review @ab748ffe

@Git-on-my-level Blockers fixed:

  1. Manual-check guard — chip + banner use canManuallyCheckForUpdates (same as Settings).
  2. Restart-imminent through install — willInstallUpdate keeps updateRestartImminent = true + version through relaunch handoff.
  3. Settings label aligned — button uses checkActionTitle from the shared status kind (Downloading… / Restarting… / etc.).

Also covered cubic’s background-poll note: userInitiatedCheckInProgress so auto Sparkle polls don’t flash “Checking…” in the chat-first top bar.

cd desktop/macos
xcrun swift test --package-path Desktop --filter DesktopUpdateStatusPresentationTests
# 8 passed
xcrun swift test --package-path Desktop --filter UpdaterViewModelTests
# 3 passed

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level need human response — re-review request.

Your CHANGES_REQUESTED still blocks merge, but head @ab748ffe already addresses the blockers (manual-check guard via canManuallyCheckForUpdates, restart-imminent preservation, Settings checkActionTitle). CI green. Could you re-pass / APPROVE when you have a moment?

@Git-on-my-level
Git-on-my-level dismissed their stale review August 6, 2026 19:25

Resolved on current head ab748ff: manual update actions now use canManuallyCheckForUpdates, restart-imminent status is preserved through install/relaunch handoff, and Settings uses the shared status mapping.

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the quick follow-up here. I re-reviewed ab748ffe against the prior blocking feedback and the current diff.

The previous blockers look resolved on this head:

  • The chat-first top-bar chip and reused sidebar banner now gate manual update checks through canManuallyCheckForUpdates, so an in-progress Sparkle session cannot be re-triggered from those surfaces.
  • The install handoff now keeps updateRestartImminent / the version visible through the relaunch path instead of dropping the status just before termination.
  • Settings now uses the shared status mapping for the button label, so checking/downloading/restart/deferred states do not contradict the status card.

I also like the extra DeferredUpdateInstall.cancel() handling; that closes the stale quiet-moment waiter case where a canceled deferred install could later fire and resurrect the update state.

I’m dismissing my stale change-request review because those blockers are addressed. I’m still leaving this as a positive review signal rather than a formal approval so a human maintainer can sign off on the macOS update/relaunch UX before merge. CI is green, and I did not find a new code blocker in static review.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Author-side clear for merge.

@Git-on-my-level dismissed the CR on @ab748ffe — manual-check guard, restart-imminent through install, Settings label alignment, deferred-install cancel all addressed. CI green · MERGEABLE. Technical read positive; still needs write-access APPROVE for the macOS update/relaunch UX.

@kodjima33 — please APPROVE/merge when ready (chat-first Sparkle progress UI, #11108). Honest gap remains: no live Sparkle download exercised in this environment; unit coverage + Desktop Swift CI cover the status mapping/wiring.

Keep DesktopUpdateStatusChip beside ShellStatusIcons (main replaced
CaptureListeningControls). Sidebar keeps shared DesktopUpdateStatusBanner
instead of main's private widget. Ratchet SidebarView to 1507.

Failure-Class: none
Co-authored-by: Cursor <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level @kodjima33 merge conflicts with main resolved on dfb046e7d0:

  • DesktopTopBar — keep DesktopUpdateStatusChip beside main’s ShellStatusIcons (replaces the old CaptureListeningControls cluster).
  • SidebarView — keep shared DesktopUpdateStatusBanner; drop main’s private updateAvailableWidget (this PR’s intent).
  • line-count ratchet — take main’s MainWindow baselines; SidebarView at 1507 after banner reuse.

David’s prior CR already dismissed on ab748ffe. Still needs write-access APPROVE for macOS update/relaunch UX. Honest gap unchanged: no live Sparkle download in this environment.

main deleted the OmiColors palette; chip/banner/Settings status now use
Ink tokens so Desktop Swift builds after the merge.

Failure-Class: none
Co-authored-by: Cursor <[email protected]>
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

Follow-up on dfb046e7: Desktop Swift failed locally after the merge because OmiColors was retired on main. Tip now migrates chip/banner/Settings update status to Ink (Ink.surface/Ink.primary for the filled chip; Ink.accent/Ink.primary/Ink.secondary/Ink.rowFill in Settings).

DesktopUpdateStatusPresentationTests — 8 passed locally.

Pick up AgentPill/SettingsGlassChrome contract updates that landed on
main after the prior conflict merge.
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level @kodjima33 Desktop Swift CI red on 3870204 was stale tripwires, not the Sparkle UI.

Root cause: tip was behind main glass-contract updates:

  • AgentPillLifecycleTests expected .frame(height: compact ? 34) but ChatBubble uses minimumHeight: compact ? 34
  • SettingsGlassChromeTests expected forKey: but HelpPage uses forKeyPath:

Merged current main on tip 3445bf20f87d (no conflicts). Local re-check:

  • testFloatingAgentToolCallsUseCompactOneLinePresentation passed
  • testHelpWebViewDoesNotFlashOpaqueWhiteWhileLoading passed
  • DesktopUpdateStatusPresentationTests 8 passed

Sparkle chip/banner still on Ink + ShellStatusIcons. Ready for CI re-check + write-access APPROVE.

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the continued follow-up here. I re-reviewed the current head after the merge-conflict/theme updates.

The prior blockers still look resolved on this head:

  • The top-bar chip and reused sidebar banner now use canManuallyCheckForUpdates, so visible in-progress update states cannot start overlapping manual Sparkle checks.
  • Restart/deferred-install state is kept visible through the install/relaunch handoff, and the added DeferredUpdateInstall.cancel() path prevents a canceled quiet-moment waiter from later firing and resurrecting stale status.
  • Settings, the top bar, and the sidebar now share the same status mapping and action labels, with tests covering the key checking/downloading/restart/deferred states plus drift guards for the shared surfaces.
  • The later merge-conflict cleanup appears to preserve the intended Sparkle status surfaces while moving to the current Ink theme tokens.

I do not see a new code blocker in static review, and CI for the desktop Swift paths is green. I’m still leaving this as a positive review signal rather than a formal approval because the macOS update/relaunch UX should get human maintainer sign-off before merge.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

Keep chat-first Sparkle update UI tip current for write-access review.
@aryanorastar

Copy link
Copy Markdown
Collaborator Author

@kodjima33 write-access APPROVE / merge when ready — #11142 chat-first Sparkle progress UI (#11108).

Author-clear:

  • David CR dismissed; latest AI re-review: no new code blocker (manual-check guard, restart-imminent through install, shared status mapping, deferred cancel, Ink migration)
  • Tip refreshed onto current main @62dd65c9771e
  • Honest gap unchanged: no live Sparkle download in this environment (unit + Desktop Swift CI cover mapping/wiring)

Please APPROVE/merge when you have a moment for the macOS update/relaunch UX sign-off.

@kodjima33 kodjima33 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.

Binds existing UpdaterViewModel state into the chat-first top bar and Settings so Sparkle update progress is visible again (fixes #11108).

@kodjima33
kodjima33 merged commit da7caec into BasedHardware:main Aug 8, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macOS needs-maintainer-review Needs a human maintainer to sign off before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: app updates silently with no progress UI; Check Now gives no in-place feedback

3 participants