Skip to content

Track chess games on user profile at deposit and improve game lists UI.#460

Open
jonty007 wants to merge 3 commits into
stagingfrom
feat/my-games-list-refactor
Open

Track chess games on user profile at deposit and improve game lists UI.#460
jonty007 wants to merge 3 commits into
stagingfrom
feat/my-games-list-refactor

Conversation

@jonty007

Copy link
Copy Markdown
Collaborator

Summary

  • Add ChessContractHelper.addGameToUserIfNeeded and call it from depositTokens (and refactor move to use it), so games are recorded on the user profile when a player deposits rather than only on the first move.
  • Refactor the chess-app sidebar into separate My Active Turns and My Games lists via GameListsProvider, with TXO streaming on both game and user mods plus a chess-games-updated event for cross-component refresh after new/accepted games.
  • Add contract tests covering User.games population on deposit, both-player deposits, and deduplication when addGameToUserIfNeeded or move runs after deposit.
  • Exclude @bitcoin-computer/chess-contracts from Vite optimizeDeps.

jonty007 and others added 3 commits June 15, 2026 19:21
Record games in User.games when tokens are deposited (not only on first move), split the sidebar into active-turn and my-games lists with live refresh, and add contract tests for deduplication.

Co-authored-by: Cursor <cursoragent@cursor.com>
@@ -0,0 +1,5 @@
export const CHESS_GAMES_UPDATED = 'chess-games-updated'

export function notifyGamesUpdated() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion this could be inlined.

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