Skip to content

feat(flatpak): list 4 screenshots in the metainfo, taken by make screenshots on a made-up vault - #127

Merged
bketelsen merged 2 commits into
mainfrom
irulan/flatpak-screenshots
Nov 4, 2026
Merged

bketelsen merged 2 commits into
mainfrom
irulan/flatpak-screenshots

Conversation

@frostyard-machines

@frostyard-machines frostyard-machines commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

The Flatpak's metainfo had no <screenshot>, so software centres and flatpak-index showed none. Brian (2026-11-03): "the flatpak metadata is missing screenshots for the frost* apps". Night line 14, desk T804.

What changes

  • packaging/flatpak/org.frostyard.Frostnotes.metainfo.xml lists 4 screenshots, each with a <caption>, at https://raw.githubusercontent.com/frostyard/frostnotes/main/docs/images/…:
    1. editor.png (type="default"): a note in the editor, with its properties, tasks and backlinks;
    2. search.png: search across the vault, with a recipe open;
    3. tasks.png: every open task in the vault, beside the note;
    4. dark.png: the dark theme, with a note's outline.
  • docs/images/: the 4 PNGs, 1280x800, 80 to 132 KB each.
  • make screenshots (dev/screenshots/) retakes them in the nsl machine. run.sh starts notesd with its own temporary data directory on a copy of dev/screenshots/vault (8 made-up notes: no real person, address or note), and Vite on 5173. Then shoot.py (Python standard library only, WebDriver is plain HTTP) drives the real UI in WebKitGTK, the desktop app's engine, through WebKitWebDriver and MiniBrowser under Xvfb. run.sh refuses to start when port 5173 is in use, so it never shoots another notesd's notes.
  • internal/packagecheck/flatpak_screenshots_test.go: the check. It fails when the metainfo has no screenshot, when the first is not type="default" or another one is, when a caption is empty, when a screenshot has no image, or when an image URL is not https, is on another host, or is not under /frostyard/frostnotes/main/. It also fails when the URL's file is not in the repository or is not a PNG. Software centres show the default first. appstreamcli validate fails on a missing default, but an http URL only gets an info, so the test checks both. A renamed or deleted image fails here before a software centre shows a broken link.
  • docs/design/app.md: 1 sentence on the screenshots and their check.

Not changed: the app ID, <releases>, stamp-version.sh, the manifest and the workflows. The Flatpak build's own appstreamcli validate --no-net still runs on the installed metainfo. The URLs are on main, so they resolve once this merges. --no-net does not fetch them.

Checks

  • make check: passes.
  • appstreamcli validate --no-net packaging/flatpak/org.frostyard.Frostnotes.metainfo.xml (AppStream 1.0.5): Validation was successful: pedantic: 1 (the existing cid-contains-uppercase-letter).
  • make screenshots in the frostnotes nsl machine: makes the 4 PNGs again from a clean state.

Revert test

On the committed metainfo, go test ./internal/packagecheck/ -run Screenshots:

  • First URL changed to http://: FAIL, screenshot 1 image 1 URL scheme is "http", want https. appstreamcli still passes this one.
  • type="default" removed: FAIL, the first screenshot is missing type="default". appstreamcli fails too: warnings: 1 (screenshot-default-missing).
  • docs/images/tasks.png moved away: FAIL, screenshot 3 image 1 file does not exist: docs/images/tasks.png.
  • Restored: ok.

TestFlatpakMetainfoScreenshotsRejects keeps 10 such cases in the suite, 1 for each rule.

After merge

The next v* tag runs .github/workflows/flatpak.yml. It builds the Flatpak with this metainfo and publishes and attests the OCI image, and flatpak-index then lists the screenshots. A push to main publishes nothing.

Cross-review

Reviewer openai/gpt-6.1-sol (coders Claude Opus and github-copilot/mai-code-2-flash), base 4772af58:

  • Head 7c219181: Ready, all 18 changed paths covered, including the 4 PNGs (demo vault only). 1 low, non-blocking finding: shoot.py started WebKitWebDriver before its cleanup, so a failed session start could leave the driver running.
  • Fixed in bb417c8b: the session starts inside the try, and the finally ends only a session that began, then terminates and waits for the driver. After the fix, make screenshots saved the 4 PNGs again, and a run with no Vite failed with "nothing named 'Projects'" and left no driver or browser process.
  • Re-review 1 at bb417c8b: Ready, Blocking: none.

Revert test (scratch worktree at the head, packaging/flatpak/org.frostyard.Frostnotes.metainfo.xml put back to the base, tests kept): go test ./internal/packagecheck/ -run Screenshots → FAIL TestFlatpakMetainfoScreenshots: metainfo has no screenshot.

CI: the first run of "Flatpak (build and test)" at bb417c8b failed while it updated the runner's GNOME SDK (Failed to update org.gnome.Sdk: Invalid cross-device link, then xvfb-run exit 139), before the app was built. The same job passed at 7c219181, and the rerun passed.

@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 4, 2026
@bketelsen
bketelsen merged commit 5675138 into main Nov 4, 2026
11 of 12 checks passed
@frostyard-machines
frostyard-machines deleted the irulan/flatpak-screenshots branch November 4, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants