Commit Graph

1949 Commits

Author SHA1 Message Date
Thomas Hallock 34785f466f fix(card-sorting): prevent infinite loop when all cards are correct
Root cause: When all cards are in the correct order, both prefix AND
suffix contain all cards. The auto-arrange logic tried to position
all 15 cards in a row, resulting in positions > 100% (e.g., card 14
at 229%). Server rejected these invalid positions, causing the effect
to loop infinitely.

Fix:
1. Detect when prefix/suffix overlap (all cards correct) and skip
   auto-arrange entirely
2. Add viewport boundary checks - only arrange cards if they fit
   within 0-100% range
3. Add detailed logging to show when/why auto-arrange is skipped

The logs revealed:
- "Move rejected: x must be between 0 and 100" errors
- Loop count hitting 230+ iterations
- All 15 cards being marked as both prefix AND suffix
- Position calculations exceeding 229%

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 3ec35f45ec debug(card-sorting): add throttled logging for auto-arrange loop
Add strategic console logging to debug the infinite loop issue:
- Track loop count with useRef
- Only log after 10 iterations and throttle to once per second
- Log prefix/suffix card counts and position changes
- Shows which cards need updates and why

This will help diagnose why the tolerance-based comparison
isn't preventing the infinite loop.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 627b873382 fix(card-sorting): prevent infinite loop with tolerance-based position comparison
When all cards are in correct order, they're in both prefix AND suffix,
causing the auto-arrange effect to trigger infinitely due to floating
point precision issues in position comparisons.

Fix: Use tolerance-based comparison (0.1%) instead of strict equality
when checking if card positions have changed.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 170abed231 fix(card-sorting): lock correctly positioned prefix/suffix cards
Cards in the correct prefix or suffix are now locked and cannot be
dragged, preventing state thrashing when trying to move them.

**Changes:**

1. **Added isCardLocked() helper:**
   - Checks if a card is part of the correct prefix or suffix
   - Uses same logic as visual feedback (prefix/suffix detection)

2. **Updated handlePointerDown:**
   - Early return if isCardLocked(cardId) is true
   - Prevents drag initialization for locked cards

3. **Updated AnimatedCard component:**
   - Added isLocked prop
   - Cursor changes to 'not-allowed' for locked cards
   - Visual indication that cards cannot be moved

**User experience:**
- Locked cards show 'not-allowed' cursor on hover
- Attempting to drag does nothing (no state changes)
- Clear feedback that these cards are finalized
- Prevents accidental disruption of correctly placed cards
- No more state thrashing when clicking on arranged cards

**Example:**
With sequence [10, 20, 30, 50, 40] and correct order [10, 20, 30, 40, 50]:
- Cards 10, 20, 30 are locked (correct prefix)
- Only cards 50 and 40 can be dragged
- Trying to drag card 10 shows 'not-allowed' cursor and does nothing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 4ba7f24717 feat(card-sorting): auto-arrange prefix/suffix cards in corners
Cards in the correct prefix and suffix now automatically arrange themselves:
- Prefix cards: top-left corner, side by side, left to right
- Suffix cards: bottom-right corner, side by side, right to left

**Arrangement details:**
- Cards positioned at 5% margin from edges
- 2% spacing between adjacent cards
- No rotation (perfectly aligned)
- Higher z-index (1000+) so they layer on top
- Smooth spring animation as they move into position

**How it works:**
1. Find prefix cards (positions 0,1,2... all matching correct order)
2. Find suffix cards (positions ...n-2,n-1,n all matching correct order)
3. Calculate positions for organized layout
4. Update card states and sync to server
5. React-spring animates the cards smoothly to their new positions

**Example with correct order [10, 20, 30, 40, 50]:**
- Sequence [10, 20, 50, 30, 40] → 10,20 auto-arrange top-left
- Sequence [30, 10, 20, 40, 50] → 40,50 auto-arrange bottom-right
- Sequence [10, 20, 30, 50, 40] → 10,20,30 auto-arrange top-left

This provides clear visual organization and frees up workspace for
sorting the remaining unsorted cards in the middle section.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 8f6feec4f2 feat(card-sorting): shrink/fade cards in correct suffix as well
Extended the shrink and fade behavior to apply to cards in both the
correct prefix AND the correct suffix of the sorted sequence.

**Examples:**

Correct order: [10, 20, 30, 40, 50]

Sequence: [10, 20, 30, 50, 40]
- Shrink/fade: 10, 20, 30 (correct prefix)

Sequence: [20, 30, 40, 50, 10]
- Shrink/fade: none (no correct prefix or suffix)

Sequence: [30, 20, 40, 50, 10]
- Shrink/fade: 40, 50 (correct suffix)

Sequence: [10, 20, 50, 40, 30]
- Shrink/fade: 10, 20 (correct prefix)

Sequence: [30, 10, 20, 40, 50]
- Shrink/fade: 40, 50 (correct suffix)

**How suffix checking works:**
For each card at position i:
- Calculate offset from end: (length - 1 - i)
- Check if all positions from i to end match the corresponding positions
  in the correct order (counting from the end)
- If yes → card is part of correct suffix

A card shrinks/fades if it's in either the correct prefix OR correct suffix.

This provides better visual feedback as players work from both ends toward
the middle, which is a common sorting strategy.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 51368c6ec5 fix(card-sorting): only shrink/fade cards in correct prefix
Changed the shrink and fade behavior to only apply to cards that are part
of the correct prefix of the sorted sequence, not just any card in its
correct absolute position.

**Before:**
If sequence is [10, 30, 20, 40, 50] and correct order is [10, 20, 30, 40, 50]:
- Cards 10, 40, and 50 would shrink/fade (in correct absolute positions)
- Even though 40 and 50 are NOT part of a correct prefix

**After:**
Only card 10 shrinks/fades (the only correct prefix of length 1)

**How it works:**
A card is in the correct prefix if:
1. It's at position i in the current sequence
2. All cards from position 0 to i match the correct order
3. This ensures only the longest correct prefix gets visual feedback

**Updated:**
- AnimatedCard rendering logic to check for correct prefix
- ContinuousSequencePath to apply scale only to prefix cards
- Green borders also now only show for correct prefix

This provides clearer feedback about progress and helps players understand
which cards are definitively correct vs. just happen to be in the right
spot relative to the full answer.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 7028cfc511 feat(card-sorting): fade correctly positioned cards to 50% opacity
Cards that are in the correct position now fade to 50% opacity in addition
to scaling down to 50% size.

This provides stronger visual feedback that cards are correctly placed:
- Scale: 50% (already implemented)
- Opacity: 50% (new)

Implementation:
- Added opacity to spring animation properties
- Opacity transitions smoothly like scale (even during dragging)
- Both opacity and scale are exempt from immediate updates during drag
- Applied opacity via springProps.opacity on the animated div

The double visual cue (smaller + faded) makes it very clear which cards
are correctly positioned and helps players focus on the remaining
unsorted cards.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 4dce16cca4 fix(card-sorting): adjust viewport dimensions for spectator panels
Fixed issue where cards were positioned based on full window size instead
of the reduced game board area when spectator panels are visible.

The root cause:
- viewportDimensions used window.innerWidth/innerHeight (full browser size)
- Game board container was resized to account for panels
- Cards were positioned using full viewport dimensions, causing them to
  extend beyond the visible game board and go under the stats sidebar

Solution:
- Created getEffectiveViewportWidth() and getEffectiveViewportHeight()
  helper functions that calculate the actual playable area
- For spectators with sidebar open: width = window.innerWidth - 280px
- For spectators: height = window.innerHeight - 56px (banner)
- For players: full window dimensions (unchanged)
- Added useEffect to update dimensions when spectator panels toggle

Now cards are correctly positioned within the visible game board area and
won't appear underneath the spectator stats sidebar.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock fc5cf1216f fix(card-sorting): adjust game board for spectator panels
The game board now resizes to avoid being covered by spectator panels:

Spectator Banner (56px height at top):
- Game board height reduced to calc(100vh - 56px)
- Game board top position adjusted to 56px
- Timer hidden for spectators (since banner shows time)

Spectator Stats Sidebar (280px width on right):
- Game board width reduced to calc(100vw - 280px) when sidebar is open
- Width transitions smoothly when sidebar collapses/expands

Player view:
- Full viewport (100vw × 100vh) as before
- Timer visible in top-left corner

All transitions are smooth with 0.3s ease for a polished feel when
toggling the stats sidebar.

This ensures spectators can see the entire game board without any
panels covering cards or gameplay elements.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock f3687ed236 fix(card-sorting): New Game now restarts with same settings instantly
Changed "New Game" behavior to immediately start a new game with the
current settings, without going through the setup page.

Changes:
- Removed the gamePhase === 'playing' guard in startGame()
- This allows starting a new game even when already playing
- Still prevents rapid double-sends within 500ms
- Simplified GameComponent's onNewGame handler back to just calling startGame()

Now when "New Game" is clicked:
- Immediately starts a fresh game
- Uses the same settings (card count, show numbers, time limit, game mode)
- No interruption with the setup screen

This provides a smoother "play again" experience for quick restarts.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock f3f6eca1db fix(card-sorting): enable New Game button during active gameplay
The "New Game" button in the mini nav menu now works even when in the
middle of a game.

When clicked during gameplay:
1. Transitions to setup phase first (to clean up game state)
2. Waits 100ms for setup phase to render
3. Automatically starts a new game

When clicked from setup or results phase:
- Starts new game immediately (existing behavior)

This allows players to quickly restart without manually going to setup
first, improving the game flow when players want to try again.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 0eefc332ac fix(card-sorting): smooth scale animation while dragging cards
Cards now smoothly scale when transitioning between sizes while being
dragged, instead of instantly snapping to the new size.

Changed the spring's `immediate` property from a boolean to a function
that checks the property key:
- Scale always animates smoothly (returns false for 'scale')
- Position and rotation are immediate during dragging (responsive feel)

This provides:
- Smooth visual feedback when dragging cards into correct positions
- Maintains responsive position tracking during dragging
- Consistent animation feel across all card transformations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 6b095c3383 fix(card-sorting): enable card scaling for spectators
Spectators now see cards scale down to 50% when in correct positions,
regardless of educational mode setting.

Separates two behaviors:
- Scale: Always applies when card is in correct position (both players
  and spectators see this)
- Green border: Only shows for players, or spectators with educational
  mode enabled

Implementation:
- Added isCorrectPosition prop to AnimatedCard (always true when correct)
- Kept isCorrect prop for border color (conditional on educational mode)
- Scale animation now uses isCorrectPosition instead of isCorrect

This provides consistent visual feedback about card placement for all
viewers while preserving the educational mode toggle for showing/hiding
correctness indicators.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 780a7161bc feat(card-sorting): add auto-submit countdown for perfect sequences
When the card sequence is correct, a countdown timer now starts:
- Shows 3, 2, 1 in the submit button (1.5s per number)
- Auto-submits the solution when countdown reaches 0
- Countdown resets if sequence becomes imperfect
- Countdown disabled for spectators

This provides:
- Visual feedback that the sequence is correct
- Automatic submission without requiring a click
- Time for players to review before submission
- Smooth game flow when solving perfectly

Implementation:
- perfectCountdown state tracks current number (3, 2, 1, or null)
- First useEffect starts/resets countdown based on isSequenceCorrect
- Second useEffect decrements countdown every 1.5s and auto-submits at 0
- Button displays countdown number when active, otherwise shows checkmark

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 829c741e55 fix(card-sorting): adjust connecting paths for scaled cards
When cards scale to 50% in correct positions, the connecting paths now
properly connect to the center of the scaled cards instead of the
original full-size positions.

Updates the ContinuousSequencePath component to:
- Track which cards are correctly positioned (and thus scaled)
- Apply scale factor to card dimensions when calculating edge points
- Pass scale information through cardCenters array

This ensures paths connect smoothly to the visual center of all cards
regardless of their scale.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 222dc555fa feat(card-sorting): scale correctly positioned cards to 50%
Cards that are in the correct position now smoothly scale down to half
size with spring animation. This provides visual feedback that the card
is correctly placed and helps reduce visual clutter as players progress.

Uses react-spring's `to()` interpolator to combine rotation and scale
transforms in a single animated transform property.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock fa9f1a568f fix(card-sorting): show only active players in team members section
Filter team members display to only show players from state.activePlayers
array, excluding spectators and disconnected players from the results screen.

Changes:
- Check state.activePlayers.length instead of players.size
- Map activePlayers array to get player metadata from players Map
- Filter out undefined entries (in case player left before results)
- Display count shows only active players

This ensures the team members section on the results screen accurately
reflects who participated in the collaborative game, not just who was
present in the room.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock ed6f177914 feat(card-sorting): add team scoring UI for collaborative mode
Enhance the results screen to distinguish collaborative games from solo play
with team-focused messaging and a team members display.

Features:
- "Team Score" badge shown only in collaborative mode
- Team-focused success messages (e.g., "Perfect teamwork!")
- Team members section showing all participants with emojis
- Purple theming for collaborative elements (consistent with activity feed)

UI Changes:
- Team Score badge: purple gradient, positioned below score circle
- Team Members card: displays all players with emoji badges
- Updated messages to emphasize teamwork and collaboration
- Flexible layout: team section only appears when players.size > 0

Messaging examples:
- Perfect: "Perfect teamwork! All cards in correct order!"
- Excellent: "Excellent collaboration! Very close to perfect!"
- Good: "Good team effort! You worked well together!"
- Needs practice: "Keep working together! Communication is key."

Design specs:
- Team badge: purple gradient (#a78bfa to #8b5cf6)
- Member badges: light purple background with purple border
- Flexbox layout with wrap for multiple team members
- Consistent with collaborative mode's purple theme

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 1461414ef4 feat(card-sorting): add activity feed notifications for collaborative mode
Implement real-time activity feed that shows toast notifications when other
players perform actions in collaborative mode. Notifications auto-dismiss
after 3 seconds with smooth fade-out animations.

Features:
- Detects when other players start dragging cards
- Shows player emoji and name with action description
- Positioned bottom-right with smooth animations
- Only visible in collaborative mode
- Filters out local player's own actions
- Auto-dismisses after 3 seconds with fade effect

Implementation:
- ActivityNotification type with player metadata
- addActivityNotification helper (useCallback)
- Auto-dismiss timer with cleanup
- State tracking for player drag events
- Fade-out animation based on notification age

UI specs:
- Fixed position: bottom-right (24px margins)
- Z-index: 150 (above spectator sidebar)
- White background with purple border
- Smooth opacity and translateY transitions
- Max width: 320px

Note: Full activity tracking (card placements, reveals) would require
enhanced state to track which player made each action. Currently tracks
drag events via cardPositions.draggedByPlayerId metadata.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock dc2d94aaa5 fix(card-sorting): filter local player from emoji overlays on dragged cards
When a player drags a card in their own window, they should not see their
own emoji overlay on that card. The emoji overlay should only appear when
OTHER players are dragging cards (for multiplayer awareness).

Changes:
- Add localPlayerId prop to AnimatedCard component
- Filter emoji overlay condition: draggedByPlayerId !== localPlayerId
- Pass localPlayerId when rendering AnimatedCard

Fixes regression where local player's emoji showed on their own dragged cards.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock 6527c26a81 feat(card-sorting): add collapsible stats sidebar for spectators
Add comprehensive real-time statistics sidebar for spectators with smooth
collapse/expand functionality and color-coded metrics.

Features:
- Collapsible sidebar (280px width, slides in from right)
- Collapse toggle button with smooth animations
- Real-time statistics cards with gradient backgrounds:
  - Time Elapsed (blue gradient, MM:SS format)
  - Cards Placed (green gradient, with completion percentage)
  - Current Accuracy (yellow gradient, % of correctly positioned cards)
  - Numbers Revealed status (pink/gray gradient based on state)
- Each stat card has emoji icons and descriptive labels
- Smooth slide-in/out transition (0.3s ease)
- Fixed position below spectator banner
- Z-index 90 (below banner which is 100)

UI Details:
- Sidebar positioned at top: 56px (below banner)
- Right slide animation from -280px to 0
- Toggle button extends slightly on hover (40px → 44px)
- Arrow indicators (◀ when collapsed, ▶ when expanded)
- Semi-transparent white background (95% opacity)
- Subtle box shadow for depth
- Scrollable content area for long stat lists

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock ee7345d641 feat(card-sorting): add spectator mode UI enhancements
Add comprehensive spectator experience with banner showing player info,
progress tracking, and educational mode toggle for learning.

Features:
- Spectator banner at top of screen with gradient purple background
- Shows which player is being spectated (emoji + name)
- Real-time progress counter (cards placed / total cards)
- Educational Mode toggle for spectators:
  - When enabled: shows correctness indicators on cards
  - When disabled: spectators see cards without hints
  - Allows learning by watching without spoiling the experience
- Correctness logic respects educational mode setting

UI Details:
- Fixed position banner (56px height, z-index 100)
- Gradient background (#6366f1 to #8b5cf6)
- Toggle button with visual state ( when on, 📚 when off)
- Smooth transitions and hover effects

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock a832325deb fix(card-sorting): add missing gameMode support after hard reset
After reverting cursor tracking commits, the gameMode type system remained
but implementation was incomplete, causing TypeScript errors. This adds the
missing gameMode handling throughout the codebase.

Changes:
- Add gameMode to createInitialState (Provider and Validator)
- Add gameMode to setConfig type signature and implementation
- Add gameMode validation case in validateSetConfig
- Include gameMode in originalConfig for pause/resume
- Initialize activePlayers, allPlayerMetadata, cursorPositions as empty

Fixes TypeScript errors:
- "Property 'gameMode' is missing" in Provider and Validator
- "Argument of type 'gameMode' not assignable" in SetupPhase

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock d25b888ffb feat(card-sorting): add game mode selector UI to setup phase
Add UI allowing players to choose between Solo and Collaborative game modes.
The selector includes visual feedback and descriptive text for each mode.

Changes:
- Add game mode selection buttons (👤 Solo / 👥 Collaborative)
- Add descriptive text explaining each mode
- Update setConfig to accept 'gameMode' field
- Add gameMode validation in Validator

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
Thomas Hallock fd765335ef feat(card-sorting): add GameMode type system for multiplayer support
Add GameMode type ('solo' | 'collaborative' | 'competitive' | 'relay') to
CardSortingConfig and CardSortingState. This establishes the foundation for
multiplayer features.

Changes:
- Add GameMode type and gameMode field to config/state interfaces
- Add JOIN_COLLABORATIVE_GAME, LEAVE_COLLABORATIVE_GAME, UPDATE_CURSOR_POSITION moves
- Add activePlayers, allPlayerMetadata, cursorPositions to state
- Set default gameMode to 'solo' in config

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:36:44 -05:00
semantic-release-bot f7e9965b37 chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add bezier curves to connecting arrows ([4d8e873](4d8e873358))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add green border to correctly positioned cards ([16fca86](16fca86b76)), closes [#22c55](https://github.com/antialias/soroban-abacus-flashcards/issues/22c55)
* **card-sorting:** add player emoji indicators on moving cards ([3a82099](3a82099757))
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add smooth transition to drop shadow ([b0b93d0](b0b93d0175))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **card-sorting:** implement continuous bezier curve paths ([2d93024](2d9302410f))
* **card-sorting:** improve card distribution for natural scattered look ([0b0503f](0b0503f035))
* **card-sorting:** make player emoji fill entire card background ([2e7a02c](2e7a02c9e4))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** keep arrow sequence numbers upright ([79c9469](79c94699fa))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** preserve rotation when starting drag ([3364144](3364144fb6))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **card-sorting:** prevent position jump when clicking rotated cards ([564a00f](564a00f82b))
* **card-sorting:** prevent replaying own movements from server ([308168a](308168a7fb))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* **card-sorting:** add comprehensive multiplayer plan ([008ccea](008ccead0f))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 20:52:12 +00:00
Thomas Hallock 2e7a02c9e4 feat(card-sorting): make player emoji fill entire card background
Change from small corner indicator to full-card emoji overlay:
- Emoji now fills entire card (140x180px)
- Large font size (120px) for visibility
- Semi-transparent (30% opacity) to see abacus through it
- Subtle blue tint background for better contrast
- Maintains rounded corners

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 15:50:55 -05:00
semantic-release-bot eaf48f65da chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add bezier curves to connecting arrows ([4d8e873](4d8e873358))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add green border to correctly positioned cards ([16fca86](16fca86b76)), closes [#22c55](https://github.com/antialias/soroban-abacus-flashcards/issues/22c55)
* **card-sorting:** add player emoji indicators on moving cards ([3a82099](3a82099757))
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add smooth transition to drop shadow ([b0b93d0](b0b93d0175))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **card-sorting:** implement continuous bezier curve paths ([2d93024](2d9302410f))
* **card-sorting:** improve card distribution for natural scattered look ([0b0503f](0b0503f035))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** keep arrow sequence numbers upright ([79c9469](79c94699fa))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** preserve rotation when starting drag ([3364144](3364144fb6))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **card-sorting:** prevent position jump when clicking rotated cards ([564a00f](564a00f82b))
* **card-sorting:** prevent replaying own movements from server ([308168a](308168a7fb))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* **card-sorting:** add comprehensive multiplayer plan ([008ccea](008ccead0f))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 20:48:11 +00:00
Thomas Hallock 3a82099757 feat(card-sorting): add player emoji indicators on moving cards
Implement Phase 1 of multiplayer plan - show player emoji on cards:
- Add draggedByPlayerId field to CardPosition type
- Add players map to Provider context
- Include draggedByPlayerId in position updates during drag
- Clear draggedByPlayerId when drag ends
- Show emoji overlay (28px circle) in top-right of cards being moved
- Works for both local and network players

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 15:46:57 -05:00
semantic-release-bot d7758c18b2 chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add bezier curves to connecting arrows ([4d8e873](4d8e873358))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add green border to correctly positioned cards ([16fca86](16fca86b76)), closes [#22c55](https://github.com/antialias/soroban-abacus-flashcards/issues/22c55)
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add smooth transition to drop shadow ([b0b93d0](b0b93d0175))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **card-sorting:** implement continuous bezier curve paths ([2d93024](2d9302410f))
* **card-sorting:** improve card distribution for natural scattered look ([0b0503f](0b0503f035))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** keep arrow sequence numbers upright ([79c9469](79c94699fa))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** preserve rotation when starting drag ([3364144](3364144fb6))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **card-sorting:** prevent position jump when clicking rotated cards ([564a00f](564a00f82b))
* **card-sorting:** prevent replaying own movements from server ([308168a](308168a7fb))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* **card-sorting:** add comprehensive multiplayer plan ([008ccea](008ccead0f))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 20:42:47 +00:00
Thomas Hallock 008ccead0f docs(card-sorting): add comprehensive multiplayer plan
Complete plan for multiplayer and spectator features:
- Player emoji indicators on moving cards
- Spectator mode UI enhancements
- Collaborative mode (team sort)
- Competitive mode (race sort)
- Implementation phases and technical specs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 15:41:32 -05:00
semantic-release-bot b41f77fb29 chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add bezier curves to connecting arrows ([4d8e873](4d8e873358))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add green border to correctly positioned cards ([16fca86](16fca86b76)), closes [#22c55](https://github.com/antialias/soroban-abacus-flashcards/issues/22c55)
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add smooth transition to drop shadow ([b0b93d0](b0b93d0175))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **card-sorting:** implement continuous bezier curve paths ([2d93024](2d9302410f))
* **card-sorting:** improve card distribution for natural scattered look ([0b0503f](0b0503f035))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** keep arrow sequence numbers upright ([79c9469](79c94699fa))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** preserve rotation when starting drag ([3364144](3364144fb6))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **card-sorting:** prevent position jump when clicking rotated cards ([564a00f](564a00f82b))
* **card-sorting:** prevent replaying own movements from server ([308168a](308168a7fb))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 20:35:10 +00:00
Thomas Hallock 2d9302410f feat(card-sorting): implement continuous bezier curve paths
Replace individual arrow segments with smooth continuous curves:
- Use cubic bezier with Catmull-Rom style tangents for smooth flow
- Calculate control points based on previous/next card positions
- Curves now transition smoothly through each card in sequence
- No more sharp angles at connection points

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 15:34:00 -05:00
semantic-release-bot e200f1bf2f chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add bezier curves to connecting arrows ([4d8e873](4d8e873358))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add green border to correctly positioned cards ([16fca86](16fca86b76)), closes [#22c55](https://github.com/antialias/soroban-abacus-flashcards/issues/22c55)
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add smooth transition to drop shadow ([b0b93d0](b0b93d0175))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **card-sorting:** improve card distribution for natural scattered look ([0b0503f](0b0503f035))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** keep arrow sequence numbers upright ([79c9469](79c94699fa))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** preserve rotation when starting drag ([3364144](3364144fb6))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **card-sorting:** prevent position jump when clicking rotated cards ([564a00f](564a00f82b))
* **card-sorting:** prevent replaying own movements from server ([308168a](308168a7fb))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 20:17:02 +00:00
Thomas Hallock 4d8e873358 feat(card-sorting): add bezier curves to connecting arrows
Replace straight arrow lines with smooth quadratic bezier curves:

- Use SVG path with quadratic bezier (Q command)
- Calculate control point perpendicular to line, offset by 30px
- Animate path with react-spring for smooth transitions
- Position arrowhead at curve endpoint with correct tangent angle
- Position sequence number badge at curve's control point (apex)
- Add drop shadow to correct (green) arrows for extra polish

Arrows now follow elegant curved paths between cards instead of
straight lines, giving the game a more polished and playful feel.
The curves are automatically calculated and animate smoothly as
cards move around.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 15:15:46 -05:00
semantic-release-bot dc1cbd81f8 chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add green border to correctly positioned cards ([16fca86](16fca86b76)), closes [#22c55](https://github.com/antialias/soroban-abacus-flashcards/issues/22c55)
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add smooth transition to drop shadow ([b0b93d0](b0b93d0175))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **card-sorting:** improve card distribution for natural scattered look ([0b0503f](0b0503f035))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** keep arrow sequence numbers upright ([79c9469](79c94699fa))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** preserve rotation when starting drag ([3364144](3364144fb6))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **card-sorting:** prevent position jump when clicking rotated cards ([564a00f](564a00f82b))
* **card-sorting:** prevent replaying own movements from server ([308168a](308168a7fb))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 20:12:49 +00:00
Thomas Hallock 308168a7fb fix(card-sorting): prevent replaying own movements from server
Fix issue where dragging a card would replay the entire movement
sequence when position updates bounced back from the server:

- Add lastPositionUpdateRef to track when we send position updates
- Set timestamp when sending updates (both real-time and on drop)
- Ignore server position updates for 500ms after sending our own
- Prevents local client from re-applying its own movements

When you drag and drop a card, the position is sent to the server
and broadcast back. This was causing the card to animate through
the entire drag path again. Now we ignore server updates for 500ms
after sending, eliminating the replay while still allowing sync
from other windows.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 15:11:36 -05:00
semantic-release-bot c1bd4cf2e1 chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add green border to correctly positioned cards ([16fca86](16fca86b76)), closes [#22c55](https://github.com/antialias/soroban-abacus-flashcards/issues/22c55)
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add smooth transition to drop shadow ([b0b93d0](b0b93d0175))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **card-sorting:** improve card distribution for natural scattered look ([0b0503f](0b0503f035))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** keep arrow sequence numbers upright ([79c9469](79c94699fa))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** preserve rotation when starting drag ([3364144](3364144fb6))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **card-sorting:** prevent position jump when clicking rotated cards ([564a00f](564a00f82b))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 20:07:54 +00:00
Thomas Hallock 79c94699fa fix(card-sorting): keep arrow sequence numbers upright
Counter-rotate sequence number badges on arrows to keep them always
upright and readable:

- Change badge div to animated.div to access springProps
- Apply counter-rotation: rotate(-angle) to cancel parent rotation
- Combine with existing translate(-50%, -50%) centering
- Numbers now stay horizontal regardless of arrow angle

The sequence number badges were rotating with the arrow lines,
making them hard to read at steep angles. Now they always appear
upright for better readability.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 15:06:20 -05:00
semantic-release-bot bd3307c3fc chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add green border to correctly positioned cards ([16fca86](16fca86b76)), closes [#22c55](https://github.com/antialias/soroban-abacus-flashcards/issues/22c55)
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add smooth transition to drop shadow ([b0b93d0](b0b93d0175))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **card-sorting:** improve card distribution for natural scattered look ([0b0503f](0b0503f035))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** preserve rotation when starting drag ([3364144](3364144fb6))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **card-sorting:** prevent position jump when clicking rotated cards ([564a00f](564a00f82b))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 20:00:46 +00:00
Thomas Hallock b0b93d0175 feat(card-sorting): add smooth transition to drop shadow
Add smooth 0.2s ease transition to box-shadow that applies both when
picking up and dropping cards:

- Remove conditional transition (was 'none' while dragging)
- Always apply 'box-shadow 0.2s ease' transition
- Shadow now smoothly animates in when starting drag
- Shadow smoothly animates out when dropping card

Previously the shadow appeared instantly when clicking because the
transition was disabled during drag. Now it smoothly fades in/out
for a more polished feel.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 14:59:28 -05:00
Thomas Hallock 564a00f82b fix(card-sorting): prevent position jump when clicking rotated cards
Fix position jump when clicking on cards by calculating drag offset
from the card's actual position instead of getBoundingClientRect():

- Use cardState position (in percentages) converted to pixels
- Calculate offset as pointer position minus card position
- Prevents jump caused by rotated elements having different bounding boxes

When a card is rotated, getBoundingClientRect() returns the bounding box
of the rotated element, not the original position. By calculating offset
from the actual cardState position, cards stay perfectly in place when
you click them, regardless of rotation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 14:58:41 -05:00
Thomas Hallock 3364144fb6 fix(card-sorting): preserve rotation when starting drag
Fix jarring rotation jump when clicking/dragging cards by preserving
the card's initial rotation and adding drag-based rotation on top:

- Store initialRotation in dragStateRef when pointer down
- Calculate dragRotation from horizontal drag distance
- Apply final rotation as initialRotation + dragRotation
- Prevents cards from snapping to 0° rotation on first click

Cards now maintain their scattered rotation when picked up, with
smooth rotation changes based on drag direction. The rotation resets
to a new random tilt when dropped, which feels natural.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 14:57:38 -05:00
semantic-release-bot 23dabe8ad5 chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add green border to correctly positioned cards ([16fca86](16fca86b76)), closes [#22c55](https://github.com/antialias/soroban-abacus-flashcards/issues/22c55)
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **card-sorting:** improve card distribution for natural scattered look ([0b0503f](0b0503f035))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 19:56:16 +00:00
Thomas Hallock 16fca86b76 feat(card-sorting): add green border to correctly positioned cards
Add visual feedback for cards that are correctly positioned in the
sequence by changing their border color to green (#22c55e):

- Add isCorrect prop to AnimatedCard component
- Calculate if each card is in correct position based on inferredSequence
- Change border from blue to green when card is correctly positioned
- Works in conjunction with green pulsing arrows between correct cards

Now players get immediate visual feedback showing which cards are
already in the correct order, making it easier to focus on the
remaining cards that need sorting.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 14:54:56 -05:00
semantic-release-bot 0b4ae08d62 chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **card-sorting:** improve card distribution for natural scattered look ([0b0503f](0b0503f035))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 19:52:41 +00:00
Thomas Hallock 0b0503f035 feat(card-sorting): improve card distribution for natural scattered look
Replace pure random positioning with a smarter grid-based distribution
that creates a more natural "cards thrown on table" appearance:

- Use a loose grid layout as a base to ensure good coverage
- Add significant random offsets (±40% of cell size) for scattered feel
- Increase rotation variance to -20 to +20 degrees
- Randomize z-index for natural overlapping/stacking
- Increase margins (5% sides, 15% top) for better spacing
- Ensure all cards stay within visible bounds

Cards now look casually scattered while remaining visible and
well-distributed across the play area.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 14:51:28 -05:00
semantic-release-bot 76625d5d81 chore(release): 4.68.0 [skip ci]
## [4.68.0](https://github.com/antialias/soroban-abacus-flashcards/compare/v4.67.1...v4.68.0) (2025-10-23)

### Features

* **arcade:** auto-create room when user has none ([ff88c3a](ff88c3a1b8))
* **card-sorting:** add CardPosition type and position syncing ([656f5a7](656f5a7838))
* **card-sorting:** add react-spring animations for real-time sync ([c367e0c](c367e0ceec))
* **card-sorting:** add updateCardPositions action to Provider ([f6ed4a2](f6ed4a27a2))
* **create-room:** replace hardcoded game grid with dynamic Radix Select dropdown ([83d0ba2](83d0ba26f5))
* **room-share:** add QR code button for easy mobile joining ([349290a](349290ac6a))

### Bug Fixes

* **arcade:** add automatic retry for version conflict rejections ([fbcde25](fbcde2505f))
* **arcade:** implement optimistic locking in session manager ([71fd66d](71fd66d96a))
* **card-sorting:** add border radius to outer card container ([a922eba](a922eba73c))
* **card-sorting:** add overflow hidden to clip rounded corners ([84c66fe](84c66feec6))
* **card-sorting:** preserve card positions on pause/resume ([0d8af09](0d8af09517))
* **card-sorting:** prevent duplicate START_GAME moves on Play Again ([a0b14f8](a0b14f87e9))
* **complement-race:** prevent delivery move thrashing in steam sprint mode ([e1258ee](e1258ee041))
* **qr-button:** improve layout and z-index ([646a422](646a4228d0))
* **qr-button:** increase mini QR code size to 80px ([61ac737](61ac7378bd))
* **qr-button:** increase mini QR code to 84px ([3fae5ea](3fae5ea6fa))
* **qr-button:** make button square and increase QR size ([dc2d466](dc2d46663b))
* **qr-button:** match height of stacked buttons ([81f202d](81f202d215))
* **room-info:** hide Leave Room button when user is alone ([5927f61](5927f61c3c))

### Code Refactoring

* **card-sorting:** send complete card sequence instead of individual moves ([e4df843](e4df8432b9))

### Documentation

* add deployment verification guidelines to prevent false positives ([3d8da23](3d8da2348b))
* update workflow to require manual testing before commits ([0991796](0991796f1e))
2025-10-23 19:49:48 +00:00
Thomas Hallock a922eba73c fix(card-sorting): add border radius to outer card container
Add borderRadius and overflow: 'hidden' to the outer animated.div
container to properly clip the white background at rounded corners.

Previously only the inner div had border radius, causing the white
background to show square corners bleeding through the shadow.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 14:48:29 -05:00