Repository navigation
feat: glucose in the briefing, HEADACHE side effect, resolved low-stock trigger - #1572
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three additive contract changes for 1.50.0 and the changelog notes they and the morning read need.
sourceMetricgainsglucose, 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 keyinsights.briefing-glucose.MedicationSideEffectEntry(migration 0572,ADD VALUEin its own file), grouped under COGNITIVE next to DIZZINESS, labelled with the symptom catalogue term in all ten locales. Feature keymedication.side-effect-headache.lowStockTriggerDayson 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 keymedication.low-stock-trigger./andGET /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.