fix(ui): align usage data contracts, add timezone setting, and fix empty usage page (#146)

- Fix 6 data contract mismatches between Go backend JSON tags and React
  frontend TypeScript interfaces (field renames, response envelope changes)
- Add timezone selector to topbar with 12 common timezone options
- Replace date-fns formatting with native Intl.DateTimeFormat for
  timezone-aware chart labels (reduces bundle ~20KB)
- Add missing SnapshotTimeSeries fields (memory_docs, memory_chunks,
  kg_entities, kg_relations) that caused empty usage page
- Add error banner to usage page for API error visibility
- Sanitize backend error messages in usage HTTP handlers
- Add batch chunking (max 3000 rows) for snapshot upserts
- Remove userId display from topbar
- Add usage analytics i18n strings for en/vi/zh
This commit is contained in:
Viet Tran authored and GitHub committed 2026-03-11 14:22:03 +07:00
1 parent 0926d053b0
commit 73389d2715
39 files changed
+3256 -134

No files matched your search

+2
View File
@@ -20,6 +20,7 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"d3-force": "^3.0.0",
"date-fns": "^4.1.0",
"framer-motion": "^12.34.3",
"highlight.js": "^11.11.1",
"i18next": "^25.8.15",
@@ -30,6 +31,7 @@
"react-i18next": "^16.5.6",
"react-markdown": "^10.1.0",
"react-router": "^7.1.0",
"recharts": "^3.8.0",
"rehype-highlight": "^7.0.2",
"remark-gfm": "^4.0.1",
"tailwind-merge": "^2.6.0",