fix: add test coverage for crafting-utils, pact-utils, and activity-log

This commit is contained in:
2026-05-22 14:39:27 +02:00
parent 49f8de01ca
commit ca1709006f
21 changed files with 1963 additions and 25 deletions
@@ -73,6 +73,17 @@ function EnemyRow({ enemy, floor }: { enemy: EnemyState; floor: number }) {
}
export function RoomDisplay({ floorState, floor }: RoomDisplayProps) {
// Guard against null/undefined/stale floorState
if (!floorState || !floorState.roomType) {
return (
<Card className="bg-gray-900/80 border-gray-700">
<CardHeader className="pb-2">
<CardTitle className="text-sm text-gray-400">Loading room...</CardTitle>
</CardHeader>
</Card>
);
}
const roomDisplay = getSpireRoomTypeDisplay(floorState.roomType as RoomType);
// Handle special room types (cast to string for extended types)