Skip to content

fix(frontend): add the missing /api/ link to the wasm demo page - #47

Merged
doublegate merged 3 commits into
mainfrom
fix/wasm-demo-page-api-link
Jul 9, 2026
Merged

doublegate merged 3 commits into
mainfrom
fix/wasm-demo-page-api-link

Conversation

@doublegate

Copy link
Copy Markdown
Owner

Summary

  • The user compared RustySNES's live Pages deployment against RustyNES's and found the demo page has no path to the API docs — RustyNES's root page has <a href="api/">API documentation</a> in a small footer; RustySNES's had nothing (you'd have to manually type /api/ into the URL bar).
  • Adds a matching footer (<p class="hint">) with a GitHub repo link + an API docs link, styled to match the existing dark theme.
  • Verified locally: RUSTFLAGS="-C target-feature=-reference-types" trunk build --release --public-url /RustySNES/ produces the footer correctly in dist/index.html.

Separately investigated, not part of this PR: the user also reported the demo canvas itself renders blank. Root-caused via a headless-Chromium (Playwright) load with full console/network capture: the wasm module loads and initializes without any errors (window.wasmBindings populates correctly), but crates/rustysnes-frontend/src/wasm.rs is — and has always been — an explicitly-labeled scaffold stub ("v0.1.0: a minimal bootstrap... The full browser frontend... is a TODO for the implementation phase"). It installs a panic hook and logs one console message, then returns — it never builds the App, creates a wgpu surface from a <canvas>, or drives a requestAnimationFrame loop. This isn't a regression from this session's PRs; it predates all of them. Every "wasm demo is live" verification this project has done so far (v0.1.0 onward) checked HTTP-level liveness (200 status, correct content-types) — not that the app actually renders. RustyNES's own wasm frontend spans 13 files (wasm.rs, wasm_winit.rs, wasm_audio.rs, wasm_gamepad.rs, wasm_io.rs, wasm_idb.rs, wasm_save_states.rs, wasm_touch.rs, wasm_lobby.rs, wasm_script.rs, wasm_cheevos.rs, wasm_netplay.rs, wasm_share.rs) for comparison — building RustySNES's out to real parity is genuinely substantial work, not a quick fix, and is being raised separately for scoping/sequencing against the v0.8.0+ ladder rather than folded into this small PR.

Test plan

  • Local trunk build --release succeeds, footer present in output
  • Markdown integrity check on the CHANGELOG entry

🤖 Generated with Claude Code

Found live by the user comparing against RustyNES's own Pages
deployment (which has an <a href="api/">API documentation</a> footer
link) -- RustySNES's demo page had no path to the API docs short of
manually typing /api/ into the URL bar. Adds a small footer mirroring
RustyNES's own pattern.

Verified locally: RUSTFLAGS="-C target-feature=-reference-types" trunk
build --release --public-url /RustySNES/ produces the footer correctly
in dist/index.html.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 9, 2026 08:16

@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 adds a footer to the WebAssembly demo page with links to the GitHub repository and the API documentation, along with corresponding CSS layout adjustments and a changelog entry. The reviewer suggests opening these links in a new tab using target="_blank" to prevent users from losing their active emulation state when navigating away.

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 crates/rustysnes-frontend/web/index.html
doublegate and others added 2 commits July 9, 2026 04:28
Gemini review finding on PR #47: navigating away from the page in the
same tab kills the running wasm instance and any in-progress
emulation state. Adds target="_blank" rel="noopener noreferrer" to
both footer links.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@doublegate
doublegate merged commit 32f34db into main Jul 9, 2026
5 checks passed
@doublegate
doublegate deleted the fix/wasm-demo-page-api-link branch July 9, 2026 11:57
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