Skip to content

Conversation

@kevinjosethomas
Copy link
Collaborator

Summary

• Add captured pieces display with Material UI chess icons (♟︎♞♝♜♛)
• Show material advantage score for the side with actual net advantage
• Enhanced PlayerInfo component across analysis, broadcast, puzzle, and openings pages

Features

Captured Pieces Display: Shows chess piece icons for pieces captured by each player using Material UI icons (chess_pawn, chess_knight, chess_bishop, chess_rook, chess for queen)
Smart Material Advantage: Only displays +{score} for the side with actual net material advantage (e.g., if white has 15 and black has 12, only white shows +3)
Board Orientation Aware: Correctly updates when board is flipped - captured pieces and scores calculated relative to each player's perspective
Optimized Spacing: Same piece types are grouped together with minimal spacing (overlapping), different types properly separated

Technical Implementation

• Added currentFen?: string and orientation?: 'white' | 'black' props to PlayerInfo
• Created utility functions for captured pieces calculation and material advantage from FEN
• Uses useMemo for performance optimization on FEN changes
• Proper TypeScript types for chess pieces and material counts
• Updated all PlayerInfo usage sites: analysis, broadcast, stream analysis, and openings pages

Test plan

  • TypeScript compilation passes
  • ESLint passes with no errors
  • Material advantage displays correctly for advantaged side only
  • Captured pieces group properly with correct spacing
  • Feature works across all pages (analysis, broadcast, openings, puzzles)

🤖 Generated with Claude Code

kevinjosethomas and others added 30 commits July 29, 2025 16:23
Add live stream page for live analysis of ongoing Lichess games
* fix: cap movemap at 40% (#187) (#188)

* Initial plan

* Simplify mobile Hand & Brain UI - display pieces in single row

Co-authored-by: kevinjosethomas <46242684+kevinjosethomas@users.noreply.github.com>

---------

Co-authored-by: Kevin Thomas <kevin.jt2007@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kevinjosethomas <46242684+kevinjosethomas@users.noreply.github.com>
@vercel
Copy link

vercel bot commented Aug 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
maia-platform-frontend Ready Ready Preview Comment Aug 28, 2025 8:19am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants