Fix no-wasm support (lots of bugs, sad)#484
Merged
Conversation
- Add ?no-wasm=true URL parameter to force RPC mode for debugging - Fix RPC serialization issues with HashMap<PlayerID, _> by adding custom Deserialize - Implement automatic cache prefilling when cards encounter uncached trumps - Prevent O(n) duplicate requests with promise-based tracking mechanism - Ensure cards wait for active prefills instead of making individual requests 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
- Use stable string key for cards in hand to prevent unnecessary re-renders - Only re-run sorting when actual card content changes, not just object references - This reduces repeated sortAndGroupCards calls during gameplay 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
- Create stable key from actual hand data (card->count mapping) instead of derived array - Prevents unnecessary re-renders when hands object reference changes but content is same - Properly memoizes the key generation to avoid recreating it every render 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
- Better error messages when JSON parsing fails - Log the actual response text for debugging - This will help identify if server is returning non-JSON error messages 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
- Wrap boolean response in a struct to work with serde tag="type"
- Update both RPC and WASM versions to return { reachable: bool }
- Fix frontend to handle the new response structure
- Add better error logging to diagnose JSON parsing issues
The issue was that serde cannot serialize a primitive boolean as a tagged enum variant.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Add ?no-wasm=true URL parameter support for debugging RPC mode - Fix duplicate batchGetCardInfo requests by tracking active prefills - Optimize React dependency tracking to prevent unnecessary re-renders - Fix NextThresholdReachable RPC serialization error - Ensure WASM and RPC versions maintain consistent API - Remove excessive console.log statements (keeping no-WASM mode log) - Update TypeScript types for new response structures 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also, do a bunch of caching to avoid extra RPCs