Skip to content

fix: enable CastCodes in-app updates#170

Open
BunsDev wants to merge 9 commits into
mainfrom
fix/in-app-dmg-updates
Open

fix: enable CastCodes in-app updates#170
BunsDev wants to merge 9 commits into
mainfrom
fix/in-app-dmg-updates

Conversation

@BunsDev

@BunsDev BunsDev commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Enables OSS/CastCodes in-app update menu items and points them at public OpenCoven/cast-codes GitHub release downloads.
  • Fetches OSS update metadata from GitHub releases and skips releases that do not include the current platform asset, so macOS arm64 can avoid non-installable releases.
  • Updates OSS bundle/installer expectations to CastCodes names on macOS and Windows, with focused regression coverage.

Why

The latest public GitHub release may not always include every platform asset. CastCodes needed app-side update checks to use the public release surface directly and select the newest release that actually contains an installable asset for the running platform.

Validation

  • cargo test -p warp-app autoupdate:: --features gui --lib -- --test-threads=1 → 14 passed
  • cargo test -p warp_core oss_channel_uses_castcodes_public_identity → passed
  • cargo fmt --check → passed
  • cargo check -p warp-app --bin cast-codes --features gui → passed
  • ./script/check_ai_attribution → passed
  • ./script/check_rebrand → passed
  • git diff --check → passed

Fetch OSS update metadata from the public OpenCoven/cast-codes GitHub releases, only select releases that include the current platform asset, and use CastCodes bundle/install names for OSS updates.

Co-authored-by: Nova <nova@openclaw.local>
@BunsDev BunsDev marked this pull request as ready for review June 15, 2026 12:56
Copilot AI review requested due to automatic review settings June 15, 2026 12:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Enables CastCodes OSS in-app updates by turning on autoupdate UI/config for the OSS channel and switching OSS update discovery to GitHub Releases, including logic to skip releases that don’t ship an installable asset for the running platform.

Changes:

  • Add public GitHub Releases API/download base URLs to warp_core::brand and wire OSS AutoupdateConfig to use them (and show menu items).
  • Implement OSS version fetching via GitHub Releases API and update OSS release asset URL construction.
  • Align macOS/Windows OSS bundle/installer naming with CastCodes naming, with targeted regression tests and minor Linux formatting cleanup.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crates/warp_core/src/channel/state.rs Enables OSS autoupdate config by default (public GitHub releases base + menu items).
crates/warp_core/src/channel/state_tests.rs Updates OSS channel state assertions for releases base URL + menu visibility.
crates/warp_core/src/brand.rs Adds public GitHub release API/download URL constants.
app/src/bin/oss.rs Enables OSS autoupdate config in the OSS binary entrypoint.
app/src/autoupdate/windows.rs Updates OSS installer naming to use CastCodes prefix.
app/src/autoupdate/mod.rs Adds OSS GitHub Releases-based version discovery + OSS release asset directory URL handling.
app/src/autoupdate/mod_tests.rs Adds tests for OSS GitHub downloads URL and asset-filtering release selection.
app/src/autoupdate/mac.rs Updates OSS bundle naming to CastCodes and adds OSS naming regression test.
app/src/autoupdate/linux.rs Refactors long format strings for readability (no behavior change).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/autoupdate/mod.rs
Comment thread app/src/autoupdate/mod.rs
Comment thread app/src/autoupdate/mac.rs
Comment thread app/src/autoupdate/mod.rs
Comment on lines +792 to 795
Channel::Integration | Channel::Local => {
// These channels don't ship release artifacts, so there's no
// version to fetch. This branch is normally unreachable because
// `AutoupdateState::register` gates the poll loop on the
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@BunsDev BunsDev self-assigned this Jun 15, 2026
BunsDev and others added 2 commits June 15, 2026 08:24
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
BunsDev added 5 commits June 15, 2026 11:46
…ct version

The test_oss_release_version_skips_releases_without_current_platform_asset
test used CastCodesSetup.exe for v0.0.12's asset. On Windows CI,
oss_update_asset_name() also returns CastCodesSetup.exe, so v0.0.12
was returned as the best match instead of being skipped.

Change v0.0.12's asset to CastCodes-arm64.dmg (macOS arm64 only) so
it's skipped on all non-macOS-arm64 platforms, and v0.0.11 (which has
the platform-appropriate oss_update_asset_name() asset) is returned.
Pre-existing failure on Windows CI unrelated to in-app updates.
…ners

CastCodes-arm64.dmg is the correct macOS arm64 asset, so macOS CI
correctly picked v0.0.12 rather than skipping it. Use a made-up
CastCodes-riscv64.AppImage (not matching any known platform) so the
release is skipped on macOS, Windows, and Linux alike.
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.

2 participants