Files
skylar taylor-barrickandDylan M. Taylor 11372822d7 Defer Developer Build verification until installation (#1706)
* Defer Developer Build verification until installation

* Keep obsolete Developer Build verification failures job-local

* Address catalog discovery review consistency and backoff findings

* Keep build verification waits out of catalog refresh status

* Register verification hold refusal for translation

* fix: scope legacy nightly retry metadata on upgrade

* Fix warm nightly replay and typed admission refusals

Keep a recovered signed listing visible but stale when an older persisted absence disagrees. Capture the eligible install candidate once before reservations and report capture failures through the typed Nightly refusal path; retain worker revalidation at use.

* test: add CodeRabbit follow-up regressions before fixes

Tests-only (plus a test-only download-turn hook) on 8084fe64 production code;
expected to fail until the follow-up fixes land.

* Address CodeRabbit follow-up on Developer Build scheduling and install checks

- A catalog request the ArtCraft throttle holds charges no app its turn and keeps
  activation revalidation pending; automatic sweeps wait for the hold, cached
  listings still display, and apps it says nothing about keep their result.
- A signed offer or omission that expired after its last check is revalidated
  before the cadence, once, in Native and in the UI's request gate.
- Live and replayed omissions share the no-build record's exclusive two-hour window.
- An install's descriptor failure publishes the build status and wait without a
  catalog-check failure event.
- The descriptor wait is a time hold applied by the UI clock and Native
  admission, not package ineligibility, so Install returns at the deadline.
- NightlyStatus carries the signed reconciliation as a lower eligibility bound.
- A job compares its exact build/package selection again after its download
  turn, before any package request.

* test: add second-round follow-up regressions before fixes

Compile-compatible with the ff250ccb production code: expiry coalescing, the held
catalog deadline in check completion, a real descriptor Retry-After keeping the current
offer (with its next click verifying again), blocked-failure controls, and the card's
Install naming the build it shows. Expected to fail until the second fix lands.

* Bind Developer Build installs to the shown offer; finish wait and hold recovery

- Command::InstallOffer carries the exact release a card shows; Native refuses it
  visibly, before any reservation, descriptor or package request, when the one
  exact capture differs. App-only Install keeps its meaning for headless callers;
  Stable refuses the new command.
- A server's descriptor Retry-After on the recorded build keeps the current listing
  eligible (time hold only); malformed/other verification failures, an expired or
  replaced listing and a storage failure stay blocked; the next click after the
  deadline verifies the descriptor again.
- The ArtCraft throttle's catalog hold reaches CheckFinished (catalog deadline only),
  and the page's hold line uses the neutral "Next check at" wording.
- Signed-expiry revalidation never shortens the one-minute coalescing window, in
  Native and in the UI's mirrored request gate.
- Native test-support feature (test-only, off by default) and a non-wasm UI
  dev-dependency let UI tests run on events a real Native backend produces.

* Address catalog replay, retry reporting and test transport review nits

---------

Co-authored-by: Dylan M. Taylor <[email protected]>
2026-11-28 22:53:59 -05:00

4.6 KiB

Development notes

Facts about the code that AGENTS.md summarises.

Workspace map

crates/
  core      artcraft-launcher-core      pure and wasm-safe: the app catalog, versions, GitHub
                                        release parsing, picking the right asset per platform
  native    artcraft-launcher-native    desktop only: HTTP, detecting installed apps, download,
                                        verify and install
  ui-egui   artcraft-launcher-ui-egui   the shared egui UI (desktop and web)
apps/
  artcraft-launcher                     desktop shell (eframe): window, tray icon, notifications
  artcraft-launcher-web                 the same UI in the browser (trunk; catalog and downloads only)
xtask/                                  cargo xtask ci | wasm | version | ico
packaging/                              macOS, Windows, Linux, FreeBSD and web packaging scripts
assets/app-icon/                        the launcher's own icon (master SVG, renders, tray icons)
assets/app-icons/                       the Craft apps' icons, copied from each app's repo
assets/fonts/                           Archivo, Inter, Geist Mono (OFL-1.1): getartcraft.com's faces

core depends on no other workspace crate and builds for wasm32-unknown-unknown. native uses core. ui-egui uses core, and native only behind cfg(not(target_arch = "wasm32")) or through a trait the desktop shell implements. Windows, tray icons and notifications are opened only in the apps. File-system, process and OS code is cfg(not(target_arch = "wasm32")).

The product name in user-facing text is ArtCraft Launcher, and the suite is the Craft App Suite. Machine names stay lowercase: crates and binaries (artcraft-launcher, artcraft-launcher-*), file names, and the app id ai.storyteller.artcraft-launcher.

Errors and tests

  • Errors use each crate's error type and ?. Production crate roots (lib.rs, each binary's main.rs, xtask) carry #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)].
  • Release parsing and asset picking in core are tested with real GitHub release JSON fixtures, small and committed under crates/core/tests/fixtures/.
  • artcraft-launcher-native's test-support feature (off by default) exposes backend::test_support, a real Developer Builds backend with an in-memory transport, so ui-egui tests (its only user, a non-wasm dev-dependency) are driven by events Native produces. Production, desktop and wasm builds never enable it.

Look and feel

The UI follows the apps page on getartcraft.com (artcraft-website-next in artcraft-services): square corners, 1 px hairlines instead of shadows, Archivo (620, 118 % width) for headings and app names, Inter for body text, upper-case Geist Mono labels and buttons, and the site's colour tokens by name (theme::Tokens). Widgets live in widgets.rs.

Animations follow the OS: with Windows' "Animation effects" off, macOS' "Reduce motion" on, a Linux desktop's animations off or a browser's prefers-reduced-motion, nothing fades, wipes or glides (Host::reduce_motion, crates/ui-egui/src/motion.rs). Animations take their time from egui's style.animation_time or switch off on LauncherUi::reduce_motion. Progress bars and spinners keep moving.

Languages

Every user-facing string goes through crates/ui-egui/src/i18n: tl!("…") for literals, fmt for {placeholders}, tn for counts. English in the code is the lookup key. Catalogs are the *.tsv files there. Product and app names (ArtCraft Launcher, Craft App Suite, PhotoCraft, ...) stay in English.

A CJK language is drawn with the system's own CJK font (crates/ui-egui/src/cjk_font.rs, desktop only; English where there is none). Georgian borrows the system's Georgian font the same way.

Icons and brand assets

ATTRIBUTION.md has a row per bundled asset: path, title, author, source, licence. The ArtCraft name, logo and "A" mark in docs/brand/ (the header logo and the tray icon) are trademarks, not MIT/Apache (docs/brand/LICENSE-brand.txt). The app icon and the tray icon are renders of the supplied "A" mark. packaging/icons.sh (needs resvg; runs on any OS) regenerates them. assets/app-icons/ is copied from each app's repo (assets/app-icon/hicolor/128x128/apps/ai.storyteller.<app>.png).

Offline builds

crates/core/build.rs fetches and verifies the signed catalog and app icons from getartcraft.com, and caches them under the Cargo target directory. For an offline or reproducible build, set ARTCRAFT_CATALOG_DIR to a pinned snapshot that includes the icons; see releasing.md.