Batch 2A review fixes on top of 4279762e:
- One launcher (packaging/linux/nightly-launcher.sh) serves the app-owned
nightly tar, the deb/rpm wrapper, the AppImage AppRun, the Arch handoff and
the Flatpak bundle. It passes an already-supplied --launch-profile (and
--version/-V) straight through, so the ArtCraft Launcher's own profile root is
honoured instead of being wrapped into file names, and it resolves its own
folder (also when a shell finds it through PATH) rather than a relative path.
- The profile moves to ${XDG_DATA_HOME:-$HOME/.local/share}/wordcraft-nightly,
which persists inside the Flatpak sandbox; the sandbox home does not, so
preferences, recovery and autosaves were lost on every exit.
- package.sh's nightly tar step uses the tar's real member paths (no usr/), so
the tar format no longer aborts and the Flatpak bundle can be built from it.
- The app-owned tar uses the standard layout: `wordcraft` is the launcher and
`wordcraft-bin` the GUI (was wordcraft.real). The archive allowlist and its
tests follow, and nightly-build.yml's exact member check accepts the OFL-*.txt
licences CRAFT_FONTS_DIR adds.
- Windows: the print helper runs before prepare_launch(), so File > Print works
in a Nightly build instead of hitting the launch-profile refusal.
- sign.ps1 keeps the stable signing step's random create-new temp folder; only
the Nightly additions remain.
- Drop our dormant nightly-dispatch.yml, as in the other apps.
- profile_root: a test pins the Flatpak's own data folder as an accepted profile.
Tests: new packaging/linux/nightly-package-test.sh renders package.sh's nightly
tar with stub binaries and runs the extracted launcher (plain, the Launcher
form, --version, XDG_DATA_HOME, a PATH lookup from another directory, and the
AppImage and flat layouts); nightly-arch-tar-test.sh covers the Launcher form
and the data-home profile.
- Fix a compile error in the flavour's own window body: the unclean-session notice flag
(an Arc) was moved into the window closure and then read after run_native, so
cargo check failed with E0382. The window body now takes its own clone, as the exit
hook already did; found by the first capped cargo check in this pass.
On top of #7746 at 99b15ac2, keeping his commits.
The deb/rpm wrapper (one shared launcher in package.sh), the AppImage AppRun, the
Arch launcher, the plain tar's bin/wordcraft and the Flatpak bundle built from
that tar now exec the real binary with
`--launch-profile nightly-v1 --profile-root $HOME/.local/share/wordcraft-nightly
--`. The XDG redirects are gone: the flavour derives the stable boundary from
them, so the chosen profile sat inside it and the build refused to start. The
real binary keeps the ../lib/wordcraft-nightly/ layout in every format, a bare
--version/-V still goes straight to it, and the archive policy allows and
requires the launcher's binary.
nightly_compile_gui passes WORDCRAFT_BUILD_CHANNEL and WORDCRAFT_VERSION
explicitly (WORDCRAFT_OVERRIDE_VERSION was read by nothing here), so the build is
the nightly channel and its "WordCraft <version> (nightly-v1)" line is what
nightly_build_gui and the macOS verifier already check.
The nightly metainfo drops its mediatypes in the deb/rpm and Flatpak trees,
matching the desktop file's dropped MimeType. profile_root accepts the nightly
Flatpak's own id and still refuses a stable sandbox, so the nightly Flatpak can
start at all. Sonar's coverage exclusions name both binaries' main.rs and the
Windows-only identity module: his two coverable new lines are in main.rs, which
the Linux coverage job never runs, which is the whole of the 0.0% on new code.
Found by the one capped cargo check: the font-store match had a `()` arm and a
`bool` arm (use_font_store returns bool), so the crate did not type-check; the
call is now a statement, as the CLI already writes it.
- Remove unsupported 'queue: max' key from concurrency in .github/workflows/nightly-sign.yml and update packaging/nightly-release-tests.py to match
- Use FLATPAK_ID (falling back to ai.storyteller.wordcraft) for runtime app_id in apps/wordcraft/src/main.rs
- Append -nightly marker to BASENAME in packaging/linux/package.sh and flatpak-bundle.sh when channel-only Nightly builds lack -nightly in VERSION
SonarCloud flags every bare [ conditional in bash scripts under packaging/ as a reliability smell (rule S7688). Convert the flagged [ ... ] tests to [[ ... ]]: safer word-splitting and no glob surprises, same semantics for these string and file tests.
- packaging/linux/package.sh: embed gh-releases-zsync update information in each AppImage
(appimagetool -u) and write the .zsync beside it; the Linux job installs zsync and checks both.
- New flatpak job (x86_64 on ubuntu-24.04, aarch64 on ubuntu-24.04-arm) repackages the Linux
tarball with packaging/linux/flatpak-bundle.sh and ai.storyteller.wordcraft.bundle.yml; no Rust
build, no release environment. The release job needs it.
- version, Linux and web jobs drop `environment: release` (they sign nothing), so a branch
workflow_dispatch dry-runs every unsigned job; the release job still needs the signed jobs.
- FreeBSD release build embeds craft-fonts like the other desktop builds and ships its licences.
- Flathub manifest: same finish-args as the bundle (adds xdg-documents), builds the CLI too;
packaging-lint checks both manifests agree.
- README: Downloads section; docs/releasing.md updated.
Co-authored-by: Brandon Thomas <shared2@storyteller.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>