Stop the engine switch claiming Rust with no backend - #23
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thehiddenattribute does, so$("engine").hidden = falsewas 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; withserverunning, the switch appears with Rust selected and the server disclosure.🤖 Generated with Claude Code