Skip to content

Stop the engine switch claiming Rust with no backend - #23

Merged
emilbob merged 1 commit into
masterfrom
fix/engine-switch-hidden
Jul 25, 2026
Merged

Stop the engine switch claiming Rust with no backend#23
emilbob merged 1 commit into
masterfrom
fix/engine-switch-hidden

Conversation

@emilbob

@emilbob emilbob commented Jul 25, 2026

Copy link
Copy Markdown
Owner

On a static host the engine switch was visible and showing "Rust" selected, while the disclosure beside it correctly said "This is not the Rust binary." The page contradicted itself about the one thing it must not be wrong about: which implementation actually ran.

.engine { display: inline-flex } overrode what the hidden attribute does, so $("engine").hidden = false was never the thing controlling visibility — the element was always shown. The rule that hides it now exists explicitly.

Also flips the markup 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.

How it was found: by opening the deployed page after merging, not the local one. The bug only appears on a host with no backend — exactly the configuration that never comes up while you're developing the backend.

Verified in both configurations locally: static (python3 -m http.server -d web) shows no switch and the JavaScript disclosure; with serve running, the switch appears with Rust selected and the server disclosure.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@emilbob
emilbob merged commit 1d2cf51 into master Jul 25, 2026
1 check passed
@emilbob
emilbob deleted the fix/engine-switch-hidden branch July 25, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant