diff --git a/packages/frontend/src/AgentSprite.jsx b/packages/frontend/src/AgentSprite.jsx index 8b4a68e..4cc927e 100644 --- a/packages/frontend/src/AgentSprite.jsx +++ b/packages/frontend/src/AgentSprite.jsx @@ -132,22 +132,24 @@ export default function AgentSprite({ agent, hovered, onHover }) { /> - {/* Agent name label */} - - {agent.name} - + {/* Agent name label — hover only (per design-critique-1 Issue 3, P1) */} + {hovered && ( + + {agent.name} + + )} {/* Hover tooltip */} {hovered && ( diff --git a/src/frontend/FarmCanvas.jsx b/src/frontend/FarmCanvas.jsx index 530e9f3..237a08c 100644 --- a/src/frontend/FarmCanvas.jsx +++ b/src/frontend/FarmCanvas.jsx @@ -3,6 +3,7 @@ import { useRef, useCallback } from 'react'; import { useStore } from './store'; import { rooms, agentDesks } from './officeMap'; import { TILESET_URL, TILE_INDEX, ROOM_TILE_STYLES } from './src/tileLoader'; +import { getAgentSpriteUrl } from './src/agentSprites'; const TILE = 32; const SCALE = 2; // 2x = 64px per tile @@ -53,13 +54,16 @@ function TileSprite({ tileCol, tileRow, x, y }) { } // Render a single furniture item: an element clipped to one tile -function FurnitureItem({ tileName, tx, ty }) { +function FurnitureItem({ tileName, tx, ty, w, h }) { const t = TILE_INDEX[tileName]; if (!t) return null; + const tw = w || 1; + const th = h || 1; + const clipId = `clip-f-${tx}-${ty}-${tw}-${th}`; return ( - - + + ); @@ -243,7 +247,7 @@ export default function FarmCanvas() { {/* Furniture from tile set */} {tileStyle.furniture.map((f, fi) => ( - + ))} {/* Doorways */} @@ -312,7 +316,7 @@ export default function FarmCanvas() { }} /> {/* Sprite at 48x48, centered in 56x56 container */}