Skip to content

Feature/128 display dynamic character stats#149

Merged
aphexlog merged 4 commits intomainfrom
feature/128-display-dynamic-character-stats
Jan 16, 2026
Merged

Feature/128 display dynamic character stats#149
aphexlog merged 4 commits intomainfrom
feature/128-display-dynamic-character-stats

Conversation

@aphexlog
Copy link
Contributor

No description provided.

Aaron West 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
@aphexlog aphexlog merged commit 50ada02 into main Jan 16, 2026
1 check passed
@aphexlog aphexlog deleted the feature/128-display-dynamic-character-stats branch January 16, 2026 14:30
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