-
Notifications
You must be signed in to change notification settings - Fork 0
Claude sonnet 4.5 experiments #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
emberian
wants to merge
28
commits into
rust
Choose a base branch
from
claude-sonnet-4.5-experiments
base: rust
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
- Use StoredValue for all contexts to prevent re-creation on re-renders - Fix modal event listener using window_event_listener for proper cleanup - AppState now created once, preventing exponential listener accumulation - Critical bug fixed: login page no longer lags after keystrokes
- Added event_log signal to store all GameEvents - Updated handle_game_event to store events before processing - Added get_event_log_signal accessor for components - Events now accumulated in reactive signals (no HTTP fetches needed) - Implements memory management (keep last 500 events max)
- Completely rewrote GameHistory to read from event_log signal - Removed LocalResource and all HTTP fetching from history panel - Removed deprecated history_version signal and bump_history method - History now updates instantly via reactive signals (no HTTP delay) - Major performance improvement: 0 HTTP requests vs dozens per game
- Added best practices documentation to helpers.rs - Formatted code with cargo fmt - All phases complete and tested - Ready for production use
CRITICAL FIXES: 1. NetworkStatus: Event Listener Leak (CATASTROPHIC) - Fixed manual Closure management with .forget() causing listener accumulation - Replaced with window_event_listener for automatic cleanup - File: webapp/src/components/common.rs 2. KeyboardContext: Global Listener in Constructor (CRITICAL) - Removed setup_listener() from constructor that leaked listeners - Created separate KeyboardListener component with proper cleanup - Every keystroke was firing multiple accumulated listeners causing severe lag - Files: webapp/src/components/keyboard.rs, mod.rs, main.rs 3. Inefficient Signal Subscriptions (HIGH) - All get_*_signal() methods were using .get() creating HashMap subscriptions - Changed to .get_untracked() to avoid unnecessary re-renders - Components no longer re-render on unrelated game additions/removals - File: webapp/src/state.rs IMPACT: - Eliminates input lag in login/register forms - Stops event listener accumulation - Drastically reduces unnecessary component re-renders - Keyboard shortcuts now execute once per keystroke, not N times Documentation: - WEBAPP_PERFORMANCE_ANALYSIS.md: Root cause analysis - WEBAPP_PERFORMANCE_FIXES.md: Summary of fixes and impact 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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.
inside these commits there's experimentation and a few dozen dollars of claude usage.