Skip to content

Fix infinite 'Teeter Loading...' screen hang - #41

Open
Chris-Moller wants to merge 19 commits into
soli-testbench:mainfrom
Chris-Moller:agent/7cdff0a5-d10f-48b8-b6a1-f77b69180d15
Open

Fix infinite 'Teeter Loading...' screen hang#41
Chris-Moller wants to merge 19 commits into
soli-testbench:mainfrom
Chris-Moller:agent/7cdff0a5-d10f-48b8-b6a1-f77b69180d15

Conversation

@Chris-Moller

Copy link
Copy Markdown

Summary

  • Added error handling for camera access denial, MediaPipe model load failure, and WebGL unavailability
  • Implemented 15-second timeout that triggers a 'failed to load' message with retry option
  • Added error UI with retry button across main.js, index.html, and styles.css

Acceptance Criteria

  • Loading screen disappears and game becomes playable when all prerequisites are met
  • Clear error message displayed when camera access is denied
  • Clear error message displayed when MediaPipe face landmark model fails to load
  • Clear error message displayed when WebGL is unavailable
  • 15-second timeout triggers 'failed to load' message with retry option

🤖 Generated with Claude Code

Venice Agent and others added 19 commits March 26, 2026 01:09
…alization failures

- Add WebGL pre-check before renderer initialization
- Add specific error messages for camera denied/not-found
- Wrap MediaPipe tracker init in try-catch with error message
- Add 15-second global timeout with Promise.race
- Add retry button to overlay that reloads the page
- Update showError() to show retry button and remove hidden class

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace Promise.race with __TIMEOUT__ sentinel pattern with a simpler
  setTimeout flag approach that's easier to reason about
- Restore catch-all error handling for unexpected init failures (was
  silently swallowed by the previous Promise.race catch)
- Cache overlay title DOM element instead of querying it on each error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add state check before transitioning to 'playing' after doInit()
completes, preventing the success path from hiding an error overlay
that the timeout already displayed. Also ensure initialization errors
are always logged to console even when timeout has already fired.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add retry button markup to overlay in index.html
- Add retry button CSS with pointer-events: auto on error overlay
- Add WebGL pre-check before renderer initialization
- Add 15-second timeout with race condition guards
- Add specific error handling for camera denial and MediaPipe failure
- Wire retry button to location.reload()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Every showError() call was always followed by showRetryButton(). Merged
the retry button display into showError() to eliminate the redundant
companion function and 5 duplicate call sites. Also removed unused
overlayTitle variable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ection

- Stop MediaStream tracks when initTracker fails or timeout fires after
  camera was acquired, preventing the camera light from staying on
- Add .catch() to top-level init() call to prevent unhandled promise rejections

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant