Compare commits

..

2 Commits

Author SHA1 Message Date
semantic-release-bot
197297457b chore(release): 4.3.1 [skip ci]
## [4.3.1](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.3.0...v4.3.1) (2025-10-16)

### Bug Fixes

* **complement-race:** resolve TypeScript errors in state adapter ([59abcca](59abcca4c4))
2025-10-16 17:10:39 +00:00
Thomas Hallock
59abcca4c4 fix(complement-race): resolve TypeScript errors in state adapter
Fixes TypeScript compilation errors that prevented dev server from starting.

## Issues Fixed

1. **Provider.tsx - gamePhase type mismatch**
   - Added explicit type annotation for gamePhase variable
   - Properly maps multiplayer phases (setup/lobby) to single-player phases (controls)

2. **Provider.tsx - timeLimit undefined handling**
   - Convert undefined to null: `timeLimit ?? null`
   - Matches CompatibleGameState interface expectation

3. **Provider.tsx - difficultyTracker type**
   - Import DifficultyTracker type from gameTypes
   - Replace `any` with proper DifficultyTracker type
   - Fixes unknown type errors in useAdaptiveDifficulty hook

4. **useSteamJourney.ts - index signature error**
   - Add type assertion: `as keyof typeof MOMENTUM_DECAY_RATES`
   - Fixes "no index signature" error when accessing decay rates

## Verification
-  TypeScript: Zero compilation errors
-  Format: Biome passes
-  Lint: No new warnings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 12:09:47 -05:00
4 changed files with 26 additions and 8 deletions

View File

@@ -1,3 +1,10 @@
## [4.3.1](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.3.0...v4.3.1) (2025-10-16)
### Bug Fixes
* **complement-race:** resolve TypeScript errors in state adapter ([59abcca](https://github.com/antialias/soroban-abacus-flashcards/commit/59abcca4c4192ca28944fa1fa366791d557c1c27))
## [4.3.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.2.2...v4.3.0) (2025-10-16)

View File

@@ -78,7 +78,9 @@ export function useSteamJourney() {
// Steam Sprint is infinite - no time limit
// Get decay rate based on timeout setting (skill level)
const decayRate = MOMENTUM_DECAY_RATES[state.timeoutSetting] || MOMENTUM_DECAY_RATES.normal
const decayRate =
MOMENTUM_DECAY_RATES[state.timeoutSetting as keyof typeof MOMENTUM_DECAY_RATES] ||
MOMENTUM_DECAY_RATES.normal
// Calculate momentum decay for this frame
const momentumLoss = (decayRate * deltaTime) / 1000

View File

@@ -16,6 +16,7 @@ import {
useViewerId,
} from '@/lib/arcade/game-sdk'
import { DEFAULT_COMPLEMENT_RACE_CONFIG } from '@/lib/arcade/game-configs'
import type { DifficultyTracker } from '@/app/arcade/complement-race/lib/gameTypes'
import type { ComplementRaceConfig, ComplementRaceMove, ComplementRaceState } from './types'
/**
@@ -43,7 +44,7 @@ interface CompatibleGameState {
// Game status
isGameActive: boolean
isPaused: boolean
gamePhase: string
gamePhase: 'intro' | 'controls' | 'countdown' | 'playing' | 'results'
// Timing
gameStartTime: number | null
@@ -79,8 +80,8 @@ interface CompatibleGameState {
// UI state
showScoreModal: boolean
activeSpeechBubbles: Map<string, string>
adaptiveFeedback: any | null
difficultyTracker: any
adaptiveFeedback: { message: string; type: string } | null
difficultyTracker: DifficultyTracker
}
/**
@@ -244,8 +245,16 @@ export function ComplementRaceProvider({ children }: { children: ReactNode }) {
const localPlayer = localPlayerId ? multiplayerState.players[localPlayerId] : null
// Map gamePhase: setup/lobby -> controls
let gamePhase = multiplayerState.gamePhase
if (gamePhase === 'setup' || gamePhase === 'lobby') {
let gamePhase: 'intro' | 'controls' | 'countdown' | 'playing' | 'results'
if (multiplayerState.gamePhase === 'setup' || multiplayerState.gamePhase === 'lobby') {
gamePhase = 'controls'
} else if (multiplayerState.gamePhase === 'countdown') {
gamePhase = 'countdown'
} else if (multiplayerState.gamePhase === 'playing') {
gamePhase = 'playing'
} else if (multiplayerState.gamePhase === 'results') {
gamePhase = 'results'
} else {
gamePhase = 'controls'
}
@@ -280,7 +289,7 @@ export function ComplementRaceProvider({ children }: { children: ReactNode }) {
// Race mechanics
raceGoal: multiplayerState.config.raceGoal,
timeLimit: multiplayerState.config.timeLimit,
timeLimit: multiplayerState.config.timeLimit ?? null,
speedMultiplier: 1.0,
aiRacers: multiplayerState.aiOpponents.map((ai) => ({
id: ai.id,

View File

@@ -1,6 +1,6 @@
{
"name": "soroban-monorepo",
"version": "4.3.0",
"version": "4.3.1",
"private": true,
"description": "Beautiful Soroban Flashcard Generator - Monorepo",
"workspaces": [