assessment-model/src/lib
Jun-te Kim 54cc71366b feat(landlord-overrides): wire all 9 override categories through the app layer
The DB schema, value enums, and migrations already defined all nine landlord
override categories, but the application layer was hardwired to the original
four (property_type, built_form_type, wall_type, roof_type). The other five
(main_fuel, glazing, construction_age_band, water_heating, main_heating_system)
were classified and written to their tables by the backend, but the frontend
never read them or offered edit dropdowns — so the verify panel rendered them
as "not classified", and any Unknown in those categories slipped past the
ADR-0006 finalise gate.

Replace the per-category switch statements (duplicated across ~6 sites) with a
single CATEGORY_TABLES registry (categories.ts) as the source of truth. Adding a
category is now one registry row. A completeness test asserts the registry,
CLASSIFIER_FIELDS, and the property_overrides override_component enum never
drift apart — the exact hole that left five categories unwired.

- categories.ts: registry + derived CATEGORY_VALUES + isLandlordCategory guard
- landlordOverrides/server.ts: getLandlordOverrides reads all 9 (fixes the
  latent crash where the page mapped 9 fields against a 4-key result)
- bulkUpload/server.ts: lookupOverrides / unknownForField / getUnknownOverrides
  / upsertUserOverride / validation now registry-driven, all 9
- OnboardingProgress.tsx: edit dropdowns use the shared 9-category CATEGORY_VALUES
- landlord-overrides page: SourceBadge now renders os_places (ADR-0007) distinctly
  instead of mislabelling it "classifier"

Enum value sets are already in sync FE<->Model (verified); only member order
drifts on 3 enums, which is cosmetic and left untouched (Postgres cannot reorder
enums). Follow-up (backend): Model's override_source SAEnum still lacks os_places.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 16:29:07 +00:00
..
bulkUpload feat(landlord-overrides): wire all 9 override categories through the app layer 2026-07-06 16:29:07 +00:00
landlordOverrides feat(landlord-overrides): wire all 9 override categories through the app layer 2026-07-06 16:29:07 +00:00
postcodeSearch fix(postcode-search): PR #355 review feedback 2026-07-06 15:13:49 +00:00
scenarios feat(scenarios): sign-post disruptive measures in the creation journey 2026-07-06 09:34:51 +00:00
services fix(reporting): negative scenario carbon impact — move carbon fragments to effective baseline 2026-07-02 14:52:21 +00:00
chartUtils.ts Before Tailwind upgrade 2025-10-31 21:48:43 +00:00
session.ts refactored with improve-code-archievture and grill-with-docs 2026-05-06 15:49:34 +00:00
utils.ts Before Tailwind upgrade 2025-10-31 21:48:43 +00:00