Files
loki/src
g-butandClaude Opus 4.7 7826eeb1f5 refactor(ssot): tighten Record<string,…> style maps to their enum types
Two display-style maps had keys that the canonical enums already define,
but were typed Record<string,string>. That meant TS could not catch a
missing key when the underlying enum gained a new member — the runtime
fallback would just silently stand in.

- src/app/money/page.tsx: STATUS_STYLE now Record<SubStatus,string>
  with computed SUB_STATUS keys; the literal "active" fallback also
  routes through SUB_STATUS.ACTIVE.
- src/app/memory/page.tsx: TYPE_COLOR now Record<EntityType,string>
  (the existing comment claimed enum-coverage enforcement but the
  string-keyed type didn't actually enforce it).

Net: slightly stricter compile-time safety with no runtime change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 21:16:31 +02:00
..