feat(app): what's new after an update, drafted by the release tool (ADR 0030, D61)

halkyon_app's WhatsNew reads what each release changed from the app's
assets/whats_new/ (<version>.<language>.txt, English and German, a change
a line): after an update a sheet lists every release since the one the
device showed last, newest first, once; Settings shows the running
version's again, above About. Nothing on a fresh install.

tool/release.dart drafts the missing texts from the commits that count
after "Go on?" (German marked TRANSLATE:), opens them in the editor until
they fit (no mark left, F-Droid's 500 characters) and commits them with
the version. The English is the Forgejo notes' What's new, each language
F-Droid's changelog of the build, written at publishing and copied in by
tool/fdroid_repo.sh. Learn and Train bundle their texts, Learn's 0.22.0
and Train's 0.1.0 written to start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-31 19:36:20 +01:00
commit 7727317c68
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
14 changed files with 1272 additions and 76 deletions

View file

@ -67,7 +67,7 @@ A spaced-repetition learning app: studysets of flashcards, reviewed on an FSRS s
- **A green `main` deploys learn.halkyon.eu** through `deploy/redeploy.sh`, the only command `deploy`'s keys may run (pinned in its `authorized_keys`: the runner's from that server itself only, the developer's for deploys by hand). It deploys the commit CI checked while it is still the tip, as a fast-forward, only if every new commit is signed by a key in `deploy/allowed-signers` (the deployed copy decides), after dumping the database (the last 3 dumps stay in `~deploy/backups`: the way back from a deploy, not backups), applies the migrations in a run of their own before switching (`--role=maintenance --apply-migrations`: a failing migration stops the deploy while the old server keeps serving, so migrations must keep the old server working until the switch), and fails unless the new server answers. A failed deploy leaves the checkout at the deployed commit; run the workflow again to retry. By hand: `ssh sahaquiel-deploy <commit>`, the commit alone, as CI passes it (the server's checkout keeps its folder `halkyon-learn`, so the command the keys are pinned to stays). Never `docker compose down -v` there.- **From the single repository** (ADR 0015): learn.halkyon.eu deploys this repository's `main`, whichever app or shared package a push changed. Its images are built from the repository's root with only what they need (Learn's server and the module it builds on, with the module's client, which the module's tests depend on; the curator), each Dockerfile narrowing the workspace to those packages (`tool/workspace_only.sh`). The first deploy after the move starts the server once more than it needs to, as the deployed copy of `redeploy.sh` looks for migrations at their old path.
- **Sidecars** (`deploy/sidecars/README.md`, decided 2026-10-14): services an instance may run beside itself, each a compose file of its own beside `deploy/compose.yaml` (`compose.jellyfin.yaml`, `compose.languagetool.yaml`; later Fedify), switched on in `deploy/.env` (`COMPOSE_FILE=compose.yaml:compose.jellyfin.yaml`), so `redeploy.sh` deploys them with the instance. The instance's compose has two networks: `edge` (`halkyon-learn-edge`, 172.30.80.0/24 and the unique local fd4a:6c6b:7e80::/64, so Docker hands Caddy IPv6 visitors' own addresses), Caddy's at fixed addresses (172.30.80.2, fd4a:6c6b:7e80::2; the server's `TRUSTED_PROXIES`), shared with the server, and the internal default one, where the server reaches Postgres; a sidecar joins `edge` alone and publishes no port (the CI runner may reach `127.0.0.1`, never Docker's 172.16.0.0/12 or fd00::/8). A sidecar reached from outside mounts its site from `deploy/sidecars/` into Caddy's `/etc/caddy/sidecars/`, which the Caddyfile imports (none without), and `redeploy.sh` recreates Caddy when a site changes. Each runs as a user ID of its own (Jellyfin 61096, LanguageTool 61081), never one a person, another container or the runner uses; its files on the server are git-ignored (`deploy/jellyfin/`, `deploy/languagetool/`). The Jellyfin sidecar sets the server's `JELLYFIN_URL`, so the instance suggests it; the LanguageTool sidecar (ADR 0024) sets `LANGUAGETOOL_URL` and has no site, as LanguageTool has no sign-in: only the server reaches it, and logs nothing (`logging: none`).
- **Backups** (`deploy/backups.md`): every hour, `deploy/backup.sh` (a systemd timer, as `deploy`) dumps the database, which holds people's files too, then bundles each published studyset's repository (`git bundle`, from the server's `repositories` volume), and restic stores both in a Hetzner Storage Box (24 hourly, 7 daily, 4 weekly, 3 monthly); the box's own snapshots protect it from a taken-over server. A restore takes the instance back up to an hour, and people who started since lose what their device held: their app no longer finds its session and asks how to start, and an account made since is gone with it. So a change that makes devices lose their session, or keeps deleted people's data longer, changes what a restore costs; say so in `deploy/backups.md`.
- **Releases** are the project's, not an instance's: the release, the Snap Store listing and the F-Droid listing point to the project's page on Halkyon's website, halkyon.app/learn (its own repository, `project-halkyon/website`; learn.halkyon.app redirects there); the builds name learn.halkyon.eu, the project's instance (`SERVER_URL`), which a new install offers first (see *Instances*). They come from a developer's laptop, never from CI: `dart run tool/release.dart learn` on `main` as pushed and green in CI (the apps' shared release tool, ADR 0015, configured in `apps/learn/release.dart`; `--dry-run` shows the version, the commits that count, every step and the notes without changing anything). Build 21 (`v0.18.0`) was the last from `tool/release.sh`, the Bash script it replaced, removed since. Versions follow semantic versioning, worked out from the commits touching Learn since its last release (`apps/learn/`, the shared packages it uses, the root pubspec and lock, its release files, and its packages' folders at the root from before the move; `feat` raises the minor number, `fix`/`perf` the patch number, breaking ones the major from 1.0 on; other types release nothing), so **commit messages keep their type prefix**. It writes the version and a raised build number into the app's pubspec in a signed release commit (`chore(release): learn-vX.Y.Z`) with a signed tag (`learn-vX.Y.Z`, by a key in `deploy/allowed-signers`; Learn's earlier `vX.Y.Z` tags count as its history), builds one universal APK from a checkout of the tag, signed with the app's key, and the snap (`snap/snapcraft.yaml`, the committed HEAD, built in LXD), both with `SERVER_URL=https://learn.halkyon.eu/`; signs `SHA256SUMS` with GPG; pushes only once both builds passed their checks; and publishes on code.halkyon.app through Forgejo's API and in the F-Droid repository. The snap goes to the Snap Store's edge channel last (`storeChannel` in `apps/learn/release.dart`; the release refuses to start unless `snapcraft whoami` shows a login). A run that stopped after its release commit and tag carries on with them. The key's password and the Forgejo token are asked for at each run and never stored. The app's key is a PKCS #12 keystore outside the repository (also in the maintainer's password manager); there is no Google Play, so it is the app's identity: lost, installed apps can't be updated. Its certificate's SHA-256 is in `tool/release/android-certificate.sha256`, and the release tool releases no APK signed otherwise; other release builds fall back to the debug key (`android/app/build.gradle.kts`), so `flutter run --release` works anywhere. The APK also goes into the project's own F-Droid repository, https://halkyon.app/fdroid/repo, through `tool/fdroid_repo.sh` (fdroidserver v2.4.5): its settings and the app's listing are in `tool/release/fdroid/` (the anti-feature NonFreeNet declared with its reasons and F-Droid's own icon; not TetheredNet, as the app chooses its instance); its index is signed with a key of its own (a PKCS #12 keystore beside the app's, password asked for, certificate pinned in `tool/release/fdroid-index-certificate.sha256`, since a new key makes the F-Droid app refuse the repository); and it is uploaded to the halkyon.app server (`ssh ramiel-fdroid`) as the user `fdroid`, whose key can only write into the folder Caddy serves (rrsync), the APKs first and the indexes last.
- **Releases** are the project's, not an instance's: the release, the Snap Store listing and the F-Droid listing point to the project's page on Halkyon's website, halkyon.app/learn (its own repository, `project-halkyon/website`; learn.halkyon.app redirects there); the builds name learn.halkyon.eu, the project's instance (`SERVER_URL`), which a new install offers first (see *Instances*). They come from a developer's laptop, never from CI: `dart run tool/release.dart learn` on `main` as pushed and green in CI (the apps' shared release tool, ADR 0015, configured in `apps/learn/release.dart`; `--dry-run` shows the version, the commits that count, every step and the notes without changing anything). Build 21 (`v0.18.0`) was the last from `tool/release.sh`, the Bash script it replaced, removed since. Versions follow semantic versioning, worked out from the commits touching Learn since its last release (`apps/learn/`, the shared packages it uses, the root pubspec and lock, its release files, and its packages' folders at the root from before the move; `feat` raises the minor number, `fix`/`perf` the patch number, breaking ones the major from 1.0 on; other types release nothing), so **commit messages keep their type prefix**. It writes the version and a raised build number into the app's pubspec in a signed release commit (`chore(release): learn-vX.Y.Z`) with a signed tag (`learn-vX.Y.Z`, by a key in `deploy/allowed-signers`; Learn's earlier `vX.Y.Z` tags count as its history), builds one universal APK from a checkout of the tag, signed with the app's key, and the snap (`snap/snapcraft.yaml`, the committed HEAD, built in LXD), both with `SERVER_URL=https://learn.halkyon.eu/`; signs `SHA256SUMS` with GPG; drafts what's new in the release for the developer to edit, committed with the version in `assets/whats_new/` (Train's ADR 0030, D61: the sheet after the update, Settings' entry above About, the notes and F-Droid's changelog); pushes only once both builds passed their checks; and publishes on code.halkyon.app through Forgejo's API and in the F-Droid repository. The snap goes to the Snap Store's edge channel last (`storeChannel` in `apps/learn/release.dart`; the release refuses to start unless `snapcraft whoami` shows a login). A run that stopped after its release commit and tag carries on with them. The key's password and the Forgejo token are asked for at each run and never stored. The app's key is a PKCS #12 keystore outside the repository (also in the maintainer's password manager); there is no Google Play, so it is the app's identity: lost, installed apps can't be updated. Its certificate's SHA-256 is in `tool/release/android-certificate.sha256`, and the release tool releases no APK signed otherwise; other release builds fall back to the debug key (`android/app/build.gradle.kts`), so `flutter run --release` works anywhere. The APK also goes into the project's own F-Droid repository, https://halkyon.app/fdroid/repo, through `tool/fdroid_repo.sh` (fdroidserver v2.4.5): its settings and the app's listing are in `tool/release/fdroid/` (the anti-feature NonFreeNet declared with its reasons and F-Droid's own icon; not TetheredNet, as the app chooses its instance); its index is signed with a key of its own (a PKCS #12 keystore beside the app's, password asked for, certificate pinned in `tool/release/fdroid-index-certificate.sha256`, since a new key makes the F-Droid app refuse the repository); and it is uploaded to the halkyon.app server (`ssh ramiel-fdroid`) as the user `fdroid`, whose key can only write into the folder Caddy serves (rrsync), the APKs first and the indexes last.
## Rules the code relies on

View file

@ -0,0 +1,4 @@
- Wähle, wie viel ein Assistent nachdenkt, und finde die Assistenten nach Anbieter.
- Ein Budget für alle deine Assistenten statt eines für jeden.
- Betreiber vergeben Assistenten an mehrere Personen auf einmal, jede mit einem Budget.
- Die Rechtschreibprüfung kommt von selbst zurück, eine Minute nachdem LanguageTool nicht antwortete.

View file

@ -0,0 +1,4 @@
- Choose how much an assistant thinks, and find the assistants by provider.
- One budget for all your assistants, instead of one each.
- Operators grant assistants to several people at once, each with one budget.
- Spell checking comes back by itself a minute after LanguageTool didn't answer.

View file

@ -1,5 +1,6 @@
import 'dart:io';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:halkyon_app/halkyon_app.dart';
import 'package:halkyon_learn_flutter/src/app/app_icon_license.dart';
@ -42,15 +43,24 @@ Future<void> main() async {
);
await instances.load(usedBefore: device.storage.usedBefore());
runApp(
InstanceGate(
frame: learnFrame,
choice: instances,
// Only an instance of Halkyon Learn: one of another Halkyon app's
// answers too, but holds nothing of this app's.
checker: ServerpodInstanceChecker(app: 'learn'),
open: (instance) => Dependencies.create(instance, device),
readLook: () async => (await device.deviceSettingsStore.read()).look,
app: const LearnSessions(),
WhatsNewScope(
whatsNew: WhatsNew(
AssetWhatsNewSource(rootBundle),
FileWhatsNewStore(File(p.join(device.support, 'whats_new.json'))),
version: device.appVersion.version,
),
// An instance chosen before: the app ran on this device already.
usedBefore: instances.current != null,
child: InstanceGate(
frame: learnFrame,
choice: instances,
// Only an instance of Halkyon Learn: one of another Halkyon app's
// answers too, but holds nothing of this app's.
checker: ServerpodInstanceChecker(app: 'learn'),
open: (instance) => Dependencies.create(instance, device),
readLook: () async => (await device.deviceSettingsStore.read()).look,
app: const LearnSessions(),
),
),
);
}

View file

@ -1,4 +1,5 @@
import 'package:go_router/go_router.dart';
import 'package:halkyon_app/halkyon_app.dart';
import 'package:halkyon_learn_flutter/l10n/app_localizations.dart';
import 'package:halkyon_ui/halkyon_ui.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
@ -40,26 +41,29 @@ class const AppShell({
child: Icon(data),
)
: Icon(data);
return NavigationFrame(
appName: l10n.appTitle,
// The kingfisher has a white background, which the frame's rounded
// tile keeps reading on light and dark rails alike.
icon: const AssetImage('assets/icon/halkyon_icon.png'),
selectedIndex: navigationShell.currentIndex,
onSelected: (index) => navigationShell.goBranch(
index,
initialLocation: index == navigationShell.currentIndex,
// After an update, what's new shows once.
return WhatsNewOnUpdate(
child: NavigationFrame(
appName: l10n.appTitle,
// The kingfisher has a white background, which the frame's rounded
// tile keeps reading on light and dark rails alike.
icon: const AssetImage('assets/icon/halkyon_icon.png'),
selectedIndex: navigationShell.currentIndex,
onSelected: (index) => navigationShell.goBranch(
index,
initialLocation: index == navigationShell.currentIndex,
),
hidesNavigationBar: hidesNavigationBar,
destinations: [
for (final destination in destinations)
(
label: destination.label,
icon: icon(destination, destination.icon),
selectedIcon: icon(destination, destination.selectedIcon),
),
],
child: navigationShell,
),
hidesNavigationBar: hidesNavigationBar,
destinations: [
for (final destination in destinations)
(
label: destination.label,
icon: icon(destination, destination.icon),
selectedIcon: icon(destination, destination.selectedIcon),
),
],
child: navigationShell,
);
}
}

View file

@ -106,10 +106,17 @@ class const SettingsScreen({super.key}) extends StatelessWidget {
const SizedBox(height: 12),
SectionCard(
padding: const EdgeInsets.symmetric(vertical: 8),
child: ListTile(
leading: const Icon(LucideIcons.info),
title: Text(l10n.settingsAbout),
onTap: () => showAbout(context),
child: Column(
children: [
// What changed in this version, as shown once after
// the update (halkyon_app's).
const WhatsNewTile(),
ListTile(
leading: const Icon(LucideIcons.info),
title: Text(l10n.settingsAbout),
onTap: () => showAbout(context),
),
],
),
),
const SizedBox(height: 24),

View file

@ -187,6 +187,10 @@ flutter:
# https://flutter.dev/assets-and-images/#from-packages
assets:
- assets/config.json
# What each release changed, one file a release and language
# (<version>.<language>.txt), drafted by tool/release.dart and edited
# (Halkyon Train's ADR 0030, D61): halkyon_app's What's new shows them.
- assets/whats_new/
# The kingfisher, Halkyon's emblem: atop the navigation rail and on the launch
# screen.
- assets/icon/halkyon_icon.png

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
- Die erste Version von Halkyon Train: Zeichne dein Training auf, plane Routen und Intervallpläne und behalte deine Tage vom Polar Loop, alles versiegelt.

View file

@ -0,0 +1 @@
- The first release of Halkyon Train: record your workouts, plan routes and interval plans, and keep your days from the Polar Loop, everything sealed.

View file

@ -1,5 +1,6 @@
import 'dart:io';
import 'package:flutter/services.dart';
import 'package:halkyon_app/halkyon_app.dart';
import 'package:halkyon_train_flutter/src/app/licences.dart';
import 'package:halkyon_train_flutter/src/app/train_app.dart';
@ -32,12 +33,21 @@ Future<void> main() async {
);
await instances.load(usedBefore: device.storage.usedBefore());
runApp(
TrainApp(
choice: instances,
// Only an instance of Halkyon Train: one of another Halkyon app's
// answers too, but holds nothing of this app's.
checker: ServerpodInstanceChecker(app: 'train'),
open: (instance) => TrainDependencies.create(instance, device),
WhatsNewScope(
whatsNew: WhatsNew(
AssetWhatsNewSource(rootBundle),
FileWhatsNewStore(File(p.join(device.support, 'whats_new.json'))),
version: device.appVersion,
),
// An instance chosen before: the app ran on this device already.
usedBefore: instances.current != null,
child: TrainApp(
choice: instances,
// Only an instance of Halkyon Train: one of another Halkyon app's
// answers too, but holds nothing of this app's.
checker: ServerpodInstanceChecker(app: 'train'),
open: (instance) => TrainDependencies.create(instance, device),
),
),
);
}

View file

@ -133,20 +133,28 @@ class const SettingsScreen({super.key}) extends StatelessWidget {
const SizedBox(height: 12),
SectionCard(
padding: const EdgeInsets.symmetric(vertical: 8),
child: ListTile(
leading: const Icon(LucideIcons.info),
title: Text(l10n.aboutTitle),
// halkyon_app's About: the app's name and icon, the
// source of what the instance runs, which both
// licences ask to offer, and the licence list.
onTap: () => showAppAbout(
context,
icon: const Image(
image: trainIcon,
width: 48,
height: 48,
child: Column(
children: [
// What changed in this version, as shown once after
// the update (halkyon_app's, D61).
const WhatsNewTile(),
ListTile(
leading: const Icon(LucideIcons.info),
title: Text(l10n.aboutTitle),
// halkyon_app's About: the app's name and icon,
// the source of what the instance runs, which
// both licences ask to offer, and the licence
// list.
onTap: () => showAppAbout(
context,
icon: const Image(
image: trainIcon,
width: 48,
height: 48,
),
),
),
),
],
),
),
const SizedBox(height: 24),

View file

@ -21,7 +21,8 @@ import 'package:material_ui/material_ui.dart';
/// off as the app opens is offered to be saved or discarded, whichever tab
/// shows, and one under way stands above the bar on every tab
/// ([RecordingBar]); GPX files Android hands Train are brought in as routes (D45), and
/// Health Connect's links to Train's rationale are followed (D31).
/// Health Connect's links to Train's rationale are followed (D31). After an
/// update, what's new shows once (halkyon_app's [WhatsNewOnUpdate], D61).
class const TrainShell({
/// The tabs' navigators, from `StatefulShellRoute`.
required final StatefulNavigationShell shell,
@ -81,7 +82,7 @@ class const TrainShell({
child: shell,
);
final listening = HealthConnectListener(
child: RouteFilesListener(child: frame),
child: RouteFilesListener(child: WhatsNewOnUpdate(child: frame)),
);
if (!records) {
return listening;

View file

@ -97,6 +97,10 @@ flutter:
# The instance the build names, unless --dart-define=SERVER_URL=… does
# (serverpod_flutter's getServerUrl).
- assets/config.json
# What each release changed, one file a release and language
# (<version>.<language>.txt), drafted by tool/release.dart and edited
# (ADR 0030, D61): halkyon_app's What's new shows them.
- assets/whats_new/
# The app's icon, Lucide's bike (ADR 0031), and Lucide's licence for the
# licence list (the repository's tool/app_icons.py writes both).
- assets/icon/halkyon_train_icon.png