Skip to content

fix(web): enable cheats+debug-hooks in the wasm demo build#113

Merged
doublegate merged 2 commits into
mainfrom
feat/v1.20.0-wasm-demo-features
Jul 15, 2026
Merged

fix(web): enable cheats+debug-hooks in the wasm demo build#113
doublegate merged 2 commits into
mainfrom
feat/v1.20.0-wasm-demo-features

Conversation

@doublegate

Copy link
Copy Markdown
Owner

Summary

Phase A.1 of the new UI/UX-parity plan (RustySNES ↔ RustyNES).

  • .github/workflows/web.yml's trunk build gains --features cheats,debug-hooks. Both are
    pure computation with zero wasm-incompatible dependencies — real cargo check --target wasm32-unknown-unknown confirms it — and were simply never added to the deployed demo's
    feature set, not excluded for any architectural reason.
  • The hosted demo's Tools → Cheats and Debug → Debugger-overlay menu items now show their real
    controls instead of a (rebuild with --features ...) placeholder label.
  • scripting/netplay/retroachievements remain genuinely unavailable on wasm (mlua/native
    sockets/rcheevos FFI are not wasm-portable) — untouched by this fix, documented honestly in
    docs/frontend.md.

Test plan

  • cargo test --workspace --exclude rustysnes-android — all green
  • cargo clippy --workspace --exclude rustysnes-android --all-targets -- -D warnings — clean
  • cargo fmt --check — clean
  • actionlint .github/workflows/web.yml — clean
  • Real, full local trunk build --release --public-url /RustySNES/ --features cheats,debug-hooks reproducing the exact CI command — succeeds.
  • Real size-budget check: scripts/wasm_size_budget.sh against the actual build output —
    2.96 MiB gzip, well under the 5 MiB budget (2.04 MiB headroom).
  • Compile-time proof: confirmed the #[cfg(not(feature = "cheats"))]/
    #[cfg(not(feature = "debug-hooks"))] placeholder branches in ui_shell.rs are the direct
    siblings 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

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).
Copilot AI review requested due to automatic review settings July 15, 2026 04:02

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/frontend.md

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Real finding: the entry said "Debugger-overlay" (hyphenated); the
actual Debug menu item, per ui_shell.rs, reads "Debugger overlay".
@doublegate
doublegate merged commit 03b9a72 into main Jul 15, 2026
12 checks passed
@doublegate
doublegate deleted the feat/v1.20.0-wasm-demo-features branch July 15, 2026 04:10
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.

2 participants