Create immersive WebXR website redesign#1
Conversation
Co-authored-by: thevirtualcraft <thevirtualcraft@users.noreply.github.com>
Co-authored-by: thevirtualcraft <thevirtualcraft@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4ec459e. Configure here.
| statusText.textContent = `Unable to start ${mode.toUpperCase()} right now.`; | ||
| xrNote.textContent = error instanceof Error ? error.message : "The browser blocked the WebXR session request."; | ||
| } | ||
| } |
There was a problem hiding this comment.
No guard against concurrent async XR session requests
Medium Severity
The activeXrSession guard on line 183 doesn't protect against overlapping async calls. Since activeXrSession is only assigned on line 202 — after three await points (requestSession, prepareXrRenderer, requestReferenceSpace) — a second button click during any of those yields passes the guard. The second call's prepareXrRenderer overwrites the shared globals xrGl, xrProgram, and xrBuffer while the first session's drawXrFrame render loop is already using them, corrupting the active session's rendering. Even if the browser rejects the second session, the catch-block error message overwrites the first session's success UI.
Reviewed by Cursor Bugbot for commit 4ec459e. Configure here.


Summary
Testing
python3HTML parser check and asset existence validation/,/styles.css, and/app.jsreturn 200 with expected content types/tmp/virtualcraft-home.png; Chrome timed out on shutdown in this container after writing the image