zeroclaw/web
Chris Hengge 4f9d817ddb
fix(memory): serialize MemoryCategory as plain string and guard dashboard render crashes (#3051)
The /memory dashboard page rendered a black screen when MemoryCategory::Custom
was serialized by serde's derived impl as a tagged object {"custom":"..."} but
the frontend expected a plain string. No navigation was possible without using
the browser Back button.

Changes:
- src/memory/traits.rs: replace derived serde impls with custom serialize
  (delegates to Display, emits plain snake_case string) and deserialize
  (parses known variants by name, falls through to Custom(s) for unknown).
  Adds memory_category_serde_uses_snake_case and memory_category_custom_roundtrip
  tests. No persistent storage migration needed — all backends (SQLite, Markdown,
  Postgres) use their own category_to_str/str_to_category helpers and never
  read serde-serialized category values back from disk.
- web/src/App.tsx: export ErrorBoundary class so render crashes surface a
  recoverable UI instead of a black screen. Adds aria-live="polite" to the
  pairing error paragraph for screen reader accessibility.
- web/src/components/layout/Layout.tsx: wrap Outlet in ErrorBoundary keyed
  by pathname so the navigation shell stays mounted during a page crash and
  the boundary resets on route change.

Co-authored-by: Argenis <theonlyhennygod@gmail.com>
2026-03-16 18:23:03 -04:00
..
public feat(web): electric blue dashboard restyle with animations and logo (#3445) 2026-03-13 17:27:41 -04:00
src fix(memory): serialize MemoryCategory as plain string and guard dashboard render crashes (#3051) 2026-03-16 18:23:03 -04:00
.gitignore feat(gateway): add embedded web dashboard with React frontend 2026-02-21 16:14:01 +08:00
index.html feat(web): electric blue dashboard restyle with animations and logo (#3445) 2026-03-13 17:27:41 -04:00
package-lock.json fix(web): update rollup to patch path traversal vulnerability (#3258) 2026-03-11 23:24:04 -04:00
package.json feat(web): electric blue dashboard restyle with animations and logo (#3445) 2026-03-13 17:27:41 -04:00
tsconfig.app.json feat(gateway): add embedded web dashboard with React frontend 2026-02-21 16:14:01 +08:00
tsconfig.json feat(gateway): add embedded web dashboard with React frontend 2026-02-21 16:14:01 +08:00
tsconfig.node.json feat(gateway): add embedded web dashboard with React frontend 2026-02-21 16:14:01 +08:00
vite.config.ts feat(web): electric blue dashboard restyle with animations and logo (#3445) 2026-03-13 17:27:41 -04:00