Feature/128 display dynamic character stats#149
Merged
Conversation
added 4 commits
January 15, 2026 17:20
- Add getCharacterData helper function for centralized character data access - Update mobile character sheet to use dynamic values from characterState - Add HP percentage calculation for dynamic health bar - Update all stat displays (STR, DEX, CON, INT, WIS, CHA) to use database values - Update Level and HP displays with fallbacks to defaults - Update inventory to dynamically render from database - Maintain fallback values for when character data is unavailable Resolves #128
- Change character lookup from adventureId to conversationId for persistence - Add ref-based lock to prevent race condition duplicate creations - Ensure exactly ONE character per conversation (not per adventure) - Characters now persist across page refreshes - Add comprehensive debug logging for character lifecycle - Add render logging for GameMasterHud component Fixes issue where 4+ characters were created on each new conversation and on every refresh
- Decouple character from adventure - use conversationId as primary lookup key - Add explicit owner field to GameMasterAdventure schema - Add authMode: 'userPool' to database queries for proper authorization - Add early return in fetchCharacter when character is found - Increase propagation delay to 1000ms to ensure database writes complete - Remove dependency on conversationId from fetchCharacter callback - Add comprehensive debug logging for character and adventure lookups - Fix character creation to happen only once per conversation - Characters now persist correctly across page refreshes Resolves duplicate character creation bug where 5+ characters were created per conversation
- Remove verbose character and adventure creation logs - Remove subscription and message flow debug logs - Remove user authentication and conversation loading logs - Keep only essential error logging for debugging issues - Retain test mode logs for development debugging - Clean up console output for production deployment
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.
No description provided.