Commit Graph

31 Commits

Author SHA1 Message Date
root 3dbf5b707b feat(client): add StocksPanel UI component
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 02:55:47 +00:00
root 9f77a84d6f feat(server): add pickup system for NPC stockpile material retrieval
NPCs can now retrieve crafting materials from stockpiles instead of
always gathering raw resources. The industry system checks if a
stockpile has needed materials before falling back to gathering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 02:52:37 +00:00
root e27f2381eb feat(client): add inventions tab with notification dot to LeftPanel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 00:45:10 +00:00
root 6b932d12a7 feat(client): add InventionsPanel UI component
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 00:44:30 +00:00
root c7bf7c9ef4 feat(client): add Phase D UI integration (D.1-D.3)
- D.1: Inventory display in NPC info panel (two-column grid below stats)
- D.2: Activity labels for gather/craft/build/dropoff goals
- D.3: Gold color for invention events in feed, lightbulb icon in history

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 00:13:15 +00:00
root 7194321e1b feat(memory): add client memory events, History tab in NPC info panel
Wire SocketClient to receive memory-event and memory-history socket
events. GameScene stores per-NPC memory events and updates the info
panel in follow mode. NpcInfoPanel gains a third "History" tab showing
a reverse-chronological event log with emoji icons per event type.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 22:02:16 +00:00
root daddf2583d feat(thought): wire client socket, GameScene thought handling, emoji animation, and info panel display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 21:12:00 +00:00
root 87946bcb5c feat: add social interaction narration system (task 1.3)
Implements LLM-powered narration for NPC social interactions:
- Rate limits updated to 20 RPM / 1000 per day (OpenRouter free tier)
- NarrationEvent type with template fallback text generator
- NarrationService with rolling event buffer and LLM priority queuing
- Narration emitter wired between social and relationship systems
- Socket.io events for real-time narration delivery
- Tabbed left panel (Stats + Events) replacing old Superlatives panel
- Recent events section in NPC info panel
- Follow tracking via socket for LLM narration priority

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 19:29:43 +00:00
root 94e4f4b9c2 fix: restore superlatives methods, fix event update rebuild, remove dead method
- Restore subscribeSuperlatives/unsubscribeSuperlatives/onSuperlativesUpdate
  on SocketClient (lost during Task 5 refactor)
- Fix EventsFeed.updateEvent to rebuild entire element when LLM narration
  arrives (names may be in different positions)
- Remove dead setFollowedEntity method from GameLoop (replaced by
  SocketServer.rebuildFollowedEntityIds)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:38:06 +00:00
root e8723f0a06 feat: add recent narration events to NPC info panel
Show the last 3 narration events involving the followed NPC in the
Status tab, between the activity label and the diamond separator.
Events update live when new narrations arrive or LLM text replaces
template text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:22:48 +00:00
root 554b5a6f30 feat: refactor left panel into tabbed container with Stats + Events tabs
Extract SuperlativesPanel into content-only component, create LeftPanel
as the outer shell with two tabs (S for Stats, E for Events), and add
EventsFeed component for displaying narration events with clickable
NPC names and auto-scroll behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:19:20 +00:00
root 37b9390c64 style: shrink NPC info panel fonts and center command panel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 17:21:57 +00:00
root 6f459fa88a feat: add trunk decorations, resize superlatives panel, add LLM plan docs
- Add trunk decoration layer to GameMap and mapGenerator
- Load trunk.png asset in BootScene
- Increase superlatives panel size and font sizes for readability
- Simplify mapGenerator (remove procedural terrain features)
- Add LLM integration planning documents
- Remove stale day-night cycle worktree plans
- Update local Claude settings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 17:09:19 +00:00
root baeaafd372 feat: display backstory in NPC info panel with fade-in transition
Add backstory element to the Status tab between the activity label and
diamond separator. When a backstory arrives from the LLM, it fades in
with italic styling. Empty backstories remain hidden.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:54:56 +00:00
root 4fe41b7cf0 feat: add SuperlativesPanel UI component
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 04:47:22 +00:00
root 61e37bd2db feat: add ring emoji for proposals and partner bond display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:36:37 +00:00
root 29c8c5fd8c fix: give each CommandPanel a unique DOM id
Both camera and follow panels had id='command-panel'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:03:33 +00:00
root 9b55a563ed refactor: parameterize CommandPanel title and commands
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:03:33 +00:00
root 19922efd80 fix: persist expanded state across relationship tab re-renders
The updateRelationships method rebuilds DOM every broadcast tick,
which reset expand/collapse state. Now tracks expanded tiers in a
Set that persists across re-renders.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:12:37 +00:00
root a0ce9c92f8 feat: add click-to-expand for relationship tier groups and memories
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:10:03 +00:00
root 420a21e184 docs: update CLAUDE.md for relationship system; fix client styling
- Update CLAUDE.md with relationship system entry points, conventions, test count
- Restore NPC info panel to 280px width with original font sizes
- Add responsive scaling to Phaser game config
- Bump CommandPanel font sizes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:42:41 +00:00
root 3af1e59232 feat: add relationships tab to NPC info panel with tier-grouped sliders
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:38:30 +00:00
root 7d196524d6 fix: clamp baseline drift both directions, make updateStats private
- Add Math.max(3, ...) to baseline drift in socialSystem to prevent
  stats drifting below minimum (was only clamping upward with Math.min)
- Make NpcInfoPanel.updateStats private (only called from updateInfo)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:31:29 +00:00
root 304dc78778 feat: display NPC stats in info panel with EarthBound styling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:28:04 +00:00
root 526bb83d0b feat: create EarthBound-styled CommandPanel UI component
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:39:09 +00:00
root 02a8fc7ce8 fix: prevent async race in sprite creation and emoji lifecycle leak
Two bugs fixed:

1. NPC sprites not fully rendering: createEntitySprite is async but was
   called without await from handleStateUpdate. Concurrent state updates
   triggered multiple simultaneous creation calls for the same entity.
   The second call composited before textures loaded, producing empty
   spritesheets. Fixed with a creatingEntities guard set.

2. Interaction emojis not appearing after first use: animationend
   listener was attached during removal (when animation had already
   completed), so it never fired. Ghost entries in activeEmojis map
   blocked future emoji creation. Fixed by self-cleaning via
   animationend listener attached at creation time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:18:20 +00:00
root d011dcf183 fix: address code review - pair-based phase transitions and emoji animation lifecycle
- Process phase transitions per-pair instead of per-entity to avoid
  double-processing (latent bug for future side effects)
- Restore independent outcome rolls per NPC (as designed)
- Let emoji CSS animation finish before removing DOM element, preventing
  visual pop when server broadcast timing doesn't align with animation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:12:01 +00:00
root 2a6c928c75 feat: show Socializing activity in NPC info panel during interactions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:08:47 +00:00
root cabb129fdf feat: add floating emoji overlay for NPC social interactions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:07:40 +00:00
root 03849c9505 style: EarthBound-inspired NPC info panel with doubled borders and pixel aesthetic
Authentic SNES RPG window styling: doubled rounded borders with gap,
deep indigo palette, portrait frame, diamond separators, gradient
need bars with numeric readout, diagonal shine overlay.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:40:11 +00:00
root ffdfd1474e feat: add NpcInfoPanel HTML/CSS overlay with EarthBound-style UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:35:46 +00:00