Repository navigation
feat(flatpak): build the desktop app as a Flatpak in CI - #97
Merged
Merged
Conversation
…kages, and hash the generators' requirements
… and ask the Background portal from a helper
…s lock and the portal helper
# Conflicts: # Makefile
frostyard-machines
marked this pull request as ready for review
October 26, 2026 19:58
bketelsen
approved these changes
Oct 26, 2026
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Core Plan 0010 Phase 5, first step, frostnotes only: the desktop app as a Flatpak built in CI from offline sources (ADR-0031, core ADR-0058).
What it adds
packaging/flatpak/org.frostyard.Frostnotes.json:org.gnome.Platform//51, with Go, Node 24 and Rust from the SDK extensions. Offline sources:cargo-sources.json(flatpak-cargo-generator),node-sources.json(an offline pnpm store, flatpak-node-generator),go-sources.json(tools/flatpakgo, afile://GOPROXY).make flatpak-sources(scripts/flatpak-sources.sh) regenerates the 3 files from the lockfiles, with flatpak-builder-tools at a pinned commit, its Python dependencies fromgenerator-requirements.txt(pip --require-hashes), and a local patch (patches/pnpm-git-path.patch) that stores only the#path:subdirectory of the 2 git-hosted lodge packages./app/bin/frostnotes). When no notesd answers, it startsfrostnotes --background(notesd only) in a new sandbox of the app through the Flatpak portal (flatpak-spawn, no--watch-bus), so notesd lives on after the window closes, until logout. Without the portal it starts no notesd of its own and says so; the app shows that notesd is not running. It thenexecs the app.frostnotes --backgroundat login. It stays on the bus until the portal answers (a one-shotgdbus callwould cancel the request).$XDG_RUNTIME_DIR/app/org.frostyard.Frostnotes/frostnotes/notesd.sock, the one directory all the app's sandboxes share (internal/configandpaths.rs, with tests). Soflatpak run --command=notesctl org.frostyard.Frostnotesworks.org.freedesktop.secrets(device tokens) and--filesystem=homefor the vault folders (the document portal gives no inotify events and no stable path for a daemon; ADR-0031 has the reasons)..github/workflows/flatpak.yml: a sources check (regenerate, thengit diff --exit-code) and the build withrun-tests(Rust tests,desktop-file-validate,appstreamcli validate, and a smoke test: launcher → notesd →notesctl vault add/write/cat).Not in this PR: the publish
A later PR adds the
v*tag publish, as igloo's workflow does: export the OCI image, push it toghcr.io/frostyard/frostnotes(vX.Y.Z,sha-<commit>, thenlatest), and attest the digest. Brian must then:frostyard/frostnotespublic after its first push.FLATPAK_INDEX_DISPATCH_TOKENin this repository, so the remote refreshes at once.apps.jsonin frostyard/flatpak-index.Notes for Brian
Flatpak (build and test)andFlatpak sources (make flatpak-sources)there if they must gate merges.go.mod,Cargo.lockorpnpm-lock.yamlnow needsmake flatpak-sources, else the sources job fails.flatpak-spawn, the Background request) have no automated test: the build sandbox has no portal. Check them on Snow (Plan 0010's "Done when").distto the rootdirsource'sskiplist in the manifest, so a localmake deboutput is not copied into the Flatpak build.Review
Cross-review: coder
github-copilot/claude-sonnet-5.5, revieweropenai/gpt-6.1-sol. Initial review (2 batches) plus 3 re-reviews; 6 blocking findings, all resolved. Final: Ready at7f1f23b(basef232d56), Blocking: none. CI green at that head, with the Flatpak tests (Rust tests,desktop-file-validate,appstreamcli validate, the smoke test).