Commit Graph

26 Commits

Author SHA1 Message Date
skylartaylor 86272c55cc fix(nightly): close the second review round's profile, launcher and notice findings
- main.rs: acknowledge the interrupted-session notice only once a frame has drawn it, so a
  renderer failure before the first frame keeps the record the next start reports.
- profile_root.rs: a fresh exclusive name per write probe, removing only this attempt's entry,
  so a probe left by a killed run no longer blocks a writable profile.
- profile_root.rs: fence the XDG bases the Linux wrapper overrides (FIGCRAFT_STABLE_<key>), so
  the stable ~/.config/FigCraft folders stay excluded from a nightly profile.
- nightly-launch.sh: pass those pre-override bases; the launch test checks them.
- docs: name craft-common-actions #363 as the prerequisite port.
2026-11-25 01:14:12 +01:00
skylartaylor fb6c02145f nightly: fix the batch-2b review findings
The review of this branch found two hosted checks that would fail, two
clippy denials and five real defects in the Linux fixup. Each is fixed
here, and the flat feed tarball now uses the kit's standard layout.

- actions.lock: regenerated with gh actions-lock v0.4.1 so nightly-macos.yml
  is pinned; `gh actions-lock --verify` reports all 12 workflows valid.
- shellcheck: the macOS identity check uses `if ! { ...; }` instead of
  `A && B || C`, and the launcher test disables SC2016 for the literal
  `$(dirname "$0")`, as package.sh already does.
- build.rs: `FIGCRAFT_REQUIRE_WINRES=1` reports a failed resource compile on
  stderr and exits 1 instead of panicking (the workspace denies clippy::panic).
- profile_root.rs: compare FLATPAK_ID with the &str constant (clippy::cmp_owned).
- AppImage: AppRun runs the staged launcher again; the copy that needed the
  runtime's $APPDIR is gone, so an extracted AppDir works too.
- Metainfo: the shared stage keeps the stable id/launchable/icon and the deb,
  the AppImage and the Flatpak each rename them to the id they install, so the
  Flatpak bundle no longer points at a desktop entry and icon it does not ship.
- main.rs: a nightly decodes the `file://` URLs the launcher passes after `--`,
  so "Open with" and a drop open the file again; the session record is finished
  before the graphics handoff, which on Unix execs the restarted window.
- Launcher: no FIGCRAFT_NIGHTLY_PROFILE override (it let a caller point the
  nightly at stable's config folder), a supplied --launch-profile/--profile-root
  passes through untouched, and a caller-written `--` is not doubled.
- The flat feed tarball follows the standard layout: `figcraft` is the launcher
  and `figcraft-bin` the GUI, with nightly-archive.py's sets and the launcher
  test updated; the shared entrypoint contract has to name figcraft-bin.
- share/mime is never installed for a nightly, and the Flatpak's --test asks
  its version through the launcher and no longer looks for share/mime.
- sign.ps1 keeps FigCraft's own Trusted Signing pin block and download URL;
  only the nightly switches (-Required, -CheckOnly, -CheckBuildEnvironment,
  the Authenticode assert) remain on top of Dylan's file.

No cargo compile was possible (load1 stayed above the gate), so hosted CI is
the first compile.
2026-11-25 00:22:10 +01:00
skylartaylor 26895334b5 nightly(linux): start the flavour's profile from every package format
On top of dylanmtaylor's #2603, whose packaging this keeps: one launcher
(packaging/linux/nightly-launch.sh) is now the nightly entry point in every format, so a Linux
Nightly started from a menu, a shell, an AppImage, a Flatpak or an unpacked tarball runs the
nightly-v1 profile instead of refusing to start:

    exec <real-bin> --launch-profile nightly-v1 --profile-root "$XDG_DATA_HOME/profile" -- "$@"

- deb/rpm: the wrapper runs /usr/lib/figcraft-nightly/figcraft on the profile.
- .tar.gz: a new bin/figcraft-nightly member beside the GUI (bin/figcraft); both are allowlisted
  and required by packaging/nightly-archive.py, so an unpacked tarball is isolated too.
- Arch handoff: the launcher replaces nightly-arch-launch.sh (deleted, superseded).
- AppImage: usr/bin/figcraft-nightly, and AppRun's exec line runs it instead of carrying inline
  XDG exports; the AppDir registers no MIME type.
- Flatpak: the manifest runs and installs figcraft-nightly, so the sandboxed bundle starts on its
  own profile (profile_root accepts the Nightly's own Flatpak id and still refuses another app's).

Also fixed here, from the re-review of this PR:
- StartupWMClass matches the window id the binary really sets
  (ai.storyteller.figcraft.nightly-v1), in the tar, deb/rpm, AppImage and Flatpak.
- No document associations for a Nightly: MimeType lines, share/mime and the metainfo
  <mediatype> entries are dropped in every format, and the nightly metainfo names the nightly id,
  launcher and icon.
- The version self-check passes as written: the flavour prints FigCraft <version> (nightly-v1)
  and reads the wrapper's FIGCRAFT_OVERRIDE_VERSION, so nightly-common.sh needed no change.
- The nightly tar from package.sh is GUI only (no CLI).
- packaging/check-app-specific.sh now runs the nightly suites, the new launcher test and bash -n
  over the nightly scripts, so packaging-lint covers nightly-release-tests.py and the Arch tar
  test that no workflow ran before.
- packaging/nightly-tests.py, launch and Arch tests all re-run locally; no local compile (the
  load gate never opened).
2026-11-24 23:13:14 +01:00
Dylan M. Taylor e2f19109c3 packaging(linux): port PhotoCraft nightly.sh and archive helpers 2026-11-24 16:17:51 -05:00
Dylan M. Taylor 1b9072f2d1 fix(packaging,ci): fix nightly desktop Exec sed delimiter and SonarCloud checks 2026-11-24 15:25:12 -05:00
Dylan M. Taylor f5695c23b4 fix(ci,packaging): sync actions lockfile, fix actionlint concurrency key, and address review comments 2026-11-24 14:21:54 -05:00
Dylan M. Taylor bd2a344590 packaging(linux): support co-installable nightly packages 2026-11-24 13:33:32 -05:00
Dylan M. Taylor 898bfc2e60 Fix Flatpak updates and bump to 0.17.1 (#2267)
* fix(flatpak): allow release checks and self-update helpers

* test: keep Flatpak permission parsing within strict Clippy rules

* chore: bump version to 0.17.1 for the Flatpak update fix
2026-11-11 15:01:36 -05:00
Dylan M. Taylor b0673ffc8b packaging(flatpak): add OCI image build and GHCR publishing helper (#1784) 2026-10-31 18:52:48 -04:00
Dylan M. Taylor 9ce1d91d39 fix(flatpak): allow reading launcher version pins (#1722)
* fix(flatpak): allow reading launcher version pins

* fix(flatpak): allow reading launcher version pins
2026-10-30 20:12:37 -04:00
Dylan M. Taylor 32e8fd0b29 Grant network access so update checks can reach GitHub (#1471) 2026-10-28 13:20:45 -04:00
Jindřich Šaršon 6258ad2786 M6: Sketch import: merge main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 22:23:40 +01:00
skylar taylor-barrick 236f3185d6 Migrate FigCraft to egui 0.37 (#1312)
* E21: require release font coverage and stabilize capture deadline tests

* E21: separate capture, IME and field-save regression phases

* M0: correct the migration qualification reference

* M-egui037: document input lifecycle and UI regression contracts

* M0: correct egui 0.37 status docs and stabilize join-code regression

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
Co-authored-by: Codebuff <noreply@codebuff.com>
2026-10-25 15:04:39 -04:00
Jindřich Šaršon db1bc539b0 M6: Sketch import: offer FigCraft for .sketch on Windows and Linux too
Linux: the shared-mime-info package declares application/x-sketch (a zip,
*.sketch) and the desktop entry and AppStream metadata list it. Windows:
the installer registers a Figcraft.Sketch ProgId under .sketch's
OpenWithProgids and .sketch in figcraft.exe's SupportedTypes, never as
the default. Both hand the path to file.open, as macOS does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 12:25:07 +01:00
Dylan M. Taylor a1a842af9a chore: resolve SonarCloud maintainability issues (#1241)
* chore: resolve SonarCloud maintainability issues

- Define SHA256_FMT constant in packaging script to remove duplicated string literal (shelldre:S1192)
- Remove redundant 'static lifetime annotations from const items (rust:S8863)
- Replace closures with method and function pointers (rust:S1612)
- Extract helper functions in synthetic document generation, bezier polyline flattening, and component restoration to reduce cognitive complexity (rust:S3776)

* fix(packaging): use verify_sha256 helper function to avoid shellcheck SC2059

* fix(engine): remove duplicate closing brace in large_document

* fix(engine): take &mut Document in restore_id_map; keep 'static on associated consts

restore_id_map allocates ids, so it needs a mutable document. Elided
lifetimes in associated consts trip elided_lifetimes_in_associated_constant,
so those annotations are restored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Assign positional parameters to locals in sha256 verification

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Dylan Taylor <dylan@craftmaker.dev>
2026-10-23 23:28:13 -04:00
aiongg c48102350b Packaging: pin the signing client and appimagetool, and check their hashes (#950)
* Packaging: pin the Windows signing client and check its hash

* Packaging: pin appimagetool and check its hash

* Reject AppImage download for architectures without a pinned appimagetool

* Pin the AppImage runtime
2026-10-23 13:02:11 -04:00
Dylan M. Taylor 8d790607ff packaging: bash test and function hygiene (SonarCloud S7688, S7679, S7682, S131, S7677) (#1201)
- Use [[ ]] instead of [ ] for conditional tests in the bash packaging scripts (S7688). Every
  converted test compares quoted values to literals, so no pattern-matching change.
- Name positional parameters with locals inside functions (S7679).
- End the env.sh helpers with an explicit return that keeps their exit status (S7682).
- Give case statements a default branch (S131).
- Send the check-app-specific.sh error to stderr (S7677).

packaging/freebsd/package.sh is left alone while #1158 rewrites it.
2026-10-23 11:17:32 -04:00
Dylan M. Taylor cb7966556c security: enforce HTTPS on curl downloads (SonarCloud S6506) (#1016)
Add --proto '=https' to curl invocations so redirects cannot downgrade to
plaintext HTTP. Resolves SonarCloud S6506 (shell/docker/githubactions).
2026-10-21 19:36:11 -04:00
bflatastic 370d9f7adc Merge main and the community batch into #346 2026-10-15 19:00:48 +07:00
IanHollow 212438a6e3 Set the native window identity to match the desktop entry
Assisted-by: OpenAI Codex (GPT-6)
Signed-off-by: IanHollow <72767437+IanHollow@users.noreply.github.com>
2026-10-14 13:12:38 -07:00
tydude001 1c1b699598 packaging: RPM declares the glibc 2.35 floor, so RHEL 9 refuses it
FigCraft's RPM declares no glibc floor, though the deb has `libc6 (>= 2.35)`. On Rocky Linux 9
(glibc 2.34) the RPM installs, and then `figcraft-cli` fails with ``/lib64/libm.so.6: version
`GLIBC_2.35' not found``.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 13:35:50 -05:00
Muhammadyusuf dd3d4d326c feat(packaging): run figcraft-cli from the AppImage with cli <args> (#232)
The AppImage ships figcraft-cli in usr/bin, but AppRun only ever launched the
app, so the CLI (and its MCP server) could not be reached without extracting
the image. `FigCraft.AppImage cli mcp` now execs `figcraft-cli mcp`, skipping
desktop integration because the CLI is headless.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 09:30:42 +07:00
BFlat 435415770f M9: live sessions in the browser; join links and dialog polish (#106)
- Browser client (step 4): the web build joins sessions a desktop app hosts
  through the browser's WebSocket API (web-sys, binary frames, the same
  message encoding). Its connection logic is a target-independent state
  machine (collab-net driver.rs): hello on open, changes and presence held
  until the welcome, throttled presence, keep-alive pings, a silent host
  counted as dropped, reconnect with backoff, final refusals. Tested natively
  against a scripted socket and a real host over loopback. Hosting stays
  desktop-only (LiveLink::can_host; collab.peers canHost). https pages are
  told up front that they can only reach ws:// sessions on this computer.
- Shared join logic (join.rs: GuestConfig, outcomes, taking in host messages)
  and transport limits (limits.rs) used by the native guest and the browser.
- Invite links: `figcraft figcraft://join?...` joins on start (a bad link
  opens the Join dialog with it); file:// arguments are paths. Windows
  registers a per-user figcraft:// opener (HKCU\Software\Classes\figcraft)
  behind a Registry trait (tests use a fake): collab.registerLinks {on?} and a
  Preferences checkbox, default on for installed builds, never for builds
  from source. macOS Info.plist declares CFBundleURLTypes; the Linux desktop
  entry declares x-scheme-handler/figcraft and passes %U.
- Join dialog: Escape closes it and no longer reaches the canvas (selection
  kept); its field has the keyboard when it opens.
- Docs: collab-protocol (browser client, links, mixed content), mcp,
  control-protocol, README, web hosting notes, collaboration wording in the
  progress docs (numbers unchanged).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:10:59 +07:00
Brandon Thomas a2bf43927f Release prep: 0.3.0 and linux-riscv64 release job (#108)
* Release prep: bump to 0.3.0; add linux-riscv64 release job

- release.yml: new linux-riscv64 job (cross-compiled on ubuntu-24.04 against ports.ubuntu.com
  riscv64 libraries, tar.gz only, CLI smoke-tested under qemu-riscv64), ported from GridCraft;
  the release job needs it so SHA256SUMS covers its tarball.
- packaging/linux/package.sh: CROSS_ARCH / CROSS_TARGET / CROSS_COMPILE / EMULATOR support.
- Version 0.2.0 -> 0.3.0 (cargo xtask version set), Cargo.lock refreshed.
- docs/releasing.md, docs/hardware-parity.md: list the riscv64 tarball.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CI: tell actionlint about the org's github-ubuntu-16core runner label

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:42:22 -04:00
Brandon Thomas 38a30d6aaf Packaging: fix AppRun test categories leftover
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:34:42 -04:00
Brandon Thomas b36fd771ab M0.9: MCP server + figcraft-cli, PDF export, web app, release/CI packaging, vector edit mode, workspace lint cleanup
- crates/mcp: JSON-RPC MCP server (18 tools, resources, prompts), headless and attached backends, end-to-end agent tests
- apps/figcraft-cli: info/export/convert/render/run/commands/mcp/perf
- crates/pdf: vector PDF export via krilla with embedded text; file.exportFramesPdf
- apps/figcraft-web + packaging/{macos,windows,linux,freebsd,web} + release/ci workflows
- engine vectoredit: edit points/handles/bend/add/delete-heal; canvas overlay and edit strip

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:31:53 -04:00