- stores/versions-store.ts, hooks/use-session-manager.ts,
lib/session-storage.ts: remove the diagramHistory conversion layer,
the localStorage chat migration and the empty templates store
- stores/canvas-store.ts, lib/drawio/editor-bridge.ts: remove the
pages list nothing read
- components/chat/chat-engine.tsx: use the context's chartXMLRef and
latestSvgRef instead of local copies, subscribe to one settings field,
stop prefetching quota limits (lib/use-quota-manager.tsx takes the
values from the 429 body), readDiagramFile delegates to the MCP
loader (which now strips XML prologs and accepts <svg:svg>)
- contexts/diagram-context.tsx: one requestTaggedExport path for
thumbnails, validation, fetch and save; fetchDiagramXml replaces
handleExport plus the exported resolver map
- hooks/use-validate-diagram.ts and app/api/validate-diagram: plain
fetch returning JSON instead of a streamed object nobody consumed
- hooks/use-diagram-tool-handlers.ts: drop the DEBUG blocks; canvas
vars inheritance lives in placeOnPage (lib/diagram-pages.ts)
- lobby-hero, icon-button, drawio-frame: remove unreachable branches
and unused props