Commit Graph
201 Commits
Author SHA1 Message Date
BFlat d1c3f85685 Merge pull request #2629 from dotCooCoo/feat/update-off-state
craft-update: an app can turn update checks off
2026-11-30 01:08:58 +07:00
BFlat 4254d781d6 Merge pull request #3971 from dotCooCoo/fix/update-tests-no-wall-clock
craft-update: cancel and output-limit tests no longer depend on elapsed time
2026-11-30 01:08:45 +07:00
kalmarr c2ec2415e8 fix(update): preserve exact matching for non-GitHub download prefixes 2026-11-29 00:00:49 +01:00
kalmarr 3d1cac4141 fix(update): preserve case-insensitive GitHub repository matching on current main 2026-11-28 20:16:16 +01:00
dotCooCoo cbff6bdeb5 Merge main into feat/update-off-state 2026-11-28 05:32:51 -08:00
dotCooCoo c32cd309b2 Merge main into fix/update-tests-no-wall-clock 2026-11-28 00:36:27 -08:00
dotCooCoo 2ab9e9fe70 craft-update: the one-installer-at-a-time test holds each installer instead of sleeping
installers_never_run_at_the_same_time slept 3 ms inside each installer and
up to 4 ms before each of its 24 jobs queued, so whether two installers ever
overlapped depended on thread timing. A queue that let two run at once could
still pass.

The test now runs three rounds, one per kind of job (an install, a removal,
a lone installer). In each round the first job's installer blocks on a
channel the test holds. The test then starts seven more jobs one at a time
and requires each to report that it is waiting before it starts the next.
After the first installer is released, every later call also blocks until
the test has checked that it is the only one running. Both assertions (at
most one installer running, all 24 targets handled) are unchanged.

With the queue's busy check removed, or with either `alone` or `batched` no
longer marking the installer busy, the test failed in 20 of 20 runs each.
2026-11-27 18:42:27 -08:00
dotCooCoo 76159a6f18 craft-update: cancel and output-limit tests no longer depend on elapsed time
Two tests of the Flatpak helper runner decided their results with the
clock. One canceled the run after 100 ms and checked that it took under
5 s. The other waited out the real 5 s output limit against a `sleep 8`
descendant and checked that it took under 8 s.

`cancellable_output` now waits through `cancellable_output_until`, which
asks a `keep_waiting` callback each time the helper or its output is
unfinished, as `run_command_until` does. `cancellable_output` keeps the
one-hour limit for the helper and the 5 s limit for its output. The
cancel test cancels on the second check, while `sleep 86400` runs. The
output test ends the wait at the first ask while a descendant holds the
pipes. Both run under a 60 s `with_deadline` hang guard.

The macOS disk-image fixture retried a busy `hdiutil` after sleeps of
0.5 to 4 s and gave up after about 8 s. It now asks again until hdiutil
gives another answer, and a helper that stays busy for a minute fails
the test. The attach in `an_install_that_ended_partway_does_not_block_the_next`
no longer skips the test when the helper stays busy.
2026-11-27 17:48:24 -08:00
FredApps 0f525a505d test(update): cover the signed-catalog source and signature failure paths
Sonar's new-code coverage gate was 71.4% (needs 80%): CatalogSource and the
signature/document refusal paths had no tests. Add tests with a fake fallback
source and a fresh signed catalog; no network is used.
2026-11-27 18:17:25 +07:00
FredApps 28b804aad6 Merge main into feat/catalog-update-source 2026-11-27 17:23:52 +07:00
bflatastic 1eb6a92ade Clear the design-lint findings on main
Mark TransformBox::handle_side and PreferencesWindow::size as point
quantities the host supplies, and make CheckContext #[non_exhaustive].
#3855 and #3738 are reverted above: they read egui memory, raw keys and
pointer clicks outside runtime::egui.
2026-11-27 15:52:38 +07:00
BFlat ed6133a64b Merge pull request #3802 from dotCooCoo/fix/macos-update-test-errors
craft-update: assert macOS detach fixture setup without unwrap
2026-11-27 15:50:01 +07:00
FredApps 921a720426 Merge main into feat/catalog-update-source; fix catalog review findings
- resolve the check_for_update doc-comment conflict with main
- offer prereleases from the signed catalog to a prerelease build, as the GitHub path does
- accept %2B in catalog download links and return the canonical link
- validate links against the catalog entry's own repo spelling
- share the stable/prerelease pick between latest_for and latest_for_repo
- add regression tests; rustfmt
2026-11-27 09:42:41 +01:00
BFlat 9a3e1507cb Merge pull request #2617 from dotCooCoo/feat/update-check-source-context
craft-update: Updater::with_check passes the app and running version to a custom check
2026-11-27 14:20:10 +07:00
BFlat d521fb973b Merge pull request #2636 from dotCooCoo/feat/update-prerelease-offers
craft-update: a copy running a pre-release is offered the next pre-release
2026-11-27 14:15:57 +07:00
BFlat 03129aea99 Merge pull request #2618 from dotCooCoo/fix/craft-update-missing-release-list
craft-update: a 404 on the release list is reported as a failed check
2026-11-27 14:05:23 +07:00
Dylan M. Taylor 408de2e176 test(update): register signed catalog unit tests with #[trial] 2026-11-26 21:59:44 -05:00
Dylan M. Taylor b3663dae2b feat(update): default update checks to signed getartcraft.com catalog with GitHub fallback 2026-11-26 21:56:04 -05:00
dotCooCoo 56b86f1924 Assert macOS detach fixture setup before using its directory 2026-11-26 14:15:11 -08:00
FredApps 1c712529fa Merge main (3b09a644a5) into codex/update-busy-detach-2221
Conflict: main split install.rs into install/{linux,macos,windows,freebsd,tests}.rs. Ported this PR's change into that layout unchanged in substance: retry_busy_detach* stay in install.rs; detach_with and the clear_mounts retry are in install/macos.rs (its stderr test as #[craft_ui::testing::trial]); the retry-policy tests and the two busy-mount tests are in install/tests.rs as #[trial] (craft-update runs harness = false), and the clear_mounts control now pins Permission denied as in this PR. Local: craft-update lib tests (new retry tests run) and clippy -D warnings pass.
2026-11-26 20:14:33 +07:00
dotCooCoo 1f67b5698a craft-update: the check dialog shows the Off message over a held release
While update checks are off, the check dialog showed a release the updater
still held, with Update and Check Again, instead of the Off message. The
dialog now treats Status::Off as hiding the release: it shows the Off
message with OK alone and no release notes link.

The test that turns checks off during a running check now waits until the
check's thread is inside the source before turning checks off, then lets
the request finish and checks that its release is not offered.
2026-11-25 22:21:48 -08:00
dotCooCoo 4e2f040650 Merge main into feat/update-check-source-context
The context source returns CheckError like CheckSource on main, CheckContext's app field gets its doc line, and the context test moves to updater/tests.rs as a trial.
2026-11-25 21:18:58 -08:00
dotCooCoo ced07ed74e Merge main into fix/craft-update-missing-release-list
Keeps main's typed CheckError and check_releases_at; a 404 on the release list is CheckError::Failed naming the repository. The test moves to http::tests as a trial that serves a 404.
2026-11-25 21:18:24 -08:00
dotCooCoo 8ec1386c26 Merge main into feat/update-prerelease-offers 2026-11-25 21:05:37 -08:00
dotCooCoo d9870762ba craft-update: turning checks on again clears the Off status
A result that said checks are off stayed after checks were turned back on, so the check dialog kept saying so and offered only Close. Turning checks on now sets Status::Off back to Idle, where the dialog offers Check Now.
2026-11-25 20:44:46 -08:00
dotCooCoo 50560555a2 Merge main into feat/update-off-state 2026-11-25 20:37:42 -08:00
BFlat 017c371f44 Merge pull request #2034 from dotCooCoo/fix/pipe-test-timeout-before-shutdown
craft-update: the inherited-pipe test no longer sets a read timeout after shutdown
2026-11-26 10:30:25 +07:00
aiongg 6e308319c0 update: local-mirror, the feature that accepts a developer's loopback mirror
ArtCraft Launcher's development builds install from a mirror on this computer (its `local-mirror` feature, `cargo xtask local serve`). With the feature, `check_download_link` accepts loopback links and `Http::new` leaves the agents for remote hosts off HTTPS-only.

Without it nothing changes: a build refuses a loopback download link and the remote agents refuse plain HTTP before they connect. `default`, `ui`, `screen-testing`, `suite` and `oci_migration` do not turn it on; the facade forwards it only as its own `update-local-mirror`, which no other facade feature turns on.
2026-11-25 17:06:02 +00:00
aiongg 3a10c49a2c Quit is a framework command, and the update dialogs show the icon the app gives its host
- QuitCommand::Quit (window.quit, Cmd+Q) replaces egui's quit shortcut, which the runtime clears at
  install. The runtime runs it from any source through the root window's close path, so the app's
  close decision asks about unsaved work. Its default yields to another command bound to the chord,
  as the window shortcuts' defaults do (library::yields_default).
- HostBuilder::icon_png gives the app's icon once, beside its AppInfo; the update dialogs show it in
  their head instead of the name's initial.
- Docs: craft-framework.md §2.2 Quit and Zoom keys rows, craft-host README.
2026-11-24 02:30:10 +00:00
Dylan M. TaylorandClaude 7c0ae3e639 fw sync: merge craft-libs next e3ca63165 (149 commits) into pdf-port/sync
Conflicts resolved (upstream's design and defaults win; the port's opt-ins stay):
- ui-contract fonts: upstream's served-faces provider, catalog job queue and byte budget;
  the port's FaceBytes::chain (Word subset siblings, F-8) re-done on the provider: a served
  face lists its served chain faces before the interface faces, a sibling landing after its
  owner remakes egui's fonts once, drawing a face marks its chain drawn. The port's chain
  trial moves onto upstream's rig, plus a late-sibling trial.
- text editor HostCx follows FacesCx's job-based document_face and document_face_bytes.
- ui-widgets Swatch: upstream's SwatchFill (split, spectrum, image, empty) with the port's
  Swatch::optional / SwatchFace::optional (new SwatchFill::None, the "no colour" diagonal)
  and Swatch::icon (glyph on the empty well) on top; both word sets kept.
- draw PaintBar: upstream's MixerLoad fill.
- font-manager: upstream's sample band; host rows (port) use it too.
- ui-panels / ui-patterns dock grips: upstream's drag_origin and named slack.
- platform clipboard tests: both trials kept.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-23 12:54:08 -05:00
Martin BallandClaude Opus 5.5 1c5ad1b85a Update: a rate-limited check is a typed reason apps can translate (#3090) (#3098)
* #3090: craft-update reports a rate-limited check as a typed reason apps can translate

check_for_update now returns CheckError (RateLimited | Failed(String)); Updater gets Status::RateLimited, LatestRelease gets RateLimited, and UpdateWords gets rate_limited. GitHub's own text stays data in Failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCZhHKRuRB5wZUiw6BE

* #3090: isolate the rate-limit source test's cache path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCZhHKRuRB5wZUiw6BE

* #3090: point the rate-limited word's doc link at updater::Status

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCZhHKRuRB5wZUiw6BE

* #3090: tests that a rate-limited release check is typed and the check dialog words it itself

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCZhHKRuRB5wZUiw6BE

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:48:33 +00:00
Dylan M. Taylor cb3101725c sync skeleton: origin/next 118f1d2ff9 into pdf-port/gaps ea77c1676f, markers left
257 conflicted files staged with their conflict markers (630 hunks). The one
modify/delete, crates/ui-patterns/src/patterns/preferences/body.rs (deleted
upstream, modified by the port), keeps the port's file for its area to carry
into upstream's preferences/page.rs. Plan: landing/fw-sync-plan.md.
2026-11-22 22:42:09 -05:00
yoriswind 6fc1ccd240 update: preserve detach stderr for the busy retry policy 2026-11-20 17:58:21 -08:00
FredApps 9c180fca2f Merge pull request #2363 from storytold/perf/2332-explicit-ui-suite
Split the UI test kit and select suite registrations explicitly
2026-11-21 03:16:06 +07:00
dotCooCoo 0dcadbb2a8 craft-update: a check's thread begins its request in one atomic step
Turning checks off could return while a check's thread that had already
read the flag as on went on to call the network. The thread now moves its
state from waiting to asking with one compare-exchange as it begins the
request, so after checks are turned off a thread that has not begun asks
nothing. A test pauses the thread just before its request, turns checks
off, and checks that the request is not made.
2026-11-20 11:27:13 -08:00
dotCooCoo a626b0d5c6 craft-update: a copy running a pre-release is offered the next pre-release
check_for_update read GitHub's release list for stable releases only, so a
build that is itself a published pre-release (0.1.0-alpha.3) was never
offered the next alpha. A copy whose version carries a release channel
label (alpha, beta, rc, nightly) now also considers pre-releases and is
offered the newest release by semver precedence. Stable copies and builds
from source (-dev, -integration) are offered stable releases only, as
before.
2026-11-20 11:16:32 -08:00
dotCooCoo 1c491e4925 craft-update: an app can turn update checks off
Updater::set_checks_enabled(false) (and with_checks_enabled) stops
check_at_start and check_now from asking the network or reading the
launcher's file. A requested check reports the new Status::Off, which the
result dialog shows as "Update checks are turned off in {app}." with OK.
Turning checks off drops a running check's answer, and its thread skips
the request when it has not begun it yet. An update that is installing
or ready carries on, and offer() still opens the prompt for a release
the app found itself.
2026-11-20 10:56:11 -08:00
dotCooCoo 6cef16580b craft-update: Updater::with_check passes the app and running version to a custom check
with_source's CheckSource takes no arguments and was documented for
tests, so an app with its own release rules had to work out the app,
the running version and the built-in check's HTTP client again.

ContextSource gets a CheckContext with the app, the version the
Updater compares, http() for the built-in check's client, and
check_github() for the built-in check itself. with_source keeps its
signature and now goes through with_check.
2026-11-20 10:47:31 -08:00
dotCooCoo b44afe09f2 craft-update: a 404 on the release list is reported as a failed check
check_for_update answered a 404 on the release list with Ok(None), so a
requested check showed "up to date" for a repository that was renamed,
deleted or made private. It now returns an error that names the
repository, and a requested check shows it as the reason the check
failed.
2026-11-20 10:47:21 -08:00
yoriswind 718e5c896d fix(update): count detach time against the retry window 2026-11-20 09:33:49 -08:00
yoriswind 7e04e999bf fix(update): retry busy leftover-mount detaches 2026-11-20 09:18:41 -08:00
David MannandClaude Opus 5.5 1929e79ebb Merge storytold main into next (20 Nov, second sync)
Merges main at 8f92ed1334 (#2550 and the rest of main since the 20 Nov sync).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 16:38:55 +01:00
FredApps 9793d1a452 Merge branch 'next' of https://github.com/storytold/craft-libs into publish/registry-2332
# Conflicts:
#	crates/dialogs/src/lib.rs
#	crates/dialogs/src/ui/mod.rs
#	crates/draw/src/ui/gradient/mod.rs
#	crates/draw/src/ui/gradient/swatch.rs
#	crates/menu/src/shortcuts/view.rs
#	crates/menu/tests/it/main.rs
#	crates/menu/tests/it/shortcuts/mod.rs
#	crates/pages/tests/it/main.rs
#	crates/print/src/lib.rs
#	crates/review/tests/it/main.rs
#	crates/story-render/src/main.rs
#	crates/table/tests/it/main.rs
#	crates/text/tests/it/main.rs
#	crates/ui-canvas/src/canvas/navigate/mod.rs
#	crates/ui-canvas/tests/it/canvas/mod.rs
#	crates/ui-contract/tests/it/access/mod.rs
#	crates/ui-contract/tests/it/fonts/mod.rs
#	crates/ui-contract/tests/it/runtime/mod.rs
#	crates/ui-gallery/src/foundations/mod.rs
#	crates/ui-patterns/src/patterns/preferences/mod.rs
#	crates/ui-patterns/tests/it/docking/mod.rs
#	crates/ui-patterns/tests/it/form_dialogs/mod.rs
#	crates/ui-patterns/tests/it/panels/palette.rs
#	crates/ui-patterns/tests/it/preferences/mod.rs
#	crates/ui-shell/src/shell/mod.rs
#	crates/ui-shell/tests/it/shell/mod.rs
#	crates/ui-widgets/src/tabs/strip.rs
#	crates/ui-widgets/tests/it/bars/mod.rs
#	crates/ui-widgets/tests/it/contract/mod.rs
#	crates/ui-widgets/tests/it/layout/mod.rs
#	crates/ui-widgets/tests/it/main.rs
#	crates/ui-widgets/tests/it/menu/mod.rs
#	crates/ui-widgets/tests/it/pickers/mod.rs
#	crates/ui-widgets/tests/it/text/mod.rs
2026-11-20 15:04:36 +01:00
FredApps dd0596ae8f Merge branch 'next' of https://github.com/storytold/craft-libs into publish/registry-2332
# Conflicts:
#	crates/menu/tests/it/main.rs
2026-11-20 13:44:42 +01:00
Martin BallandClaude Opus 5.5 bc4bb7bd73 Merge craft-libs next 7efbe8bb6 into the WordCraft port
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 03:53:30 +00:00
aiongg b05c1c27f9 Merge storytold main into next (20 Nov sync) 2026-11-20 01:48:18 +00:00
dotCooCoo ebbc62b93d Update tests: the attach retry calls busy() 2026-11-19 15:39:12 -08:00
dotCooCoo 9bb003847d Merge main into fix/update-test-attach-retry 2026-11-19 15:23:47 -08:00
kalmarr 05f939667e fix(update): preserve repository casing through strict asset checks 2026-11-19 22:14:59 +01:00
Dylan M. Taylor 88b867f4dc Framework batch 3 d: port follow-ups (see runs/fwb3-d.md) 2026-11-19 15:48:27 -05:00