Commit Graph
10083 Commits
Author SHA1 Message Date
Marc-André Bombeck 6debd62326 build(deps): bump next and eslint-config-next to 16.4.6
16.4.6 keeps a single header value as a string, so the compression
middleware now sees a route handler's Content-Type and gzips the
response when the client accepts it. Route handlers were never
compressed before. Measured on a production build: JSON and CSV
exports go out gzipped with their Content-Disposition intact and still
flush chunk by chunk, so a streamed download keeps arriving as it is
written. The Coach and document chat streams send
Cache-Control: no-transform, which the middleware honours, so they stay
uncompressed and each frame arrives when it is written. A guard now
holds every text/event-stream surface to that directive.

The notification journey failed twice on the release candidate at the
same step: the e-mail address typed into the card was wiped. The spec
waited for the settings read with waitForResponse, which settles on the
headers, and treated that as the card having copied the server value
into the input. With compression the body follows the headers after a
round through zlib on the thread pool, which a loaded runner can hold
up, and the late copy overwrote the typed value. The spec now also
waits for each card's enable switch, which is disabled until its read
has landed and is enabled in the same render that does the copy.
2026-11-15 23:43:32 +01:00
Marc-André Bombeck f602336fcb build(deps): bump web-push from 3.6.7 to 4.0.0
4.0.0 moves the package to ESM and class syntax and drops minimist from
the CLI. The sender and the VAPID route load it with a dynamic import
and call generateVAPIDKeys, setVapidDetails and generateRequestDetails,
which keep their names, arguments and module-level VAPID state; the
request is still dialled through safeFetch, so the library's own
transport and error shapes are not on our path.

Every sender test mocks the library, so a contract test now runs the
real one: a stored VAPID pair is accepted, the request carries the same
headers (TTL of four weeks, Urgency, aes128gcm), the VAPID JWT verifies
against the public key with the endpoint origin as audience, and the
subscriber's keys decrypt the body back to the payload. It passes on
3.6.7 and on 4.0.0.
2026-11-15 23:21:37 +01:00
Marc-André Bombeck 0d5f1ec04a build(deps): bump the production-weekly group
@aws-sdk/client-s3 3.1169 and lib-storage 3.1167, @napi-rs/canvas 1.1.1,
@simplewebauthn/server 14.1.0, @tanstack/react-query 5.107.1,
dotenv 18.0.10, jose 6.2.17, lucide-react 1.73, mmdb-lib 3.0.5,
nodemailer 10.5.0 and pg-boss 12.38.2.

The pins that hold these move after reading the installed sources:

- pg-boss 12.38.2 keeps the failed-row ledger the 72-hour reader relies
  on: deletion still runs on completed_on + deletion_seconds against
  job_now(), with the 14-day retention, 7-day deletion, 15-minute expiry
  and two retries unchanged. The release only moves keep_until along
  with start_after on retry and resume.
- @simplewebauthn/server 14.1.0 adds passkeyProviderMetadata to the
  registration result. It is filled only by an initialised FIDO metadata
  service, which downloads from the FIDO Alliance; HealthLog initialises
  none, so the contract now pins the field as absent. The stored key
  bytes are unchanged. The new origin and RP ID checks reject a trailing
  slash or non-ASCII form, and both values already come from URL.origin
  and URL.hostname.
- dotenv 18.0.10 moves its CLI to a separate entry; the library API is
  unchanged. The Prisma CLI stage installs the same version.
2026-11-15 23:18:42 +01:00
Marc-André Bombeck 685645db3d build(deps): move the pgclient stage to the rebuilt postgres 18.6 image
postgres:18.6-trixie now resolves to e3d24f6, a multi-arch index with
linux/amd64 and linux/arm64 on the current Debian trixie-slim base. The
PostgreSQL package is unchanged (18.6-1.pgdg13+2).
2026-11-15 23:14:21 +01:00
Marc-André Bombeck b2281e12c1 build(deps): move the Node base image to 22.23.5
node:22-trixie-slim now resolves to 68c76cf, a multi-arch index with
linux/amd64 and linux/arm64 that carries Node 22.23.5, a security
release with HTTP, HTTP/2 and TLS fixes. All four Node stages and the
release guard move to the new digest together.
2026-11-15 23:14:04 +01:00
dependabot[bot] 78c2601e2d chore(deps-dev): bump @next/bundle-analyzer from 16.4.5 to 16.4.6 (#1392)
Bumps [@next/bundle-analyzer](https://github.com/vercel/next.js/tree/HEAD/packages/next-bundle-analyzer) from 16.4.5 to 16.4.6.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Commits](https://github.com/vercel/next.js/commits/v16.4.6/packages/next-bundle-analyzer)

---
updated-dependencies:
- dependency-name: "@next/bundle-analyzer"
  dependency-version: 16.4.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-15 17:18:19 +00:00
dependabot[bot] a87fa9df08 chore(deps-dev): bump the development-weekly group with 5 updates (#1389)
Bumps the development-weekly group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.64.1` | `1.65.0` |
| [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss) | `4.3.4` | `4.3.5` |
| [knip](https://github.com/webpro-nl/knip/tree/HEAD/packages/knip) | `6.44.1` | `6.45.1` |
| [prettier](https://github.com/prettier/prettier) | `3.9.10` | `3.10.1` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) | `4.3.4` | `4.3.5` |


Updates `@playwright/test` from 1.64.1 to 1.65.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.64.1...v1.65.0)

Updates `@tailwindcss/postcss` from 4.3.4 to 4.3.5
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.5/packages/@tailwindcss-postcss)

Updates `knip` from 6.44.1 to 6.45.1
- [Release notes](https://github.com/webpro-nl/knip/releases)
- [Commits](https://github.com/webpro-nl/knip/commits/knip@6.45.1/packages/knip)

Updates `prettier` from 3.9.10 to 3.10.1
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.9.10...3.10.1)

Updates `tailwindcss` from 4.3.4 to 4.3.5
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.5/packages/tailwindcss)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.65.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-weekly
- dependency-name: "@tailwindcss/postcss"
  dependency-version: 4.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-weekly
- dependency-name: knip
  dependency-version: 6.45.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-weekly
- dependency-name: prettier
  dependency-version: 3.10.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-weekly
- dependency-name: tailwindcss
  dependency-version: 4.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-weekly
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-15 16:48:49 +00:00
Marc-André Bombeck 93f68915db Merge pull request #1385 from MBombeck/release/v1.47.6
release: v1.47.6
v1.47.6
2026-11-15 11:34:48 +01:00
Marc-André Bombeck 39a855b6ad Merge branch 'fix/1384-pregenerate-without-provider' into release/v1.47.6 2026-11-15 11:16:13 +01:00
Marc-André Bombeck 5152e68586 fix(jobs): step over a briefing night that attempted nobody
A night on which every account was skipped, for instance because every
provider was paused for background work, wrote all_failed false. The
repeated-failure alert read that as a successful run: it ended the
streak and announced a recovery while the provider was still down, and
nights then alternated between failed and paused so the streak never
reached the alert again.

The run now also records run_attempted. A completed run with
run_attempted 0 is neither a failure nor a recovery: the alert and
readConsecutiveRunFailures step over it.

Refs #1384
2026-11-15 11:16:13 +01:00
Marc-André Bombeck b4927e1ea4 Merge branch 'fix/e2e-flakes' into release/v1.47.6
# Conflicts:
#	CHANGELOG.md
2026-11-15 10:59:09 +01:00
Marc-André Bombeck e84c358fdf fix(charts): match chart loading shells to the charts they become
The footer reserve under a day-linked chart's loading shell still held the
caption line that was dropped from those charts, so every such shell stood
20 px taller than its chart (40 px on a phone). The dashboard's mood chart
loaded behind the generic shell, which is about 30 px shorter than the
mood card. When the shared chart chunk arrived late the dashboard's chart
row changed height under a reader already scrolled past it; the tablet
shell journey measured <main> right after such a swap and found it no
longer at its end.

The reserve now holds only the day rug, and the mood chart gets a shell
built from the same card primitives and boxes. The tablet journey also waits
for every chart cell to reveal and every loading shell to go before it
scrolls to the end, instead of trusting two equal heights 250 ms apart.
2026-11-15 10:58:13 +01:00
Marc-André Bombeck 23a6f85b0f fix(sharing): drop an account read answered across a record switch
Raising the record-session hold clears the query cache, which remounts the
account query, so the switching tab has a GET /api/auth/me in flight beside
its own POST /api/account/switch. When the server answered that read from
the record being left and the answer was applied after the commit, fetchMe
rewrote the scope mirror back to the old record. A peer tab that had already
settled read that write as a foreign switch and published a hold expecting
the old record, which no /me would ever confirm, so every tab sat behind the
hydration gate until the stored transition aged out.

The transition store now counts the changes a tab applies, and fetchMe
repeats a read whose request straddled one instead of applying it.
2026-11-15 10:58:06 +01:00
Marc-André Bombeck 883df7b569 chore(release): keep an empty Unreleased heading 2026-11-15 10:46:54 +01:00
Marc-André Bombeck e19b9299b7 chore(release): date the 1.47.6 changelog 2026-11-15 10:46:41 +01:00
Marc-André Bombeck 42c8b11fca chore(release): v1.47.6 2026-11-15 10:46:35 +01:00
Marc-André Bombeck f2cf316ad8 Merge branch 'fix/1384-pregenerate-without-provider' into release/v1.47.6 2026-11-15 10:46:20 +01:00
Marc-André Bombeck 75f8a648dc fix(jobs): stop counting an unusable provider as a failing briefing run
The nightly briefing pass settled an account as failed whenever its
generation failed, including when every provider of its chain was
benched for background work and no request was sent, and when the
provider refused the account's own credential. A key revoked at its
issuer stays saved and is refused every night, so a single-account
instance read as all-failed night after night and the repeated-failure
alert reported a broken job.

- A chain that sent nothing settles as skipped (provider_benched), with
  no 45-minute retry.
- A refused credential of the account's own settles as auth_failed,
  which the run reports as partial but does not fail over; a refusal of
  the operator's shared key still fails the run.
- The generator's failed outcome names the provider that failed first,
  whether its credential was refused and whether anything was sent.
- The run's facts carry failure_cause and failure_provider.

The admin Background jobs card listed only pg-boss failures, while the
alert also counts runs that completed with every account failed, so an
operator sent to the card read that nothing had failed. The card now
lists those runs, and the card and the alert describe them in words
with the cause and provider instead of quoting the run's JSON.

The warm tally counted a status card that fell back to its deterministic
text as a warmed assessment; it now counts model-written notes only.

Refs #1384
2026-11-15 10:45:21 +01:00
Marc-André Bombeck ac4a4b2fbc Merge pull request #1376 from ferges123/fix/illness-episode-dates-publish
fix(illness): allow adding episodes before noon
2026-11-15 09:58:20 +01:00
Konrad Garbal 851d52b137 fix(illness): allow creating episodes before noon 2026-11-15 09:22:26 +01:00
Marc-André Bombeck ecde3330c1 Merge pull request #1382 from MBombeck/feat/1371-medication-note
feat(medications): add a note to the medication
2026-11-14 10:23:40 +01:00
Marc-André Bombeck 4b500dc66c Merge remote-tracking branch 'origin/main' into feat/1371-medication-note
# Conflicts:
#	CHANGELOG.md
2026-11-14 09:36:45 +01:00
Marc-André Bombeck 2fab144e1c Merge pull request #1381 from MBombeck/fix/1372-record-menu-and-push-errors
fix: open records inside the account menu on a phone, and say when push is refused
2026-11-14 09:35:45 +01:00
Marc-André Bombeck d0b7749a99 fix(medications): keep the request schemas out of the wizard bundle
The note field imported its length limit from the validation module,
which pulled zod and the medication request schemas into the client and
put the medications list and detail pages over their bundle budget. The
limit lives in a zod-free module now, and the validation re-exports it.
2026-11-14 09:35:35 +01:00
Marc-André Bombeck 4537ff0d8e feat(medications): add a note to the medication (#1371)
Directions such as "30 to 60 minutes before food" had nowhere to go: a
medication carried no free text of its own, only the notes on a dose
change or a course. The medication now has one note, edited on the last
step of the wizard and shown under the name on the detail page, above
the dose actions on both card variants, under the picked medication in
the log-dose sheet, and per row in the take-all-due list. One
MedicationNote component renders it everywhere, in foreground text.

The note is sealed at rest in Medication.noteEncrypted (migration
0498_medication_note, lock-bounded), with no plaintext column. Create
and update take an optional `note`: trimmed, at most 500 characters, an
empty string or null clears it, absent keeps it. The wizard sends it on
an edit only when it changed, so an unrelated save never clears it. The
list and detail reads strip the ciphertext and answer `note`.

Both ends of the data path carry it: the backup (decrypted in a portable
file, ciphertext in a disaster-recovery file), the restore, the data
export, the key-rotation registry and script, and the MCP medication
schedule, resources and fetch, fenced as user text. The doctor report
and the FHIR export leave it out: it is the person's own reminder, and
the report has no selection for personal prose.

The size baselines rise by the one-line wiring of the field in the
medication page, detail tabs, cards, log-dose sheet, wizard step and
list read; the wizard payload grows by the field's own encode and
hydrate.
2026-11-14 09:30:40 +01:00
Marc-André Bombeck e715e428a6 Merge remote-tracking branch 'origin/main' into fix/1372-record-menu-and-push-errors
# Conflicts:
#	CHANGELOG.md
2026-11-14 09:10:24 +01:00
Marc-André Bombeck 3ddb2d2e45 Merge pull request #1380 from MBombeck/feat/1377-ingest-custom-metrics
feat(custom-metrics): accept the measurement token on value logging
2026-11-14 09:09:57 +01:00
Marc-André Bombeck de088d358a Merge remote-tracking branch 'origin/main' into fix/1372-record-menu-and-push-errors
# Conflicts:
#	CHANGELOG.md
2026-11-14 08:57:17 +01:00
Marc-André Bombeck 422decc9d9 fix(notifications): say when the browser's push service refuses
Enabling Browser Push showed only "Activation failed" whenever
pushManager.subscribe() rejected. Brave keeps push messaging off by
default and rejects with "AbortError: Registration failed - push
service error", which left people with nothing to act on.

The browser's own refusal is now classified apart from the server
answers around it. An AbortError from subscribe reads as the push
service refusing and links the Browser Push docs; in Brave the message
names the setting under brave://settings/privacy. A blocked permission
stays blocked, and a dismissed prompt or a rejected key keeps the
generic message. The subscribe flow moves out of the card component so
it stays under the function size baseline.

Refs Discussion #1378
2026-11-14 08:56:25 +01:00
Marc-André Bombeck cfa834510e fix(nav): open the records inside the account menu on a phone
The record switcher opened as a side sub-menu next to the account menu.
On a phone the account menu sits against the right edge and takes most
of the width, so the 240 px sub-menu had room on neither side and ran
off the screen with the names cut off. Below the sm breakpoint the
trigger now unfolds the records in place inside the account menu;
wider screens keep the sub-menu. The trigger, list and entry slots are
unchanged, so the journeys read the same at either width.

Refs #1372
2026-11-14 08:56:18 +01:00
Marc-André Bombeck 29e25079db Merge remote-tracking branch 'origin/main' into feat/1377-ingest-custom-metrics
# Conflicts:
#	CHANGELOG.md
2026-11-14 08:48:50 +01:00
Marc-André Bombeck 2cacad91cc docs(changelog): say existing measurement tokens can log custom-metric values too 2026-11-14 08:48:30 +01:00
Marc-André Bombeck 2167e251c1 feat(custom-metrics): accept the measurement token on value logging
A script or a home-automation rule holding a measurement token can now
post a value to POST /api/custom-metrics/{id}/entries for a custom metric
its owner already created. The route names MEASUREMENTS_WRITE_SCOPE on
the POST only; the value list, the metric list and every create, edit,
delete and restore leg still name no scope and refuse the token 403.

The token stays on its owner's record: requireAuth refuses any account
selector, and an id that is unknown, deleted or another account's answers
the same 404. The entry has no source column, so the audit row names the
token that wrote it.

The bearer-scope guard now freezes the scope's reach at three files, with
the custom-metric file naming it once and only on the POST. Integration
cases cover the admitted write, idempotent retry, the foreign and deleted
ids, five other narrow scopes, every other custom-metric leg, and a shared
record. The OpenAPI descriptions and the token card text in every locale
say what the token can do and where a metric's id is found.

Refs #1377
2026-11-14 08:47:42 +01:00
Marc-André Bombeck 20e9620b12 Merge pull request #1379 from MBombeck/chore/hono-4.13.16
chore(deps): raise the hono floor to 4.13.16
2026-11-14 08:47:26 +01:00
Marc-André Bombeck 1c247f27e3 chore(deps): raise the hono floor to 4.13.16 2026-11-14 08:25:58 +01:00
Marc-André Bombeck deb7db2ffa chore(funding): add GitHub Sponsors next to Buy Me a Coffee 2026-11-13 22:08:22 +01:00
Marc-André Bombeck 5cf5f7a544 Merge pull request #1375 from MBombeck/release/v1.47.5 v1.47.5 2026-11-12 17:33:38 +01:00
Marc-André Bombeck d0763e273f fix(dashboard): give the tappable averages a 44 px touch target
The averages on a dashboard tile open their colour hint on a tap now,
which made them touch targets of 16 px height. On a touch screen the
trigger is 44 px tall, and a negative margin keeps the tile's line
where it was.
2026-11-12 17:16:10 +01:00
Marc-André Bombeck 5691ddcffb chore(release): v1.47.5 2026-11-12 16:35:27 +01:00
Marc-André Bombeck 3366a7a74c test: lower the size and comment baselines after the merges
Functions and files that shrank across the merged branches; every entry goes down.
2026-11-12 16:35:13 +01:00
Marc-André Bombeck 6e56c63234 Merge branch 'fix/v1475-no-sheet-back' into release/v1.47.5 2026-11-12 16:27:49 +01:00
Marc-André Bombeck 919c508d59 revert(sheets): take out Back closing the open sheet
Opening a sheet pushed a history entry, and closing it took that entry
off again with a history back. The browser answers that back later, so
when the close started a navigation it landed after the router's push
and undid it: the medication wizard stayed on the list instead of
opening the new medication, a section picked from the settings list on
a phone stayed on the account page, and a link followed from a sheet
could put the page under it back.

The sheet history goes, with its wiring in ResponsiveSheet, the
document sheet's opt-out, the account form's deference to it, Back
answering the discard question, and their tests. Back behaves as
before: it leaves the page and the sheet goes with it, and the account
form's own Back guard answers every Back again. A tap outside, Escape,
the X and a swipe still ask before dropping typed input. The two size
baselines return to their earlier numbers.
2026-11-12 16:27:10 +01:00
Marc-André Bombeck 6994cb5ce8 Merge remote-tracking branch 'origin/main' into release/v1.47.5 2026-11-12 15:46:29 +01:00
Marc-André Bombeck 0310172095 Merge pull request #1374 from MBombeck/release/v1.47.4 v1.47.4 2026-11-12 15:46:07 +01:00
Marc-André Bombeck e6a7e33a31 Merge branch 'fix/v1475-review' into release/v1.47.5 2026-11-12 15:28:48 +01:00
Marc-André Bombeck 80ee228899 fix(pwa): clear the leftover app badge from the page, not the worker
A badge call from the service worker stalled Chromium's worker thread
while it activated, awaited or not: the worker reached "activated" but
never claimed its pages, so no page was ever controlled and every
offline path was gone. The worker no longer touches the badge. The
installed app clears a leftover count from the page once the worker is
registered; a browser tab leaves it alone.

The filter-sync test no longer reads `history.length`, which the
browser caps; the recorded push without a replace already proves the
new entry.
2026-11-12 15:28:37 +01:00
Marc-André Bombeck 159f40c0fc test(reminders): run the ketone checkup cases beside the glucose ones
The two ketone cases repeated the glucose cases with one type changed; they are now one parametrized case each, which keeps the mocked client casts at their count.
2026-11-12 15:22:46 +01:00
Marc-André Bombeck 352a170313 docs: past tense for the Fitbit turndown, plain punctuation in new text
The Fitbit guide still called the integration experimental and spoke of
the 30 October 2026 turndown as ahead. Three new files carried em
dashes in a doc comment and two test titles.
2026-11-12 15:19:19 +01:00
Marc-André Bombeck 9ed27c47f4 fix(i18n): release notes label, neutral discard and prefill wording
- The About button opens the release notes and now says so in all ten
  languages; six of them still showed the English word "Changelog".
- The discard question now also covers edit sheets, where "Discard this
  entry?" read like deleting the target or episode being edited. It
  asks about the changes in every language; Russian also loses the
  ambiguous "Отменить" on both the title and the button.
- The 7-day trend figure on a dashboard tile had an English screen
  reader label in every language.
- Outlier terms in the new checkup and ketone strings follow each
  catalog (ru "Кетоны в крови", "Коуч"; es "Desactivado"; nl
  "rusthartslag"), the French steps question reads naturally, and the
  shared Polish and Russian Coach question no longer assumes a
  masculine speaker.
2026-11-12 15:19:19 +01:00
Marc-André Bombeck 7683e84a84 test(medications): fail the dose history test on a read of every intake
The case with a year of earlier takes proved the ledger stays the same,
which the old read of every intake satisfied as well, so a revert of
the bounded read passed every test. It now also counts the rows the
route read and expects only the window's.
2026-11-12 15:17:50 +01:00