From b04123d065c8846f18405b09d0e4de16f562bec8 Mon Sep 17 00:00:00 2001 From: emilbob Date: Sat, 25 Jul 2026 23:15:54 +0200 Subject: [PATCH] Stop the engine switch claiming Rust with no backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On a static host the switch was visible and showing "Rust" selected while the disclosure beside it correctly said "This is not the Rust binary" — the page contradicting itself about the single thing it must not be wrong about, namely which implementation just ran. `.engine { display: inline-flex }` overrode what the `hidden` attribute does, so `hidden` set the attribute and changed nothing. The rule that hides it now exists explicitly. Also flips the markup's default to JavaScript, since that is what runs before anything answers /api/health; the switch moves to Rust only once a backend has confirmed it is there. Belt and braces on a claim about what the user is looking at. Caught by opening the deployed page rather than the local one — the bug needed a host with no backend, which is exactly the configuration that never comes up while developing the backend. Co-Authored-By: Claude Opus 5 --- web/index.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/web/index.html b/web/index.html index 9cec43f..070086c 100644 --- a/web/index.html +++ b/web/index.html @@ -135,6 +135,11 @@ /* Engine switch — only shown when a real backend answered /api/health. */ .engine { display: inline-flex; align-items: center; gap: 0.6rem; } + /* Any `display` here would override what the `hidden` attribute does, leaving + a static host showing an engine switch set to "Rust" while JavaScript is + what actually runs — the page contradicting itself about the one thing it + must not be wrong about. */ + .engine[hidden] { display: none; } .seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 2px; overflow: hidden; } .seg button { font-family: var(--mono); font-size: var(--step--1); font-weight: 600; @@ -273,9 +278,12 @@

substrate-node-probe