Skip to content

Update, announcement and sunset messaging

Every installed Homefelt app, from the first store build on, can hear “please update”, “the server is down”, “something new” and “this is ending”.

Summary

  • One static feed, https://homefelt.io/app-status/v1.json. It is a file in the repo, deployed by Vercel with the marketing site, so it answers even when the game server is down or not hosted. The schema, examples and selection cases live in spec/app-status/. Swift, Kotlin and the web each implement one pure select(feed, context) and pass the same cases.
  • Fail open, and block online play, not the app. An unreachable feed never stops a game. A protocol break blocks online play only ("blocks": "online"), because solo and same-screen games are local. Blocking the whole app is kept for the end of a sunset.
  • TLS, no signature, strict client limits. The feed holds plain text, links to allowlisted hosts and a fixed set of actions. A signature would need an offline key whose loss silences every installed app, and on Android a crypto dependency (minSdk 29 predates platform Ed25519).
  • The server enforces later, spec first. From day one the hello carries client: {platform, app, version, protocol}, which today’s server ignores. Once hosted, the server answers updateRequired (close 4426) below the minimum. The feed warns, and the server is the backstop.
  • Messages wait for a safe point: the home screen, the end of a hand or game over. Only a blocking message interrupts, and the game is saved after every move.

Decisions

Eduardo decided these on 2026-11-25.

  1. Where the feed lives: https://homefelt.io/app-status/v1.json, deployed with the marketing site. A site rollback also rolls the feed back; the runbook says so.
  2. Integrity: TLS only, no signature, with the strict client limits below.
  3. Android updates: the store action opens the Play Store listing. No Play In-App Updates (checkpoint 6 is not planned); it can be reconsidered after the first Play release.
  4. Sunset promise: at least 90 days of notice, then 30 days of read-only online play (games in progress finish, none start) with an export of the player’s server data, then the final state. Games on the device keep working throughout.
  5. “What’s new” comes from the feed (whatsNew, shown once after an update), so it can be corrected or translated after release.
  6. Who publishes: only Eduardo, through a PR that he merges (CODEOWNERS on the feed).
  7. Languages: every message carries English and Spanish; the schema rejects a message missing either, and selection falls back to English for any other locale.
  8. Versions: dates for the apps, semantic versions for the APIs (decision 0013, issue #226):
    • The apps’ marketing version (MARKETING_VERSION, versionName) is the release day as YYYY.M.D, three integers without leading zeros (2026.12.3). Apple requires at most three period-separated non-negative integers, and the feed’s versions ranges compare the three parts as numbers, so date order is version order. A second store release on the same day takes the next day’s date.
    • The build number (CURRENT_PROJECT_VERSION, versionCode) is YYYYMMDDNN, NN the build of that day from 01 (2026120301). It always increases, as both stores require, and stays below Google Play’s versionCode limit of 2,100,000,000 until the end of 2099.
    • The CLI/server protocol and the feed schema carry semantic versions MAJOR.MINOR.PATCH. A change that an older client cannot handle (a removed or renamed field, a new required field, a changed meaning) bumps MAJOR; an addition old clients safely ignore bumps MINOR; a fix with no shape change bumps PATCH. The feed URL carries the schema’s major (v1.json).
    • The server’s updateRequired (checkpoint 7) refuses a hello when its client.protocol major differs from the server’s, or when client.version, compared as a date version, is below that platform’s minimum in HOMEFELT_MIN_CLIENT_VERSIONS.

Use cases

Use case Kind Severity Shape
Soft update update warning versions below the latest; action store; daily
Required update (protocol break) update blocking below the minimum; blocks: online; matches the server’s 4426
Maintenance maintenance warning all versions, starts and ends; online play greyed out
Announcement (new game, rule change) announcement info once, optional link
Sunset sunset info, warning, blocking dated messages plus a flag (below)
Kill switch none none a flag, not a message, optionally with one
What’s new whatsNew info trigger: afterUpdate, once, never after a fresh install

A sunset of a game, an app version or the whole service runs in four dated stages:

  1. Advance notice, 90 days or more before: info, shown once, saying what ends and when.
  2. Read-only, 30 days: warning, shown daily, and the newOnlineTables flag off, so games in progress finish but none start. Once the server can export results, its action links to a homefelt.io page about it.
  3. Final state: blocking, blocks: "online", with no ends, so clients keep it cached. The text says “Games on this phone still work, and your saved game stays here.”
  4. App retired: only then does blocks: "app" appear.

The feed

The live file is site/public/app-status/v1.json, which Astro copies as is. A change that breaks old clients goes to v2.json, served beside v1 for as long as v1 clients exist.

{
"schema": "1.0.0",
"messages": [
{
"id": "canasta-online-1-3",
"revision": 1,
"kind": "update",
"severity": "blocking",
"blocks": "online",
"target": {
"platforms": ["ios", "android"],
"apps": ["canasta"],
"versions": { "below": "2027.3.1" }
},
"starts": "2027-04-01T08:00:00Z",
"text": {
"en": {
"title": "Please update Canasta",
"body": "To keep playing with friends online, install the new version. Games on this phone still work.",
"action": "Update"
},
"es": {
"title": "Actualiza Canasta",
"body": "Para seguir jugando en línea con tus amigos, instala la nueva versión. Las partidas en este teléfono siguen funcionando.",
"action": "Actualizar"
}
},
"action": { "kind": "store" },
"repeat": "everyLaunch"
}
],
"flags": [
{ "id": "newOnlineTables", "enabled": false, "target": { "apps": ["canasta"] },
"starts": "2027-04-01T08:00:00Z" }
]
}

Fields (spec/app-status/README.md pins each one):

  • id and revision: dismissals are stored per id@revision; bump the revision to show it again.
  • kind: update, maintenance, announcement, sunset or whatsNew. severity: info, warning or blocking. blocks: online or app, on blocking messages only.
  • target; a field left out matches everything.
    • platforms: ios, android or web.
    • apps: game ids from the registry (canasta). On the web, the message shows on that game’s pages only.
    • versions: { "from": "2026.12.1", "below": "2027.3.1" }, inclusive then exclusive. This is a plain range rather than npm syntax, so three platforms parse it alike: one to three decimal parts, missing parts 0, no pre-release tags.
    • locales: language tags, matched by language (es matches es-MX).
  • starts and ends: optional, RFC 3339 UTC, compared with the device clock. A message past its ends is dropped, even from the cache.
  • text: language tag to { title, body, action? }, with en required. The fallback runs from the exact tag to the language to en, the chain in the parallel i18n plan. The title is at most 60 characters and the body 280, as plain text with no markup.
  • action.kind:
    • store opens the platform’s own store page, which the app knows.
    • link opens an https:// URL on homefelt.io or play.homefelt.io only.
    • continue closes the message.
    • Each kind has a default label in the app, so text.*.action is optional.
  • repeat: once, daily or everyLaunch. Blocking messages cannot be dismissed. trigger: "afterUpdate" shows a message only when the previous launch ran an older version.
  • flags: { id, enabled, target?, starts?, ends? }. Each app compiles in the flags it knows, with defaults (onlinePlay, newOnlineTables, invites), and ignores unknown ids.

Two levels of strictness. spec/app-status/schema.json (JSON Schema 2020-12) is strict for authors: additionalProperties: false, the enums, the lengths, an en text and a valid URL. Clients are lenient, so the format can grow:

  • they ignore unknown fields;
  • they skip a message whose kind, severity, blocks or action.kind they do not know;
  • they treat a feed over 64 KiB, or with a schema other than 1.x.y, as unreachable.

The exact rules are in spec/app-status/README.md (#228), which wins where this plan is less precise.

Spec layout, following the existing invalid/ pattern:

spec/app-status/
README.md fields, selection rules, wording rules with good and bad examples
schema.json authoring schema
examples/*.json one valid feed per use case (soft, required, maintenance, sunset-*, kill, whats-new)
cases/*.json { "feed": "examples/sunset-final.json",
"context": { "platform": "android", "app": "canasta", "version": "2027.2.14",
"previousVersion": "2027.2.1", "locale": "es-MX",
"now": "2027-04-02T10:00:00Z", "dismissed": { "x@1": "2027-04-01T10:00:00Z" } },
"expect": { "blocking": "canasta-online-1-3", "banner": null, "sheet": null,
"flags": { "newOnlineTables": false }, "language": "es" } }
spec/invalid/app-status/*.json each breaks one rule; expected.json gives the failure text

Selection:

  1. Filter by target and dates, and drop dismissed messages.
  2. The first blocking message, in feed order, wins.
  3. Otherwise there is at most one banner (warning) and one sheet (info), each the latest by starts.

It is platform code, named for Homefelt (architecture.md):

  • Swift: a Foundation-only HomefeltStatus target with AppStatus.swift.
  • Kotlin: a JVM module, kotlin/status, with AppStatus.kt.
  • Web: web/src/status/appStatus.ts.

Integrity: TLS or a signed payload

TLS only (decided) TLS plus an Ed25519 signature
On-path tampering stopped (App Transport Security; https only on Android) stopped
A hijacked Vercel, GitHub or DNS account not stopped stopped while the key stays offline
Cost none an offline key, signing before each commit, two embedded public keys for rotation; on Android 29–32 Tink or Bouncy Castle, since Signature has Ed25519 from API 33
Worst failure a bad feed until the next deploy (minutes) a lost key: no installed app can be told anything again

CryptoKit verifies Ed25519 from iOS 13, so iOS would be cheap. Android would not, and the key would be a single point of failure for a mechanism whose job is to work at the end. I recommend TLS only for v1, with the clients capping the harm: text only, allowlisted links, no remote images, and blocks: "app" honoured only on sunset messages. Whoever can hijack the deploy can already replace the web game. Revisit if the feed moves to a third-party CDN or others get merge rights; a signed feed would be v2.json.

Client behaviour

  • Fetch on launch and on return to the foreground, at most every 15 minutes, in the background. The first screen never waits for it.
  • Cache the last good body with its ETag, and send If-None-Match; a 304 keeps the cache. Vercel serves static files from its CDN for the life of a deployment. Confirm with curl -sI after the first deploy that it sends an ETag; without one, it is a plain GET of a few KB.
    • iOS: an ephemeral URLSession of the feed’s own, never URLSession.shared.
    • Android: OkHttp, a client derived with newBuilder() from the app’s one OkHttpClient.
    • Web: fetch with credentials: "omit".
    • Each platform’s network layer and the feed’s StatusClient: decision 0015 (Swift HomefeltNet, Kotlin kotlin/net, web web/src/net).
  • Timeout budget: 3 seconds to connect, 5 in total, no retries. A failure leaves the cache as it is.
  • Fail open. No feed and no cache means no messages and the compiled flag defaults. A cache applies when the fetch fails, including a cached blocking message until its ends, so a phone offline after a sunset still shows the final state.
  • No tracking. A bare GET with no query, no cookies and User-Agent: Homefelt, because Android’s default user agent names the device model. Targeting happens on the device. Vercel still sees the IP, so add a line to site/src/pages/privacy.astro and the Play data-safety form.
  • Android needs INTERNET. The manifest has none today. It is a normal permission, with no prompt.
  • Test hooks, Debug only, after CANASTA_UI_TEST_SEED and UiTestLaunch:
    • HOMEFELT_STATUS_FEED (a fixture path from spec/app-status/examples; the UI tests pass the feed itself in HOMEFELT_STATUS_FEED_TEXT, since a simulator app cannot open files on an external volume) and HOMEFELT_STATUS_NOW;
    • HOMEFELT_STATUS_URL, for a Vercel branch preview;
    • HOMEFELT_STATUS_FRESH (a first launch), HOMEFELT_STATUS_PREVIOUS_VERSION and HOMEFELT_STATUS_VERSION;
    • on Android the UI tests set the same through UiTestStatus (a feed read from the test APK’s assets, which carry spec/app-status);
    • on the web, Playwright’s page.route serves the fixtures.
  • A server 4426 shows the same “update to play online” view, with text built into the app.

Server-side enforcement (future protocol change, spec first)

The hello (spec/protocol/server.md) already ignores unknown fields, so clients send this from their first release:

{"type":"hello","token":"<access token>","client":{"platform":"ios","app":"canasta","version":"2027.2.1","protocol":"1.0.0"}}

Once the server is hosted (#50), the spec adds:

{"type":"error","error":{"kind":"client","code":"updateRequired","message":"updateRequired",
"context":{"platform":"ios","minimum":"2027.3.1"}}}
  • A new error kind, client, and close code 4426 (after HTTP 426 Upgrade Required).
  • HOMEFELT_MIN_CLIENT_VERSIONS=ios=2027.3.1,android=2027.3.1. A platform left out has no minimum, as the always-latest web does.
  • A hello with no client is refused with updateRequired (decided in #233: the web ships with the server and the apps send client from their first store build, so no switch is needed).
  • Optionally, a Homefelt-Client header on the HTTP endpoints gets 426, so an old app learns before it creates a table.

How it fits with the feed. The feed warns early and reaches offline phones; the server is the gate for whoever missed it. The runbook order:

  1. Ship in both stores.
  2. Warn for two weeks.
  3. Publish the blocking message.
  4. Raise the minimum the same day, never before App Review has passed.

Store-native options

Decided: the store link only on both platforms (decision 3). The Play option is kept here for when it is reconsidered.

  • Android: Play In-App Updates (not planned) (com.google.android.play:app-update and -ktx 2.1.0).
    • AppUpdateManager.appUpdateInfo reports UPDATE_AVAILABLE, and startUpdateFlowForResult runs IMMEDIATE (full screen; Play installs and restarts) or FLEXIBLE (background download, then completeUpdate()).
    • Priority is set only through the Play Developer API.
    • It works only for Play installs and is tested through internal app sharing.
    • The feed stays the authority: the store action starts FLEXIBLE for a warning and IMMEDIATE for a blocking message when Play offers an update, and opens the listing otherwise.
  • iOS has no update API. SKStoreProductViewController shows a store page but cannot check for or force an update. The store action opens https://apps.apple.com/app/id<appleId> with openURL, so the in-app message plus a store link is the whole mechanism.

The web

  • Same feed, platform web. site/vercel.json gives /app-status/(.*) four headers: Content-Type: application/json; charset=utf-8, Cache-Control: public, max-age=60, Access-Control-Allow-Origin: * (public data, read from play. and from web previews) and X-Content-Type-Options: nosniff.
  • Reload check.
    • A small Vite plugin writes dist/version.json ({ "build": "<commit sha>" }) and defines the same id in the bundle; web/vercel.json serves the file with no-cache.
    • The tab checks it on becoming visible and every 30 minutes. At the next safe point it says: “Homefelt has been updated. Reload to get the new version.”
    • Reloading is safe: the solo game is saved after every move, and an online seat returns with the next hello.
  • Lazy chunks. A tab opened before a deploy can fail to import() the game’s engine, so it handles Vite’s vite:preloadError by reloading.
  • Not Skew Protection. It needs Pro, does not support Vite, and never tells a tab that a new version exists.

Authoring and publishing

  • Edit site/public/app-status/v1.json, which starts as {"schema":"1.0.0","messages":[],"flags":[]}. Copy entries from spec/app-status/examples/.
  • Check with bin/test app-status, which bin/test site also runs. It validates the feed and examples against the schema with spec/behaviour/app-status.ts (no dependencies), and checks that each ends follows its starts, that ids are unique and that link hosts are allowed.
  • Preview (from #230) with bin/app-status preview --platform android --version 2027.2.1 --locale es --now 2027-04-02, which prints what that client would show, using the web’s select.
    • For the look on the web: npm run dev in web/ with ?statusFeed=, in dev builds only.
    • On native: a Debug build with HOMEFELT_STATUS_FEED.
  • Who publishes: whoever merges to main, which means Eduardo. Add CODEOWNERS for site/public/app-status/ and spec/app-status/. An emergency is a feed-only PR.
  • Caveat: an Instant Rollback of the homefelt project rolls the feed back too.

UI

  • Banner (warning): in the layout at the top of the home and hand-score screens, never an overlay. It has one action, plus “Not now” when it can be dismissed.
  • Sheet (info): SwiftUI .sheet or Compose ModalBottomSheet, with scrolling content.
  • Blocking view: for online it replaces the online entry points, and solo play stays. For app it replaces AppView’s content, with no close button and no swipe to dismiss.
  • Large text: the theme’s textSizes and its large set, as elsewhere. Nothing is truncated, everything scrolls, and buttons stack at large sizes, at least Theme.Control.buttonHeightStandard tall.
  • VoiceOver and TalkBack:
    • titles are headings (.isHeader, semantics { heading() });
    • a new banner is announced politely (AccessibilityNotification.Announcement, liveRegion = Polite);
    • a blocking view takes focus on its title;
    • severity is a word (“Important”), never colour alone;
    • a link says where it goes.
  • Never mid-hand. Non-blocking messages queue until the home screen, the hand score or game over.
  • Wording for older players:
    • Say first what happens to their game.
    • One idea per sentence, one action.
    • Write dates out (“Thursday 1 April”).
    • No version numbers, “server”, “protocol” or “error”.
    • No exclamation marks, capitals or countdowns.
    • Reassure: “Your saved game is safe.”

Phased plan

Each checkpoint is one issue and one PR. Before any of them reaches a store build, both apps switch to date versions (#226).

  1. Spec (M), #228: spec/app-status/ with the README, schema, examples, cases and invalid files.
  2. Feed hosting (S), #229:
    • the empty live feed;
    • the site/vercel.json headers;
    • bin/test app-status checking the live file, and CODEOWNERS for the feed and its spec.
  3. Selection on three platforms (M), #230: HomefeltStatus, kotlin/status and web/src/status, each passing every case, and bin/app-status preview, which needs the web’s select.
  4. Native client, day one, before the first store release (L), #231:
    • fetch, cache and timeout;
    • Android INTERNET;
    • the banner, sheet and blocking views in both apps;
    • the Debug hooks, and UI tests for soft update, required update, maintenance and sunset;
    • the privacy page line;
    • client in every hello, once the apps have a server client.
  5. Web (M), #232: feed messages, the reload banner and vite:preloadError, with Playwright checks, on the web’s network layer and per-service clients (decision 0015; web/README.md “Network and app-status messages”).
  6. Play In-App Updates: not planned (decision 3).
  7. Server enforcement (M), once hosted (#50), #233: the spec, then canasta-server, then each client’s 4426 handling.
  8. Runbook (S), #234: docs/app-status.md for an update, maintenance and a sunset.

Open questions

All eight were answered by Eduardo on 2026-11-25 and are recorded under Decisions.

Sources (opened 2026-11-23; versioning rules opened 2026-11-25):