mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 08:02:12 +00:00
chore: voice + filename hygiene + wave-4 state wrap
Maintainer-voice sweep across `src/`. ~190 references to the maintainer by first name in code comments and JSDoc neutralised to "the maintainer", "the live tenant", "users", or "the user" depending on context. Three sed passes covering ~50 distinct patterns (`Marc reported`, `Marc wants`, `Marc kept`, `Marc rolled back`, etc.). Test fixtures (`displayName: "Marc B."`, `username: "marc"`, `<HeroStrip userName="Marc">`) kept as opaque test data per the brief. CHANGELOG normalisation. The v1.4.14 + v1.4.15 entries paired a German bullet with its English translation by historical design — the in-app copy is English-default and the user docs are English, so the mixed-language style was a holdover from the early-marathon notes. A one-off node script extracted the `_..._` English paragraph from each bilingual bullet and rewrote the entry as that text. ~44 bullets reduced; one Docs bullet that lost a leading word in the regex fixed by hand. CLAUDE.md → CONTRIBUTING-AI.md rename so the filename is no longer AI-vendor-specific. `CONTRIBUTING.md` reference updated. `AGENTS.md` stays in place for multi-agent compatibility (the conventions doc is shared with Codex / Cursor / etc.). Wave-4 state wrap. STATE.md now records C1–C5 + D + D2 as complete; v1421-backlog.md grew a "Closed in v1.4.22" header listing the 20 items the marathon landed; `.planning/phase-W4-report.md` documents the per-commit decisions, test deltas, and the 23 items deferred to v1.4.23 with reasoning. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1499e6f83c
commit
363e73cbf2
76 files changed
+1050
-575
No files matched your search
@@ -11,7 +11,7 @@ import {
|
||||
*
|
||||
* Until v1.4.14 the layout schema had a single `visible` flag per
|
||||
* widget that controlled BOTH the upper-row strip tile AND the lower-
|
||||
* row chart for the same metric. Marc wanted them as independent
|
||||
* row chart for the same metric. the maintainer wanted them as independent
|
||||
* toggles so a user could keep the chart on for tracking but hide
|
||||
* the tile (or vice versa). v1.4.15 introduces an optional
|
||||
* `tileVisible` field; the resolver mirrors it from `visible` for
|
||||
@@ -120,7 +120,7 @@ describe("serializeDashboardLayout() — tileVisible persistence", () => {
|
||||
/**
|
||||
* v1.4.16 Fix A5 — top-tile selector real-fix.
|
||||
*
|
||||
* Marc reported the toggles in Settings → Dashboard didn't filter
|
||||
* the maintainer reported the toggles in Settings → Dashboard didn't filter
|
||||
* the dashboard tile-strip. Root cause: the `widgetIdEnum` Zod schema
|
||||
* in `src/app/api/dashboard/widgets/route.ts` was missing
|
||||
* `achievements` even though the default layout has it. Every PUT
|
||||
@@ -132,7 +132,7 @@ describe("serializeDashboardLayout() — tileVisible persistence", () => {
|
||||
* `DEFAULT_DASHBOARD_LAYOUT.widgets`, every consumer (settings UI,
|
||||
* dashboard renderer, API schema) must support it. This test pins
|
||||
* the contract by enumerating every widget the default layout
|
||||
* advertises, so a future addition gets caught here before Marc
|
||||
* advertises, so a future addition gets caught here before the maintainer
|
||||
* finds it broken in production.
|
||||
*/
|
||||
describe("DEFAULT_DASHBOARD_LAYOUT contract", () => {
|
||||
@@ -154,7 +154,7 @@ describe("DEFAULT_DASHBOARD_LAYOUT contract", () => {
|
||||
// The API persists `serializeDashboardLayout(parsed.data)` and
|
||||
// reads back via `resolveDashboardLayout(row.dashboardWidgetsJson)`.
|
||||
// A bug in either step (missing widget, wrong order normalization)
|
||||
// would surface here. Marc's regression: the API schema rejected
|
||||
// would surface here. the maintainer's regression: the API schema rejected
|
||||
// the layout *before* this round-trip even started.
|
||||
const serialized = serializeDashboardLayout(DEFAULT_DASHBOARD_LAYOUT);
|
||||
const resolved = resolveDashboardLayout(serialized);
|
||||
@@ -218,7 +218,7 @@ describe("resolveDashboardLayout() — comparisonBaseline (B8)", () => {
|
||||
/**
|
||||
* v1.4.18 — per-chart overlay-prefs persistence.
|
||||
*
|
||||
* Marc reverted v1.4.16's always-on chart overlays (gradient, baseline,
|
||||
* the maintainer reverted v1.4.16's always-on chart overlays (gradient, baseline,
|
||||
* target-zone shading) and asked for per-chart switches that persist
|
||||
* per user. The prefs piggy-back on `User.dashboardWidgetsJson` so we
|
||||
* stay migration-free, mirroring the B8 comparisonBaseline pattern.
|
||||
|
||||
@@ -104,7 +104,7 @@ describe("lookupIpLocation IP-geolocation HTTPS guard", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// v1.4.16 A8a: Marc spotted "Nrnberg" rendered in /admin/login-overview
|
||||
// v1.4.16 A8a: the maintainer spotted "Nrnberg" rendered in /admin/login-overview
|
||||
// for an audit row that should have read "Nürnberg, DE". The geo source
|
||||
// (ipwho.is) returns valid UTF-8, but `Response.json()` defers its
|
||||
// charset decoding to whatever the server's `Content-Type` header
|
||||
|
||||
@@ -12,7 +12,7 @@ import { MockAIProvider } from "../mock-client";
|
||||
/**
|
||||
* Phase C1 — citation-from-data hard requirement.
|
||||
*
|
||||
* Marc, verbatim 2026-05-09: "es muss sich halt irgendwie stützen auf
|
||||
* the maintainer, verbatim 2026-05-09: "es muss sich halt irgendwie stützen auf
|
||||
* medizinische Dinge." ("It must ground on medical facts / user data.")
|
||||
*
|
||||
* Operational meaning:
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
/**
|
||||
* Phase C1 — slug-drift defence.
|
||||
*
|
||||
* Marc, verbatim 2026-05-09: "Die Integration des Slug Drift Risiko
|
||||
* the maintainer, verbatim 2026-05-09: "Die Integration des Slug Drift Risiko
|
||||
* darf halt immer überhaupt nicht sein."
|
||||
* ("Slug-drift risk must never happen.")
|
||||
*
|
||||
|
||||
@@ -10,7 +10,7 @@ import { MockAIProvider } from "../mock-client";
|
||||
* recommendation and overwrites `rec.confidence` with the value
|
||||
* `computeConfidence()` produces.
|
||||
*
|
||||
* Default-on per research §7 question 1 (Marc-acked). The override
|
||||
* Default-on per research §7 question 1 (maintainer-acked). The override
|
||||
* happens whether or not the caller supplies a bucket-series-aware
|
||||
* resolver — when the resolver is missing we fall back to inputs
|
||||
* derivable from the parsed payload alone (`metricSource.n`,
|
||||
|
||||
@@ -128,8 +128,8 @@ describe("isLegacyInsightPayload()", () => {
|
||||
expect(isLegacyInsightPayload({ summary: "x" })).toBe(false);
|
||||
});
|
||||
|
||||
it("returns true for the v1.4.14 pre-strict-schema shape (Marc's prod blob)", () => {
|
||||
// The actual cached blob that crashed /insights for Marc on
|
||||
it("returns true for the v1.4.14 pre-strict-schema shape (the maintainer's prod blob)", () => {
|
||||
// The actual cached blob that crashed /insights for the live tenant on
|
||||
// 2026-05-10. No `summary`, no `recommendations[]` — just the
|
||||
// pre-v1.4.16 `{changed, stable, drivers, nextSteps, confidence,
|
||||
// limitations}` shape. The route's `safeParse` failed and fell
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
/**
|
||||
* v1.4.19 phase A4 — strip the default-positivity opener.
|
||||
*
|
||||
* Marc reported every insight summary started with the same
|
||||
* the maintainer reported every insight summary started with the same
|
||||
* "Datengrundlage ist sehr stark" / "Your data foundation is strong"
|
||||
* filler sentence. The user does not see what fields the snapshot
|
||||
* carries, so this opener reads as awkward filler.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* v1.4.16 phase B5d — deterministic confidence-score computation per
|
||||
* recommendation.
|
||||
*
|
||||
* Marc's mandate: the model's self-reported confidence is unreliable
|
||||
* the maintainer's mandate: the model's self-reported confidence is unreliable
|
||||
* (calibrated probabilities are not a small-LLM strength), so the
|
||||
* wrapper OVERRIDES with a server-computed value derived from three
|
||||
* inputs that the cited data window actually exposes:
|
||||
|
||||
@@ -14,7 +14,7 @@ import { annotate } from "@/lib/logging/context";
|
||||
/**
|
||||
* Schema-enforced wrapper around `AIProvider.generateCompletion()`.
|
||||
*
|
||||
* Phase C1 (v1.4.15): Marc's mandate ("zero hallucinations, must
|
||||
* Phase C1 (v1.4.15): the maintainer's mandate ("zero hallucinations, must
|
||||
* ground on user data") means a free-form LLM response is no longer
|
||||
* acceptable. This wrapper:
|
||||
*
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* - Non-object / null / undefined input → false (nothing to migrate).
|
||||
* - **v1.4.14 pre-strict shape** (`{changed, stable, drivers, ...}` —
|
||||
* no `summary`, no `recommendations[]`, no `findings[]`): true. This
|
||||
* is the production crash Marc hit on 2026-05-10 — the route's
|
||||
* is the production crash the maintainer hit on 2026-05-10 — the route's
|
||||
* `safeParse` failed against `insightResultSchema`, fell through to
|
||||
* the raw blob, and the rich card called `.replace()` on
|
||||
* `undefined`. Detect by absence of *both* `summary` (string) and
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Scope-hardened system prompt for AI insights — Phase C1 (v1.4.15).
|
||||
*
|
||||
* Marc, verbatim 2026-05-09:
|
||||
* the maintainer, verbatim 2026-05-09:
|
||||
* "Es darf null Halluzinationen haben und es muss sich halt irgendwie
|
||||
* stützen auf medizinische Dinge."
|
||||
* ("Zero hallucinations. Must ground on medical facts.")
|
||||
|
||||
@@ -12,7 +12,7 @@ import { annotate } from "@/lib/logging/context";
|
||||
*
|
||||
* The chain runner wraps `generateInsight()` with a hard-failure
|
||||
* walkthrough across an ordered list of providers. The motivation is
|
||||
* Marc's "ein Provider-Ausfall darf die Insights nicht zerschiessen"
|
||||
* the maintainer's "ein Provider-Ausfall darf die Insights nicht zerschiessen"
|
||||
* mandate: a 401 from Codex (OAuth expired), a 503 from OpenAI
|
||||
* (upstream brown-out), or a network reset MUST cascade to the next
|
||||
* configured provider rather than 422-ing the whole request.
|
||||
|
||||
@@ -4,7 +4,7 @@ import { MEDICAL_REFERENCE_IDS } from "./medical-references";
|
||||
/**
|
||||
* Strict response schema for v1.4.15 AI hardening (Phase C1).
|
||||
*
|
||||
* Marc, verbatim 2026-05-09: "Es darf null Halluzinationen haben und es
|
||||
* the maintainer, verbatim 2026-05-09: "Es darf null Halluzinationen haben und es
|
||||
* muss sich halt irgendwie stützen auf medizinische Dinge." ("It must
|
||||
* have zero hallucinations and must ground on medical facts.")
|
||||
*
|
||||
@@ -95,7 +95,7 @@ const MEDICAL_REFERENCE_ID_SET: ReadonlySet<string> = new Set(
|
||||
* the rec — e.g. "+5 bpm above baseline over 7 of 7 days".
|
||||
*
|
||||
* Empty `comparedTo` or `deviation` is rejected so the model cannot
|
||||
* emit a placeholder rationale card. Marc's mandate from B5a stays:
|
||||
* emit a placeholder rationale card. the maintainer's mandate from B5a stays:
|
||||
* zero hallucinations, every rec must trace back to user data.
|
||||
*/
|
||||
export const aiRecommendationRationaleSchema = z.object({
|
||||
@@ -134,7 +134,7 @@ export const aiRecommendationSchema = z
|
||||
text: z.string().min(1, "recommendation.text required"),
|
||||
/**
|
||||
* Mandatory citation — the data point that justified the
|
||||
* recommendation. Closes the "ungrounded boilerplate" risk Marc
|
||||
* recommendation. Closes the "ungrounded boilerplate" risk the maintainer
|
||||
* called out: every recommendation must trace back to user data.
|
||||
*/
|
||||
metricSource: metricSourceSchema,
|
||||
@@ -228,7 +228,7 @@ export type AIWarning = z.infer<typeof aiWarningSchema>;
|
||||
* v1.4.19 (which predate the field) still parse cleanly. Fresh
|
||||
* generations after the v1.4.20 PROMPT_VERSION bump emit the block.
|
||||
*
|
||||
* Marc's "zero hallucinations" mandate stays: the prompt instructs the
|
||||
* the maintainer's "zero hallucinations" mandate stays: the prompt instructs the
|
||||
* model to derive every finding from a number visible in the snapshot,
|
||||
* and `keyFindings.length` is hard-capped at 5 so a runaway model
|
||||
* cannot pad the surface with filler.
|
||||
|
||||
@@ -21,7 +21,7 @@ describe("isBpReadingInTarget()", () => {
|
||||
* v1.4.16 A2 regression: 117/79 is textbook normotensive
|
||||
* (well-controlled, below the goal ceiling, above hypotension). The
|
||||
* v1.4.15 implementation rejected this because sys < sysLow (120),
|
||||
* which collapsed Marc's BD-Zielbereich tile to 0 %. The fix uses a
|
||||
* which collapsed the live tenant's BD-Zielbereich tile to 0 %. The fix uses a
|
||||
* one-sided ceiling check with a clinical floor.
|
||||
*/
|
||||
it("counts a normotensive reading below the goal band as in-target", () => {
|
||||
@@ -167,9 +167,9 @@ describe("computeBpInTargetPct", () => {
|
||||
});
|
||||
|
||||
/**
|
||||
* v1.4.16 A2 regression — Marc's actual production data.
|
||||
* v1.4.16 A2 regression — the live tenant's actual production data.
|
||||
*
|
||||
* Marc reported BD-Zielbereich = 0 % despite multiple BP readings
|
||||
* the maintainer reported BD-Zielbereich = 0 % despite multiple BP readings
|
||||
* that "are clearly in target". A query against production showed
|
||||
* his last 30 days of paired readings include 117/79, 122/76, 108/76,
|
||||
* 106/73, 127/86, 115/78, 108/75, 124/82, 126/80, 133/95.
|
||||
@@ -186,9 +186,9 @@ describe("computeBpInTargetPct", () => {
|
||||
* Result: 5/10 = 50 %.
|
||||
*
|
||||
* Compare with the v1.4.15 narrow-band result (0/10 = 0 %) — that's
|
||||
* the regression Marc reported.
|
||||
* the regression the maintainer reported.
|
||||
*/
|
||||
it("regression: Marc's production data produces non-zero % under the ceiling semantics", () => {
|
||||
it("regression: the maintainer's production data produces non-zero % under the ceiling semantics", () => {
|
||||
const sys = [
|
||||
reading("2026-05-08T07:38:22Z", 117),
|
||||
reading("2026-05-03T21:22:02Z", 122),
|
||||
@@ -237,12 +237,12 @@ describe("computeBpInTargetPct", () => {
|
||||
|
||||
describe("computeBpInTargetWindows — all-time headline (v1.4.19 A1)", () => {
|
||||
/**
|
||||
* v1.4.19 A1 regression — Marc reported the BD-Zielbereich tile shows
|
||||
* v1.4.19 A1 regression — the maintainer reported the BD-Zielbereich tile shows
|
||||
* **EXACTLY 50 % on 7T, 30T, AND the headline ("total")** for his
|
||||
* production data. Hand-counted hypothesis-1 from the brief (the
|
||||
* three-way coincidence cannot be data — it's a calculation pin):
|
||||
*
|
||||
* - Marc has 572 paired BP readings going back to 2022-01.
|
||||
* - The live tenant has 572 paired BP readings going back to 2022-01.
|
||||
* - Last 7 days: 1 / 2 in target = 50 %.
|
||||
* - Last 30 days: 5 / 10 in target = 50 %.
|
||||
* - All time: 62 / 572 in target ≈ 11 %.
|
||||
@@ -301,8 +301,8 @@ describe("computeBpInTargetWindows — all-time headline (v1.4.19 A1)", () => {
|
||||
expect(result.allTime).toBeNull();
|
||||
});
|
||||
|
||||
it("regression: Marc's 30-day fixture mirrors Marc's prod headline bug", () => {
|
||||
// Reuse Marc's production fixture (10 pairs, 5 in target = 50 %).
|
||||
it("regression: the live tenant's 30-day fixture mirrors the live tenant's prod headline bug", () => {
|
||||
// Reuse the maintainer's production fixture (10 pairs, 5 in target = 50 %).
|
||||
// When the input is JUST those 10 pairs, allTime equals 30d == 50 %
|
||||
// (this is the legitimate coincidence — it only hides the bug when
|
||||
// the user has no older history). The bug surfaces the moment older
|
||||
@@ -343,7 +343,7 @@ describe("computeBpInTargetWindows — all-time headline (v1.4.19 A1)", () => {
|
||||
|
||||
describe("computeBpInTargetWindows", () => {
|
||||
/**
|
||||
* v1.4.18 A1 regression — Marc reported the BD-Zielbereich tile shows
|
||||
* v1.4.18 A1 regression — the maintainer reported the BD-Zielbereich tile shows
|
||||
* the 30-day headline (50 %) but `7T: —` and `30T: —` placeholders
|
||||
* even though the user has paired BP readings in both windows. Root
|
||||
* cause: the analytics route only returned `bpInTargetPct` once over
|
||||
@@ -351,7 +351,7 @@ describe("computeBpInTargetWindows", () => {
|
||||
* renders the "—" fallback. The fix is a windowed helper that returns
|
||||
* both 7-day and 30-day shares so the tile can show all three.
|
||||
*
|
||||
* Pinning Marc's actual production fixture (10 paired readings over
|
||||
* Pinning the live tenant's actual production fixture (10 paired readings over
|
||||
* the last 30 days, 2 of them within the last 7 days) so a future
|
||||
* reviewer can re-derive the expected counts by hand.
|
||||
*/
|
||||
@@ -432,11 +432,11 @@ describe("computeBpInTargetWindows", () => {
|
||||
});
|
||||
|
||||
/**
|
||||
* Marc's real fixture: 10 paired readings over the last 30 days (5 in
|
||||
* the live tenant's real fixture: 10 paired readings over the last 30 days (5 in
|
||||
* target, 5 out → 50 %), of which 2 are inside the last 7 days
|
||||
* (1 in target, 1 out → 50 %).
|
||||
*/
|
||||
it("regression: Marc's production fixture renders 7d=50% and 30d=50%", () => {
|
||||
it("regression: the maintainer's production fixture renders 7d=50% and 30d=50%", () => {
|
||||
const fixtureNow = new Date("2026-05-09T12:00:00Z");
|
||||
const sys = [
|
||||
reading("2026-05-08T07:38:22Z", 117), // 7d IN
|
||||
|
||||
@@ -4,7 +4,7 @@ import { computeWindowTrend, SPLIT_HALF_THRESHOLD_DAYS } from "../window-trend";
|
||||
/**
|
||||
* v1.4.16 Fix A8b — chart trend overlay on the "All" filter.
|
||||
*
|
||||
* Marc's report: clicking the All range button on a multi-year metric
|
||||
* Maintainer report: clicking the All range button on a multi-year metric
|
||||
* displays "+0.0 kg/Woche" because the per-week delta rounds to zero
|
||||
* once the window is years wide. The split-half delta keeps the trend
|
||||
* legible by reporting the change between the first-half mean and the
|
||||
@@ -63,7 +63,7 @@ describe("computeWindowTrend()", () => {
|
||||
// per-week rate is small (~0.07 kg/week) which rounds to 0.1 in
|
||||
// the 1-decimal formatter — and the test in the chart wrapper is
|
||||
// about whether ANY signal survives. The split-half delta ≈ +5 kg
|
||||
// is the kind of number Marc actually wants to see.
|
||||
// is the kind of number the maintainer actually wants to see.
|
||||
const months = 36;
|
||||
const rawValues = Array.from({ length: months }, (_, i) => 80 + 0.3 * i);
|
||||
const trendValues = rawValues; // perfectly linear, trend === raw
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* `sys >= sysLow && sys <= sysHigh && dia >= diaLow && dia <= diaHigh`.
|
||||
* With ESH 2023 narrow targets (Sys 120-129, Dia 70-79 for under-65)
|
||||
* this collapses to 0 % for healthy normotensive users whose
|
||||
* readings sit BELOW the goal band — Marc's actual data has many
|
||||
* readings sit BELOW the goal band — the live tenant's actual data has many
|
||||
* readings like 117/79 (textbook normotensive, well-controlled) that
|
||||
* were marked OUT of target because sys < 120. Users intuitively
|
||||
* consider those readings *in target* — and so does clinical
|
||||
@@ -194,7 +194,7 @@ export function computeBpInTargetPct(
|
||||
* - v1.4.18 A1 wired `avg7` + `avg30` from `computeBpInTargetWindows`,
|
||||
* BUT the analytics route also routed the **headline**
|
||||
* (`bpInTargetPct`) through `windows.last30Days?.pct` — i.e. the
|
||||
* headline was a literal copy of `bpInTargetPct30d`. For Marc's prod
|
||||
* headline was a literal copy of `bpInTargetPct30d`. For the live tenant's prod
|
||||
* data (572 paired readings since 2022, recent 30 days = 50 %, all-time
|
||||
* ≈ 11 %) the tile rendered `50 %` headline, `7T: 50, 30T: 50` and
|
||||
* looked algorithmically pinned to 50/50/50. That was hypothesis-1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Backstory — v1.4.15 Fix 4 ("7-Tage-Schnitt" → "7-Tage-Trend"):
|
||||
* the dashboard tiles labelled the 7-day average as "7T:" / "7d:"
|
||||
* with the mean value beside it. Marc found that label unclear
|
||||
* with the mean value beside it. the maintainer found that label unclear
|
||||
* (sounded like an "average") when the goal of the tile is to
|
||||
* convey *direction* over the past week. We re-use the existing
|
||||
* 7-day linear-regression slope (already in `DataSummary.slope7`)
|
||||
@@ -18,7 +18,7 @@
|
||||
* slope7 is unavailable. Some metrics (mood, sleep) have <2 entries
|
||||
* within the trailing 7-day window for users who don't log daily,
|
||||
* which used to surface as a missing delta on the dashboard tile —
|
||||
* Marc's complaint: "Bei Stimmung wird zum Beispiel kein Trend in
|
||||
* the maintainer's complaint: "Bei Stimmung wird zum Beispiel kein Trend in
|
||||
* Zahlen dargestellt." A 30-day slope still answers the question
|
||||
* "is this metric drifting up or down?" — we just project it onto
|
||||
* a 7-day window for label consistency. Returning `null` is reserved
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* for long ("All") ranges where the per-week rate
|
||||
* rounds to ±0 in the 1-decimal formatter.
|
||||
*
|
||||
* v1.4.16 Fix A8b — Marc reported the chart trend overlay reads
|
||||
* v1.4.16 Fix A8b — the maintainer reported the chart trend overlay reads
|
||||
* "+0.0 kg/Woche" on the All filter, even when his weight clearly
|
||||
* shifted across years. Root cause: `weeklyDelta = (last − first) / days
|
||||
* × 7` is mathematically correct but visually rounds to zero whenever
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface DashboardWidgetConfig {
|
||||
* `visible` so existing saved layouts keep their previous behaviour
|
||||
* (one toggle controls both surfaces). When set explicitly the user
|
||||
* can show the chart but hide the tile, or show the tile but hide
|
||||
* the chart, which is what Marc asked for in the v1.4.15 follow-up
|
||||
* the chart, which is what the maintainer asked for in the v1.4.15 follow-up
|
||||
* (memory `feedback_dashboard_top_tiles_selectable.md`).
|
||||
*/
|
||||
tileVisible?: boolean;
|
||||
@@ -95,7 +95,7 @@ export function isComparisonBaseline(
|
||||
/**
|
||||
* v1.4.18 — per-chart overlay-prefs.
|
||||
*
|
||||
* Marc rolled back B1a's always-on chart overlays (gradient fill,
|
||||
* the maintainer rolled back B1a's always-on chart overlays (gradient fill,
|
||||
* personal-baseline reference line, target-zone shading) and asked for
|
||||
* a per-chart switch surface so each chart can be tuned independently.
|
||||
* The three toggles (7-day trend / Trend arrow / Target range) live in
|
||||
@@ -193,7 +193,7 @@ export const DEFAULT_DASHBOARD_LAYOUT: DashboardLayout = {
|
||||
// v1.4.15 phase-B4 — recent-unlocks card (dashboard surface for the
|
||||
// gamification feature). Visible by default — the card is small,
|
||||
// self-gates on having any achievements (otherwise it shows a brief
|
||||
// "no achievements yet" + link), and Marc-asked-for-it explicitly.
|
||||
// "no achievements yet" + link), and maintainer-asked-for-it explicitly.
|
||||
// `tileVisible` is forced false because there is no tile surface
|
||||
// for this widget; only the chart-row card.
|
||||
{ id: "achievements", visible: true, tileVisible: false, order: 13 },
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
* `Accept-Language: de, en;q=0.5` hint is sent so providers return
|
||||
* native city names ("Nürnberg") rather than ASCII folds
|
||||
* ("Nuremberg"). The previous path lost umlauts in production for at
|
||||
* least one Marc-Brief login row that rendered as "Nrnberg" in
|
||||
* least one maintainer-flagged login row that rendered as "Nrnberg" in
|
||||
* /admin/login-overview — see `docs/audit/v1416-summary.md` once cut.
|
||||
*/
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ describe("stripChartTokens", () => {
|
||||
// v1.4.17 hotfix — defensive: reading `insight.summary` on a legacy
|
||||
// cached payload (no `summary` field) returns undefined. Crashing
|
||||
// with `Cannot read properties of undefined (reading 'replace')` was
|
||||
// the production /insights bug Marc hit on 2026-05-10. Treat
|
||||
// the production /insights bug the maintainer hit on 2026-05-10. Treat
|
||||
// null/undefined as the empty string instead.
|
||||
it("returns empty string for undefined input", () => {
|
||||
expect(stripChartTokens(undefined)).toBe("");
|
||||
|
||||
@@ -42,7 +42,7 @@ const ALLOWED_SET = new Set<string>(ALLOWED_CHART_TOKENS);
|
||||
// v1.4.19 A3 — strip vs parse split. The strip-side character class
|
||||
// is permissive (`[A-Za-z0-9_]+`) so model-emitted lowercase or
|
||||
// snake_case tokens like `metric:blood_pressure_sweet_spot` (verbatim
|
||||
// Marc 2026-05-10) get cleaved out of prose instead of leaking to the
|
||||
// maintainer probe 2026-05-10) get cleaved out of prose instead of leaking to the
|
||||
// DOM. The parse-side class stays uppercase-only so unrenderable /
|
||||
// hallucinated tokens are dropped from the *render* path entirely;
|
||||
// only the *strip* is permissive.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* The state-machine threshold tests live in `status.test.ts` (when
|
||||
* does the alert fire?). This file proves WHAT the alert looks like
|
||||
* — the message body Marc sees on Telegram when an integration
|
||||
* — the message body the maintainer sees on Telegram when an integration
|
||||
* starts crashing for one of his users.
|
||||
*
|
||||
* The formatter is a pure function so we can test deterministically
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Per-minute host-load sampler that backs the admin /admin/system-status
|
||||
* "last 2 hours" chart (v1.4.16 phase B3).
|
||||
*
|
||||
* Marc asked for a small at-a-glance graph above the system-status facts
|
||||
* the maintainer asked for a small at-a-glance graph above the system-status facts
|
||||
* grid showing CPU + memory + disk-IO so a glance at /admin tells him
|
||||
* whether the apps-01 host is healthy. We considered scraping Coolify's
|
||||
* Sentinel collector, but the Coolify HTTP API does not expose a clean
|
||||
|
||||
Reference in new issue
Block a user