fix(v2): character window now updates live from WebSocket

The CharacterWindow only fetched once from API on mount and never
updated. Now:
- character_stats WS messages are tracked in useLiveData via ref
- Passed through WindowRenderer to CharacterWindow as liveStats prop
- Window uses live WS data when available, falls back to API fetch
- Attributes, skills, vitals base values, properties (augmentations,
  ratings, etc.), allegiance all update in real-time

Also: vitals bars in the character window use live WS vitals data
(health_percentage etc.) for real-time HP/Stamina/Mana display.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-04-14 16:02:49 +02:00
parent a5bd659876
commit d2c30b610b
30 changed files with 115 additions and 54 deletions

View file

@ -66,7 +66,8 @@ export const MapLayout: React.FC<Props> = ({ data }) => {
/>
<WindowRenderer characters={data.characters} chatMessages={data.chatMessages}
nearbyObjects={data.nearbyObjects} inventoryVersion={data.inventoryVersion}
equipmentCantrips={data.equipmentCantrips} socket={data.socketRef.current} />
equipmentCantrips={data.equipmentCantrips} characterStats={data.characterStats}
socket={data.socketRef.current} />
<RareNotification recentRares={data.recentRares} />
</div>
</WindowManagerProvider>