cmux/Sources/Update
Lawrence Chen b42f64fbe3
Fix update attempt refreshing pill without actually updating (#2168)
* Fix update attempt refreshing pill without actually updating

The attemptUpdate() subscriber watched for .updateAvailable state to
auto-confirm, but showUpdateFound used setStateAfterMinimumCheckDelay
which delays the transition by up to 2 seconds. During that window,
dismissUpdateInstallation (from a background probe race) could cancel
the pending transition, reverting state to idle without ever confirming.
The subscriber then tore down on the transient idle, silently abandoning
the update.

Fix: move auto-confirm to the Sparkle driver level via an
autoInstallOnNextUpdate flag. When set, showUpdateFound immediately
calls reply(.install) bypassing the delay entirely. The subscriber
is kept as a fallback but no longer tears down on transient idle
while the flag is active.

Closes https://github.com/manaflow-ai/cmux/issues/2166

* Revert "Fix update attempt refreshing pill without actually updating"

This reverts commit 1cd842dd924bf114b096f222851c47d2e36ad4d9.

* Fix update attempt refreshing pill without actually updating

The attemptUpdate() subscriber tore down monitoring whenever it saw
.idle after observing progress. During check startup (retry loop,
background probe race), state can transiently return to .idle before
Sparkle's interactive check begins. The subscriber interpreted this
as "check completed" and stopped monitoring, so the auto-confirm
for .updateAvailable never fired.

Fix: add !state.isIdle to the teardown guard so monitoring only
stops on terminal failures (.notFound, .error), not transient idle.

Closes https://github.com/manaflow-ai/cmux/issues/2166

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
2026-03-25 16:55:29 -07:00
..
UpdateBadge.swift Show update-available banner automatically on launch (#1651) 2026-03-18 12:30:44 -07:00
UpdateController.swift Fix update attempt refreshing pill without actually updating (#2168) 2026-03-25 16:55:29 -07:00
UpdateDelegate.swift Revert Sparkle manual update dialog flow from #1908 (#2090) 2026-03-24 20:44:54 -07:00
UpdateDriver.swift Revert Sparkle manual update dialog flow from #1908 (#2090) 2026-03-24 20:44:54 -07:00
UpdateLogStore.swift Fix frozen terminals after split churn (#12) 2026-02-13 16:45:31 -08:00
UpdatePill.swift Fix sidebar update pill cached popover flow (#2142) 2026-03-25 04:21:03 -07:00
UpdatePopoverView.swift Fix sidebar update pill cached popover flow (#2142) 2026-03-25 04:21:03 -07:00
UpdateTestSupport.swift Fix sidebar update pill cached popover flow (#2142) 2026-03-25 04:21:03 -07:00
UpdateTestURLProtocol.swift Release v1.23.0 (#31) 2026-02-09 15:30:43 -08:00
UpdateTiming.swift Improve update UI error details 2026-01-28 01:49:02 -08:00
UpdateTitlebarAccessory.swift fix: align titlebar icons with traffic-light buttons (#1754) 2026-03-20 01:57:35 -07:00
UpdateViewModel.swift Fix sidebar update pill cached popover flow (#2142) 2026-03-25 04:21:03 -07:00