Conversation
Wire up full pipeline for real-time potion balance updates: - PG NOTIFY trigger on consumables table (indexer migration) - API: LISTEN consumables_update, broadcast on consumables channel - Client: useWebSocket consumables handler + GameDirector filtering by wallet Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🚅 Deployed to the summit-pr-131 environment in Summit stack
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant enhancement to the game's real-time capabilities by enabling reactive updates for player potion balances. By integrating PostgreSQL notifications with a new WebSocket channel, players will now see their potion counts update instantly as changes occur on the backend. This improves the responsiveness and accuracy of the game's UI, providing a more seamless and engaging user experience without requiring manual refreshes. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Claude finished @loothero's task —— View job Claude Review - General Engineering Reviewrun=22837099462 attempt=1 sha=33b866f8959df3f8e06f0347566693461c766a41 scope=general Todo List
Review FindingsAfter analyzing the PR changes, I found only one file modified outside the core app packages: Changes analyzed:
AssessmentNo issues found. The documentation update in
This change maintains documentation accuracy and helps developers understand the new WebSocket channel functionality. The update is consistent with the implementation and follows the existing documentation patterns. Summary0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO |
Codex Review - General Engineering ReviewNo issues found. |
|
Claude finished @loothero's task —— View job Claude Review - Indexer/API Reviewrun=22837099462 attempt=1 sha=33b866f8959df3f8e06f0347566693461c766a41 scope=indexer-api Todo List
Review FindingsNo issues found. Analysis SummaryI reviewed the changes in PostgreSQL Trigger (0004_consumables_trigger.sql):
WebSocket Subscription Changes:
Data Integrity & Operations:
Migration Safety:
The implementation is operationally sound and follows established patterns from the existing notification system. Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO--- | Branch: |
There was a problem hiding this comment.
Code Review
This pull request introduces a new WebSocket channel consumables for real-time updates of potion balances, with changes across the API, client, and database, including a new PostgreSQL trigger, API endpoint extensions, and client-side handling in GameDirector and useWebSocket hook. However, a critical security vulnerability exists: the server-side SubscriptionHub broadcasts balance updates for all users to any client subscribed to the consumables channel, leading to information exposure by allowing real-time monitoring of other players' assets. This must be mitigated by implementing server-side filtering based on the owner's address. Additionally, a high-severity issue in GameDirector.tsx was found where updating consumable balances incorrectly overwrites the entire token balance state. While the implementation is generally well-tested and follows existing patterns, addressing these issues is essential.
client/src/contexts/GameDirector.tsx
Outdated
| setTokenBalances(() => ({ | ||
| "EXTRA LIFE": data.xlife_count, | ||
| ATTACK: data.attack_count, | ||
| REVIVE: data.revive_count, | ||
| POISON: data.poison_count, | ||
| })); |
There was a problem hiding this comment.
The current implementation of setTokenBalances will overwrite the entire token balances state, potentially clearing other token balances like SKULL or CORPSE. The new consumable balances should be merged with the existing state to preserve other token counts.
setTokenBalances((prevBalances) => ({
...prevBalances,
"EXTRA LIFE": data.xlife_count,
ATTACK: data.attack_count,
REVIVE: data.revive_count,
POISON: data.poison_count,
}));
There was a problem hiding this comment.
Fixed in ffede6c — now spreads ...prev to preserve SKULL/CORPSE/SURVIVOR balances. Test updated to verify existing keys are retained.
| case "consumables_update": | ||
| this.broadcast("consumables", payload as ConsumablesPayload); | ||
| break; |
There was a problem hiding this comment.
The consumables channel broadcasts potion balance updates for all users to every client subscribed to the channel. While the client-side GameDirector filters these messages to only process updates for the connected wallet (line 422), a malicious client can subscribe to the channel and monitor the real-time balance changes of all players. This information exposure can be used for tactical advantage in a competitive game. To remediate this, implement server-side filtering: clients should provide the owner address they are interested in when subscribing, and the broadcast method should only send updates to clients whose interested address matches the owner in the payload.
There was a problem hiding this comment.
Declining this one — this follows the same broadcast pattern as summit and event channels, which also send all data to all subscribers. Token balances are on-chain public data (anyone can call balanceOf), so there's no real information exposure. Adding server-side owner filtering would introduce significant complexity (subscription state per-owner, address normalization in the hub) for no meaningful security gain. If we decide to add per-owner filtering later, it should apply to all three channels uniformly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Codex Review - Indexer/API ReviewNo review output was produced. |
|
Claude finished @loothero's task —— View job Claude Review - General Engineering Reviewrun=22837142807 attempt=1 sha=f8dabb449264d8e66a51922fbe375ef93695cd81 scope=general Todo List
Review FindingsAfter analyzing the PR changes, I found only one file modified outside the core app packages: Changes analyzed:
AssessmentNo issues found. The documentation update in
This change maintains documentation accuracy and helps developers understand the new WebSocket channel functionality. The update is consistent with the implementation and follows the existing documentation patterns. Summary0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO |
Codex Review - General Engineering ReviewNo issues found. |
|
Claude finished @loothero's task —— View job Claude Review - Indexer/API Reviewrun=22837142807 attempt=1 sha=f8dabb449264d8e66a51922fbe375ef93695cd81 scope=indexer-api Todo List
Review FindingsNo issues found. Analysis SummaryI reviewed the changes in PostgreSQL Trigger (0004_consumables_trigger.sql):
WebSocket Subscription Changes:
Data Integrity & Operations:
Migration Safety:
The implementation is operationally sound and follows established patterns from the existing notification system. Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO--- | Branch: |
|
Claude finished @loothero's task —— View job Claude Review - React/Frontend Reviewrun=22837142807 attempt=1 sha=f8dabb449264d8e66a51922fbe375ef93695cd81 scope=client Todo List
Review Findings[HIGH] client/src/contexts/GameDirector.tsx:424-429 - State overwrite bug Additional ObservationsThe implementation is generally well-structured and follows good React patterns:
The security concern noted by Gemini about broadcasting all user data is primarily a backend API design issue rather than a client-side vulnerability. The client correctly filters messages to only process updates for the connected wallet. Test coverage appears comprehensive with 5 new tests covering both the WebSocket hook functionality and GameDirector consumables handling. Summary: 0 CRITICAL, 1 HIGH, 0 MEDIUM, 0 LOW, 0 INFO |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33b866f895
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
client/src/contexts/GameDirector.tsx
Outdated
| setTokenBalances(() => ({ | ||
| "EXTRA LIFE": data.xlife_count, | ||
| ATTACK: data.attack_count, | ||
| REVIVE: data.revive_count, | ||
| POISON: data.poison_count, |
There was a problem hiding this comment.
Preserve existing token balances when applying consumable updates
This setter replaces the entire tokenBalances object with only four potion keys, so any previously loaded balances like SKULL, CORPSE, SURVIVOR, or STRK are dropped after the first consumables WebSocket event and then read as zero in balance-dependent UI/actions until another full fetch runs. Merge these values into prev instead of returning a new partial map.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in ffede6c — now uses (prev) => ({ ...prev, ... }) to merge consumable balances into existing state. Test also updated to pass in { SKULL: 10, CORPSE: 5 } as prev and verify they're preserved.
| @@ -0,0 +1,28 @@ | |||
| -- Migration: Add NOTIFY trigger for real-time consumables balance updates | |||
There was a problem hiding this comment.
Register the new consumables trigger migration in journal
Adding this migration file without a corresponding 0004_consumables_trigger entry in indexer/migrations/meta/_journal.json means Drizzle-based migration execution (used by pnpm db:migrate and the indexer migrator) will not apply it, so the consumables_update trigger/function will be missing in upgraded environments and no consumables WS notifications will be emitted.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in ffede6c — added 0004_consumables_trigger entry to indexer/migrations/meta/_journal.json so the Drizzle migrator picks it up.
There was a problem hiding this comment.
Pull request overview
Adds end-to-end real-time “consumables” (potion) balance updates from the indexer → API WebSocket → client state, so the UI can react when a wallet’s potion counts change.
Changes:
- Add a PostgreSQL
NOTIFYtrigger on theconsumablestable to publish balance updates. - Extend the API WebSocket
SubscriptionHuband the clientuseWebSockethook with a newconsumableschannel + payload type. - Wire
GameDirectorto consumeconsumablesupdates and update local token balances; add corresponding tests.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| indexer/migrations/0004_consumables_trigger.sql | Adds pg_notify('consumables_update', ...) trigger/function for consumables updates. |
| api/src/ws/subscriptions.ts | LISTENs for consumables_update and broadcasts a new consumables WS channel. |
| api/src/ws/subscriptions.test.ts | Adds tests around subscribing/unsubscribing to the new channel. |
| client/src/hooks/useWebSocket.ts | Adds consumables channel support + ConsumablesData and callback wiring. |
| client/src/hooks/useWebSocket.test.ts | Adds unit tests for the new hook callback and subscription message contents. |
| client/src/contexts/GameDirector.tsx | Subscribes to consumables and updates balances for the connected wallet. |
| client/src/contexts/GameDirector.test.tsx | Adds tests validating the consumables handler behavior. |
| api/AGENTS.md | Updates documentation to include the new WS channel and real-time pattern. |
| client/tsconfig.tsbuildinfo | Updates generated TS build info artifact (should not be committed). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
client/src/contexts/GameDirector.tsx
Outdated
| setTokenBalances(() => ({ | ||
| "EXTRA LIFE": data.xlife_count, | ||
| ATTACK: data.attack_count, | ||
| REVIVE: data.revive_count, | ||
| POISON: data.poison_count, | ||
| })); |
There was a problem hiding this comment.
setTokenBalances is replacing the entire tokenBalances map with only the four potion entries. Elsewhere (e.g. in ControllerProvider.fetchTokenBalances/fetchPaymentTokenBalances) balances are merged into the same map, so this will wipe any existing token entries (including payment tokens) whenever a consumables update arrives. Update this to merge into the previous state instead of overwriting it (e.g. spread prev and update only the potion keys).
| case "consumables_update": | ||
| this.broadcast("consumables", payload as ConsumablesPayload); | ||
| break; |
There was a problem hiding this comment.
The new consumables_update notifications are broadcast to every client subscribed to the consumables channel, meaning each subscriber receives balance updates for all owners (and must filter client-side). Given consumables updates can be frequent, this increases bandwidth/CPU and may unnecessarily expose per-owner balance data to all connected clients. Consider adding server-side filtering (e.g. owner-scoped subscriptions or including an owner filter in the subscribe message) so clients only receive updates relevant to them.
| @@ -1 +1 @@ | |||
| {"root":["./src/App.tsx","./src/main.tsx","./src/patchCoverage.imports.test.ts","./src/vite-env.d.ts","./src/api/ekubo.test.ts","./src/api/ekubo.ts","./src/api/starknet.test.ts","./src/api/starknet.ts","./src/api/summitApi.test.ts","./src/api/summitApi.ts","./src/components/ActionBar.test.tsx","./src/components/ActionBar.tsx","./src/components/AttackingBeasts.tsx","./src/components/BeastCard.tsx","./src/components/BeastCollection.tsx","./src/components/BeastProfile.tsx","./src/components/BurgerMenu.tsx","./src/components/ClaimRewardsButton.tsx","./src/components/Countdown.tsx","./src/components/DiplomacyPopover.tsx","./src/components/EventHistoryButton.tsx","./src/components/FinalShowdown.tsx","./src/components/GameNotificationFeed.tsx","./src/components/Icons.tsx","./src/components/KilledByAdventurers.tsx","./src/components/Leaderboard.jsx","./src/components/Leaderboard.test.tsx","./src/components/LeaderboardButton.tsx","./src/components/Migrating.tsx","./src/components/ProfileCard.tsx","./src/components/QuestBoard.tsx","./src/components/QuestRewardsRemainingBar.tsx","./src/components/RewardsRemainingBar.tsx","./src/components/Summit.tsx","./src/components/TermsOfServiceModal.tsx","./src/components/dialogs/AutopilotConfigModal.tsx","./src/components/dialogs/BeastDexModal.tsx","./src/components/dialogs/BeastUpgradeModal.tsx","./src/components/dialogs/ConnectWallet.tsx","./src/components/dialogs/DCATab.tsx","./src/components/dialogs/EventHistoryModal.tsx","./src/components/dialogs/LeaderboardModal.tsx","./src/components/dialogs/MarketplaceModal.tsx","./src/components/dialogs/QuestsModal.tsx","./src/components/dialogs/SummitGiftModal.tsx","./src/components/dialogs/TopUpStrkModal.tsx","./src/contexts/GameDirector.test.tsx","./src/contexts/GameDirector.tsx","./src/contexts/QuestGuide.tsx","./src/contexts/Statistics.test.tsx","./src/contexts/Statistics.tsx","./src/contexts/controller.test.tsx","./src/contexts/controller.tsx","./src/contexts/sound.tsx","./src/contexts/starknet.tsx","./src/dojo/useGameTokens.test.tsx","./src/dojo/useGameTokens.ts","./src/dojo/useSystemCalls.ts","./src/hooks/useWebSocket.ts","./src/pages/MainPage.tsx","./src/stores/autopilotStore.ts","./src/stores/gameStore.ts","./src/types/game.ts","./src/utils/BeastData.ts","./src/utils/addressNameCache.ts","./src/utils/analytics.ts","./src/utils/beasts.test.ts","./src/utils/beasts.ts","./src/utils/events.test.ts","./src/utils/events.ts","./src/utils/networkConfig.ts","./src/utils/styles.ts","./src/utils/summitRewards.ts","./src/utils/themes.ts","./src/utils/translation.test.ts","./src/utils/translation.ts","./src/utils/utils.test.ts","./src/utils/utils.ts","./src/utils/variants.test.ts","./src/utils/variants.ts"],"errors":true,"version":"5.9.3"} No newline at end of file | |||
| {"root":["./src/App.tsx","./src/main.tsx","./src/patchCoverage.imports.test.ts","./src/vite-env.d.ts","./src/api/ekubo.test.ts","./src/api/ekubo.ts","./src/api/starknet.test.ts","./src/api/starknet.ts","./src/api/summitApi.test.ts","./src/api/summitApi.ts","./src/components/ActionBar.test.tsx","./src/components/ActionBar.tsx","./src/components/AttackingBeasts.tsx","./src/components/BeastCard.tsx","./src/components/BeastCollection.tsx","./src/components/BeastProfile.tsx","./src/components/BurgerMenu.tsx","./src/components/ClaimRewardsButton.tsx","./src/components/Countdown.tsx","./src/components/DiplomacyPopover.tsx","./src/components/EventHistoryButton.tsx","./src/components/FinalShowdown.tsx","./src/components/GameNotificationFeed.tsx","./src/components/Icons.tsx","./src/components/KilledByAdventurers.tsx","./src/components/Leaderboard.jsx","./src/components/Leaderboard.test.tsx","./src/components/LeaderboardButton.tsx","./src/components/Migrating.tsx","./src/components/ProfileCard.tsx","./src/components/QuestBoard.tsx","./src/components/QuestRewardsRemainingBar.tsx","./src/components/RewardsRemainingBar.tsx","./src/components/Summit.tsx","./src/components/TermsOfServiceModal.tsx","./src/components/dialogs/AutopilotConfigModal.tsx","./src/components/dialogs/BeastDexModal.tsx","./src/components/dialogs/BeastUpgradeModal.tsx","./src/components/dialogs/ConnectWallet.tsx","./src/components/dialogs/DCATab.tsx","./src/components/dialogs/EventHistoryModal.tsx","./src/components/dialogs/LeaderboardModal.tsx","./src/components/dialogs/MarketplaceModal.tsx","./src/components/dialogs/QuestsModal.tsx","./src/components/dialogs/SummitGiftModal.tsx","./src/components/dialogs/TopUpStrkModal.tsx","./src/contexts/GameDirector.test.tsx","./src/contexts/GameDirector.tsx","./src/contexts/QuestGuide.tsx","./src/contexts/Statistics.test.tsx","./src/contexts/Statistics.tsx","./src/contexts/controller.test.tsx","./src/contexts/controller.tsx","./src/contexts/sound.tsx","./src/contexts/starknet.tsx","./src/dojo/useGameTokens.test.tsx","./src/dojo/useGameTokens.ts","./src/dojo/useSystemCalls.ts","./src/hooks/useWebSocket.test.ts","./src/hooks/useWebSocket.ts","./src/pages/MainPage.tsx","./src/stores/autopilotStore.ts","./src/stores/gameStore.ts","./src/types/game.ts","./src/utils/BeastData.ts","./src/utils/addressNameCache.ts","./src/utils/analytics.ts","./src/utils/beasts.test.ts","./src/utils/beasts.ts","./src/utils/events.test.ts","./src/utils/events.ts","./src/utils/networkConfig.ts","./src/utils/styles.ts","./src/utils/summitRewards.ts","./src/utils/themes.ts","./src/utils/translation.test.ts","./src/utils/translation.ts","./src/utils/utils.test.ts","./src/utils/utils.ts","./src/utils/variants.test.ts","./src/utils/variants.ts"],"version":"5.9.3"} No newline at end of file | |||
There was a problem hiding this comment.
tsconfig.tsbuildinfo is a generated TypeScript incremental build artifact and is typically not meant to be committed. Including it in the repo tends to create noisy diffs and merge conflicts across machines/CI. Remove this file from version control and add it to an appropriate .gitignore (or disable incremental builds for the client if you intentionally want build info tracked).
| {"root":["./src/App.tsx","./src/main.tsx","./src/patchCoverage.imports.test.ts","./src/vite-env.d.ts","./src/api/ekubo.test.ts","./src/api/ekubo.ts","./src/api/starknet.test.ts","./src/api/starknet.ts","./src/api/summitApi.test.ts","./src/api/summitApi.ts","./src/components/ActionBar.test.tsx","./src/components/ActionBar.tsx","./src/components/AttackingBeasts.tsx","./src/components/BeastCard.tsx","./src/components/BeastCollection.tsx","./src/components/BeastProfile.tsx","./src/components/BurgerMenu.tsx","./src/components/ClaimRewardsButton.tsx","./src/components/Countdown.tsx","./src/components/DiplomacyPopover.tsx","./src/components/EventHistoryButton.tsx","./src/components/FinalShowdown.tsx","./src/components/GameNotificationFeed.tsx","./src/components/Icons.tsx","./src/components/KilledByAdventurers.tsx","./src/components/Leaderboard.jsx","./src/components/Leaderboard.test.tsx","./src/components/LeaderboardButton.tsx","./src/components/Migrating.tsx","./src/components/ProfileCard.tsx","./src/components/QuestBoard.tsx","./src/components/QuestRewardsRemainingBar.tsx","./src/components/RewardsRemainingBar.tsx","./src/components/Summit.tsx","./src/components/TermsOfServiceModal.tsx","./src/components/dialogs/AutopilotConfigModal.tsx","./src/components/dialogs/BeastDexModal.tsx","./src/components/dialogs/BeastUpgradeModal.tsx","./src/components/dialogs/ConnectWallet.tsx","./src/components/dialogs/DCATab.tsx","./src/components/dialogs/EventHistoryModal.tsx","./src/components/dialogs/LeaderboardModal.tsx","./src/components/dialogs/MarketplaceModal.tsx","./src/components/dialogs/QuestsModal.tsx","./src/components/dialogs/SummitGiftModal.tsx","./src/components/dialogs/TopUpStrkModal.tsx","./src/contexts/GameDirector.test.tsx","./src/contexts/GameDirector.tsx","./src/contexts/QuestGuide.tsx","./src/contexts/Statistics.test.tsx","./src/contexts/Statistics.tsx","./src/contexts/controller.test.tsx","./src/contexts/controller.tsx","./src/contexts/sound.tsx","./src/contexts/starknet.tsx","./src/dojo/useGameTokens.test.tsx","./src/dojo/useGameTokens.ts","./src/dojo/useSystemCalls.ts","./src/hooks/useWebSocket.test.ts","./src/hooks/useWebSocket.ts","./src/pages/MainPage.tsx","./src/stores/autopilotStore.ts","./src/stores/gameStore.ts","./src/types/game.ts","./src/utils/BeastData.ts","./src/utils/addressNameCache.ts","./src/utils/analytics.ts","./src/utils/beasts.test.ts","./src/utils/beasts.ts","./src/utils/events.test.ts","./src/utils/events.ts","./src/utils/networkConfig.ts","./src/utils/styles.ts","./src/utils/summitRewards.ts","./src/utils/themes.ts","./src/utils/translation.test.ts","./src/utils/translation.ts","./src/utils/utils.test.ts","./src/utils/utils.ts","./src/utils/variants.test.ts","./src/utils/variants.ts"],"version":"5.9.3"} |
Codex Review - React/Frontend Review[HIGH] client/src/contexts/GameDirector.tsx:424 - [LOW] client/src/contexts/GameDirector.test.tsx:204 - New consumables test validates updater behavior only against an empty previous state, so it does not catch balance-clobber regressions. Summary: 0 CRITICAL, 1 HIGH, 0 MEDIUM, 1 LOW, 0 INFO |
…nal entry Address review feedback: - Merge consumables into existing tokenBalances instead of overwriting - Register 0004_consumables_trigger in Drizzle migration journal Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codex Review - Indexer/API Review[HIGH] indexer/migrations/0004_consumables_trigger.sql:1 - New migration file is not accompanied by a migration journal update ( [MEDIUM] api/src/ws/subscriptions.ts:168 - [LOW] indexer/migrations/0004_consumables_trigger.sql:26 - Trigger emits on every Summary: 0 CRITICAL, 1 HIGH, 1 MEDIUM, 1 LOW, 0 INFO |
|
Claude finished @loothero's task —— View job Claude Review - General Engineering Reviewrun=22837240827 attempt=1 sha=ffede6c1f3ed3264acbe322d752e8e5237b9d819 scope=general Todo List
Review FindingsAfter running the git diff command to check for changes outside the core app packages (contracts/, client/, indexer/, api/), no files were modified in the targeted scope. Changes analyzed: No files outside the core app packages were modified in this PR. AssessmentNo issues found. This PR contains changes only within the core application packages (indexer/, api/, client/) and does not modify any CI/workflow files, scripts, tooling, shared configuration, or other files that could impact the broader repository infrastructure or development workflow. The reactive potion balances feature is implemented entirely within the application layer without requiring changes to:
Summary0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO |
Codex Review - General Engineering ReviewNo issues found. |
|
Claude finished @loothero's task —— View job Claude Review - Indexer/API Reviewrun=22837240827 attempt=1 sha=ffede6c1f3ed3264acbe322d752e8e5237b9d819 scope=indexer-api Todo List
Review FindingsNo issues found. Analysis SummaryI reviewed the changes in PostgreSQL Trigger (0004_consumables_trigger.sql):
WebSocket Subscription Changes:
Data Integrity & Operations:
Migration Safety:
The implementation is operationally sound and follows established patterns from the existing notification system. Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO--- | Branch: |
|
Claude finished @loothero's task —— View job Claude Review - React/Frontend Reviewrun=22837240827 attempt=1 sha=ffede6c1f3ed3264acbe322d752e8e5237b9d819 scope=client Todo List
Review FindingsNo issues found. Analysis SummaryI reviewed the changes in GameDirector.tsx Changes:
useWebSocket.ts Changes:
Test Coverage:
Type Safety & React Patterns:
Previous Review Issues Addressed:
The implementation follows established WebSocket patterns from existing channels, maintains type safety, includes comprehensive test coverage, and properly handles the real-time potion balance update use case without breaking existing functionality. Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO |
Codex Review - Indexer/API ReviewNo issues found. |
Codex Review - React/Frontend Review[HIGH] client/src/contexts/GameDirector.tsx:420 - New [MEDIUM] client/src/contexts/GameDirector.tsx:436 - Summary: 0 CRITICAL, 1 HIGH, 1 MEDIUM, 0 LOW, 0 INFO |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @loothero's task —— View job Claude Review - General Engineering Reviewrun=22853591843 attempt=1 sha=ae2fb1279e1525674e1401f1abc6b5feadb1e27f scope=general Todo List
Review FindingsAfter running the git diff command to check for changes outside the core app packages (contracts/, client/, indexer/, api/), no files were modified in the targeted scope. Changes analyzed: No files outside the core app packages were modified in this PR. AssessmentNo issues found. This PR contains changes only within the core application packages (indexer/, api/, client/) and does not modify any CI/workflow files, scripts, tooling, shared configuration, or other files that could impact the broader repository infrastructure or development workflow. The reactive potion balances feature is implemented entirely within the application layer without requiring changes to:
Summary0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO |
|
Claude finished @loothero's task —— View job Claude Review - Indexer/API Reviewrun=22853591843 attempt=1 sha=ae2fb1279e1525674e1401f1abc6b5feadb1e27f scope=indexer-api Todo List
Review FindingsNo issues found. Analysis SummaryI reviewed the changes in PostgreSQL Trigger (0004_consumables_trigger.sql):
WebSocket Subscription Changes:
Data Integrity & Operations:
Migration Safety:
The implementation is operationally sound and follows established patterns from the existing notification system. Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO--- | Branch: |
Codex Review - General Engineering ReviewNo issues found. |
|
Claude finished @loothero's task —— View job Claude Review - React/Frontend Reviewrun=22853591843 attempt=1 sha=ae2fb1279e1525674e1401f1abc6b5feadb1e27f scope=client Todo List
Review FindingsNo issues found. Analysis SummaryI reviewed the changes in GameDirector.tsx Changes:
useWebSocket.ts Changes:
Test Coverage:
Type Safety & React Patterns:
Previous Review Issues Addressed:
The implementation follows established WebSocket patterns from existing channels, maintains type safety, includes comprehensive test coverage, and properly handles the real-time potion balance update use case without breaking existing functionality. Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO |
Codex Review - Indexer/API Review[MEDIUM] indexer/migrations/0004_consumables_trigger.sql:10 - Summary: 0 CRITICAL, 0 HIGH, 1 MEDIUM, 0 LOW, 0 INFO |
Codex Review - React/Frontend Review[MEDIUM] client/src/contexts/GameDirector.tsx:422 - address comparison for consumables updates does not normalize case before padding. [LOW] client/src/contexts/GameDirector.tsx:436 - client always subscribes to Summary: 0 CRITICAL, 0 HIGH, 1 MEDIUM, 1 LOW, 0 INFO |
Wire consumables_supply PG NOTIFY trigger (aggregate SUM per ERC20), API supply channel + LISTEN, client useWebSocket onSupply callback, and StatisticsProvider handler to replace polling for "Potions Held By Players" display. Per-ERC20 keyed payload for extensibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @loothero's task —— View job Claude Review - General Engineering Reviewrun=22861925601 attempt=1 sha=ef4e4a795ecec0f30efc2c8add9be143b19005b4 scope=general Todo List
Review FindingsAfter running the git diff command to check for changes outside the core app packages (contracts/, client/, indexer/, api/), no files were modified in the targeted scope. Changes analyzed: No files outside the core app packages were modified in this PR. AssessmentNo issues found. This PR contains changes only within the core application packages (indexer/, api/, client/) and does not modify any CI/workflow files, scripts, tooling, shared configuration, or other files that could impact the broader repository infrastructure or development workflow. The reactive potion balances feature is implemented entirely within the application layer without requiring changes to:
Summary0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO |
Codex Review - General Engineering ReviewNo issues found. |
|
Claude finished @loothero's task —— View job Claude Review - Indexer/API Reviewrun=22861925601 attempt=1 sha=ef4e4a795ecec0f30efc2c8add9be143b19005b4 scope=indexer-api Todo List
Review FindingsNo issues found. Analysis SummaryI reviewed the changes in PostgreSQL Trigger (0004_consumables_trigger.sql):
WebSocket Subscription Changes:
Data Integrity & Operations:
Migration Safety:
The implementation is operationally sound and follows established patterns from the existing notification system. Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO--- | Branch: |
|
Claude finished @loothero's task —— View job Claude Review - React/Frontend Reviewrun=22861925601 attempt=1 sha=ef4e4a795ecec0f30efc2c8add9be143b19005b4 scope=client Todo List
Review FindingsNo issues found. Analysis SummaryI reviewed the changes in GameDirector.tsx Changes:
useWebSocket.ts Changes:
Test Coverage:
Type Safety & React Patterns:
Previous Review Issues Addressed:
The implementation follows established WebSocket patterns from existing channels, maintains type safety, includes comprehensive test coverage, and properly handles the real-time potion balance update use case without breaking existing functionality. Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO |
Codex Review - Indexer/API Review[HIGH] indexer/migrations/0004_consumables_trigger.sql:52 - [MEDIUM] indexer/migrations/0004_consumables_trigger.sql:29 - The trigger recalculates total supply via [INFO] api/AGENTS.md:59 - Real-time pattern docs list Summary: 0 CRITICAL, 1 HIGH, 1 MEDIUM, 0 LOW, 1 INFO |
Codex Review - React/Frontend ReviewNo issues found. |
|
I would not update token balances, only the total counts on the leaderboard. It is not 100% accurate since indexing did not start from beginning but from when supply counts were introduced. Client already updates changes to consumables, except for transfers between players |
Summary
consumablestable (indexer/migrations/0004_consumables_trigger.sql) to broadcast balance changesSubscriptionHubwithconsumables_updateLISTEN andconsumablesWS channelConsumablesDatatype andonConsumablescallback to clientuseWebSockethookGameDirectorto subscribe toconsumableschannel and update token balances when the connected wallet's potion counts changeTest plan
tsc --noEmit)🤖 Generated with Claude Code