mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-18 08:02:12 +00:00
v1.4.36 — perf, charts, AI payload trim, UX punch
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.
This commit is contained in:
1 parent
5a3ca330ac
commit
0e2a99f8e7
70 files changed
+4982
-810
No files matched your search
@@ -0,0 +1,15 @@
|
||||
-- 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 '{}';
|
||||
@@ -36,6 +36,12 @@ model User {
|
||||
insightsPrivacyMode String @default("aggregated") @map("insights_privacy_mode") // "aggregated" | "raw"
|
||||
insightsCachedAt DateTime? @map("insights_cached_at")
|
||||
insightsCachedText String? @map("insights_cached_text") // cached JSON output
|
||||
// v1.4.36 W3 T3 — per-user AI Insights exclude-metrics list, mirrors
|
||||
// `coachPrefsJson.excludeMetrics`. The /api/insights/generate route
|
||||
// filters matching keys off `features` before JSON.stringify so the
|
||||
// model never sees data the user opted out of. Default `[]` = legacy
|
||||
// behaviour for every existing row.
|
||||
insightsExcludeMetrics String[] @default([]) @map("insights_exclude_metrics")
|
||||
|
||||
// Telegram notifications (per-user)
|
||||
telegramBotToken String? @map("telegram_bot_token") // AES-256-GCM encrypted
|
||||
|
||||
Reference in new issue
Block a user