mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 23:12:04 +00:00
Heavy-aggregate skip on the rollup-fresh + fully-covered path, daily chart fetches opt into rollup buckets via source=rollup, Insights extractFeatures swap drops the prompt payload from double-digit MB to the low hundreds of kB on power-user accounts, page-level isLoading gate replaced with per-section early-skeleton paint, trends-row chart slot pinned for CLS, IntakeHistoryListV2 restored on the medication detail page, About card folded into the Admin Console with an auto-checking update badge, cumulative metric tiles read the day's running sum, IP-whois fallback surfaces city + country when the ASN lookup misses. Migration 0068 adds an additive users.insights_exclude_metrics column. Unit suite 4354 passing; typecheck + lint clean.
16 lines
795 B
SQL
16 lines
795 B
SQL
-- v1.4.36 W3 T3 — per-user AI Insights exclude-metrics list.
|
|
--
|
|
-- Mirrors `coachPrefsJson.excludeMetrics` so the user has a single
|
|
-- contract for "which data blocks reach the LLM" across both Coach
|
|
-- and Insights. Stored as a plain Postgres TEXT[] (not Json) because
|
|
-- the values are a closed enum and we want straightforward array
|
|
-- containment queries in case ops ever needs to audit them.
|
|
--
|
|
-- Additive only: NOT NULL with DEFAULT '{}' keeps every existing row
|
|
-- on the "exclude nothing" path, byte-identical to v1.4.35 behaviour
|
|
-- for accounts that haven't opened the new toggle. The `IF NOT EXISTS`
|
|
-- guard makes the migration idempotent — same posture as 0058 /
|
|
-- 0061.
|
|
ALTER TABLE "users"
|
|
ADD COLUMN IF NOT EXISTS "insights_exclude_metrics" TEXT[] NOT NULL DEFAULT '{}';
|