Skip to content

v1.37.11 — one save for the lifestyle context - #771

Merged
MBombeck merged 4 commits into
mainfrom
release/v1.37.11
Aug 10, 2026
Merged

v1.37.11 — one save for the lifestyle context#771
MBombeck merged 4 commits into
mainfrom
release/v1.37.11

Conversation

@MBombeck

Copy link
Copy Markdown
Owner

Assembled off origin/main. Additive polish bundle: no migration, no API/contract change.

One save for the lifestyle-context tile

The Lebensstil-Kontext card in Anamnese had three fact kinds (smoking, alcohol, shift work), each with its own save button. Now one footer Save writes every dirty kind together through its existing endpoint, with one confirmation and one refresh. Partial failure is honest: a kind that cannot be saved keeps its draft and says which one failed, while the others go through, rather than a single green toast hiding the failure. Per-kind remove is unchanged. No new column, no new route. Watched-red proven: two dirty kinds write to both real endpoints; a forced conflict on one keeps its draft while the other persists and the error names the failed kind.

Mood chart header through TileHeader

The mood chart still hand-rolled its title where the other chart cards already use the shared TileHeader primitive. Swapped it. Like-for-like: same element, size, colour and position, control rows untouched, so nothing moves. No other chart cards were touched.

Mood insights page: fix a stale test mock and scan the page

The /insights/mood sub-page threw an error boundary under the accessibility fixture. The cause was a stale test mock, not the product: the mock returned a count field where the response contract has totalEntries, so a guard did not short-circuit and the code read a heatmap the mock never populated. Corrected the mock to the real response shape and added /insights/mood to the accessibility scan matrix so the page is covered from now on. No defensive shim was added to the component, since the contract guarantees the fields.

Verification

  • typecheck, lint, openapi:check (in sync, the diff is only the version line), test (21117 passed), build: all green, and format:check (a Prettier gate that a previous release only caught in CI) passes locally.
  • No migration, no test:integration need (additive, no server or schema change).
  • Note for CI: /insights/mood is scanned by the accessibility job for the first time. If it surfaces unrelated accessibility violations that are more than a trivial fix, the route-add hunk can be reverted on its own while keeping the mock correction, and the violations filed as a follow-up.

The lifestyle-context tile carried a Save button per fact kind. Collapse
them into one footer Save that writes only the dirty kinds, firing the
existing bitemporal call per kind (POST a first value, PATCH a revision)
and settling them together so a single conflict cannot take the healthy
writes down with it. A kind that 409s keeps its draft on screen and names
itself, instead of vanishing behind one green toast. The per-kind Remove
stays.
The mood chart hand-rolled a CardTitle where every other insights tile
header goes through TileHeader. Swap it for the shared primitive, which
renders the same CardTitle at text-base, and drop the now-unused CardTitle
import. Like-for-like; the surrounding control rows are untouched.
The `/api/mood/insights` mock still returned the pre-heatmap shape, so
`summary.totalEntries` was undefined, the empty-state guard never
short-circuited, and the page threw reading `heatmap.cells`. Correct the
mock to the current MoodInsightsResponse and add `/insights/mood` to the
a11y route matrix so the page is scanned henceforth.
@MBombeck
MBombeck merged commit ca88d8c into main Aug 10, 2026
23 checks passed
@MBombeck
MBombeck deleted the release/v1.37.11 branch August 10, 2026 09:20
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.

1 participant