adaptSchools read sc.school_name and sc.elev_m, but
doe_schools.summary_for_point emits loc_name and elevation_m. Same
mismatch on adaptHospitals. Pre-existing — register cards have been
quietly showing — for elev and falling through to 'name' for schools
since the rename. Add fallbacks so both old and new shapes render.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
step_nycha hung the FSM for 8+ minutes per query because
summary_for_point did 20 polygon×polygon intersections (5 nearest
developments × 4 layers) every time. Refactor to read pre-computed
exposure flags from data/registers/nycha.json — the bake script
already runs that math citywide once. Per-query work is haversine
+ dict lookup, sub-millisecond.
Same pattern for step_doe_schools (reads data/registers/schools.json,
~1ms). Hospitals have no pre-built catalog (~150 entries; would have
required a new build script + LLM-budget bake) so they read the
30 KB hospitals.geojson directly and sample the Cornerstone baked
rasters per hit (~10ms first call, sub-ms after).
Schema change for NYCHA per-query view: drop pct_inside_sandy_2012
and pct_in_dep_extreme_2080 floats (polygon-overlap percentages
weren't in the prebuilt catalog), replace with binary
inside_sandy_2012 + dep_*_class/dep_*_label to match the schools
and hospitals shape. NYCHA developments are now reported with
"centroid is in…
Telescoped from ~25 spine commits into the three UI generations:
Lit (kept on disk for reference, not loaded):
web/static/components/{briefing,trace,signals,sources-footer}.js
Component-per-tag custom elements with reactive props.
Svelte 5 custom-element bundle (legacy primary, served at /legacy):
web/svelte/src/lib/{Briefing,Trace,SourcesFooter}.svelte + main.js
Shared store for cross-component highlight (citeIndex,
highlightedDocId). Built artifact ships at web/static/dist/riprap.js.
SvelteKit design-system v0.4.2 (the new primary):
web/sveltekit/src/* — adapter-static build, IBM Plex, four-tier
glyphs, MapLibre map with custom basemap, server-side render of
/q/sample + /q/<query>. Built artifact ships at web/sveltekit/build/.
web/main.py wired up the new endpoint surface:
/, /q/sample, /q/<query> → SvelteKit build
/legacy, /single, /compare → Svelte custom-element bundle
/api/agent/stream → SSE pipeline (plan/step/toke…