Skip to content

build(release): remove AppImage distribution#503

Merged
yandy-r merged 3 commits into
mainfrom
feat/remove-native
Jun 12, 2026
Merged

build(release): remove AppImage distribution#503
yandy-r merged 3 commits into
mainfrom
feat/remove-native

Conversation

@yandy-r

@yandy-r yandy-r commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove AppImage and CLI release distribution surfaces so Flatpak is the only published package.
  • Keep the production Tauri no-bundle binary build as the Flatpak staging primitive.
  • Preserve Flatpak migration and host gateway behavior for existing users.

Changes

  • Add scripts/build-release-binary.sh and repoint Flatpak packaging/release CI to it.
  • Delete AppImage-only builder, launcher, icon-sync, Arch PKGBUILD, and release artifact paths.
  • Disable Tauri bundling and remove the AppImage WebKit startup workaround.
  • Update install, build, release, and agent docs for Flatpak-only distribution.

Testing

  • bash -n scripts/build-release-binary.sh scripts/build-native.sh scripts/build-flatpak.sh scripts/install-native-build-deps.sh scripts/lib/build-paths.sh
  • jq empty package.json src/crosshook-native/src-tauri/tauri.conf.json
  • ruby -e require-yaml check for .github/workflows/release.yml and packaging/flatpak/dev.crosshook.CrossHook.yml
  • cargo test --manifest-path src/crosshook-native/Cargo.toml -p crosshook-core
  • cargo fmt --manifest-path src/crosshook-native/Cargo.toml --all -- --check
  • cd src/crosshook-native && npm run typecheck
  • cd src/crosshook-native && npm test
  • ./scripts/lint.sh --shell --host-gateway
  • ./scripts/build-release-binary.sh
  • ./scripts/build-flatpak.sh --skip-build --strict
  • production mock sentinel grep
  • Prettier checks for markdown, YAML, JSON, .mdc, and .cursorrules

@yandy-r yandy-r added area:build MSBuild, project files, CI feat:flatpak Feature: Flatpak distribution target labels Jun 11, 2026
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 838612eb-2ea0-4e84-8995-6ea16c69d838

📥 Commits

Reviewing files that changed from the base of the PR and between d650388 and db2fce6.

📒 Files selected for processing (5)
  • CONTRIBUTING.md
  • docs/architecture/adr-0004-flatpak-per-app-isolation.md
  • docs/getting-started/quickstart.md
  • docs/internal-docs/profile-collections-browser-mocks.md
  • src/crosshook-native/src/lib/mocks/README.md

📝 Walkthrough

Walkthrough

Transition the repository from AppImage-centric packaging to Flatpak-first: add a release-binary build script, delegate/remove native/AppImage build artifacts and container flows, update Flatpak build and CI release jobs, disable Tauri bundling, remove AppImage startup paths, and update docs and helper scripts to Flatpak semantics.

Changes

Flatpak-only distribution transition

Layer / File(s) Summary
Release-binary build entrypoint
scripts/build-release-binary.sh
New Bash script to build the Tauri release binary (no-bundle) for a target triple, optionally install native deps, and stage the binary into dist/ with a target-triple marker.
Build script migration & dependency tooling
scripts/build-native.sh, scripts/install-native-build-deps.sh, scripts/lib/build-paths.sh, scripts/lib/sync-tauri-icons.sh (removed), scripts/build-native-container.sh (removed), scripts/build-native-container.Dockerfile (removed), scripts/lint.sh
Deprecate/convert build-native.sh into a shim delegating to build-release-binary.sh; update install-native-build-deps.sh package lists and messages for release-binary builds; remove AppImage-specific helpers (icon sync, appimage-bundle-dir helper); and fix shell file discovery in lint.sh.
Flatpak build script updates
scripts/build-flatpak.sh, packaging/flatpak/README.md
Rewire Flatpak build to consume staged release-binary, install icon/asset tool dependencies, check cached crosshook-native.target-triple, and proceed into icon staging; update Flatpak packaging README and local/CI guidance.
GitHub release workflow and publish
.github/workflows/release.yml, .github/pull_request_template.md
Replace build-native with build-release-binary, add a step to build the release binary for Flatpak staging, remove AppImage/CLI artifact packaging and upload, and update job dependencies and PR checklist to reference release-binary and Flatpak rebuild/strict steps.
Runtime packaging and startup cleanup
src/crosshook-native/src-tauri/src/lib.rs, src/crosshook-native/src-tauri/tauri.conf.json, src/crosshook-native/crates/crosshook-cli/src/args.rs, various crates/crosshook-core doc comments
Disable Tauri bundling in config; remove AppImage-specific WebKitGTK re-exec path; retain WebKit env gating; and update doc comments and CLI help text to reflect Flatpak and legacy-import semantics.
Documentation and policy alignment
README.md, CONTRIBUTING.md, AGENTS.md, .cursor/rules/project.mdc, .cursorrules, .ai/rules/project.md, AGENTS.md, CLAUDE.md, docs/* (ADR files, quickstart, internal-build-publish, mocks, steam-deck checklist, PRD), packaging/PKGBUILD (removed)
Update all user-facing, contributor, and agent docs to declare Flatpak as the published distribution, remove AppImage instructions, change build commands to build-release-binary.sh + build-flatpak.sh --rebuild --strict, reframe legacy/AppImage-era data import wording, and remove the packaging PKGBUILD artifact.
NPM scripts and packaging artifacts
package.json
Add flatpak:binary script pointing to scripts/build-release-binary.sh and remove obsolete build:binary/build:appimage entries.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title "build(release): remove AppImage distribution" is clear, specific, and accurately summarizes the main objective of the PR: removing AppImage as a distribution target while keeping Flatpak as the only published package.
Description check ✅ Passed The PR description provides a comprehensive Summary section, detailed Changes listing, and explicit Testing section with syntax/format checks and build verification steps. It aligns well with the template's core requirements despite using a different testing structure than the template's checklist format.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added platform:linux Linux (non-Steam Deck) type:build Build system or CI/CD changes type:refactor Code refactoring, no functional change labels Jun 12, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
docs/internal-docs/profile-collections-browser-mocks.md (1)

41-51: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Sync this CI snippet with the current workflow check.

The snippet around Line 46 documents an older sentinel list and omits the JS-asset existence guard now present in .github/workflows/release.yml. Please update it so docs match the actual release gate.

Suggested doc update
 - name: Verify no mock code in production bundle
   run: |
-    if grep -rl '\[dev-mock\]\|getMockRegistry\|registerMocks\|MOCK MODE' \
+    if ! compgen -G "src/crosshook-native/dist/assets/*.js" > /dev/null; then
+      echo "::error::No JS assets found under src/crosshook-native/dist/assets/ — build output missing or glob did not match" >&2
+      exit 1
+    fi
+    if grep -rl '\[dev-mock\]\|getMockRegistry\|registerMocks\|MOCK MODE\|__MOCK_VALIDATION_ERROR__\|__MOCK_VALIDATION_WARNING__' \
         src/crosshook-native/dist/assets/*.js 2>/dev/null; then
       echo "::error::Mock code found in production bundle — refusing to ship"
       exit 1
     fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/internal-docs/profile-collections-browser-mocks.md` around lines 41 -
51, Update the docs' verify:no-mocks snippet so it exactly matches the workflow:
include the JS-asset existence guard around the grep and use the same sentinel
pattern the workflow currently checks for (i.e., the grep pattern used in the
verify:no-mocks job), and keep the same asset glob
(src/crosshook-native/dist/assets/*.js) and error behaviour; specifically change
the code block to first test for JS assets' existence (the guard used in
verify:no-mocks) and then run the grep with the exact sentinel regex currently
used by the workflow (replacing the older
'\[dev-mock\]\|getMockRegistry\|registerMocks\|MOCK MODE' list) so the docs and
the verify:no-mocks job are identical.
src/crosshook-native/src/lib/mocks/README.md (1)

116-117: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove the /home/... examples from the mock README.

The fixture-lint job already rejects developer-home-path strings in mock fixture docs, so this file will keep failing CI until those examples are rewritten to synthetic prefixes like /mock/.... This matches the CI failure reported for mock fixture files.

Suggested fix
-- File paths: use `/home/devuser/…` or `/mock/…` prefixes. No real system
--   paths.
+- File paths: use `/mock/…` prefixes or other synthetic placeholders. No real
+  system paths.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/crosshook-native/src/lib/mocks/README.md` around lines 116 - 117, Remove
all `/home/...` developer-home-path examples from the mocks README and replace
them with synthetic prefixes (e.g. `/mock/...`); specifically update the line
that currently reads "**File paths**: use `/home/devuser/…` or `/mock/…`
prefixes." to eliminate `/home/devuser` examples (use `/mock/...` consistently),
ensure no strings matching developer home paths remain, and re-run fixture-lint
to confirm the mock README no longer triggers the CI rejection.

Source: Pipeline failures

CONTRIBUTING.md (1)

116-117: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Point the style section at the repo’s actual formatter/linter config.

The section now says cargo fmt and cargo clippy use standard defaults, but this repo uses src/crosshook-native/rustfmt.toml and workspace lints in src/crosshook-native/Cargo.toml. Please update the wording so contributors don’t run the wrong config surface.

Suggested wording
- - **Formatting**: `cargo fmt` (standard defaults -- no `rustfmt.toml`)
- - **Linting**: `cargo clippy` (standard defaults -- no `clippy.toml`)
+ - **Formatting**: `cargo fmt` (uses `src/crosshook-native/rustfmt.toml`)
+ - **Linting**: `cargo clippy` (workspace lints in `src/crosshook-native/Cargo.toml`)

As per coding guidelines, Rust formatting and linting are driven by the repo-specific configs, not the defaults.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CONTRIBUTING.md` around lines 116 - 117, Update the Formatting/Linting lines
that currently state "cargo fmt (standard defaults -- no rustfmt.toml)" and
"cargo clippy (standard defaults -- no clippy.toml)" in CONTRIBUTING.md to point
contributors at the repo-specific configs: mention that Rust formatting uses
src/crosshook-native/rustfmt.toml and linting is driven by the workspace
settings in src/crosshook-native/Cargo.toml (and instruct running cargo fmt /
cargo clippy which will pick up those configs), replacing the current "standard
defaults" wording so contributors use the repo configs.

Source: Coding guidelines

docs/getting-started/quickstart.md (1)

131-131: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep the Flatpak sandbox path separate from the legacy host import path.

Both docs still present ~/.config/crosshook/ as the normal storage location, but that path is only the legacy/AppImage import source. Fresh Flatpak installs store live config in the sandboxed app directory, so the quickstart and release notes should name the legacy path explicitly or switch to the Flatpak path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/getting-started/quickstart.md` at line 131, Update the quickstart and
release notes to distinguish the legacy AppImage/config import path from the
Flatpak sandbox path: leave the legacy path as `~/.config/crosshook/...` but
explicitly mark it as "legacy/AppImage import source", and add the Flatpak
live-config examples using the sandboxed paths (e.g.
`~/.var/app/<flatpak-id>/config/crosshook/profiles/` and
`~/.var/app/<flatpak-id>/.local/share/crosshook/prefixes/<slug>/`), and adjust
the prose around the Install Game flow (the paragraph that currently references
`~/.config/crosshook/profiles/` and `~/.local/share/crosshook/prefixes/<slug>`)
so it shows both paths and which installer type uses each.

Source: Linked repositories

docs/architecture/adr-0004-flatpak-per-app-isolation.md (1)

104-111: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Reword the reset-path caveat.

A --delete-data reset does not duplicate tap state on its own; it re-imports the current host tree. The real risk is that sandbox-only changes are lost and host-side edits become the new source of truth after the reset.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/adr-0004-flatpak-per-app-isolation.md` around lines 104 -
111, Update the "Sandbox reset triggers re-import" caveat so it accurately
explains that `flatpak uninstall --delete-data` simply re-imports the current
host tree and does not by itself duplicate tap state; specifically replace the
sentence starting with "A `flatpak uninstall --delete-data` removes the sandbox
tree; the next Flatpak launch re-imports from the host (idempotent, but the
operation runs again and may duplicate community tap state if the host tree
changed in the interim)." with wording that emphasizes the real risk:
sandbox-only changes are lost and host-side edits become the new source of truth
after the reset, and clarify that duplication of tap state only occurs if the
host tree itself changed in the interim, not as a direct consequence of the
reset operation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture/adr-0001-platform-host-gateway.md`:
- Around line 9-13: The ADR's example list conflates game-process wrappers with
general host utilities; update the paragraph describing CrossHook so tools that
must "interact with a game process" are listed separately (e.g. gamescope,
MangoHud, winetricks, umu-run) and move general host utilities (e.g. git,
unshare) into a distinct clause or example list to keep the contract precise and
scoped to process-interaction vs general host tooling. Ensure the sentence
describing CrossHook's role (mentions of CrossHook, Proton/Wine, and "host
process") is preserved and only the example grouping is split for clarity.

In `@README.md`:
- Around line 174-182: Update the README's Flatpak build example to ensure the
release binary is refreshed; change the command or instruct to run the release
build first so build-flatpak.sh won't reuse a cached binary. Specifically either
call ./scripts/build-release-binary.sh before running ./scripts/build-flatpak.sh
--strict, or update the example to ./scripts/build-flatpak.sh --rebuild --strict
so build-flatpak.sh will regenerate the release binary rather than packaging a
potentially stale one.

In `@scripts/build-flatpak.sh`:
- Around line 212-226: The cached release binary at BINARY_PATH
("$DIST_DIR/crosshook-native") is not keyed by TARGET_TRIPLE, so
build-flatpak.sh may reuse a wrong-architecture binary; update build-flatpak.sh
to verify the cached binary matches the current TARGET_TRIPLE by reading a
marker file (e.g. "$DIST_DIR/crosshook-native.target-triple") and only reuse the
cache when the marker content equals $TARGET_TRIPLE (otherwise treat as missing
and rebuild), and update scripts/build-release-binary.sh to write that marker
immediately after copying the built binary (write "$TARGET_TRIPLE" into
"$DIST_DIR/crosshook-native.target-triple") so the check can succeed on
subsequent runs.

---

Outside diff comments:
In `@CONTRIBUTING.md`:
- Around line 116-117: Update the Formatting/Linting lines that currently state
"cargo fmt (standard defaults -- no rustfmt.toml)" and "cargo clippy (standard
defaults -- no clippy.toml)" in CONTRIBUTING.md to point contributors at the
repo-specific configs: mention that Rust formatting uses
src/crosshook-native/rustfmt.toml and linting is driven by the workspace
settings in src/crosshook-native/Cargo.toml (and instruct running cargo fmt /
cargo clippy which will pick up those configs), replacing the current "standard
defaults" wording so contributors use the repo configs.

In `@docs/architecture/adr-0004-flatpak-per-app-isolation.md`:
- Around line 104-111: Update the "Sandbox reset triggers re-import" caveat so
it accurately explains that `flatpak uninstall --delete-data` simply re-imports
the current host tree and does not by itself duplicate tap state; specifically
replace the sentence starting with "A `flatpak uninstall --delete-data` removes
the sandbox tree; the next Flatpak launch re-imports from the host (idempotent,
but the operation runs again and may duplicate community tap state if the host
tree changed in the interim)." with wording that emphasizes the real risk:
sandbox-only changes are lost and host-side edits become the new source of truth
after the reset, and clarify that duplication of tap state only occurs if the
host tree itself changed in the interim, not as a direct consequence of the
reset operation.

In `@docs/getting-started/quickstart.md`:
- Line 131: Update the quickstart and release notes to distinguish the legacy
AppImage/config import path from the Flatpak sandbox path: leave the legacy path
as `~/.config/crosshook/...` but explicitly mark it as "legacy/AppImage import
source", and add the Flatpak live-config examples using the sandboxed paths
(e.g. `~/.var/app/<flatpak-id>/config/crosshook/profiles/` and
`~/.var/app/<flatpak-id>/.local/share/crosshook/prefixes/<slug>/`), and adjust
the prose around the Install Game flow (the paragraph that currently references
`~/.config/crosshook/profiles/` and `~/.local/share/crosshook/prefixes/<slug>`)
so it shows both paths and which installer type uses each.

In `@docs/internal-docs/profile-collections-browser-mocks.md`:
- Around line 41-51: Update the docs' verify:no-mocks snippet so it exactly
matches the workflow: include the JS-asset existence guard around the grep and
use the same sentinel pattern the workflow currently checks for (i.e., the grep
pattern used in the verify:no-mocks job), and keep the same asset glob
(src/crosshook-native/dist/assets/*.js) and error behaviour; specifically change
the code block to first test for JS assets' existence (the guard used in
verify:no-mocks) and then run the grep with the exact sentinel regex currently
used by the workflow (replacing the older
'\[dev-mock\]\|getMockRegistry\|registerMocks\|MOCK MODE' list) so the docs and
the verify:no-mocks job are identical.

In `@src/crosshook-native/src/lib/mocks/README.md`:
- Around line 116-117: Remove all `/home/...` developer-home-path examples from
the mocks README and replace them with synthetic prefixes (e.g. `/mock/...`);
specifically update the line that currently reads "**File paths**: use
`/home/devuser/…` or `/mock/…` prefixes." to eliminate `/home/devuser` examples
(use `/mock/...` consistently), ensure no strings matching developer home paths
remain, and re-run fixture-lint to confirm the mock README no longer triggers
the CI rejection.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68f58363-18c2-4236-8a03-4d54cd9c90b0

📥 Commits

Reviewing files that changed from the base of the PR and between d0576dc and 131514c.

📒 Files selected for processing (41)
  • .ai/rules/project.md
  • .cursor/rules/project.mdc
  • .cursorrules
  • .github/pull_request_template.md
  • .github/workflows/release.yml
  • AGENTS.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • README.md
  • docs/architecture/adr-0001-platform-host-gateway.md
  • docs/architecture/adr-0002-flatpak-portal-contracts.md
  • docs/architecture/adr-0003-proton-download-manager.md
  • docs/architecture/adr-0004-flatpak-per-app-isolation.md
  • docs/getting-started/quickstart.md
  • docs/internal-docs/local-build-publish.md
  • docs/internal-docs/profile-collections-browser-mocks.md
  • docs/internal-docs/steam-deck-validation-checklist.md
  • docs/prps/prds/flatpak-distribution.prd.md
  • package.json
  • packaging/PKGBUILD
  • packaging/flatpak/README.md
  • scripts/build-flatpak.sh
  • scripts/build-native-container.Dockerfile
  • scripts/build-native-container.sh
  • scripts/build-native.sh
  • scripts/build-release-binary.sh
  • scripts/generate-crosshook-desktop.sh
  • scripts/install-native-build-deps.sh
  • scripts/lib/build-paths.sh
  • scripts/lib/sync-tauri-icons.sh
  • scripts/lint.sh
  • src/crosshook-native/crates/crosshook-cli/src/args.rs
  • src/crosshook-native/crates/crosshook-core/Cargo.toml
  • src/crosshook-native/crates/crosshook-core/src/flatpak_migration/mod.rs
  • src/crosshook-native/crates/crosshook-core/src/platform/detect.rs
  • src/crosshook-native/crates/crosshook-core/src/platform/gateway.rs
  • src/crosshook-native/crates/crosshook-core/src/platform/mod.rs
  • src/crosshook-native/crates/crosshook-core/src/platform/xdg.rs
  • src/crosshook-native/src-tauri/src/lib.rs
  • src/crosshook-native/src-tauri/tauri.conf.json
  • src/crosshook-native/src/lib/mocks/README.md
💤 Files with no reviewable changes (5)
  • scripts/generate-crosshook-desktop.sh
  • scripts/lib/sync-tauri-icons.sh
  • scripts/build-native-container.Dockerfile
  • scripts/build-native-container.sh
  • packaging/PKGBUILD

Comment thread docs/architecture/adr-0001-platform-host-gateway.md Outdated
Comment thread README.md
Comment thread scripts/build-flatpak.sh
@coderabbitai coderabbitai Bot added the priority:high Important, fix soon label Jun 12, 2026
@yandy-r yandy-r merged commit 3fff5f0 into main Jun 12, 2026
8 of 9 checks passed
@yandy-r yandy-r deleted the feat/remove-native branch June 12, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:build MSBuild, project files, CI feat:flatpak Feature: Flatpak distribution target platform:linux Linux (non-Steam Deck) priority:high Important, fix soon type:build Build system or CI/CD changes type:refactor Code refactoring, no functional change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant