3252 Commits
Author SHA1 Message Date
Marc-André Bombeck 8dc52c8f0e Merge pull request #393 from MBombeck/release/v1.25.11
release: v1.25.11 — consistent settings and cards
v1.25.11
2026-06-30 22:14:19 +02:00
Marc-André Bombeck 7e8e848eb2 fix(medications): drop the unused DoseUnitKey export
The shared dose-unit module exported a DoseUnitKey type alias that nothing
consumed, tripping the dead-code gate. Drop it; the const array is the
only export the wizard and formatDose need.
2026-06-30 21:45:56 +02:00
Marc-André Bombeck e4935ce788 chore(release): v1.25.11 — consistent settings and cards 2026-06-30 21:42:46 +02:00
Marc-André Bombeck 220233e845 fix(medications): localise the per-schedule dose accent too
The medication and GLP-1 cards print a per-schedule dose override as a
trailing accent ("— 5 mg"), straight from the stored string, so the same
raw unit token the main dose carried still showed through there. Run it
through formatDose so the per-schedule accent localises like the rest.
2026-06-30 21:31:45 +02:00
Marc-André Bombeck 09be190f9f feat(ui): swap the date field's native picker for an app-controlled calendar
The date field opened the browser's native date picker, which rendered by
the browser and kept its intrinsic width on mobile. Replace it with the
shadcn calendar in a popover: a fully app-controlled react-day-picker
calendar that looks the same everywhere and never overflows a phone-width
sheet. The field keeps its preference-formatted, typeable display and its
yyyy-MM-dd value contract, so the date-time field, the time field and
every form that uses them are unchanged. The calendar's month and weekday
labels follow the UI language.
2026-06-30 20:47:23 +02:00
Marc-André Bombeck 5a96b58439 fix(settings): stop short sections over-scrolling into empty space
A short settings section over-scrolled into a dark empty band below the
last card: the content column's min-height reserve was tuned without the
AuthShell wrapper's pt-6/pb-20 in the budget, so it pushed the column past
the viewport. Move the floor onto the grid (top bar + wrapper padding =
10.5rem) and make the content column the grid's 1fr row, so it fills the
viewport exactly on a short section — no over-scroll — and grows normally
on a long one. The sticky sidebar and the stable scrollbar gutter are
unchanged, so switching sections stays width-stable.
2026-06-30 19:08:57 +02:00
Marc-André Bombeck a01c9d0435 feat(settings): turn Appearance into a hub of per-module subpages
Appearance ("Darstellung") stacked every module's view and ordering
settings on one long page. Split it into a hub that lists the modules as
navigable rows, each opening its own /settings/layout/<module> subpage
with a back link — the per-module settings move verbatim, no restyling.
The module routes now redirect to those subpages instead of an in-page
anchor, and the in-app cogs link straight to them.
2026-06-30 18:53:50 +02:00
Marc-André Bombeck fa2e2c6ba2 fix(ui): tell Bitwarden to skip config and secret fields
The Input and Textarea primitives already opted config and secret fields
out of 1Password and LastPass autofill (data-1p-ignore / data-lpignore)
whenever autocomplete was off, but Bitwarden had no opt-out hint anywhere,
so it kept offering to fill and save API keys, tokens and integration
URLs. Emit data-bwignore alongside the existing hints, which covers every
field flowing through the primitives. Pin explicit autocomplete on the
change-password dialog so genuine credentials still autofill, and add the
ignore hints to the export passphrase and the few new-password admin
config fields that opt in directly.
2026-06-30 18:32:35 +02:00
Marc-André Bombeck 8ce98a802f fix(measurements): give the custom-metrics section an accessible add button
The custom-metrics add button hid its label below sm and carried no
accessible name, so on mobile it read as a bare "+". Add an aria-label to
both the header and empty-state add buttons, and separate the section from
the built-in measurement list above it with a top border so it reads as
its own block.
2026-06-30 18:24:15 +02:00
Marc-André Bombeck 2ed73a3a34 fix(admin): truncate and copy the login-overview IP address
A long IPv6 in the login overview forced the table to scroll sideways and
the full address was awkward to lift out. Cap the cell, ellipsize the
address, and make it a button that copies the full value to the clipboard
with a transient checkmark and a toast — keyboard-activatable, with an
accessible label. The empty case stays plain text.
2026-06-30 18:24:15 +02:00
Marc-André Bombeck 45ca6ff24b fix(admin): name the configured geo provider in the system snapshot
The admin system snapshot hardcoded "ipwho.is" for the offline-geo-off
state, so an operator who points IP_GEO_LOOKUP_URL at another provider
still read the wrong host. Resolve the actual provider host from the env
and surface it through /api/version, so the snapshot reads
"Online (ip-api.com)" — the host it really queries.
2026-06-30 18:08:57 +02:00
Marc-André Bombeck 6fe552ffdf fix(medications): localise the dose unit and lift it onto its own line
A medication's dose is stored as free text the wizard composes from an
amount and a unit token ("1 pieces", "2 tablets"), and the card rendered
that token verbatim glued onto the name — so the unit showed in English
on every locale and the title read "Test ABC 1 pieces".

Translate the dose at display time: a formatDose helper splits the stored
string and runs a known unit token through the existing unit messages, so
"1 pieces" reads "1 Stück" / "1 piece(s)" per locale while a custom
free-text dose passes through untouched. The card header now carries the
name alone on its title line with the dose on a muted line beneath it,
above the category badge; the detail view, table and intake dialogs
localise the same way. Vorsorge and lab rows pass an empty dose so they
render no extra line.
2026-06-30 13:39:23 +02:00
Marc-André Bombeck a31711699c fix(settings): stop the integrations notification card hydrating from null
NotificationStatusCard read useAuth().isAuthenticated, which is false
during SSR and true on the client, so the card rendered null on the
server and a loading card on first client paint — a tree-shape change
React reported as a hydration mismatch on every authenticated load of
the integrations page, regenerating the subtree and dropping the
channel controls' handlers.

Gate the card behind the shared useMounted() hydration probe so the
server and the first client paint agree (both render null); the real
status loads as an ordinary post-hydration update. Fold the settings
shell's own inline copy of the probe onto the same hook.
2026-06-30 13:02:07 +02:00
Marc-André Bombeck d0b4b1e4cd fix(ui): introduce FieldGroup and unify the add-form rhythm
The measurement add form opened with a horizontal type row (label beside
the select) while every field below it stacked label-above-control, so
the form read with two competing rhythms. Introduce a small FieldGroup
primitive — the long-standing space-y-2 label-above-control idiom in one
place — and route the measurement, mood and baseline forms through it so
they share one vertical rhythm. The type row now stacks like the rest.

Output stays byte-identical for the already-vertical groups; only the
type row changes, by design.
2026-06-30 12:35:36 +02:00
Marc-André Bombeck ca067bfe3d fix(ui): conform the wellbeing card and fill lone grid items full-width
The mental-wellbeing instrument card carried a font-medium title and a
gap-4 body, drifting from the medication card it should mirror; bring its
title to text-lg font-semibold and its body to the shared space-y-3.5
rhythm.

Several insight grids left a lone trailing tile stranded at half width
with an empty column beside it. Gate each multi-column grid on having
more than one item so a single tile spans the full row, and give the
fixed five-card mood-correlation grid a trailing-card span so it no
longer orphans on the two-up breakpoint.

Add a little bottom breathing room to the device-score tile so its
rolling-average line no longer reads flush against the card edge.
2026-06-30 12:29:17 +02:00
Marc-André Bombeck 304f0c7057 refactor(settings): route every card header through SettingsCardHeader
Hand-rolled section headers had drifted into a dozen variants — some
without an icon, some with a text-sm description instead of the shared
text-xs, the data-reset title once even tinted red. Route the remaining
ad-hoc headers through the SettingsCardHeader primitive so icon sizing,
title weight and description size live in one place.

Give the integrations connections group (the data sources) its own
labelled header for parity with the delivery-channels group below it.

A coverage test now globs every settings *-section.tsx / *-card.tsx and
fails on any hand-rolled <h2 text-lg> outside the primitive, with a short
allowlist for the collapsible-toggle security cards and the layout
section pending its hub rebuild.
2026-06-30 12:22:08 +02:00
Marc-André Bombeck f207f1a7d9 Merge pull request #392 from MBombeck/release/v1.25.10
release: v1.25.10 — mobile add-form fix
v1.25.10
2026-06-30 10:41:17 +02:00
Marc-André Bombeck 9bae4dd2f6 fix(ui): stack the date-time field on narrow viewports
A native date input keeps its intrinsic width on mobile WebKit and won't
shrink, so the `date + fixed-width time` row overran a phone-width sheet —
the time field and its clock icon spilled past the screen edge and every
add form (measurements, mood, medication, …) scrolled sideways. Stack the
two halves on narrow viewports and only place them side-by-side from the
`sm` breakpoint up; each half then takes the full sheet width and nothing
overflows.
2026-06-30 10:33:16 +02:00
Marc-André Bombeck 9bba6204b4 Merge pull request #391 from MBombeck/release/v1.25.9
release: v1.25.9 — custom metrics
v1.25.9
2026-06-30 09:57:35 +02:00
Marc-André Bombeck 3d75db917e fix(settings): keep the section nav hydration-stable
The settings section navigation filtered its entries by the resolved
`user.modules` map directly in render. That map resolves at different
points on the server-rendered pass and the hydrating client pass, so the
two renders emitted a different number of nav entries — a hydration
mismatch that made React discard and regenerate the tree, leaving every
control on the page non-interactive (a disclosure that wouldn't open, an
export button that did nothing).

Emit the full fail-open list on both the server pass and the first client
paint (gated behind a `useSyncExternalStore` hydration probe), then apply
the module filter once, after hydration. Server and first client render
now always match, so the nav — and the rest of the settings page — stays
interactive.
2026-06-30 09:49:09 +02:00
Marc-André Bombeck c306d42347 chore(release): v1.25.9 — custom metrics
Renumber the custom-metrics migration to 0223 (the next free slot on the
trunk) and cut the release: version bump, regenerated OpenAPI contract,
service-worker stamp, and CHANGELOG entry.
2026-06-30 08:59:44 +02:00
Marc-André Bombeck b3e6ba03d7 feat(measurements): add custom metrics (define, log, chart)
Add a user-defined custom-metric store alongside the built-in measurements
on the Measurements surface. A user defines an arbitrary metric (name, unit,
optional target window, decimals, description), logs values, and charts them.

The store is a separate generic catalog + values pair, isolated from the
closed measurement-type system: not synced, not in FHIR, not in insights —
log and chart only. Names and units are plaintext, mirroring the biomarker
catalog. The inline list lives beneath the measurement list (no new nav
entry); tapping a metric opens a detail page with the trend chart, target
band, stat strip, and an editable value history.

Migration 0224 adds custom_metrics and custom_metric_entries.
2026-06-30 08:54:39 +02:00
Marc-André Bombeck 150b827d01 Merge pull request #390 from MBombeck/release/v1.25.8
release: v1.25.8 — carrier in the sign-in overview
v1.25.8
2026-06-30 00:08:24 +02:00
Marc-André Bombeck 9b097b0553 test(audit): type the geo fixture so strict tsc accepts a non-null location 2026-06-30 00:00:24 +02:00
Marc-André Bombeck bdac5b2c0d feat(admin): resolve the sign-in carrier online + give it its own column
The network operator (carrier) used to resolve only from the optional
offline GeoLite2-ASN database. On a host without it the carrier stayed
empty even though the location resolved fine online.

Mine the operator from the same online provider response the location
lookup already fetches — ip-api's top-level `isp`/`org`/`as`, ipwho.is's
nested `connection.{isp,org,asn}` — so the carrier is populated out of the
box. The offline ASN database stays authoritative when configured.

A single `lookupIpGeo` now returns location + ASN + carrier in one pass;
the audit write and the backfill both go through it. The backfill also
revisits rows that already had a location but no carrier, so the column
fills in across existing history, not just for new sign-ins.

In the admin sign-in overview the carrier moves out of a chip stacked
under the login method into its own column, next to the location.
2026-06-29 23:51:40 +02:00
Marc-André Bombeck c14d760654 Merge pull request #389 from MBombeck/release/v1.25.7
Release v1.25.7 — settings, tidied
v1.25.7
2026-06-29 22:51:22 +02:00
Marc-André Bombeck b6886c50d2 chore(release): v1.25.7 2026-06-29 22:42:50 +02:00
Marc-André Bombeck cce0dd9414 refactor(settings): drop the no-op content-column scrollbar gutter
The authenticated shell's <main> scroll container already reserves the
scrollbar gutter; the settings content column is not a scroll container, so a
gutter rule on it has no effect. Remove it (and its misleading comment) rather
than imply a fix that does nothing.
2026-06-29 22:21:06 +02:00
Marc-André Bombeck 11774f731e refactor(settings): fold tracking modules into Appearance, dedupe nav
Collapse the duplicated settings navigation so each surface lives in
one place:

- Appearance ("Darstellung") stops being a link hub and renders the
  dashboard, insights, and every tracking module's settings inline as
  stacked, anchored sections. Each module section keeps its module
  gate, so a disabled module's section does not render. The standalone
  Medikamente / Stimmung / Labor / Krankheit / Vorsorge nav entries are
  gone; their routes 301-redirect to /settings/layout#<anchor>.
- Move the delivery channels out of Notifications into Integrations,
  where the other connected services live. Notifications keeps only the
  reminder types. /settings/channels now redirects to
  /settings/integrations#channels; the per-channel anchors still resolve.
- Fold the clinician share-link surface into the health-record section
  as a labelled Sharing group. /settings/sharing redirects to
  /settings/gesundheitsakte#sharing.
- Drop the duplicated active-sessions and security-activity cards from
  Account; they remain under Data & Privacy.
- Reserve the scrollbar gutter on the settings content column so a
  section with a vertical scrollbar and one without render at the same
  width.

Move-only: every card renders through its existing component unchanged.
2026-06-29 22:16:02 +02:00
Marc-André Bombeck 8cd28ffd3f Merge pull request #388 from MBombeck/release/v1.25.6
Release v1.25.6 — optional HTTP geolocation provider
v1.25.6
2026-06-29 20:46:42 +02:00
Marc-André Bombeck e51c6dc2ad feat(geo): allow an opt-in plain-HTTP location provider
A self-hoster can set IP_GEO_ALLOW_INSECURE=true alongside an http:// URL to
use a free HTTP-only provider — the free ip-api.com endpoint is HTTP-only (its
HTTPS form needs a paid key) but its geolocation is often more accurate and it
carries the ISP. The default stays HTTPS-only with ipwho.is; plain HTTP is
refused unless the operator explicitly opts in, since the looked-up IP then
travels unencrypted over the server's own egress. Whitelisted in compose and
documented in the env example.
2026-06-29 20:38:04 +02:00
Marc-André Bombeck fbb88b81bc Merge pull request #387 from MBombeck/release/v1.25.5
Release v1.25.5 — mental-wellbeing polish, location lookup
v1.25.5
2026-06-29 20:30:43 +02:00
Marc-André Bombeck e91a28fade test(e2e): skip the download-event assertions under mobile emulation
Playwright's mobile project (Pixel 5 / isMobile) treats a Blob + anchor
click as a navigation and never emits a "download" event, so the two
settings-export download tests time out only on chromium-mobile while
passing on chromium-desktop. Skip them on mobile — the download wiring is
engine behaviour, not viewport-dependent, and stays covered on desktop.
2026-06-29 20:22:28 +02:00
Marc-André Bombeck c275683e42 chore(release): v1.25.5 2026-06-29 20:04:25 +02:00
Marc-André Bombeck abb4c71d0c feat(geo): make ipwho.is the default IP-location provider again
ipwho.is is free, needs no key, and resolves a city/country for the login
overview out of the box. It is the default online lookup again; the offline
GeoLite2 MMDB tier stays strictly optional (consulted only on an online miss,
skipped when the databases are absent). Operators whose egress ipwho.is
rejects can point IP_GEO_LOOKUP_URL at ip-api.com — the parser accepts both
response shapes, so the swap needs no code change.
2026-06-29 20:00:53 +02:00
Marc-André Bombeck 2500dbeb1a fix(mental-wellbeing): match the standard chart, widen the page, drop the redundant chrome
- The screener trend now reads like every other trend: a monotone line over
  the primary colour with the dashboard's soft gradient area fill and matching
  margins. The surface-only severity-band backgrounds are gone (the band still
  shows in the tooltip), so it no longer looks different from the dashboard.
- The landing fills the content width like the other tracking surfaces instead
  of a narrow max-w-3xl column.
- The voluntary-self-test disclaimer line and the visible page heading + its
  tooltip are removed; the title stays as an sr-only heading for the outline.
- The instrument card's last-test line adopts the medication-card grammar:
  label left, the relative day (today / yesterday / date) right-aligned, no
  severity badge.
2026-06-29 20:00:36 +02:00
Marc-André Bombeck 23f803f982 Merge pull request #386 from MBombeck/release/v1.25.4
Release v1.25.4 — time picker honors the 24-hour preference
v1.25.4
2026-06-29 19:24:47 +02:00
Marc-André Bombeck 2c701e121e fix(measurements): keep blood-pressure field labels on one line
In the three-column blood-pressure entry grid the "Systolic (mmHg)" /
"Diastolic (mmHg)" / "Pulse (bpm)" labels wrapped onto a second line in
narrow columns. Render the localised label as the metric name (which
truncates if it must) plus the unit as a compact muted affix that never
wraps, so each field reads on a single line while keeping its unit.
2026-06-29 19:09:17 +02:00
Marc-André Bombeck 7e901e674a fix(ui): own the time picker so it follows the 24-hour preference
The native datetime-local / time picker renders its clock and AM/PM
toggle by the browser UI language, not the page lang or the app's
time-format preference — so an English-language browser showed AM/PM
even with 24-hour selected. Replace the native time control with an
app-controlled TimeField (text entry + a dependency-free popover of
hour/minute, plus AM/PM in 12-hour mode) whose hour cycle always tracks
the preference. DateTimeField now composes the native calendar (date)
with TimeField (time); the committed value stays a local
yyyy-MM-ddTHH:mm string, and min/max clamp the recombined value.

Also thread the time-format preference into the doctor-report PDF so its
generated-at timestamp honours it instead of the locale default.
2026-06-29 19:03:47 +02:00
Marc-André Bombeck 426b21497a Merge pull request #384 from MBombeck/release/v1.25.3
release: v1.25.3 — Mental wellbeing, labs depth, time-format + tile fixes
v1.25.3
2026-06-29 16:11:10 +02:00
Marc-André Bombeck 00ea61ee9f chore(release): v1.25.3 2026-06-29 15:53:41 +02:00
Marc-André Bombeck d0eced41f9 Merge v1.25.3: honor the 24h time-format preference app-wide 2026-06-29 15:49:52 +02:00
Marc-André Bombeck 7eca388f56 Merge v1.25.3: channels into notifications + Darstellung appearance hub 2026-06-29 15:49:39 +02:00
Marc-André Bombeck 0d45d0ab53 fix(format): honour the time-format preference on every clock renderer
The H24 / H12 preference only reached makeFormatters().time. Surfaces that
build their own Intl.DateTimeFormat — the sleep hypnogram axis, the workout
list and detail headers — omitted the hour cycle, so an en-locale (or AUTO)
user saw AM/PM even with H24 selected. The security activity feed and session
list rendered raw toLocaleString(), bypassing both the locale and the
preference entirely.

Export hourCycleOptions from format-locale as the single source for the
H12 / H24 / AUTO Intl options and spread it into the self-built formatters,
preserving each surface's locale and timezone. Route the security cards
through useFormatters().dateTime. Drop the date-time field's local copy of
the helper.

Guards: the helper contract, the en-US hour/minute call-site pattern (no
AM/PM under H24, AM/PM under H12), and formatUpdatedLabel fed an H24
formatter for the briefing freshness label.
2026-06-29 15:47:48 +02:00
Marc-André Bombeck 537b31f4ac feat(settings): fold delivery channels into Notifications, rename the Dashboard hub to Appearance
Two surgical, additive, reversible changes to the flat settings navigation.

Notifications becomes one surface with two sequenced, labelled groups:
Reminders ("what you receive") first, then Delivery channels ("where it
lands") = the existing channels panel, unchanged. The standalone Channels
sidebar entry and slug are dropped; /settings/channels 301-redirects to
/settings/notifications#channels (mirroring the reminders redirect). The
per-channel anchors keep resolving.

The mis-titled "Dashboard" area (slug kept as layout, so no route churn) is
renamed Appearance / Darstellung and widened from two links to six: dashboard
arrangement, insights overview and pills, plus deep-links to the view/sort/
order cards of medications, labs, the illness journal, and checkups. Each
module keeps its view cards on its own page; the hub only indexes them. The
checkups view card gains a vorsorge-view anchor so the deep-link lands.

i18n updated across all six locales; settings and notifications tests track
the new structure.
2026-06-29 15:47:39 +02:00
Marc-André Bombeck 78fec1ceff Merge v1.25.3: v1253-mental-wellbeing 2026-06-29 15:30:33 +02:00
Marc-André Bombeck d3057e4a92 Merge v1.25.3: v1253-briefing-timeout 2026-06-29 15:30:33 +02:00
Marc-André Bombeck a333776725 Merge v1.25.3: v1253-disable-documents 2026-06-29 15:30:32 +02:00
Marc-André Bombeck 9ede7575cf Merge v1.25.3: v1253-labs-detail 2026-06-29 15:30:32 +02:00
Marc-André Bombeck 0e21210263 Merge v1.25.3: v1253-insights-ui 2026-06-29 15:30:32 +02:00