Spaces:
Sleeping
Sleeping
Commit History
-
fix: detect iframe requests in service worker and skip COOP headers
Modified coi-serviceworker to check Sec-Fetch-Dest header. When the request destination is "iframe", skip adding Cross-Origin-Opener-Policy headers which block iframe embedding. This allows: - Direct access: Full SharedArrayBuffer support with COOP headers - Iframe embedding: Works without COOP (AI uses single-thread mode) Co-Authored-By: Claude <noreply@anthropic.com>a5530bb -
fix: deregister coi-serviceworker in iframe mode
When the page is in an iframe, deregister any existing service worker that was registered from a previous direct visit. This prevents the COEP headers from blocking cross-origin resources in the HF Space iframe. Co-Authored-By: Claude <noreply@anthropic.com>0b5b16e -
fix: skip coi-serviceworker in iframe to allow HF Space embedding
The COOP header (Cross-Origin-Opener-Policy: same-origin) was blocking iframe embedding on huggingface.co/spaces. Now the service worker only registers when not in an iframe. Trade-off: - Direct access: Full SharedArrayBuffer support (faster AI) - Iframe embedding: No SharedArrayBuffer (AI uses single-thread, but works) Co-Authored-By: Claude <noreply@anthropic.com>d182f15
-
feat: add coi-serviceworker for SharedArrayBuffer support
Enables cross-origin isolation on client side for ONNX Runtime Web multi-threading support without requiring server-side COOP/COEP headers. This fixes VS AI mode which requires SharedArrayBuffer for ONNX inference. Co-Authored-By: Claude <noreply@anthropic.com>f553531 -
fix: rebuild frontend dist with room rename feature
eb57696 -
feat: room rename and room switching with confirmation
New features: - Room rename: admins can rename rooms with editable input - Room switching during game: confirmation dialog prevents accidental game abandonment - Auto-resign when leaving active game after confirmation Bug fixes included: - Race conditions in join logic - Reconnect logic to rejoin previous room - Memory leak prevention in socket listeners - Fixed offX() methods undefined handler6f4808d
-
fix(vs-people): enable resign functionality to emit socket event
The resign function was showing confirmation but not actually emitting the resign event. Now properly calls socketApi.resign() for multiplayer. Co-Authored-By: Claude <noreply@anthropic.com>e144fd4 -
fix: sync board shape when joining existing room
When joining an existing room, now properly syncs: - Board shape from server's gameState - Game moves from TGN - Viewport rendering with correct board Co-Authored-By: Claude <noreply@anthropic.com>df4bec6 -
fix: fall back to initializeGame when TGN loading fails
When gameReset event has TGN but parsing fails, now properly falls back to initializeGame() with the server's boardShape. Co-Authored-By: Claude <noreply@anthropic.com>49798bd -
fix: properly apply board shape from server in gameReset event
When server sends gameReset event with new boardShape, now correctly: - Use initializeGame() to create new game with new shape - Update viewport with setBoardShape() - Update board shape dropdown to match Co-Authored-By: Claude <noreply@anthropic.com>b78e8db -
feat(debug): add window.trigoApi for testing
e367b4e -
fix(vs-people): initialize socket listeners when switching game modes
a7d41bc
-
feat: switch to hash-based routing for better static hosting
- Change router from createWebHistory to createWebHashHistory - Update useRoomHash to use query params instead of hash for room IDs - URLs now: /#/vs-people?room=ABC1234577c3cea -
Deploy: add startup logging to debug VS People mode
f2d331b -
Deploy: include pre-built dist folder in git
- Remove 'dist' from app/.gitignore so pre-built assets are tracked - Update deploy.sh to automatically remove dist from .gitignore - Include frontend dist folder with all assets876d29c -
Deploy: fix room selector reactivity bug
- Use spread operator for immutable array updates - Add debug logging for room events - Add hf-autoplay.cjs test script3a12496 -
Update: fix disconnect state sync and dynamic socket URL
Changes: - Fix room showing "full" after player disconnect - Clean up stale disconnected player entries - Use window.location.origin for dynamic socket URL - Add Vite proxy for socket.io support - Rebuild frontend with latest changes Co-Authored-By: Claude <noreply@anthropic.com>f6a5e63
-
Skip vite build by committing pre-built frontend dist
- Include pre-built dist folder with all frontend assets - Skip vite build step in Dockerfile (now just copies dist) - Large files (.wasm, .onnx) tracked via Git LFS - This avoids HF Space build failures Co-Authored-By: Claude <noreply@anthropic.com>be5c8a6