fix(timeline): cap lab markers instead of refusing the request

A values list naming more than 24 lab markers answered 422. The list is a
device preference, so once a 25th marker was ticked every later visit
failed: the page rendered its error card, and the values menu that could
untick it only renders on success.

The server now keeps the first 24 markers and leaves the rest out, as it
already does for a marker the record no longer has; a malformed key still
answers 422. The page applies the same cap before it asks, and the values
menu holds further unchosen markers back at 24 with a line saying why,
while a chosen one can always be removed.
This commit is contained in:
Marc-André Bombeck committed 2026-10-29 21:06:52 +01:00
1 parent 00d129ad42
commit 21f6f5796b
18 files changed
+164 -25

No files matched your search

+10 -8
View File
@@ -26190,17 +26190,19 @@ paths:
- in: query
name: values
schema:
description: Comma-separated value series to include, as `MeasurementType` names, `MOOD`, or a lab marker as
description: "Comma-separated value series to include, as `MeasurementType` names, `MOOD`, or a lab marker as
`lab:<biomarkerId>` (see `availableLabs`). A name given twice counts once, so the list is bounded by the
names that exist; an unknown measurement name answers 422, and so do more than 24 lab markers (ids, unlike
names, are not a closed set). A lab marker that is not in the record (deleted, or another record's) is
left out of `labSeries` without an error, so a stored choice never breaks the page.
names that exist; an unknown measurement name or a malformed marker key answers 422. At most 24 lab
markers are drawn (ids, unlike names, are not a closed set): the first 24 are kept and any further ones
left out without an error. A lab marker that is not in the record (deleted, or another record's) is
likewise left out of `labSeries`, so a stored choice never breaks the page."
type: string
description: Comma-separated value series to include, as `MeasurementType` names, `MOOD`, or a lab marker as
description: "Comma-separated value series to include, as `MeasurementType` names, `MOOD`, or a lab marker as
`lab:<biomarkerId>` (see `availableLabs`). A name given twice counts once, so the list is bounded by the
names that exist; an unknown measurement name answers 422, and so do more than 24 lab markers (ids, unlike
names, are not a closed set). A lab marker that is not in the record (deleted, or another record's) is left
out of `labSeries` without an error, so a stored choice never breaks the page.
names that exist; an unknown measurement name or a malformed marker key answers 422. At most 24 lab markers
are drawn (ids, unlike names, are not a closed set): the first 24 are kept and any further ones left out
without an error. A lab marker that is not in the record (deleted, or another record's) is likewise left out
of `labSeries`, so a stored choice never breaks the page."
responses:
"200":
description: The timeline for the requested zoom and window.