Skip to main content

ADR-0007: Release the Web and Desktop Apps Together

Status: Accepted, implemented (first prod release through it: 6.0.2 on 2026-11-20; app.qubital.space moved to it on 2026-11-21)
Date: 2026-11-04
Deciders: Team

Context​

Until November 2026 the web app and the desktop app shipped by hand, each its own way.

  • The web app had no staging and no review on its way to prod. It ran on a temporary Northflank service built from a branch: every push to that branch was a prod deploy, with nothing in between, and the service sent no content security policy.
  • The desktop apps were built on a laptop and uploaded to R2 by hand, with no tag and no GitHub release. Nothing recorded which commit a version came from, and the Mac builds were signed ad hoc, not with a Developer ID and not notarized, so macOS's Gatekeeper stopped every fresh install until the user let it through.
  • Nothing kept the order. A web app built against a new backend API could go live before the backend that served it, and once did, in a hand release.
  • The backend already deployed through GitOps (ADR-0006); the apps had no path of their own.

Decision​

  • One image, built once, promoted by digest. Every merge to qubital-apps' main builds one web image for every environment and deploys it to staging through qubital-infra. A release copies that exact image to the prod package by digest; prod is never rebuilt (D19).
  • One version for both apps, from one commit staging ran. A release ships the web app and the desktop app together, under one X.Y.Z, from a commit whose staging deploy verify saw running (D22).
  • A candidate, then a publish. The candidate builds, signs and uploads everything without putting it live, and the team tests its exact files. Publish then puts it live in a fixed order: the web app; then the desktop files, the update manifests last among them; then the tag and the release (D22, D23).
  • The backend ships first. A release must pin a prod API contract of the major prod runs, and not above it (D19, D23).
  • On the Mac, a universal dmg to install and one update zip per chip (Intel, Apple silicon), each app signed with the Developer ID, notarized and stapled. On Windows, an NSIS installer, signed once the company can sign (D22).
  • Runtime config for the web app. The image writes /config.js from qubital-infra's webapp.json as its container starts. The desktop build takes the same values from production/webapp.json (D19, D22).
  • Release flags in the app's code, each with a staging and a production value, so unfinished work can merge to main (D23).
  • Rollback: the web app by a git revert in qubital-infra; the desktop app only forward (D23).

The decisions are recorded in qubital-infra's architecture. How it all works is in Web and Desktop Release.

Alternatives Considered​

  • Separate web and desktop releases — rejected: two version lines to track, and nothing to keep the desktop app on the same backend and the same prod values as the web app. A bug report naming a version would no longer name one set of code.
  • Rebuilding the web app for prod — rejected: prod would run bytes nobody tested. With the config read at runtime, one image serves every environment, so nothing needs a rebuild.
  • One universal Mac update zip — rejected: the zip compresses the app's main framework file, Intel code first, as one stream, so each update would download about 60 MB of unchanged code again. One zip per chip downloads only what changed; the dmg stays universal, so the download button needs no choice of chip.
  • A long-lived release branch — rejected: it goes against trunk-based development (ADR-0004), and fixes would have to be merged both ways. A release is a commit of main; an emergency hotfix branch lives only until its release is out.

Consequences​

  • Prod runs what staging ran: the same image, by digest, and only a commit whose staging deploy was verified and smoke-checked.
  • Testers test what customers get: the candidate's signed installers are the files publish puts live.
  • The release records itself: a tag and a GitHub release per version, naming the commit, the web image, the API contract and the qubital-infra commit the desktop config came from; the publish run's summary names the deploy commit.
  • Mac apps open without a warning, and update through the signed updater.
  • A release waits for both platforms. When the Mac build can't finish, during an Apple notarization outage for instance, the web release waits too.
  • The macOS runner minutes cost the most: GitHub bills a macOS minute at about ten times a Linux one, and the Mac job builds three apps. Moving it to a team Mac is one line of the workflow.
  • The desktop app picks up config only at a release. A runtime change reaches the web app at once and the desktop app with the next release.
  • Windows ships unsigned until the company can sign, so Windows SmartScreen warns on every fresh download.
  • Versions only go up: an abandoned candidate uses up its version, and an emergency hotfix holds staging until someone ends the hold.