"""The dashboard served at / (src/static/dashboard.html, docs/DASHBOARD_REDESIGN.md). Rules: every fetched path is routed, every string has EN and TH (Thai first), no emoji in the interface, and a replay or a simulation is never shown as live data. """ import re from pathlib import Path STATIC = Path(__file__).parents[1] / "src" / "static" DASHBOARD = STATIC / "dashboard.html" ROUTER = Path(__file__).parents[1] / "rust" / "collector" / "src" / "web" / "mod.rs" def _html() -> str: return DASHBOARD.read_text(encoding="utf-8") def _body(html: str) -> str: """Markup only. The STRINGS table repeats every English phrase, so a whole-file search would pass even if an element were deleted.""" return html[html.index("") : html.index("