Skip to content

feat: per-platform usage stats: Desktop downloads and Android MAU - #71

Draft
Bilb wants to merge 4 commits into
mainfrom
feat/platform-stats
Draft

Bilb wants to merge 4 commits into
mainfrom
feat/platform-stats

Conversation

@Bilb

@Bilb Bilb commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Usage figures per platform, and one monthly post with each platform and a total.

iOS is not in yet. App Store Connect's App Sessions report counts unique devices per row (app version × device × OS × territory × source), so summing rows may count a device twice; it follows on this branch once a month's sum is checked against the App Analytics website's figure.

Desktop: in the mau post, and release-stats removed

  • The post lists the latest stable Desktop release's downloads per platform: Linux (.deb, .AppImage, .rpm, .freebsd, plus Flathub installs since the release day), macOS (.dmg, .zip), Windows (.exe). Desktop has no active-user count.
  • Flathub builds from the GitHub .deb on its own servers, so its installs are not already in GitHub's counts. Homebrew's cask downloads the GitHub .dmg, so it is left out.
  • Flathub keeps 180 days of daily installs; the run fails on an older release rather than undercount.
  • release-stats and its on-demand per-release CSVs are gone: the monthly post is the one place Desktop downloads are counted. On the host, /var/lib/session-ops/release-stats/ is left for whoever wants its last CSVs.

Android: new mau job

  • Google exposes Play's MAU through no API or bucket export, only the Statistics page's CSV export. Someone exports the saved report monthly and rsyncs it into /var/lib/session-ops/mau/inbox/.
  • Each export merges into a daily history.json, so exports can overlap or cover any range; a later export wins and the post lists any revised day. Unreadable files go to rejected/ and fail the run.
  • Last month posts once its last day is in the history (Play trails by about eight days). The timer on the 10th at 11:00 Melbourne, an hour clear of the queue's posts, posts a reminder until then. A month is posted once.
  • The post adds the Desktop downloads above, and a total of Android's MAU and those downloads.

watch in jobs.toml

  • A glob under the job's state directory. session-ops units writes a session-ops@<job>.path drop-in (PathExistsGlob=), and install.sh creates the inbox owned by the job's account and enables the path unit for ready jobs.
  • The job must move matching files out, or the path unit starts it again.

Deploy

  • /etc/session-ops/mau.env: MAU_DISCORD_WEBHOOK_URL, and MAU_INBOX_HOST for the reminder's rsync command. The job stays disabled until the file has content.

Tests: uv run --locked python -m unittest discover -s tests -t . (807 OK), ruff check . clean.

Bilb added 4 commits October 7, 2026 11:37
release-stats also writes desktop-platform-totals.csv: Linux (GitHub
.deb, .AppImage, .rpm, .freebsd plus Flathub installs since the release
day), macOS (.dmg, .zip) and Windows (.exe) for the latest stable
release.
The mau job merges each Play Console MAU export dropped into its inbox
into a daily history and posts last month once its last day is in,
with the change on the month before; from the 10th it posts a reminder
until then. A job may now watch a glob under its state directory: a
matching file starts it through a session-ops@<job>.path unit.
Desktop has no active-user count, so the post lists the latest stable
release's downloads per platform and adds them to Android's MAU for the
total. The timer moves to 11:00, an hour clear of the queue's posts.
The monthly post is now the one place Desktop downloads are counted,
so release-stats and its per-release CSVs go.
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.

1 participant