Skip to content

Updates: the updater reports installing, ready, installed and failed, and installs at exit - #3621

Merged
dylanmtaylor merged 1 commit into
storytold:mainfrom
dotCooCoo:chore/craft-update-updater-fixes
Nov 9, 2026
Merged

dylanmtaylor merged 1 commit into
storytold:mainfrom
dotCooCoo:chore/craft-update-updater-fixes

Conversation

@dotCooCoo

@dotCooCoo dotCooCoo commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Draft until storytold/craft-libs#687 and storytold/craft-libs#696 merge. The craft-libs pin points at dotCooCoo/craft-libs c7c84230, a branch that is craft-libs main at 0a9d1f48 with those two pull requests merged in, #687 first. When both merge, the pin moves to the craft-libs merge commit on storytold/craft-libs and the pull request is marked ready.

What changes

  • Cargo.toml, apps/gridcraft/Cargo.toml, crates/ui-egui/Cargo.toml: craft-update, craft-window, craft-print and craft-ui move together from c5a1cbfb to c7c84230. Cargo.lock changes the six craft-libs entries, moves winprint and craft-winprint-gdi to 64e7afd4 (craft-print's pin), and drops zopfli from zip. The web app's craft-web-api and craft-web-host stay on fd5e2fef.
  • crates/ui-egui/src/updates_ui.rs: the check result window now shows whenever the updater's status is not idle, not only after Help ▸ Check for Updates. At the first start after an update it reports that the update installed (Status::Updated) or why it failed (Status::InstallFailed). Its Restart to Update (Status::Ready) calls Updater::restart_to_update. The new Installing, Ready and Managed statuses show in the same window, which stays closed while the startup prompt is open.
  • Action::Close from the updater now goes through SheetApp::request_quit. Before, it closed only the current viewport, so with a second workbook window open the app kept running and the update did not install.
  • apps/gridcraft/src/main.rs: on_exit calls the new SheetApp::start_pending_update before the macOS std::process::exit(0). On Windows the install helper now starts at the app's exit instead of right after the download, so a canceled close keeps the update ready. On Windows and Linux dropping the updater starts it too.
  • New test updates_ui::tests::result_window_shows_every_status_but_idle.

The updater's dialogs stay in English: GridCraft does not pass a translator to craft-update.

Other craft-libs changes since c5a1cbfb

The numbers are storytold/craft-libs pull requests.

  • craft-update: translated button labels behind an app's translator (craft-libs 508, 542), standalone and package-manager install fixes (392, 460, 465, 481), a safe release link (452), and zip without zlib-rs on Windows (608).
  • craft-print: a job can be canceled until it reaches the spooler (622), printer queues are listed without driver queries (618), PrintTicket calls are serialized (171), a token budget for the lexer (547), and winprint 64e7afd4 (605).
  • craft-window: new windows cascade on the real monitor (468).
  • craft-ui: docking move handles have one name each (410), floating destinations and font bytes are checked (567), a native floating bar shows no title (367), and optional host docking surfaces (470) that GridCraft does not use.
  • craft-fonts-build: path and cmap checks (267, 527, 528).

None of them needed a code change here.

Overlap

#3274 moves craft-update alone to 37c845c4 (the head of storytold/craft-libs#570). Whichever merges first, the other needs only the newer rev in the manifests and Cargo.lock. Earlier pin changes on main moved all four craft-libs crates in one commit (79722c76, c7911c83, and 94fcbf8b, which pinned a fork branch until c7911c83 moved it to storytold/craft-libs), while outside pull requests #2586, #2928 and #2934 moved craft-update alone.

Tested

On Windows 11, on 2c58c769 (main) with this commit:

  • cargo fmt --all -- --check: clean.
  • cargo check --workspace --tests --locked: clean.
  • cargo clippy -p gridcraft -p gridcraft-ui-egui -p gridcraft-web --all-targets --locked -- -D warnings (the crates that depend on craft-libs crates): clean.
  • cargo test -p gridcraft -p gridcraft-ui-egui -p gridcraft-web --locked --no-fail-fast with CRAFT_FONTS_DIR at craft-fonts b076417b (CI's pin): 8 test binaries, 1578 passed, 0 failed. Without craft-fonts, interaction::column_autocomplete_folds_case_beyond_ascii and interaction::language_switch_renders_the_ribbon_and_persists fail on missing glyphs; open UI tests: skip the glyphs the bundled fonts lack when craft-fonts is absent #2773 adds skips to both.
  • The new test fails when the window is limited to Checking, UpToDate and Failed.
  • cargo xtask assets, layers, parity --check and keytips --check: ok.

… and installs at exit

craft-update, craft-window, craft-print and craft-ui move from craft-libs
c5a1cbfb to c7c84230, a branch with storytold/craft-libs#687 and storytold#696
merged into craft-libs main.

- The check result window shows whenever the updater's status is not
  idle, so the first start after an update reports that it installed or
  why it failed. Restart to Update asks the app to quit once nothing is
  unsaved.
- An update's close request quits the app (Quit asks about each unsaved
  workbook), so every workbook window closes.
- on_exit starts the install helper of a ready update before the macOS
  process exit.
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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

LGTM. craft-libs#696 is merged into main.

@dylanmtaylor
dylanmtaylor marked this pull request as ready for review November 9, 2026 03:12

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

LGTM. craft-libs#696 is merged to main.

@dylanmtaylor
dylanmtaylor merged commit 01033f2 into storytold:main Nov 9, 2026
7 checks passed
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