#!/bin/bash # Quick verification script for prize zone fix echo "🔍 Verifying Prize Zone Fix..." echo "" # Check we're on the right branch BRANCH=$(git branch --show-current) if [ "$BRANCH" != "fix/defer-board-creation-until-state" ]; then echo "❌ Wrong branch: $BRANCH" echo " Expected: fix/defer-board-creation-until-state" exit 1 fi echo "✓ On correct branch: $BRANCH" # Check TypeScript compilation echo "" echo "🔧 Checking TypeScript compilation..." cd frontend npm run typecheck > /dev/null 2>&1 if [ $? -eq 0 ]; then echo "✓ TypeScript compilation passed" else echo "❌ TypeScript compilation failed" echo " Run 'cd frontend && npm run typecheck' for details" exit 1 fi # Check for required imports echo "" echo "📦 Checking required imports..." if grep -q "import { gameBridge } from '../bridge'" frontend/src/game/sync/StateRenderer.ts; then echo "✓ gameBridge import found in StateRenderer" else echo "❌ Missing gameBridge import in StateRenderer" exit 1 fi if grep -q "import type { Board } from '../objects/Board'" frontend/src/game/scenes/MatchScene.ts; then echo "✓ Board type import found in MatchScene" else echo "❌ Missing Board type import in MatchScene" exit 1 fi # Check for fatal error handling echo "" echo "⚠️ Checking fatal error handling..." if grep -q "handleFatalErrorReturn" frontend/src/pages/GamePage.vue; then echo "✓ Fatal error handler function exists" else echo "❌ Missing fatal error handler function" exit 1 fi if grep -q "Return to Menu" frontend/src/pages/GamePage.vue; then echo "✓ Manual return button exists" else echo "❌ Missing manual return button" exit 1 fi # Check for resign toast echo "" echo "📢 Checking resign failure toast..." if grep -q "Could not confirm resignation" frontend/src/pages/GamePage.vue; then echo "✓ Resign failure toast exists" else echo "❌ Missing resign failure toast" exit 1 fi # Summary echo "" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "✅ All automated checks passed!" echo "" echo "Next steps:" echo "1. Start dev servers (backend + frontend)" echo "2. Navigate to: http://localhost:5173/game/f6f158c4-47b0-41b9-b3c2-8edc8275b70c" echo "3. Verify NO prize rectangles appear on board" echo "4. Check console logs show: usePrizeCards: false" echo "" echo "See TESTING.md for full test suite" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"