Skip to content

Release v1.49.0 - #1428

Merged
MBombeck merged 674 commits into
mainfrom
release/v1.49.0
Nov 23, 2026
Merged

MBombeck merged 674 commits into
mainfrom
release/v1.49.0

Conversation

@MBombeck

@MBombeck MBombeck commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

1.49 doesn't come alone. The iPhone and iPad app 1.7 is in TestFlight at the same time, and it's the biggest update the app has had since it launched. On the server, medications now behave the same wherever you log a dose, and a new push relay lets the App Store app deliver notifications from your own server. Most of the rest started as one of your issues or as an answer in the "What would you change?" thread (#1116). This is also the last release that comes out whenever it happens to be ready. From here on there's a fixed rhythm, explained right below, so an update lands when you have time for it, not in the middle of your week. See you on a Saturday for 1.50.

Releases on Saturdays

Until now a fix went out the day it was ready, and some days that meant two releases. From here on there is one feature release a month, on the first Saturday, plus fixes on the other Saturdays when there are any. 1.50.0 comes on the first Saturday of the first month that starts at least three weeks after this release. Security problems, lost data and installs that do not start don't wait for a Saturday: they get a fix as soon as it is ready, and the notes say why. If you want a fix before its Saturday, every push to main publishes an :edge image (amd64). What this means for updating is in Updates and deploy, and the rules are in the release policy.

The app: 1.7 for iPhone, iPad and iPhone Duo

1.7 is in TestFlight now and goes to the App Store once it has been tested against this server release. What's in it:

  • A timeline that puts medications, symptoms, seizures, lab results and measurements on one time axis, each in its own lane, much like a clinical chart. Pinch to zoom from a week out to everything, turn the phone sideways for more room, and open it from the sidebar, More, Insights or healthlog://timeline. It is at its best on an iPad.
  • On the iPad and in wide windows there is a sidebar beside the page, and the screens use the width instead of stretching a phone layout.
  • The app knows the iPhone Duo, folded and open.
  • Spanish is the fifth app language.
  • It understands everything new on the server: one answer per dose on every device, the server's dose windows, the reminder steps for every scheduled medication, the push relay with its own consent, and a Live Activity the relay can start and update.

Medications

If you log doses in more than one place, on the web, on the phone, through Telegram or through an automation that calls the medication hook, those places did not always agree. A dose could end up recorded twice, and the phone could still say "due" when the web already said "taken". Each scheduled dose now has exactly one answer. Recording it a second time changes nothing and says it was already taken, an undo only removes your own entry, and the update merges the duplicates that are already in your history, keeping a take over a skip.

The words match too. A dose card has Take and Skip, and a dose is pending, due, overdue, taken, taken late, skipped or missed, in the app, in Telegram, in push notifications and in the doctor report. "Remind me later" meant 1 or 3 hours in Telegram, 15 minutes on the iPhone, and didn't exist on the web. It is one setting under Settings > Notifications now, from 10 minutes to two hours (Remind me later), and every Telegram reminder offers your own length in your language. A snooze holds only the dose it answers.

The Take button does what it says. "Take (19:00)" counts for the 19:00 dose even when you are early, and the confirmation tells you which dose the take went to. More than six hours ahead the button reads "Take an extra dose", so nothing is booked against a dose you didn't mean. A medication you have just added shows "No doses yet" where it used to show 100 % adherence and a streak it hadn't earned. And a take logged on the web in the first minute after a page loaded could be confirmed and still go missing. That is fixed.

Finding the leaflet for a medication used to mean a search engine and some guessing. Every medication now has a "Find leaflet" button that opens the official medicine registry of your country in a new tab, with the name already searched for where the registry allows it. Twelve registries are in, from Poland's RPL to the EMA. You pick yours on the medication or under Settings > Modules > Medications, whatever language the app is in. Once you have found the right leaflet, paste its link onto the medication and it is one tap away from then on. Your server never talks to a registry: the button is a plain link, and your browser does the rest (official leaflets). Thanks to @ferges123 for the idea and the homework behind it. (#1430)

The medication list can be grouped by category, with a search field and filters for category and treatment period above it. That one is also from @ferges123, who wrote it and sent the pull request. (#1425)

Logging a dose uses one form on the medications page, in the history and in the capture menu, and it tells you before you save which dose the entry counts for. Setting up a medication asks less, and the reminder steps (Due, Still due, Overdue, Missed) work for every scheduled medication and no longer just for GLP-1 courses. A medication's own page has take, skip and snooze for the next dose, which @2q2code missed after tapping a reminder.

Your phones hear about more of this. A dose recorded anywhere reaches every paired device, and so does a change to the medication itself. A take or skip you undo arrives as open again, so your other phone doesn't keep showing a dose as answered. A guardian's phone hears about a managed profile's doses too; over the relay it catches up when the app opens, so the relay never learns when someone else's doses are recorded. If your server uses the push relay described below, its medication reminders reach every iPhone the server is meant to remind: one set to server delivery, one that follows an account set that way, and one whose own reminder plan has run out.

The new push relay

This one is entirely optional, and nothing changes for you unless you turn it on.

Apple only delivers a push to the App Store app when it is signed with the key of whoever publishes the app, and a self-hosted server does not have that key. So far that meant your server could not confirm a dose on your other phone, tell it to refresh, or end a Live Activity, unless you built the app yourself. The push relay fills that gap. It is a server I run for HealthLog in Germany, on Hetzner Cloud in Falkenstein, hardened and kept to that one job. It exists because of your donations: they pay for it, and without them I could not offer it. It is free for private and household use, and none of you has to run anything for it.

Your server seals every notification for the one device it is meant for before it leaves, end to end. The relay passes it on to Apple and holds no key that could open it. The code is public at MBombeck/healthlog-push under Apache-2.0, together with its protocol and test vectors, so anyone can read what it does and run it themselves. A relay of your own works with an app you build and sign yourself; the App Store app talks to the hosted one.

The relay only ever carries what your own server sends to your own devices. I will never send anything through it myself: no announcements, no update notices, no messages of any kind.

After the update HealthLog asks the admin once, for the whole server, whether to use the relay: on the dashboard, on the admin start page and in the server setup. No keeps it off and nobody is asked again, though you can still turn it on later under Admin > Push and channels. Yes asks you to accept the relay terms and to confirm that the server is for yourself or your household. A server that has its own Apple key, or sets PUSH_RELAY_MODE=off, isn't asked at all. If the relay asks for an invite code, the same dialog takes it; ask for one at relay@healthlog.dev (invite codes). After that each person decides on their own iPhone, with the 1.7 app, and can turn it off there at any time. If you turn it off at the server, or erase all data of an account, the device bindings go with it.

The dialog asks for the terms and the privacy notice separately, and shows what the relay sees before you agree. That is delivery metadata: the device's push token while it forwards (kept only as a keyed hash), your server's instance id, the kind, size and time of each push, and the version of your consent. Never what a notification says. The relay's privacy notice is the authoritative list, with how long each item is kept. Sealing can't hide timing, though. If you record a dose and your other phone gets the confirmation, the relay and Apple can tell that something happened at that moment, which is why reminders are planned on the iPhone itself first. When your server has to remind a device itself, because you chose server reminders or the phone hasn't checked in for a while, the reminder travels sealed through the relay too, so the relay and Apple can see when a dose is due. Every alert over the relay lives 15 minutes and every silent push an hour, so the relay can't tell a reminder from a security alert by its lifetime. The price is that an iPhone that is offline for longer doesn't get the older alert through the relay. If you turned the relay on before this update, the relay card asks you once to read and confirm the updated text; the relay keeps working until you do.

What goes over the relay: the dose confirmation and the note that a dose is open again, the silent sync, the end of a medication Live Activity, other server notifications such as low stock or a seizure cluster, the security alerts described further down, and two rationed silent wakes. One comes when a server-side sync stored new readings and names only the kind of data; the other asks the app to run its Apple Health upload when the server hasn't heard from it for six hours.

Starting and updating a medication Live Activity from the server is a separate choice, off by default. What a Live Activity shows can't be sealed, so with this on, the relay and Apple can see when a dose is due. It carries only the state and the countdown, never a medication name, and it follows the medication's own dose windows, so the lock screen says due when the app does. It needs the operator to set PUSH_RELAY_LIVE_ACTIVITY=on and each person to turn on a second switch in the app; until then only the end of a Live Activity goes over the relay. A start only counts once the relay has accepted it, so one that failed is tried again, and so is an end that got lost on the way. Updates only go to an Activity the server started itself, and when a device signs out, is revoked or moves to another account, its Live Activities leave the lock screen (Live Activity over the relay).

The hosted relay is not a medical service. The admin card shows how the relay is doing: your server asks it once an hour, and the card says when the relay reports a disruption or refuses your server's signature. It also shows the hand-off time of the last 24 hours, from queueing a push on your server until the relay answers, which it does once Apple has accepted the push. The card has a test push to your own devices and a button to rotate the server's relay key, and erasing an account removes its devices at the relay. If you already run your own Apple key, you don't need the relay: your server seals the same way and sends directly. The rest is on the push relay page.

Your record

The new emergency card holds the emergency part of your health profile for when you're away from home: blood type, allergies, ongoing conditions, current medications, implants, contacts and your declarations. Save it as an offline copy that opens without a connection, print it as a wallet card, or hand out a QR link that a first responder can read without signing in. You tick what the link shows, give it an end date or none, and revoke it whenever you like (the emergency card).

Cycle tracking can hold a pregnancy and the weeks after a birth as a state of its own. While it holds, period and fertile day predictions and their reminders pause, the cycle page and the doctor report show the week, and nothing in HealthLog rates your weight: no goal, no BMI category, no trend arrow, no hint from the Coach. The state is stored encrypted and only applies within its own dates. It counts weeks and does nothing more (pregnancy and after the birth).

The Day view sets a symptom against the nearest dose of that day, for example "2h 10m after Metformin", and with the seizure diary on it does the same for seizures. That's a distance in time, not a claim about cause. Thanks to @2q2code, who asked for exactly this. (#1116)

The sleep page opens with a night timeline, each stage drawn over the clock, and you can step back through the nights. Thanks to @kruemelro for asking (#1419), and for the FIT files I checked every number against: a FIT import brings training effect, training load, recovery time, sweat loss and the running dynamics (#1343). From Apple Health, cycling and rowing distance and the running dynamics are stored instead of skipped, and workout effort is kept apart from the watch's estimate. Thanks to @camiracode for the request and the effort code. (#1415, #1416)

There are more ways in. A Gadgetbridge database export brings the data of the bands and watches it runs (Gadgetbridge), and a FHIR R4 Bundle from a patient portal puts lab results, vital signs, conditions, vaccinations, medications and visits where they belong (FHIR Bundle). Health Connect's scheduled export can be fetched straight from a WebDAV or Nextcloud folder, set up under Settings > Integrations, so you no longer carry the ZIP by hand (Health Connect from a folder). A reading from the iPhone can carry the time zone it was taken in, so a night slept in New York is filed under the morning it ended in New York. And Withings readings that reach the Withings cloud late are no longer skipped.

If you import both food and energy, the nutrients page sets intake against resting and active energy, per day and as a seven-day trend (energy balance). The doctor report can file itself into your documents every month, quarter or year (scheduled doctor report). Booked visits, check-ups and vaccination boosters can go into your calendar as a feed (care dates in your calendar). You can also ask for a notification when a vital has shifted and stayed there for at least ten days (lasting change). All of these are off until you turn them on.

The Coach knows your seizure diary. If you run a local model or an OpenAI-compatible gateway, the new "Coach budget for self-hosted models" card lets you set how much of your data the Coach reads, how many tokens and steps it may use and how long an answer may take (Coach budget). And when AI work in the background stops, a document summary for instance, HealthLog says why: on the document itself and on a card in the AI settings, with a "Try again" beside it. That used to fail without a word, as @ch3funio pointed out. (#1404)

A guardian can read a managed profile's activity from their own account and make its emergency card, its calendar feed and its scheduled report, which follows on from @ch3funio's request. A managed profile uses the AI provider its guardian chose, and the guardian can switch AI off for the profile with "No AI provider". (#1403)

Finding things

The sidebar, and the More sheet on the phone, sort their entries under three headings: Tracking, Health record and Analysis. Medications and Checkups show a small number when something is due. No page moved and no address changed. The layout follows the sketch @Cnote43 posted in the navigation discussion. (#1113)

The emergency card has its own entry in the navigation, a button under Medical history and a card under Settings > Health record. The search finds every page and every settings card, also by the word you would actually type, such as "snooze", "dark mode", "Nextcloud" or "ICE".

Settings > Notifications has an "Alerts" group for account security and the lasting change notice, and you see it before you have set up a channel. Settings > Data & privacy opens with "Who can reach your record", one list of every door into it, from guardians and clinician links to API tokens and your own sign-ins. Checkups, Vaccinations and Documents link straight to the care calendar and the report schedule.

The look

One change you may notice the moment you update: the theme follows your device unless you chose light or dark yourself. Until now HealthLog started dark for everyone who never picked a theme. If that is you and your phone or computer is set to light, HealthLog will be light after the update. To keep it dark, pick Dark once in the avatar menu or under Settings > Account > Display, and it stays that way on that device.

The 90 days tab on the charts draws weekly averages again instead of ninety single days, for measurements and for mood. A point names the days it covers and how many readings went into it, and the 7-day trend line only appears where the points are days.

A lot of small differences between pages are gone. The button at the bottom of a settings card sits on the right, at the same size, on the phone too. Most switches stand to the right of their name, and the tabs on Cycle, Checkups and a medication look like the other view switches. Every settings save answers with a short confirmation; quite a few used to save without a word. Counts read right in all ten languages, "1 device" where it used to say "1 devices", with the proper Russian and Polish forms. French and Russian address you formally throughout.

Entering data got quicker too. The capture menu shows the types you enter most as their own rows, "Save and next" moves on to the next one, your last reading sits under the field, and the save message has an Undo and an Edit.

Speed

Pages arrive with your account already in the first HTML, so the browser doesn't wait for another request before it shows anything. On a slow phone connection the dashboard's main content used to appear after 4.3 seconds and now takes about one. After a sync the dashboard and the daily overview load about three times faster, around 150 instead of 490 milliseconds in my tests.

The biggest gains are for accounts with a very dense source. A Fitbit syncing through Google Health writes around 35,000 pulse readings a day, and several pages went through all of them on every visit. On a test account with a month of that, the daily overview, the dashboard and the targets load in 0.1 to 0.3 seconds after a sync, where they took 1 to 4. A pulse chart over 30 or 90 days takes about half a second instead of 1.5 to 2.5.

The same data exposed a real bug. "Pulse through the day" stopped a little after four in the morning on such an account, and the heart rate curve of a long workout was cut short, because both read a capped number of rows. They show the whole day and the whole workout again. The figures that quietly worked from a capped slice, among them strain, stress, readiness and the glucose and SpO2 safety limits, count every reading. Thanks to @sdrburgess for a report precise enough to point straight at the cause. (#1429)

Safety and backups

The portable export was missing more than I knew. It left out the form and class of a medication, its whole schedule, and the injection site and amount of each dose, so a file restored on another server could bring an injection back as a tablet and a plan back without its times. It carries all of that now. A restore keeps each visit's lab results attached, and a backup made before this release restores cleanly, also when it holds a dose recorded twice. A dose or reading you delete in HealthLog stays deleted, even when the app reads your whole Apple Health history again, and a deleted dose never takes its stock a second time. One you delete in Apple Health goes in HealthLog as well. An older day total from the phone no longer overwrites a newer one, once the app says when it computed them.

An e-mail address or username can belong to only one account, whatever the case. Until now an _ or % in what you typed at sign-in worked as a wildcard in the lookup. That was never a way into someone else's account, because sign-in still needs the password and single sign-on never links on an e-mail address alone, but it's fixed.

Pages you open while signed in are no longer kept in the browser's page cache, and the account data in a page's first HTML leaves out your name, birth date and insurance details. You get a notification when a passkey is added or removed, an access token is revoked, a device is signed out because its sign-in token was used twice, or another account takes over one of your devices. That takeover only works once you are signed out on the device; while you are still signed in, the other account is refused. A phone that signs out loses its push credentials at once. The calendar feed link and the emergency card link are stored only as a hash and stay out of backups, and a dead emergency card or clinician link answers with a plain 404.

For operators

A new server asks its first admin the handful of things only an admin can decide: who may sign up, how notifications leave the server, whether AI is on and what it sends where, and what else goes out. It ends with a plain check of keys, cookies, backups and the public address, and that check stays on Admin > System status afterwards. Every step can be skipped and changed later, and a server that already runs is not asked (first steps). People setting up their own record get a small version of the same: the time zone and, with medication, the leaflet registry are filled in to confirm, and reminders and the Coach are offered only to those they concern.

Admin is sorted differently. Everything about push lives under "Push and channels": the channel switches, the Web Push keys, the relay with its deliveries of the last seven days, and delivery health with its test push. "Integrations" is called "Monitoring". System status has a card with the version, the image channel and the state of the migrations. The audit log can be narrowed by kind of action (sign-ins, documents, sharing and managed profiles, medications), so a guardian's upload into a managed profile is one pick away; that came from @ch3funio as well. (#1403)

The failing-jobs card got more honest. A background run that carried on past a failed item, say one push wake out of many or one account in the off-host backup, used to read as a success. It shows up there with how many items failed.

If you run your own PostgreSQL: the image ships the PostgreSQL 19 client tools, so a server on 19 no longer stops the update at the pre-migration dump, and its nightly dumps work again. 16, 18 and 19 are all fine, and the bundled database stays on 18. Thanks to @aw23edfr4, who tracked it down and sent the fix. (#1431, #1432) The dump before a migration and the nightly dump are also written straight to files and no longer through a pipe.

A phone's first big Apple Health sync no longer runs a small server out of memory. The upload routes take a few uploads at a time and ask the rest to try again a few seconds later.

From 1.49.0 on, every release carries a signed image manifest and SLSA provenance as release files, so you can check which image a release names without asking the registry. The commands are under Verify a release from its assets.

If you write against the API: a 422 names the bounds a value missed, GET /api/version lists the features a client may rely on, and an app can read the push state of its own device at GET /api/devices/me/push-diagnostics. The new error codes are on the docs site, and the OpenAPI document has the rest.

Updating

Updates and deploy has the steps, and docs/ops/deploy.md, under "v1.49.0 notes", has the operator detail. Take a backup first. If your compose file has the backups volume, the container writes a pre-migration dump into it before it migrates; without it no dump is taken, so run pg_dump yourself.

Pull and restart. Thirty-six migrations run on the first start, 0514 to 0558 (0516, 0523, 0527, 0528, 0541, 0548, 0550, 0552 and 0555 don't exist), so the boot log says 36 database migrations pending. Most only add tables and columns. Seven touch data you already have:

  • 0515 merges dose rows recorded twice for one slot (a take wins over a skip, then the oldest), gives back the stock a merged take used, clears the missed mark on doses that were taken or skipped, and stores the dose window of older single-time schedules.
  • 0517 makes e-mail and username unique regardless of case. If two accounts on your server share an address or a username that differs only in case, it stops, changes nothing, and the container does not start. docs/ops/deploy.md, under "Accounts that differ only in case", has the query that lists them; run it before the update and you won't hit the stop. Otherwise give one account of each pair a different address or name, mark the failed attempt with prisma migrate resolve --rolled-back 0517_case_insensitive_identity_and_retention_indexes as shown there, and start the container again.
  • 0529 stores APNs device tokens in lower case. Where two devices held the same token in different case, the one seen most recently keeps it, and the other registers again on its next launch.
  • 0543 records where each cycle symptom came from, so an Apple Health day no longer replaces the symptoms you logged yourself.
  • 0546 records who deleted a synced row, so a reading or dose you deleted is refused when a reinstalled phone sends it again. It also drops the old workout and ECG deletion list, so a sample that comes back in Apple Health is written again.
  • 0551 marks the new server setup as finished on a server that already has accounts, so the update doesn't ask you questions you answered long ago.
  • 0557 marks the rows your phone had reported as deleted in Apple Health before the update, so they can return if they are back there. It does that only where the audit log proves it, leaves every other deleted row refused, and writes that one column and nothing else.

A few of the additive ones are worth knowing by number. 0553 adds the table behind the background AI reasons. 0554 gives each settings page its own save token, with nine columns and two triggers and no rewrite; a browser or app that had such a page open during the update gets one conflict on its next save and has to reload. 0556 adds the answer to the relay question and 0558 five columns for what the relay reports; neither rewrites a table. Those two, like 0539 and 0540, only change data on a server that ran a 1.49 pre-release.

0518 builds an index on measurements with CONCURRENTLY while the container starts, and the app waits for it. On a large instance the first start takes longer than usual; let it finish rather than restarting the container. If it gets interrupted anyway, "A concurrent index build that failed" in docs/ops/deploy.md says how to continue.

Going back to 1.48.5 means restoring that pre-migration dump with the 1.48.5 image, pinned with HEALTHLOG_IMAGE_REF=:v1.48.5, as described in Going back to before a migration. Starting the old image on the migrated database is not a way back, because 0515 changed how dose rows are keyed.

New environment variables, all optional and all on the compose whitelist:

  • PUSH_RELAY_MODE: off hides the relay entirely; unset leaves the choice to the admin.
  • PUSH_RELAY_URL and PUSH_RELAY_KEYS: only for a relay other than the hosted one.
  • PUSH_RELAY_LIVE_ACTIVITY: on allows Live Activity start and update over the relay. Off by default; leave it off until the 1.7 app has been tested on your devices.
  • HEALTH_CONNECT_WEBDAV_PRIVATE_ORIGINS: exact origins of WebDAV folders on your own network.

All five are in the environment reference.

The relay and the new dose behaviour on the phone need the iPhone app 1.7.

This is the readable version. The changelog lists every change and every fix.

Thank you

@camiracode asked for the cycling, rowing and running types and sent the workout effort code that this release builds on. @kruemelro asked for the night timeline and the FIT figures and shared real files to test against. @2q2code keeps writing down what gets in the way of tracking a lot of symptoms and medications every day, and two of those notes are in here. @ljcasaai asked for the Coach limits for local models, the energy balance, the scheduled doctor report and a notice of lasting change, and described the Gadgetbridge setup the new import is built for. @ch3funio's guardian request keeps paying off, this time for the profile's AI and activity. @ferges123 built the grouped medication list with its filters and sent it as a pull request. @aw23edfr4 tracked down why an install on PostgreSQL 19 stopped booting and sent the fix with it. And thanks to everyone who answered "What would you change?", by issue, discussion or e-mail.

And then there are the donations. Over the last weeks, through GitHub Sponsors and Buy Me a Coffee, some of you gave far more generously than I ever expected, among them @ljcasaai and @ch3funio. Honestly, it blew me away. HealthLog started as something I built for myself, and seeing people put their own money behind it means a lot to me. Every bit of it goes into the servers and the push relay, which is why I can run the relay as a free service for everyone who self-hosts. Thank you, all of you.

…arity goldens

The filled account carries one more column per row, so the filler's clock
moves the medication rows' stamps on by a minute; nothing else changes.
The coincident-deviation and coach-read latest-day value is held against
a band built from day values, and a pulse day is the weighted mean of its
hours' means. The SQL latest-day read returned the plain mean of the day
and refused pulse; it now reads the day as one row per local hour and
combines them through `combineHourCells`, the plain mean staying for every
other type. The unit fakes fold the same way, and the derived-score tests
that reach the live cumulative fold or the latest-day read use them.

Refs #1429
# Conflicts:
#	src/__tests__/baselines/source-file-lines.json
#	src/__tests__/baselines/source-function-lines.json
The web-vitals library reports navigationType "restore" for a page
brought back from a discarded tab; the collector refused it with 400.
The latest-day value read every reading of its window to find the latest
day, a month of pulse on a dense account (about a second per vital on the
daily digest). Every reading of the latest local day lies within a day and
two reading-zone slacks of the newest reading, so the read starts there.
The rows it folds and the value it returns are the same.

Refs #1429
…d block

The 30-day low-percentile proxy folds a month of raw pulse, about a second
on a watch that writes 35 000 readings a day, and the intraday chart, the
daily digest, the pulse status card, the targets card and the correlations
all read it. A day's proxy depends only on that day's readings, so the whole
local days between the window's partial first day and today are kept in the
analytics cache under `closedBlockKeyPart(start of today)`. A miss runs the
old single statement over the window and keeps the block from it; a hit
folds the partial first day and today only. A sync that writes today's
readings leaves the block (the write tail passes `touchedFrom`), a write
that reaches into it or does not say how far it reached drops it.

The integration test holds the old statement as the reference and checks
the cached read against it cold, warm, after a sync of today and after a
backfill into the block, and pins the daily digest's statements and its
single proxy fold after a sync on the dense fixture, now with the rollup
tier built as a running instance holds it.

Refs #1429
The boot script, the theme provider and the offline page all fell back
to dark when nothing was stored. They now share one rule
(parseThemeChoice / resolveTheme): an explicit light or dark choice is
kept, anything else follows prefers-color-scheme and switches live.
A storage read that throws no longer pins the page to dark.

The boot script and the offline page script are checked against
resolveTheme for every stored value and device scheme, so the three
copies cannot drift.
silentBudgetLeft now reads the device's window once and asks
silentBudgetAllows; silentBudgetSummary derives the numbers a reader
shows from the same rule. push.device's route moves to deviceRouteOf
and transportOf so other readers share it.
The token mask, the device row and the attempt row of the admin
notification diagnostic move to push-relay/diagnostics.ts; the admin
answer is unchanged.
GET /api/devices/me/push-diagnostics returns the X-Device-Id device's
route, relay and binding state, silent budget with the owed sync, last
delivery per kind, last receipt and masked APNs token. Another
account's device and an unknown one answer the same 404; 10 reads a
minute per account; private, no-store. Feature key
push.device-diagnostics.
Five skippable steps (accounts, notifications, AI, privacy, setup check)
under /onboarding/server, each the existing admin cards in an order with
the flow's heading and actions. Progress lives on AppSettings
(serverSetupCompletedAt, serverSetupStepsJson); migration 0551 stamps
instances that already have accounts, so an upgrade never offers it. A
dismissible start-page notice offers it once per admin; it is never
offered on a demo deploy. The setup health check (encryption keys, the
secure-cookie flag against the request's scheme, the database dump, the
public URL) is a signal model shown on System status and in the last step.
Routes: GET/PATCH /api/admin/server-setup, POST .../notice and GET
/api/admin/setup-health, all cookie-only requireAdmin.
…e setup flow

The units step (id unchanged) now confirms the time zone and, when
medication was chosen, the medicine registry, both prefilled from the
account and written in the same transaction as the units. It also
applies to a medication schedule. Two follow-ups come after confirm:
reminders (the Settings channel panel, for a medication schedule or a
mood or cycle area) and ai (an honest yes or no to the Coach, only while
the server offers it; yes gives the consent through its own route, no
switches the Coach off, skip writes nothing). The state gains offers.ai.
A follow-up that does not apply reads skipped, and a ledger confirmed
before these steps existed reads both as skipped, so no finished setup
reopens and a client that skips unknown ids still completes. An admin
whose server setup is open gets one line pointing at it on the welcome
and done screens.
A collapsed "More you can set up" group: emergency card, care calendar
subscription, sharing, imports (Gadgetbridge, Health Connect, FHIR), a
regular doctor report and the iPhone app. Each row is dismissible and
none counts towards the list's progress. One presence read,
GET /api/onboarding/extras (requireGuardianAuth), runs only when the
group is opened; inside a managed profile only the guardian's rows
apply, and a delegate gets no group. The report schedule row follows
the doctor report module through the surface map. The channels row now
follows the medication row for a medication schedule.
…a unit

"No" on the Coach step switches the Coach off, which also ends the
server's Coach offer; the answered step then fell out of the step order,
so Continue lost its place and Back could not reach it. An answered ai
step now stays in the order. On Region & units, the prefilled time zone
and registry no longer count as the answer while a unit is asked;
Continue waits for a unit, and a screen without a unit question is
still answered by confirming the filled values. Set up AI opens in a new
tab so the setup stays open.
…ggregates

The dense-stream readers carried a second day aggregator beside
day-aggregates.ts: readLocalDayExtremes was readDayAggregates under another
name, and readLatestLocalDayMean folded the latest day's hours a second way
in JavaScript, behind two identical readLatestDayMean wrappers.

readDayAggregates now reports each day's newest reading and can read only
the tail of the window that holds the latest day. The safety floor reads
its daily extremes through it, and one readLatestDayMean serves the coach
read, the coincident deviation and the readiness score.
The GLP-1 card named the last injection today or yesterday, and counted the
days to the next one, from the browser's calendar (getFullYear, getMonth,
getDate) while the medication card had moved to the profile zone. With the
browser in another zone, the two cards could name different days for the
same dose. Both cards now share one label helper. The medication wizard's
default start date and the Coach conversation groups read the host
calendar the same way and follow the profile zone too.

The neighbour-day guard now also catches a calendar day read off the host
clock, so this shape cannot come back.
url-credential.ts carried a character-for-character copy of matchesEtag
from http/etag.ts and its own HOUR_MS beside MS_PER_HOUR. The feeds and
the emergency card import the shared ones.
The provider re-derived the rule that resolveTheme holds and its tests pin;
it calls the function now, so the tests cover the path the app takes.
The card menu built the registry search in the browser from the account's
registry, and the detail section did the same for a detail seeded from the
list, while the detail read already carried leafletSearch from the server.
GET /api/medications now carries leafletSearch on every row, built for the
caller after the per-record cache like the course authority, and both
surfaces read it. The server is the one builder of the link.
nextFreeAt includes the time the relay named when it refused a silent push, read from the newest silent deliveries, so the statement budget holds. An integration test walks the refused sync from the flush to the minute pass that delivers it once the relay's window frees, with a matrix over the relay's answers. The OpenAPI descriptions and the relay guide say how a budget refusal is handled.
How far an ungated burst outgrows the budget depends on the machine; on the shared CI runners it can outlast the timeout instead. The gated test still runs everywhere.
The single intake route honoured a `scheduledFor` that names a real slot
behind the take; the bulk route bound by the take's window alone. The same
take then answered a slot on one route and an extra dose on the other: a
late take of a missed dose sent through the outbox was filed as an extra
dose. Where two doses' windows overlap, both routes gave the take to the
nearer anchor rather than to the dose it named, so the due 20:00 dose taken
at 19:30 answered alreadyTaken for a taken 19:00 dose.

One rule now decides for both routes: a named real slot counts for a take
when it lies behind the take, however late, or when the take sits inside
the slot's window from its early grace on. A slot further ahead still does
not bind; a dose that is not open yet is pinned with forceSlotInstant.
…hLog

The bulk routes refuse a re-post of a sample the person deleted in
HealthLog per entry (`skipped`, `deleted_in_healthlog`). The single create
routes had no such rule. POST /api/mood-entries, which the app uses for
State of Mind samples one at a time, upserted onto the tombstone, left it
deleted and answered 201, so the client believed the entry was back while
nobody could see it, and an entry reported deleted in Apple Health stayed
deleted when it came back. The sleep-stage arm of POST /api/measurements
answered 200 duplicate with the deleted row, the single cycle day revived a
day the person had deleted, and an AUDIT-C replay answered a deleted entry
as live.

Each now answers 410 with `meta.reason: "deleted_in_healthlog"`, the
deleted row's id and a route code (`mood.deleted_in_healthlog`,
`measurement.deleted_in_healthlog`, `cycle.day-log.deleted_in_healthlog`,
`anamnesis.auditC.deleted_in_healthlog`), and writes nothing. A mood entry
the phone reported deleted in Apple Health is written back as live. A guard
finds every single POST route whose body takes an `externalId` and holds it
to a stated rule, so a new one cannot ship without one.
…y names the slot

The bulk route resolves a named slot per entry. In the usual case the
take's window already put it on the slot the entry names, and the second
read of the schedule only confirmed it.
A scroll container still reports its whole content as its min-content
width, so a Tabs root in a grid or flex cell widened that cell to the
strip's labels. On a 390 px phone the Cycle page's single column ran
10 px past the screen instead of letting the strip scroll. The root
takes min-w-0, so the strip scrolls inside whatever column holds it.
The Push and channels explainer wrapped to a second line in German,
and the Russian backups and export explainers, the Spanish, Portuguese
and Polish push explainers, the French export one and the Dutch
backups one ran as wide or wider. Each is shortened without losing
what it names.

The header sweep walks English and German only. A new check measures
the explainer column on a real page once and sets every locale's
Settings and Admin explainer beside it in the same computed font, so
a translation that would wrap fails by locale and key.
The child-profile journey with a medication schedule now meets Region
and units before confirm, as the flow asks since the registry joined
that step. The admin strip check finds the SubNav row the console uses
now and asserts the painted bar is gone by computed style rather than
by a class name. The phone route sweep resolves the server setup steps.
A person who finished the setup on the previous release, with Region
and units passed, opens the app after the update: the account payload
clears the first-run hint even when the browser still holds a stale
one, the edge lets every page through, and /onboarding opened by hand
renders instead of resuming a step. An account that skipped the setup
is not sent into it either.
The hot-route budgets were measured on the live clock, and two reads exist
only on one side of a local hour: the day projection's occupancy read while
today's slot can still be projected, and the resting-pulse edge read after
the morning window. The fixture's medication was also created at seed time,
so by day its 08:00 slot predated it and the occupancy read went uncounted.
A run between midnight and 08:00 Berlin time counted one statement more on
the dashboard summary than the budget allowed.

Pin Date to the next noon in Berlin, create the medication before its
history, and count the occupancy read every real account pays: summary
37 -> 38, snapshot 89 -> 90. No read is added.
…py and access changes

The rail tightens its rows and group headings at short window heights so every destination fits without a scroll edge. The touch-target check measures the InlineAction hit area. The document specs read the plural copy, and the doctor-report delegate spec follows the record-page rule.
A run inside today's 08:00 to 10:00 UTC window counted the open dose differently from one after it.
@MBombeck
MBombeck marked this pull request as ready for review November 23, 2026 04:36
…by a checked handler

Closes two CodeQL findings in a test and the heap benchmark.
Concurrent probes of one account shared the query in flight, and nothing
was kept once it settled. Whether a later reader in the same request met
an earlier probe still running was left to scheduling, so the daily
digest sent two to four coverage probes for the same request on the same
data, and the statement budget failed in the runs that sent four.

Within a GET request the first answer now holds for every later probe of
the account. A measurement write anywhere in the process retires the held
answers, so no reader is answered from before a write; other methods,
jobs and scripts keep the in-flight sharing only, as before.

Budgets: digest 134 to 131, snapshot 90 to 88, health status 60 to 59.
The file took its clock from the wall clock. In the first ten minutes
after midnight in the fixture zone (05:00 to 05:10 UTC in winter) the
reading written as today's, ten minutes back, was yesterday's; the write
reached into the closed proxy days and the block was dropped, as it
should be, and the test failed. The module's instant and the routes' own
clock could also fall on either side of midnight.

Pin Date for the whole file to the last 12:00 in the zone at or before
the real time; timers stay real, and no fixture lies ahead of the
database clock.
intakeSync read degraded on any accepted silent or alert push that was
never confirmed, however old. iOS delivers silent pushes at its
discretion, so one unconfirmed background push kept a healthy device
degraded for good.

Only alert-class pushes count now (each carries mutable-content, so the
notification service extension opens it on arrival), only the newest
accepted alert of the last 24 hours, and a dropped dose confirmation
counts until an alert after it was opened. The device's push
diagnostics carry the state with its reason.
A server hanging up mid-download left a file write in flight while the hand-rolled loop destroyed the stream; the late write callback could surface as an uncaught ERR_STREAM_DESTROYED and take the worker down. One pipeline now owns both ends, attaches error handling to each, and settles only after the file stream has closed. The byte cap rides the same pipeline.
@MBombeck
MBombeck merged commit 0fd0ef7 into main Nov 23, 2026
39 checks passed
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.

2 participants