Replace lossy casts with checked tile/canvas helpers, use map_or_else and
infallible conversions, and switch the build script to assert!.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Poll the state endpoint while the WebSocket is not open so browsers that fail to establish the socket still receive initial state and continue updating the UI. Retain WebSocket streaming as the primary transport.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>