Skip to content

fix(tldraw): resolve the launcher name from the payload (com.tldraw.Offline) - #163

Merged
jing2uo merged 2 commits into
mainfrom
fix/tldraw-launcher-rename
Jul 30, 2026
Merged

jing2uo merged 2 commits into
mainfrom
fix/tldraw-launcher-rename

Conversation

@jing2uo

@jing2uo jing2uo commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

What — fixes com.tldraw.Offline, which cannot be installed or updated right now, and closes the pipeline gap that shipped the break. Reported by @h1zardian in #130.

Fixes #130.

Why it broke — upstream renamed the Electron launcher inside its .deb: v1.11.0 shipped /opt/tldraw offline/@tldesktop, v1.12.0 renamed it to /opt/tldraw offline/tldraw-offline. apply_extra.sh asserted the old name and the wrapper execed it, so the daily pin refresh turned every install and update into:

Error: While trying to apply extra data: apply_extra script failed, exit status 256

The asset name never changed (tldraw-offline-linux-amd64.deb), so nothing upstream of the user's machine noticed. The currently published pin (v1.12.1) has the same layout, so this affects everyone with the app installed, not one reporter.

Fix — apply_extra reads the launcher out of the .desktop file upstream ships in the same .deb, whose Exec is an absolute path into the app directory (Exec="/opt/tldraw offline/tldraw-offline" %U), and records the resolved name beside the staged tree; the wrapper reads it from there. Nothing in the repo names the binary any more. The upstream tree is still staged byte-for-byte — the resolved name lives next to it, not inside it.

Why it reached users — check-apply-extra.sh is the only check that opens the payload, and it ran for apps a PR adds. The PRs that would need it are the automated pin refreshes, and those are opened with the default GITHUB_TOKEN, which does not trigger pr-checks at all — the auto-update PRs have run zero checks (gh pr checks on #156/#157/#160: "no checks reported"). A version bump was effectively unreviewed.

  • update-check.yml now unpacks each recomputed payload before pinning it, and holds back an app whose artifact no longer unpacks: it keeps its last installable pin, the PR body lists it with the reason, and the run goes red for a human. One broken upstream no longer blocks or poisons the rest of the batch.
  • release-dispatch.yml verifies its single app, skipping the download on the common "nothing moved" path.
  • pr-checks.yml widens the check from new apps to any app whose sha256 moved or whose apply_extra.sh changed.
  • check-apply-extra.sh grows INSTALL_RUNTIME=1 so a payload-only workflow can fetch the runtime instead of building the app first.

Sandbox — unchanged.

Verification

  • read-descriptor / audit-descriptor clean.
  • scripts/check-apply-extra.sh com.tldraw.Offline — the pinned v1.12.1 .deb unpacks as uid 0 with every capability dropped, launcher resolved to tldraw-offline.
  • scripts/publish.sh --verify com.tldraw.Offline — builds (appstreamcli compose Success), installs from the signed local repo.
  • Launch through zypak: home window shows, the app reports version 1.12.1, its own update check finds no newer release. /app/extra/launcher contains tldraw-offline.
  • Not verified: the held-back path in update-check.yml end to end — it only fires when an upstream artifact actually stops unpacking. The pieces it is built from (the check, the git checkout of one app dir) are exercised above and unchanged.

🤖 Generated with Claude Code

jing2uo and others added 2 commits July 30, 2026 22:30
…ffline)

tldraw offline v1.11.0 shipped its Electron launcher as `@tldesktop`, and both
apply_extra.sh and the wrapper named that file directly. v1.12.0 renamed it to
`tldraw-offline`. Pin refreshes are automated, so the rename went straight out:
apply_extra's binary assertion failed and every install and update since has
ended in `apply_extra script failed, exit status 256`. Reported in #130.

apply_extra now reads the launcher out of the .desktop file upstream ships in
the same .deb, whose Exec is an absolute path into the app directory, and
records the resolved name beside the staged tree. The wrapper reads it from
there. Nothing in the repo names the binary any more, so the next rename is a
non-event rather than a broken update for everyone who has the app installed.

The upstream tree itself is still staged byte-for-byte; the resolved name lives
next to it, not inside it.

Verified: apply_extra unpacks the pinned v1.12.1 payload as uid 0 with every
capability dropped, and the app builds, installs from the signed local repo and
launches through zypak.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Nothing in the pipeline looked inside an artifact a pin refresh had just
pinned. check-apply-extra.sh — the only check that opens the payload — ran for
apps a PR *adds*, and the auto-update PRs it would have to run in are opened
with the default GITHUB_TOKEN, which does not trigger pr-checks at all. So a
version bump reached users unopened, and #130 is what that costs: upstream
renamed a file inside the .deb and the app became uninstallable.

Both update workflows now unpack the new payload the way an install does before
the pin ships. The daily sweep holds back an app whose artifact no longer
unpacks — it keeps its last installable pin, the PR body says which and why, and
the run goes red for a human — instead of failing the whole batch or shipping
the break. release-dispatch verifies its single app, and skips the download on
the common "nothing moved" path.

pr-checks widens the same check from new apps to any app whose sha256 moved: a
new payload is a payload no unpack script has seen, whoever bumped it. New apps
still qualify, since their pins arrive as added lines.

check-apply-extra.sh grows INSTALL_RUNTIME=1 so a workflow that only checks
payloads can fetch the runtime instead of building the app first.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@jing2uo
jing2uo merged commit 2280e38 into main Jul 30, 2026
@jing2uo
jing2uo deleted the fix/tldraw-launcher-rename branch July 30, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tldraw offline desktop app to the repo

1 participant