Skip to content

Fix update-channel regressions: nightly exit + older nightly filtering - #115

Closed
lawrencecchen wants to merge 5 commits into
mainfrom
fix/nightly-stable-exit
Closed

lawrencecchen wants to merge 5 commits into
mainfrom
fix/nightly-stable-exit

Conversation

@lawrencecchen

Copy link
Copy Markdown
Contributor

Summary

  • fix the nightly -> stable escape hatch by allowing stable appcast selection when the app is on a nightly build and nightly updates are disabled
  • prevent nightly channel from suggesting older semantic versions (example: being on 0.58.x and getting offered 0.56.x-nightly)
  • add regression coverage for both behaviors

Why

Two bad update-channel edge cases were possible:

  1. After installing nightly, disabling nightly could trap the user because Sparkle treated stable as older (onNewerThanLatestVersion).
  2. Enabling nightly could offer a numerically older release series due nightly build-number ordering.

What changed

Sources/Update/UpdateDelegate.swift

  • added semantic version parsing in UpdateChannelSettings
  • added shouldOfferNightlyCandidate(...) guard
  • expanded bestValidUpdate(in:for:) logic:
    • when nightly is OFF and current build is nightly: select latest stable item (enables leaving nightly)
    • when nightly is ON: only select appcast items whose semantic version is >= current semantic version
    • if nightly is ON and no eligible semantic candidate exists: return SUAppcastItem.empty() to avoid falling back to an older nightly suggestion

cmuxTests/CmuxWebViewKeyEquivalentTests.swift

  • added regression tests for:
    • toggling nightly off returns to stable feed
    • stable downgrade offer logic for nightly-installed builds
    • nightly candidate selection when semantic version is equal/newer
    • nightly candidate rejection when semantic version is older (0.58 current vs 0.56-nightly candidate)

Verification

  • xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux-unit -configuration Debug -destination 'platform=macOS' -only-testing:cmuxTests/UpdateChannelSettingsTests test
  • ./scripts/reload.sh --tag fix-nightly-exit
  • xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug -destination 'platform=macOS' build

@vercel

vercel Bot commented Feb 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Feb 20, 2026 4:00am

@cmux-agent

cmux-agent Bot commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor
Older manaflow preview screenshots (latest comment is below)

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Screenshot status is unknown for this run.


Generated by manaflow preview system

@cmux-agent

cmux-agent Bot commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor
Older manaflow preview screenshots (latest comment is below)

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Screenshot capture was skipped.

No UI changes detected - screenshots skipped


Generated by manaflow preview system

@cmux-agent

cmux-agent Bot commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Screenshot capture was skipped.

No UI changes detected - screenshots skipped


Generated by manaflow preview system

@lawrencecchen lawrencecchen added the stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening. label Sep 23, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in cmux backlog Sep 23, 2026
teamleaderleo added a commit that referenced this pull request Oct 14, 2026
cg-design-judge's sidebar Thunderdome (Tact #115): status set --state busy
drew no glyph, and a one-line status doubled the row (24 to 40 pt).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 14, 2026
* test: a reported status shows its glyph and keeps a one-line row's pitch

cg-design-judge's sidebar Thunderdome (Tact #115): status set --state busy
drew no glyph, and a one-line status doubled the row (24 to 40 pt).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: a one-line status keeps a one-line sidebar row's height

A one-line status on an otherwise one-line row (one reported entry, or
the hooks' status line) now sits dim on the right of the name's line,
truncated at 40% of the row, instead of a second line that grew the row
from 24 to 40 pt. A richer block (several entries, a log line or a
progress label) still draws under the name, as do rows with another
second-line element. The hover card lists every entry; VoiceOver reads
the text.

A status's state already reaches the row's badge on this base: busy
draws the grey spinner (the default row shows progress), and failed and
waiting draw their colored glyphs (#20492). The tests guard those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — ddb954e1 Deployed Feb 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant