Commit Graph
7082 Commits
Author SHA1 Message Date
Marc-André Bombeck 706af61cdd fix(custom-metrics): say "name taken" only for a name clash
The form read every 409 as "a metric with this name already exists".
Now that it keeps one idempotency key across taps, a second tap while
the first create is still running also answers 409, and the form told
the person their name was taken. The create and rename routes send
`customMetric.name_taken` with the clash, and the form matches the code.
2026-11-12 12:52:39 +01:00
Marc-André Bombeck 671245c782 fix(documents): one cap line for both pickers, with a search-aware hint
The vault picker and the Coach's attachment picker each wrote their own
"showing the newest 50" line, which the UI standards leave to
`ListCapNotice`, and with a search running past fifty matches the line
still said "Search to find an older document". Both pickers now share
`DocumentPickerCapNotice` on `ListCapNotice`, which takes the sentence
to show, and a running search asks for a narrower one.
2026-11-12 12:51:32 +01:00
Marc-André Bombeck 3ed266e281 fix(measurements): drop the stray space in a unit-less range message
A score, rating, count or ratio has no unit label, so the range
message for a manual pain score read "Enter a value between 0 and 10 ."
with a space before the stop, and the same in every locale. A second
sentence without the unit now answers those types.
2026-11-12 12:49:18 +01:00
Marc-André Bombeck 048dbbee9f fix(measurements): keep computed scores out of the bulk delete
The row menu stopped offering edit and delete on a computed score
(recovery, strain, stress), but the list still drew its selection
checkbox and "select all" took it into the page, so the bulk bar could
delete a page of scores, and the tombstones kept the recompute out.

A computed row now has no checkbox on either layout and stays out of
the page selection, and the bulk-delete route skips computed rows if a
client sends them anyway. The iOS app treats these rows as read-only
and does not rely on deleting them.
2026-11-12 12:48:03 +01:00
Marc-André Bombeck a4b14609bf fix(practitioners): offer an Undo for every delete, not only the last
Two quick deletes in the address book showed the Undo toast for the
second entry only: the callbacks `mutate` takes belong to the latest
call of the list's one mutation, so the first entry's were dropped. The
toast now hangs on each delete's own promise.
2026-11-11 23:00:43 +01:00
Marc-André Bombeck ca0d80b85c test(insights): prove the health status cache against Postgres
The route test that pinned the cached answer replaced the database client
and the engines, so it saw the calls the route makes and not what a reader
gets back. The integration test drives the shipped route: a reading written
past the API leaves the second open on the stored answer, while a
measurement written through the API and a module switch both show it.
2026-11-11 23:00:16 +01:00
Marc-André Bombeck df47980454 fix(telegram): pick the running course and judge a reminder by its slot
The "taken <name>" keyword looked up the first medication of that name
and only then asked whether its course had ended, so an old ended
course beside the current one of the same name answered "not found".
The lookup now reads every match and takes the first that runs.

A reminder button judged the course at the moment of the tap, so the
last evening dose of a course, confirmed after midnight, was refused
although the web still takes it. When the message names its slot, the
course is now judged at that slot. The handler file grows by six lines;
its size baseline is raised to match.
2026-11-11 22:59:53 +01:00
Marc-André Bombeck d79060e26b fix(checkups): show a marked-done check-up as done before the refetch
The "Mark done" button re-enables as soon as the satisfy call settles,
while the row kept reading as due until the list refetch landed, so a
second tap stored a second satisfied entry; skip and snooze behaved the
same. The row each of the three calls answers with is now written into
the cached list on success, so the row moves to its next due date at
once, and the refetch follows as before.
2026-11-11 22:56:32 +01:00
Marc-André Bombeck 46906916d8 fix(vaccinations): re-anchor a booster on the logged dose's own day
Logging the next dose satisfies a matching booster reminder with the
dose date, a calendar date stored at UTC midnight. The reminder engine
reads that instant in the person's zone, where west of UTC it is the
evening before, so the next booster came due a day early. The first
booster's anchor was already counted from the start of the dose day in
the person's zone; the satisfy path now hands the engine the same
instant.
2026-11-11 22:55:59 +01:00
Marc-André Bombeck f76e5cdafd fix(insights): let a read grant read the record's targets
The weight band and the BMI chart read `/api/insights/targets` inside a
shared record, and the route asked for a manage grant, so a read or
write delegate got a 403 and saw no band and no BMI. The targets are
the bands the dashboard snapshot already paints on a whole-record read
grant, computed with no provider, so the read now asks for the same
level. A section-scoped grant is still refused.
2026-11-11 22:54:34 +01:00
Marc-André Bombeck ef952c4354 test: carry the function sizes the merged branches recorded
The sheet now owns its dismissal guard and the Back handling, and three pages gained one or two lines for the save and refetch order; each branch had recorded its numbers, the merge kept only one side.
2026-11-11 22:54:20 +01:00
Marc-André Bombeck ce01d455be fix(targets): no adult weight and BMI bands on a child's record
Now that the BMI chart draws inside a managed record, a child's normal
BMI sat in the red under-17 band, and the weight page painted the adult
WHO band (about 26 to 35 kg for 118 cm), so a healthy 21 kg read as
underweight. The release's own weight-band test pinned that band.

No band here knows a child's age yet. For a record under 18, or a
managed record with no date of birth, the targets read names no WHO
weight range, no BMI range and no category; the record's own weight
target still shows, and the values and the chart stay. The BMI chart
and the weight band draw only what the server names. The weight-band
test now uses an adult height and gains the child case.

The targets builder and the vitals builder grow by two lines each for
the flag; their size baselines are raised to match.
2026-11-11 22:53:31 +01:00
Marc-André Bombeck d5dd05b5ac Merge branch 'fix/v1475-cleanup' into release/v1.47.5
# Conflicts:
#	src/__tests__/baselines/source-file-lines.json
#	src/__tests__/baselines/source-function-lines.json
#	src/__tests__/baselines/version-stamp-comments.json
2026-11-11 22:51:42 +01:00
Marc-André Bombeck b5e118d086 Merge branch 'fix/v1475-speed' into release/v1.47.5
# Conflicts:
#	src/__tests__/baselines/source-function-lines.json
2026-11-11 22:51:36 +01:00
Marc-André Bombeck ad483fa4bc Merge branch 'fix/v1475-mobile' into release/v1.47.5
# Conflicts:
#	src/__tests__/baselines/source-function-lines.json
#	src/__tests__/baselines/version-stamp-comments.json
2026-11-11 22:51:30 +01:00
Marc-André Bombeck 9683daf4f2 fix(api): take a new idempotency key once the server has answered
A create form kept its key until a save succeeded. The server stores a
refusal under the key for a day, so after a 422 or 409 the corrected
retry ran as a different body without any protection, and a timeout on
it could store the entry twice; an unchanged retry after the cause was
gone replayed the stale refusal until the form was closed.

Any answer now settles the key. Only a timeout, a dropped connection, or
the 409 that says the first request under the key is still running
(`X-Idempotent-Replay: false`, now `ApiError.inFlight`) keeps it, so
those retries still replay the first answer.
2026-11-11 22:50:42 +01:00
Marc-André Bombeck 0c77eaa085 fix(errors): name the refusals behind the AI test and a passkey proof
Three refusals answered without an error code, so the web printed the
status's generic sentence. A connection test with nothing configured
read "Some of the entries were not accepted", and a mistyped password
while adding a passkey read "Your session has ended. Sign in again",
which sent people to sign out for nothing.

An empty chain now resolves to no provider, which the test route
answers with `ai.provider.none`. The passkey registration and the
step-up mint answer a failed or stale proof with `auth.reproof.failed`.
`ai.provider.none`, `ai.budget.exceeded` and `auth.reproof.too_weak`
get sentences in every locale.
2026-11-11 22:49:20 +01:00
Marc-André Bombeck f17819f1c2 fix(settings): English addresses for the health record and checkups pages
Two Settings pages had German words in their address in every
language: /settings/gesundheitsakte and /settings/layout/vorsorge.
They are /settings/health-record and /settings/layout/checkups now,
and the old addresses (and the older /settings/sharing and
/settings/vorsorge) redirect permanently, so bookmarks and links in
old reports keep working; the report range a since-last-visit link
carries in its query passes through. The in-app links, the tour, the
command palette, the anchor forwards and the e2e specs use the new
addresses, and the two message groups follow the new slugs.
2026-11-11 22:47:40 +01:00
Marc-André Bombeck 4be724fefb fix(ai): keep the picked gateway serving behind an empty chain
A person on the OpenAI-compatible gateway lost every AI surface once
their chain was saved at all: the fallback to the picked gateway asked
whether the chain was the default object itself, so a chain reset to
the default, reordered, or written by the gateway form's reasoning
setting (which appended a disabled entry to hold the value) no longer
counted, and the chain resolved empty. Rows written that way before
this release broke on deploy.

The fallback now reads the chain's content: the picked gateway serves
when nothing else resolves, unless the chain holds the gateway switched
off. A disabled gateway entry that carries a reasoning effort is the
form's holder, not a switch; the chain editor drops the effort of a
gateway it switches off, so a switch-off stays one. Saving the gateway
form with the gateway picked writes its entry switched on. Resolution,
the presence probe, the account payload and the iOS availability flag
all read the same rule.
2026-11-11 22:45:28 +01:00
Marc-André Bombeck 3b79c81379 test(i18n): expect the German chart column label
The dashboard layout test pinned the German column header as "Chart",
the English word the catalog carried until it was translated.
2026-11-11 22:44:29 +01:00
Marc-André Bombeck 6be88e777a fix(medications): English tab slugs in the URL, old links still open
The medication detail tabs put German words into the address for
every language (`?tab=verlauf`, `?tab=bestand`). They are overview,
effect, schedule, supply, history, injection and advanced now. Every
old slug maps to its tab, so a bookmark, a link in an old report or a
low-stock notification sent before the change opens where it did. The
low-stock push, the list card and the efficacy summary link with the
new slugs. The slug vocabulary moves into its own module with a test.
2026-11-11 22:41:42 +01:00
Marc-André Bombeck 17dbb225d4 fix(profile): read and store the date of birth as a calendar day
The iOS app sends the date of birth as the instant its date picker
returned, and the profile writers stored that instant as sent. Since the
report cover and the share page read the date part of the stored value,
an entry made just after midnight in Berlin printed the day before, and a
Californian entry made in the evening printed the day after.

Both profile writers now store the calendar day the value names in the
owner's zone, at noon UTC like other date-only values, so an iOS client
reading the instant back in its own zone keeps the date. Older rows keep
their instant: dateOfBirthKey reads a date-only anchor (UTC midnight or
noon) by its date and any other instant in the owner's zone. The report
collector, the targets age, and the web forms that send the date back
read it through that helper.
2026-11-11 22:37:57 +01:00
Marc-André Bombeck 2a68b39a85 fix(ketones): offer ketone logging in the catalog and as a checkup
Ketones joined in v1.47.2 without their two sibling lists. The metric
catalog treated them as connectable and sent a user without readings
to the integrations page, where nothing delivers ketones; they now
count as manual-only and the row offers "Log ketones". And a checkup
could not be tied to ketones, so a "measure ketones" reminder never
resolved on its own; ketones are now a reminder target next to blood
glucose, with a label in all ten locales. A catalog test also holds
every metric that cannot be connected to a way to log it.
2026-11-11 22:34:51 +01:00
Marc-André Bombeck 3edb63d759 fix(illness): log a day of a recovered illness inside the episode
"Log day" always opened on today and let the picker run to today, so
for an illness marked recovered on Monday a note added on Thursday was
filed three days after the recovery, and the day view showed a sick day
with no illness beside it. Both places that open the sheet now hand it
the episode's last day: today while it runs, the recovery day (read in
the profile zone, as the server reads it) once it ended. The picker
opens there and offers nothing later.
2026-11-11 22:33:41 +01:00
Marc-André Bombeck 71d4516808 fix(checkups): show the Coach and switched-off badges in the list view
The card view marks a checkup the Coach created and one that is
switched off; the list view drew neither, so a disabled checkup looked
active there. Both views now take the badges from one helper, and the
list row shows them beside the title.
2026-11-11 22:31:26 +01:00
Marc-André Bombeck d77fe9aa7d fix(i18n): translate the illness labels left in English
The illness screens showed "Weight", "Pulse", "Recovery" and "Day" in
English in German, French, Spanish, Italian and Polish: the four keys
had been copied from English into those catalogs, while their
neighbours were translated. The same copy left the medication wizard's
"Name" step in French, Spanish, Italian and Polish and the dashboard
layout's "Chart" column in German in English. A test now holds the
illness keys translated in every locale.
2026-11-11 22:29:24 +01:00
Marc-André Bombeck 9712238d3d fix(about): link the release notes instead of the full changelog
Settings, About sent every user to CHANGELOG.md on GitHub, a 1.4 MB
file with every release since the first. The link now opens the
releases page, which carries the same notes per version and loads.
The `changelog` field of /api/version keeps its name and stays a URL.
2026-11-11 22:24:40 +01:00
Marc-André Bombeck 4a40a63656 docs: remove the second contributing note and its dead pointers
CONTRIBUTING-AI.md pointed contributors at a CLAUDE.md "checked in and
kept current"; that file is not in the repository, so the pointer and
the twenty references to it in folder READMEs, docs and comments led
nowhere. The note goes; its one lasting rule (whoever commits a change
stands behind it, no real names, no live health figures, no secrets)
moves into CONTRIBUTING.md. The folder READMEs keep their own content
and drop the dead link, and a reference to the unpublished planning
folder goes with it.

The checked-in .mcp.json was a local editor config no workflow reads;
it is untracked and ignored now. The translation tiers are described
as machine-translated first drafts reviewed by the community, and the
list names Russian, which it missed.
2026-11-11 22:24:16 +01:00
Marc-André Bombeck 8f6081de89 test: delete text pins on things removed releases ago
Five tests only read source or message files to assert that something
long gone stays gone: the moodLog bridge (removed in July), the chart's
target-adjust link (v1.16.8), the mood notes timeline, the medication
detail page's old dose card and wizard host (v1.15.18), and the
obsolete v1.34.1 copy keys. They protect no behaviour, and the general
i18n guards already hold every key and placeholder across the ten
locales, which the v1.34.1 list did for nine. The source-read baseline
drops from 337 to 332.
2026-11-11 22:23:07 +01:00
Marc-André Bombeck 408c2abb39 test: lower the as-never baseline after the channel test went
The removed preferred-channel test carried one of the casts the
realism ratchet counts.
2026-11-11 22:22:31 +01:00
Marc-André Bombeck 08e6229142 fix(glucose): show targets in the new unit right after a unit change
After switching between mg/dL and mmol/L, the target panels on the
glucose page kept the old unit for up to ten minutes. Their unit comes
from the cached targets payload, and the save only refreshed the
account payload. The select now invalidates the targets query, and the
route evicts the profile-derived server caches when the unit changes,
the same way the thresholds and source-priority writes do.
2026-11-11 22:21:47 +01:00
Marc-André Bombeck 0c07764097 refactor(settings): drop two query keys nothing reads
The unit-system and glucose-unit selects invalidated
`userUnitPreference()` and `userGlucoseUnit()` after a save, but no
query was ever registered under either key; every surface reads the
units from the account payload, which both selects already refresh.
2026-11-11 22:20:53 +01:00
Marc-André Bombeck 5552a9b149 refactor(notifications): drop the channel option that routed nothing
The localised dispatch helper accepted a `channel` and copied it into
the metadata as `preferredChannel`, which no sender reads. No caller
passed it either; every message still fans out across the user's
enabled channels. The option, its comment and the test that pinned the
copy go.
2026-11-11 22:20:09 +01:00
Marc-André Bombeck 507d4e6fac refactor(medications): drop the side-effect slot nobody wires
The card menu took an optional side-effect item for the GLP-1 card, but
no page ever passed the handler, so the item never rendered; side
effects are logged on the detail page. The slot, its message key in ten
locales and the tests that passed it by hand go.

One test pinned behaviour only the dead slot produced: a delegate who
may write but not manage kept a menu trigger because the test supplied
the handler. In the app that delegate never had one, and the test now
says so.
2026-11-11 22:19:47 +01:00
Marc-André Bombeck fc1fadcdab chore: remove production files that only tests reached
Four files under src had no production importer:

- the keyset measurement reader for backups: both backup writers moved
  to the shared account copy and the streamed full backup, and its
  header still claimed both used it;
- the HOMA-IR calculator and the mood stability label, never wired to a
  surface;
- the backup verdict helper, which only the backup classification guard
  called. It now lives in that guard.

The queue expiry table is what the job queue guards check the registry
against and nothing in the worker reads it, so it moves to the test
helpers. The version-stamp baseline drops the deleted files.
2026-11-11 22:18:11 +01:00
Marc-André Bombeck 82125815d5 test: settle the parity snapshot and the size ratchet
An unreadable provider key is now reported once: the empty-chain fallback no longer opens the same key a second time. Two files shrank, so the size baseline steps down.
2026-11-11 22:17:07 +01:00
Marc-André Bombeck 3b3adc3aed chore(charts): correct the sleep series clamp comment
The comment said the series route caps sleep at 365 days; the route
accepts up to 3650, which is what the "All" tab asks for and what the
clamp below applies.
2026-11-11 22:15:31 +01:00
Marc-André Bombeck 2284040c6e fix(cycle): hold the calendar's height while the cycle read loads
The cycle page's calendar card showed one line of loading text until
its read arrived, then grew to the month grid, so the predictions and
everything below moved down once the page had drawn. The card now
draws the month header and this month's weeks in the grid's own cell
size while it loads, with the loading text kept for screen readers.
2026-11-11 22:14:45 +01:00
Marc-André Bombeck 848e88d58e fix(admin): hold the recovery readiness list's height while it loads
`/admin/backups` opens with the recovery readiness card, which showed a
one-line spinner until its seven signals arrived as one block, so the
backups and off-host cards below jumped down by the whole list after
they had drawn. The loading state now draws one placeholder row per
signal in the list's own row shape, with the loading text kept for
screen readers.
2026-11-11 22:11:37 +01:00
Marc-André Bombeck eec52534d5 fix(insights): ask the empty-state Coach question in the reader's language
A metric page without data offers to ask the Coach about the metric.
44 of the 49 pages passed that question as an English literal, so a
German, French or Korean reader got an English first message; only 5
read it from the catalog. 31 of the 44 were one sentence with the
metric's name swapped in.

`HealthKitMetricPage` now asks that sentence once, translated, around
the page's own title, and the 31 pages drop the prop. The 13 pages
with a question of their own (steps, HRV, sleep, mood, workouts, blood
pressure and others) read it from the catalog like the 5 did, in all
ten languages.
2026-11-11 22:09:23 +01:00
Marc-André Bombeck b970ea7468 perf(dashboard): seed the mood chart's series from the snapshot
The dashboard snapshot carries the mood tile's series from the same
engine `/api/mood/analytics` answers from, and the snapshot already
seeds the widget layout, but nothing seeded the mood analytics cell the
mood chart reads, so every dashboard open with the mood chart asked for
the series again. Both seed points, the server render and the client
snapshot read, now fill that cell too, under the same rule as the
layout: only an empty cell, and only when the tile has readings, the
one case where its summary is the route's.
2026-11-11 22:05:48 +01:00
Marc-André Bombeck ea6e94adcf perf(monitoring): read the monitoring switches in the root layout
Every document load, the sign-in page included, mounted a client
effect that asked `/api/monitoring/settings` for three instance-wide
values (false, null, false on a default install) before it mounted the
analytics script or the error reporter. The root layout is a server
component and now reads them while it renders and passes them in, so
the request and the effect go. The key-mismatch page reads nothing, as
before. The route stays for other callers.
2026-11-11 22:05:48 +01:00
Marc-André Bombeck d2ac3b91bd perf(insights): stop the tab strip reading the briefing on every page
The layout shell around every Insights page read the advisor briefing
(`GET /api/insights/generate`, about half a second on the demo) for the
regenerate button on the tab strip, and once the answer arrived it
loaded the schema chunk that parses it. The strip shows no briefing;
only the overview does, and it reads the same cell itself. On a metric
page both were spent on a button.

The shell's hook now reads the briefing only while its own regenerate
settles. A regenerate from a page that never read the briefing reads
it first, so a timed-out attempt still settles against the briefing it
replaces instead of taking the old one for fresh. The button, its
toasts and the overview are unchanged. The strip's comments that said
only the overview carries the button are corrected.
2026-11-11 22:05:48 +01:00
Marc-André Bombeck e1d143d689 fix(medications): read the dose history's window, not every intake
The history tab asks for a window of at most a year, but the route read
every intake the medication ever had: a medication taken three times a
day for five years read about 5,500 rows on each open. The full read
also served to find the last intake for rolling cadences.

The route now reads the rows anchored or taken in the window, and of
the rows before it only the latest take, which is the anchor a rolling
grid re-starts from and the last intake when none falls in the window.
Earlier takes place no slot in the window, so the ledger is the same.
The read moves into its own function, which shortens the handler.
2026-11-11 22:05:48 +01:00
Marc-André Bombeck 6a1c91d5d4 perf(insights): mount the medication efficacy summary when near
Insights > Medications sent two requests per medication on entry: the
compliance calendar inside each card and the efficacy read behind the
summary card, which sits below every card and shows one line per
medication. The summary now mounts through `DeferUntilNear`, like the
overview's sections, so the efficacy reads go out only when the reader
scrolls toward it. The cards and what the summary shows are unchanged.

The comment that called the summary "never a second computation" goes:
the efficacy route builds the view on every request.
2026-11-11 22:05:48 +01:00
Marc-André Bombeck d310058bc5 fix(admin): read the AI quality summary once on the Coach page
`/admin/coach` mounts the AI quality card and the Coach feedback card,
and both read `GET /api/admin/ai-quality` with the same unwrap, under
two different query keys, so every open sent the request twice. The
feedback card now reads the quality card's cell.
2026-11-11 22:05:48 +01:00
Marc-André Bombeck a6fdd48058 fix(pwa): pause the version check while the tab is hidden
The version poller asked `/api/version` every 60 s from a plain timer,
also in a background tab or a minimised window, for as long as the
browser let timers run. It was the largest standing poll and the only
one that kept going while hidden, although the poll notes describe it
as the same shape as the others.

A tick now asks only while the tab is in view, and a tab that comes
back after a full interval away checks once at once, so a release
still surfaces on return.
2026-11-11 22:05:48 +01:00
Marc-André Bombeck 9b2c68fbe5 perf(insights): keep the health status answer in the analytics cell
`/api/insights/health-status` recomputed the coincident deviation and
the 180-day changepoint scan over every vital on each open of Insights,
the only read on that page that stayed slow when warm, for a body of a
few hundred bytes. It now goes through the same analytics cell its
sibling reads use. Measurement and mood writes sweep the record's
cells; the reader's day and the switched-off modules are part of the
key, so a new day or a module switch never serves the other answer.
2026-11-11 22:05:48 +01:00
Marc-André Bombeck 0d41abcda4 fix(settings): list the Coach entry only while the Coach can answer
The settings nav filtered its Coach entry by the raw module map, which
follows the operator's switch and Hide Coach but not a missing provider
or missing consent, so it kept an entry the sidebar and the bottom bar
had already dropped. It now reads useNavModules like them. Settings, AI
decides from the same map whether to list the stored Coach memory, so
the memory always has one place in Settings where it can be read and
deleted.
2026-11-11 21:50:28 +01:00
Marc-André Bombeck 8352b1eef2 fix(onboarding): keep the tour card above the home indicator
On a phone the tour falls back to a card at the bottom edge, 8 px above
it, so in the installed app its Next and Skip row sat inside the home
indicator strip. The card now adds the bottom safe area, as the bottom
bar and the sheets do.
2026-11-11 21:49:56 +01:00