fix(web): enable cheats+debug-hooks in the wasm demo build#113
Conversation
Both features are pure computation with zero wasm-incompatible dependencies (real cargo check --target wasm32-unknown-unknown confirms it), and were simply never added to web.yml's trunk build - not excluded for any architectural reason. Removes 2 of 5 "(rebuild with --features X)" placeholder labels from the hosted demo with real, working controls. Verified: full local trunk build reproducing the CI command, gzip size stays at 2.96 MiB (well under the 5 MiB budget), and compile-time #[cfg] proof that the placeholder branches are absent from this binary. First rung of the new UI/UX-parity plan (Phase A.1).
There was a problem hiding this comment.
Code Review
This pull request updates the changelog and frontend documentation to state that the WASM demo now supports the Cheats and Debug menu items by adding --features cheats,debug-hooks to the build workflow. However, as noted in the review, the actual workflow file .github/workflows/web.yml was not modified in this PR, meaning the features are not yet enabled in the build.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
Enables the cheats and debug-hooks opt-in features for the GitHub Pages wasm demo build so the hosted UI shows the real Cheats window and Debugger overlay controls (instead of feature-gated placeholders), and documents the change.
Changes:
- Update the Pages wasm build (
trunk build) to include--features cheats,debug-hooks. - Document the wasm-demo feature availability change in
docs/frontend.md. - Add an Unreleased changelog entry describing the wasm demo fix.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/web.yml |
Adds --features cheats,debug-hooks to the Pages trunk build step (with rationale in comments). |
docs/frontend.md |
Notes that the hosted demo now enables cheats + debug-hooks, while calling out wasm-incompatible features that remain unavailable. |
CHANGELOG.md |
Adds an Unreleased “Fixed” entry describing the wasm demo change. |
Real finding: the entry said "Debugger-overlay" (hyphenated); the actual Debug menu item, per ui_shell.rs, reads "Debugger overlay".
Summary
Phase A.1 of the new UI/UX-parity plan (RustySNES ↔ RustyNES).
.github/workflows/web.yml'strunk buildgains--features cheats,debug-hooks. Both arepure computation with zero wasm-incompatible dependencies — real
cargo check --target wasm32-unknown-unknownconfirms it — and were simply never added to the deployed demo'sfeature set, not excluded for any architectural reason.
controls instead of a
(rebuild with --features ...)placeholder label.scripting/netplay/retroachievementsremain genuinely unavailable on wasm (mlua/nativesockets/
rcheevosFFI are not wasm-portable) — untouched by this fix, documented honestly indocs/frontend.md.Test plan
cargo test --workspace --exclude rustysnes-android— all greencargo clippy --workspace --exclude rustysnes-android --all-targets -- -D warnings— cleancargo fmt --check— cleanactionlint .github/workflows/web.yml— cleantrunk build --release --public-url /RustySNES/ --features cheats,debug-hooksreproducing the exact CI command — succeeds.scripts/wasm_size_budget.shagainst the actual build output —2.96 MiB gzip, well under the 5 MiB budget (2.04 MiB headroom).
#[cfg(not(feature = "cheats"))]/#[cfg(not(feature = "debug-hooks"))]placeholder branches inui_shell.rsare the directsiblings of the real controls — a successful build with these features enabled means those
placeholder branches are provably absent from the built binary.
🤖 Generated with Claude Code