Skip to content

feat: glucose in the briefing, HEADACHE side effect, resolved low-stock trigger - #1572

Merged
MBombeck merged 10 commits into
release/v1.50.0from
feat/150-commitments
Nov 26, 2026
Merged

MBombeck merged 10 commits into
release/v1.50.0from
feat/150-commitments

Conversation

@MBombeck

Copy link
Copy Markdown
Owner

Three additive contract changes for 1.50.0 and the changelog notes they and the morning read need.

  • Briefing glucose. sourceMetric gains glucose, so glucose signals and findings are no longer dropped row by row by the reader ([Bug] Daily briefing generation is reported as successful even when the briefing cannot be displayed #1499 follow-up). Prompt enum lists and template updated; figures stay in the reader's glucose unit, which the snapshot already converts. Card: drop icon, link to the glucose page; the trends row skips it. Feature key insights.briefing-glucose.
  • HEADACHE side effect. Appended to MedicationSideEffectEntry (migration 0572, ADD VALUE in its own file), grouped under COGNITIVE next to DIZZINESS, labelled with the symptom catalogue term in all ten locales. Feature key medication.side-effect-headache.
  • lowStockTriggerDays on the list and detail answers (and create/edit): max(lowStockRunwayDays, reorderLeadDays + one dose interval), medication lead over the account default, null when the alert is off or nothing is consumed on a cadence. A low-stock settings change evicts the medications list cache. Feature key medication.low-stock-trigger.
  • CHANGELOG. Added: the morning read on / and GET /api/daily/morning, plus the three items above. Updating: 0566, 0570, 0571, 0572, the admin second-factor notice (browser only, checked per request) and the rollback note (restore the pre-update dump).

Checks run locally: typecheck, lint, full unit suite (failures were fixed; the geometry test times out only under load), OpenAPI regenerated and in sync, integration: medication parity (snapshots updated with the new field) and side-effect routes.

The signals-of-the-day block has handed the model a glucose entry since
the same-hours comparison landed, but sourceMetric had no glucose value,
so the reader dropped every glucose signal and finding row by row.

Add glucose to the enum, the prompt's enum lists and the template, with
the rule that its figures stay in the unit the entry carries. The card
shows it with a drop icon and links to the glucose page; the trends row
skips it, since its unit transform does not cover glucose units. The
lead-coverage terms learn the glucose words so a lead about glucose does
not repeat the signal headline.
The entry list had dizziness but no headache, so a client filing a
headache had to pick the nearest other code. HEADACHE is appended to the
enum (migration 0572) and sits next to DIZZINESS under COGNITIVE in the
picker, labelled with the symptom catalogue's term in every locale.
The list and detail answers carry lowStockTriggerDays, the runway at or
below which the medication is low on stock: max(lowStockRunwayDays,
reorderLeadDays + one dose interval), with the medication's own lead over
the account default, as the low-stock job decides. Null when the alert is
off or nothing is taken on a cadence. A change to the low-stock settings
evicts the cached medications list so the field follows at once.
…keys

GET /api/version lists insights.briefing-glucose,
medication.side-effect-headache and medication.low-stock-trigger.
Regenerate the OpenAPI document.
…er, updating notes

Add the morning on the start page and the three additions under Added.
Updating names migrations 0566, 0570, 0571 and 0572, says the admin
second-factor notice shows in the browser only and is checked per
request, and that going back means restoring the pre-update dump.
…e cached build

Keep buildMedicationsList at its size: the trigger is added to the rows
in one pass after the build, from the row's live schedules and lead.
Shorten the glucose prompt rule to the lines it had, drop the version
stamps from the new comments, and move the dropped-metric tests to a
metric the enum does not know.
…ommitments

# Conflicts:
#	docs/api/openapi.yaml
#	src/lib/server-features.ts
@MBombeck
MBombeck merged commit d8520f8 into release/v1.50.0 Nov 26, 2026
39 checks passed
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