Phase 1 — tests/test_compare_shape.py: asserts /api/agent/stream for a
compare query emits exactly one final event with intent="compare", two
targets each carrying an address field, and a merged paragraph that
splits at "---" into PLACE A / PLACE B sections each with citations.
6/6 pass against the live server.
Phase 2 — CompareBriefing.svelte: when plan.intent=="compare" and
finalResult lands, renders a two-column layout (1fr 1px 1fr grid,
collapses below 900 px) with:
- Per-column .address-header showing the resolved address
- Existing Briefing component in each column, no changes to Briefing
- compare-delta-bar above both columns: one row per canonical section
where the first compared number differs (e.g. "TWI: 12.4 vs 8.2")
- Stone provenance / FindingsRegion unchanged (full-width below)
During streaming the merged paragraph renders in the existing single
Briefing path; the two-column view switches in only after finalResult.
FinalResult interface gains optional intent + target…
ux: stream Findings cards in real time + fade-in instead of typing caret
Two follow-ups from the live Red Hook walkthrough:
1) **Findings stream as specialists fire.** Previously cards only
populated from `finalResult` (one event at end of stream). Now a
`liveResults` map updates on every SSE `step` event and feeds the
adapter; cards pop into each Stone's rail as their specialist
completes.
* lib/client/cardAdapter.ts gains `applyStepEventToLiveState()`,
mapping step names like `sandy_inundation` / `dep_stormwater` /
`mta_entrance_exposure` to the FSM state-keys the card builders
expect (`sandy`, `dep`, `mta_entrances`, ...). The slim `step.result`
summary shapes are translated into the doc-payload shapes the
builders read; one card per fired specialist, partial-data tolerant.
* `adaptFinalToFindings()` accepts `Partial<FinalResult> | null` and
skips the Capstone meta card until at least one of streaming /
finalResult has produced something to summarise.
* src/routes/q/[queryId]/+page.svelte plumbs `…
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…