Repository navigation
add(tldraw offline): package the official Linux build as extra-data - #131
Merged
Merged
Conversation
Requested in #130. tldraw offline is an Electron whiteboard/diagramming app that stores documents as portable .tldraw files and works without a network connection. It is not on Flathub and upstream ships an official amd64 .deb. Packaging follows the registry's Electron pattern: the Electron base app for zypak (so Chromium keeps its internal sandbox), the vendor .deb fetched as pinned extra-data and unpacked by apply_extra, and a wrapper that execs the upstream binary unmodified. The .deb stages the app under "/opt/tldraw offline"; apply_extra renames only that directory, to a space-free path, and leaves its contents — including the `@tldesktop` binary name — untouched. The desktop file, icons, AppStream metainfo and a shared-mime-info file for application/x-tldraw are shipped at build time, since Flatpak exports those from the build rather than from extra-data fetched later on the user's machine. Sandbox: display, GPU, network (for the startup update check) and --filesystem=xdg-documents, which is what a document editor needs to save and reopen .tldraw files across restarts. The rest of $HOME is not granted; files kept elsewhere go through the portal file chooser, and .tldraw files opened from a file manager arrive through the document portal (the Exec ends in %U, so flatpak exports it with --file-forwarding). --filesystem=home and --socket=pulseaudio are documented as opt-in overrides in the metainfo. Verified locally: publish.sh --verify builds and installs from the signed local repo, check-apply-extra.sh passes the system-install path (root, no capabilities), and the app launches under zypak and renders its home screen. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
jing2uo
pushed a commit
that referenced
this pull request
Oct 11, 2026
131 of the 154 resolvers reach the GitHub API and every one of them already reads GITHUB_TOKEN, but neither workflow step that runs check-updates.sh sets it, so the calls go out anonymously against a 60-per-hour per-IP budget shared with everything else on the runner's egress address. A full sweep needs 131. In update-check #131 the 403s begin at app 47 of 154 and from there every resolver that reaches the API fails, 89 in all; the 19 that still resolve are the ones that never call it. None of the 89 are held back, so they keep their current pins, stay out of the held-back alert, and the run goes green.
This was referenced Oct 11, 2026
jing2uo
added a commit
that referenced
this pull request
Oct 11, 2026
A resolver or pin rewrite that failed only logged a warning: the app kept its pin, was in neither `changed` nor `held`, and the run went green. Update-check #131 lost 89 apps to the GitHub API rate limit that way without anyone seeing. check-updates.sh now appends each failure to $FAILED_OUT with its last stderr line. update-check turns that list into a single ci-alert issue for the whole batch, rewritten every run (new `ci-alert.sh sync`) so it always shows that day's failures and they can be fixed together in one PR; it closes once a sweep finishes with none. The run also goes red on resolver failures, like it already does for held-back pins.
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.
Closes #130.
tldraw offline is an Electron whiteboard and diagramming app built on tldraw's infinite canvas. There are no accounts and no servers — documents are portable
.tldrawfiles on disk and the app works without an internet connection. It is not on Flathub, and upstream publishes an official amd64.debon every release.Packaging
Standard registry Electron pattern:
org.electronjs.Electron2.BaseAppfor zypak, so Chromium keeps its internal sandbox instead of running--no-sandbox..deb(v1.11.0) is fetched as pinned extra-data from the upstream release, straight fromgithub.com/tldraw/tldraw-offline.apply_extraunpacks the.debdata member with bsdtar (--no-same-owner, per the system-install path) and stages the app tree. Upstream puts it under/opt/tldraw offline— the directory is renamed to a space-free/app/extra/tldraw-offline, and nothing inside it is touched, including the@tldesktopbinary name.zypak-wrapperwith--ozone-platform-hint=auto, and defensively unsetsELECTRON_RUN_AS_NODE.The desktop file, icons, AppStream metainfo and a shared-mime-info file for
application/x-tldraware shipped at build time, since Flatpak exports those from the build rather than from extra-data fetched later on the user's machine. The MIME file mirrors the definition upstream ships in the.deb, merged into one<mime-type>so both the.tldrawand.tldrglobs live under a single type.resolve-update.shmatches the version-independent asset nametldraw-offline-linux-amd64.debexactly and re-checks the resolved URL against the expected release path, so the AppImages, the macOS/Windows builds and the electron-updaterlatest*.ymlmetadata are all excluded.Sandbox
Granted:
--share=ipc,--socket=wayland,--socket=fallback-x11,--device=dri--share=network--filesystem=xdg-documents.tldrawfiles on disk: saving, reopening from the Home screen's recent list, and keeping working copies all need to survive restarts--unset-env=ELECTRON_RUN_AS_NODEunsetcannot--filesystem=xdg-documentsis the narrowest grant that makes the core feature work; the rest of$HOMEstays invisible. Files kept elsewhere go through the desktop portal's file chooser, and files passed on the command line arrive through the document portal rather than as raw host paths — the.desktopExecends in%U, so flatpak exports it with--file-forwarding.Not granted, documented as opt-in
flatpak overridecommands in the metainfo:--filesystem=home— for.tldrawfiles kept outside~/Documents, or to let a local coding agent reach the same paths the app does--socket=pulseaudio— audio in media embedded on a canvasNo sandbox-escape permission is used, so
policy.dangerous_permissionsis empty.Note for reviewers
.tldrawfiles can embed document scripts that run when the file is opened, and tldraw offline can be connected to a local coding agent that reads and edits documents. That is upstream's designed behavior, not something packaging adds — the payload is the vendor's own build, unmodified. It is called out in the metainfo description so it shows on the app page. The default sandbox keeps both confined to~/Documentsplus whatever the user picks through the portal.Upstream is closed source ("tldraw offline is not open source. All rights reserved."), which
policy.proprietary: trueand the metainfoproject_licensereflect.Testing
node scripts/read-descriptor.mjsandscripts/audit-descriptor.mjs— clean./scripts/publish.sh --verify com.tldraw.Offline— builds and installs from the signed local repo./scripts/check-apply-extra.sh com.tldraw.Offline— passes the system-install path (uid 0, all capabilities dropped, offline)./tests/run-tests.sh— 16/16 pass;./scripts/check-links.sh com.tldraw.Offline— all links OK.tldrawfile and reopening it were exercised by hand and behave normally.Not exercised: the arm64 build (upstream ships arm64 as an AppImage only, which is not an accepted artifact, so this package is
only-arches: x86_64).