-
Notifications
You must be signed in to change notification settings - Fork 199
feat: add best practices cursor files #10128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@NeOMakinG has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 42 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughFour new markdown documentation files have been added under Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Assessment against linked issues
Poem
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
.cursor/rules/error-handling.mdc(1 hunks).cursor/rules/naming-conventions.mdc(1 hunks).cursor/rules/react-best-practices.mdc(1 hunks).cursor/rules/typescript-best-practices.mdc(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
.cursor/rules/react-best-practices.mdc (4)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Check registry entry in constants.ts during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
.cursor/rules/naming-conventions.mdc (6)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Check registry entry in constants.ts during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Ensure adherence to Swapper and SwapperApi interfaces in code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
.cursor/rules/typescript-best-practices.mdc (10)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Include comments explaining swap logic in swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Check registry entry in constants.ts during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/{constants,types}.ts : Register new swappers in packages/swapper/src/constants.ts and add them to the SwapperName enum in packages/swapper/src/types.ts.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Ensure adherence to Swapper and SwapperApi interfaces in code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : All swappers must conform to the Swapper and SwapperApi interfaces defined in packages/swapper/src/types.ts.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Validate inputs and log errors for debugging in swapper implementations.
.cursor/rules/error-handling.mdc (10)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Validate inputs and log errors for debugging in swapper implementations.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Include comments explaining swap logic in swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Leverage shared utilities (e.g., executeEvmTransaction, checkEvmSwapStatus) in swapper implementations when applicable.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Ensure adherence to Swapper and SwapperApi interfaces in code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: gomesalexandre
PR: #10074
File: src/features/defi/providers/fox-farming/components/FoxFarmingManager/Withdraw/components/Confirm.tsx:192-194
Timestamp: 2025-07-24T10:07:54.919Z
Learning: For fox farming withdrawals in the ShapeShift web app, the architectural preference is to either not handle errors with old-style toast notifications or handle broadcast on-chain errors holistically through the action center system. On-chain errors are considered rare and not a major concern worth individual toast handling.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : All swappers must conform to the Swapper and SwapperApi interfaces defined in packages/swapper/src/types.ts.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Verify chain ID filtering in filterAssetIdsBySellable and filterBuyAssetsBySellAssetId methods.
premiumjibles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NeOMakinG looks solid overall. We can always iterate on this if we think it's making bad suggestions.
Code rabbit suggestions seem generally good. Left a few small ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (1)
.cursor/rules/naming-conventions.mdc (1)
99-116: Contradictory file-naming examples still violate the kebab-case ruleRule 99 mandates kebab-case for all file and directory names, yet the “GOOD” examples below use
AssetList.tsxanduseTradeExecution.tsx(PascalCase / camelCase). Worse, the “BAD” section flags the kebab-case versions as incorrect, flipping the guidance.-// ✅ GOOD - camelCase for hooks/helpers and PascalCase file names for TSX components -// components/AssetList/AssetList.tsx -// hooks/useTradeExecution/useTradeExecution.tsx +// ✅ GOOD - kebab-case file and directory names +// components/asset-list/asset-list.tsx +// hooks/use-trade-execution/use-trade-execution.tsx ... -// ❌ BAD - kebab-case or PascalCase file names -// components/AssetList/asset-list.tsx -// hooks/useTradeExecution/UseTradeExecution.tsx +// ❌ BAD - Non-kebab-case file names +// components/AssetList/AssetList.tsx +// hooks/useTradeExecution/useTradeExecution.tsxPlease realign the examples with the stated rule (or relax the rule).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
.cursor/rules/error-handling.mdc(1 hunks).cursor/rules/naming-conventions.mdc(1 hunks).cursor/rules/react-best-practices.mdc(1 hunks).cursor/rules/typescript-best-practices.mdc(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
.cursor/rules/typescript-best-practices.mdc (15)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Check registry entry in constants.ts during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Include comments explaining swap logic in swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/{constants,types}.ts : Register new swappers in packages/swapper/src/constants.ts and add them to the SwapperName enum in packages/swapper/src/types.ts.
Learnt from: gomesalexandre
PR: #10074
File: src/features/defi/providers/fox-farming/components/FoxFarmingManager/Withdraw/components/Confirm.tsx:192-194
Timestamp: 2025-07-24T10:07:54.919Z
Learning: For fox farming withdrawals in the ShapeShift web app, the architectural preference is to either not handle errors with old-style toast notifications or handle broadcast on-chain errors holistically through the action center system. On-chain errors are considered rare and not a major concern worth individual toast handling.
Learnt from: NeOMakinG
PR: #10121
File: src/hooks/useActionCenterSubscribers/useGenericTransactionSubscriber.tsx:65-66
Timestamp: 2025-07-28T10:36:26.897Z
Learning: In ShapeShift web app transaction processing, prefer parallel async execution over sequential processing to avoid blocking when handling multiple transactions. Use forEach for concurrent operations rather than for...of loops to prevent slower transactions from blocking faster ones.
Learnt from: 0xApotheosis
PR: #10073
File: src/components/Layout/Header/ActionCenter/components/Details/ClaimDetails.tsx:10-11
Timestamp: 2025-07-24T21:05:13.642Z
Learning: In the ShapeShift web repository, translation workflow follows a two-step process: 1) First PR adds only English translations to src/assets/translations/en/main.json, 2) Globalization team handles follow-up PRs to add keys to remaining language files (de, es, fr, id, ja, ko, pt, ru, tr, uk, zh). Don't suggest verifying all locale files simultaneously during initial feature PRs.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/index.ts : Export unique functions/types from packages/swapper/src/index.ts if needed.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Leverage shared utilities (e.g., executeEvmTransaction, checkEvmSwapStatus) in swapper implementations when applicable.
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Validate inputs and log errors for debugging in swapper implementations.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Verify chain ID filtering in filterAssetIdsBySellable and filterBuyAssetsBySellAssetId methods.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
.cursor/rules/react-best-practices.mdc (14)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/index.ts : Export unique functions/types from packages/swapper/src/index.ts if needed.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Check registry entry in constants.ts during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/{constants,types}.ts : Register new swappers in packages/swapper/src/constants.ts and add them to the SwapperName enum in packages/swapper/src/types.ts.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,utils/*.ts} : Each swapper must be implemented in its own directory under packages/swapper/src/swappers// with the following files: .ts, endpoints.ts, utils/constants.ts, utils/helpers.ts, types.ts.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Include comments explaining swap logic in swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : All swappers must conform to the Swapper and SwapperApi interfaces defined in packages/swapper/src/types.ts.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers/**/*.@(test|spec).ts : Write unit tests for swapper methods and API endpoints.
Learnt from: NeOMakinG
PR: #10121
File: src/hooks/useActionCenterSubscribers/useGenericTransactionSubscriber.tsx:65-66
Timestamp: 2025-07-28T10:36:26.897Z
Learning: In ShapeShift web app transaction processing, prefer parallel async execution over sequential processing to avoid blocking when handling multiple transactions. Use forEach for concurrent operations rather than for...of loops to prevent slower transactions from blocking faster ones.
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: 0xApotheosis
PR: #10073
File: src/components/Layout/Header/ActionCenter/components/Details/ClaimDetails.tsx:10-11
Timestamp: 2025-07-24T21:05:13.642Z
Learning: In the ShapeShift web repository, translation workflow follows a two-step process: 1) First PR adds only English translations to src/assets/translations/en/main.json, 2) Globalization team handles follow-up PRs to add keys to remaining language files (de, es, fr, id, ja, ko, pt, ru, tr, uk, zh). Don't suggest verifying all locale files simultaneously during initial feature PRs.
.cursor/rules/naming-conventions.mdc (15)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Verify chain ID filtering in filterAssetIdsBySellable and filterBuyAssetsBySellAssetId methods.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Include comments explaining swap logic in swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Leverage shared utilities (e.g., executeEvmTransaction, checkEvmSwapStatus) in swapper implementations when applicable.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,utils/*.ts} : Each swapper must be implemented in its own directory under packages/swapper/src/swappers// with the following files: .ts, endpoints.ts, utils/constants.ts, utils/helpers.ts, types.ts.
Learnt from: gomesalexandre
PR: #10074
File: src/features/defi/providers/fox-farming/components/FoxFarmingManager/Withdraw/components/Confirm.tsx:192-194
Timestamp: 2025-07-24T10:07:54.919Z
Learning: For fox farming withdrawals in the ShapeShift web app, the architectural preference is to either not handle errors with old-style toast notifications or handle broadcast on-chain errors holistically through the action center system. On-chain errors are considered rare and not a major concern worth individual toast handling.
Learnt from: NeOMakinG
PR: #10121
File: src/hooks/useActionCenterSubscribers/useGenericTransactionSubscriber.tsx:65-66
Timestamp: 2025-07-28T10:36:26.897Z
Learning: In ShapeShift web app transaction processing, prefer parallel async execution over sequential processing to avoid blocking when handling multiple transactions. Use forEach for concurrent operations rather than for...of loops to prevent slower transactions from blocking faster ones.
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: 0xApotheosis
PR: #10073
File: src/components/Layout/Header/ActionCenter/components/Details/ClaimDetails.tsx:10-11
Timestamp: 2025-07-24T21:05:13.642Z
Learning: In the ShapeShift web repository, translation workflow follows a two-step process: 1) First PR adds only English translations to src/assets/translations/en/main.json, 2) Globalization team handles follow-up PRs to add keys to remaining language files (de, es, fr, id, ja, ko, pt, ru, tr, uk, zh). Don't suggest verifying all locale files simultaneously during initial feature PRs.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Validate inputs and log errors for debugging in swapper implementations.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Check registry entry in constants.ts during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Ensure adherence to Swapper and SwapperApi interfaces in code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
.cursor/rules/error-handling.mdc (13)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Validate inputs and log errors for debugging in swapper implementations.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Include comments explaining swap logic in swapper implementation files.
Learnt from: 0xApotheosis
PR: #10073
File: src/components/Layout/Header/ActionCenter/components/Details/ClaimDetails.tsx:10-11
Timestamp: 2025-07-24T21:05:13.642Z
Learning: In the ShapeShift web repository, translation workflow follows a two-step process: 1) First PR adds only English translations to src/assets/translations/en/main.json, 2) Globalization team handles follow-up PRs to add keys to remaining language files (de, es, fr, id, ja, ko, pt, ru, tr, uk, zh). Don't suggest verifying all locale files simultaneously during initial feature PRs.
Learnt from: NeOMakinG
PR: #10121
File: src/hooks/useActionCenterSubscribers/useGenericTransactionSubscriber.tsx:65-66
Timestamp: 2025-07-28T10:36:26.897Z
Learning: In ShapeShift web app transaction processing, prefer parallel async execution over sequential processing to avoid blocking when handling multiple transactions. Use forEach for concurrent operations rather than for...of loops to prevent slower transactions from blocking faster ones.
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: gomesalexandre
PR: #10074
File: src/features/defi/providers/fox-farming/components/FoxFarmingManager/Withdraw/components/Confirm.tsx:192-194
Timestamp: 2025-07-24T10:07:54.919Z
Learning: For fox farming withdrawals in the ShapeShift web app, the architectural preference is to either not handle errors with old-style toast notifications or handle broadcast on-chain errors holistically through the action center system. On-chain errors are considered rare and not a major concern worth individual toast handling.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Leverage shared utilities (e.g., executeEvmTransaction, checkEvmSwapStatus) in swapper implementations when applicable.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Verify chain ID filtering in filterAssetIdsBySellable and filterBuyAssetsBySellAssetId methods.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Ensure adherence to Swapper and SwapperApi interfaces in code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : All swappers must conform to the Swapper and SwapperApi interfaces defined in packages/swapper/src/types.ts.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Call / Static
|
Merging to avoid getting things stale, I suspect we will do some back and forth while developing on this thing anyway, thanks for the reviews! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (1)
.cursor/rules/typescript-best-practices.mdc (1)
9-13: Contradictory guidance on enum usage – align “ALWAYS” vs “PREFER”.The first bullet states “ALWAYS use enums for constants”, while the dedicated “Enum Usage” section later switches to “PREFER”. Pick one stance (ideally the softer prefer wording already adopted below) and update this bullet & the checklist (item 3 on lines 444-447) to avoid reviewer confusion and contradictory automated linting.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
.cursor/rules/error-handling.mdc(1 hunks).cursor/rules/react-best-practices.mdc(1 hunks).cursor/rules/typescript-best-practices.mdc(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
.cursor/rules/react-best-practices.mdc (17)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/index.ts : Export unique functions/types from packages/swapper/src/index.ts if needed.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Check registry entry in constants.ts during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/{constants,types}.ts : Register new swappers in packages/swapper/src/constants.ts and add them to the SwapperName enum in packages/swapper/src/types.ts.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,utils/*.ts} : Each swapper must be implemented in its own directory under packages/swapper/src/swappers// with the following files: .ts, endpoints.ts, utils/constants.ts, utils/helpers.ts, types.ts.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Include comments explaining swap logic in swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : All swappers must conform to the Swapper and SwapperApi interfaces defined in packages/swapper/src/types.ts.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers/**/*.@(test|spec).ts : Write unit tests for swapper methods and API endpoints.
Learnt from: NeOMakinG
PR: #10121
File: src/hooks/useActionCenterSubscribers/useGenericTransactionSubscriber.tsx:65-66
Timestamp: 2025-07-28T10:36:26.897Z
Learning: In ShapeShift web app transaction processing, prefer parallel async execution over sequential processing to avoid blocking when handling multiple transactions. Use forEach for concurrent operations rather than for...of loops to prevent slower transactions from blocking faster ones.
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: 0xApotheosis
PR: #10073
File: src/components/Layout/Header/ActionCenter/components/Details/ClaimDetails.tsx:10-11
Timestamp: 2025-07-24T21:05:13.642Z
Learning: In the ShapeShift web repository, translation workflow follows a two-step process: 1) First PR adds only English translations to src/assets/translations/en/main.json, 2) Globalization team handles follow-up PRs to add keys to remaining language files (de, es, fr, id, ja, ko, pt, ru, tr, uk, zh). Don't suggest verifying all locale files simultaneously during initial feature PRs.
Learnt from: gomesalexandre
PR: #10074
File: src/features/defi/providers/fox-farming/components/FoxFarmingManager/Withdraw/components/Confirm.tsx:192-194
Timestamp: 2025-07-24T10:07:54.919Z
Learning: For fox farming withdrawals in the ShapeShift web app, the architectural preference is to either not handle errors with old-style toast notifications or handle broadcast on-chain errors holistically through the action center system. On-chain errors are considered rare and not a major concern worth individual toast handling.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Leverage shared utilities (e.g., executeEvmTransaction, checkEvmSwapStatus) in swapper implementations when applicable.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Validate inputs and log errors for debugging in swapper implementations.
.cursor/rules/typescript-best-practices.mdc (16)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Check registry entry in constants.ts during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Include comments explaining swap logic in swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: gomesalexandre
PR: #10074
File: src/features/defi/providers/fox-farming/components/FoxFarmingManager/Withdraw/components/Confirm.tsx:192-194
Timestamp: 2025-07-24T10:07:54.919Z
Learning: For fox farming withdrawals in the ShapeShift web app, the architectural preference is to either not handle errors with old-style toast notifications or handle broadcast on-chain errors holistically through the action center system. On-chain errors are considered rare and not a major concern worth individual toast handling.
Learnt from: NeOMakinG
PR: #10121
File: src/hooks/useActionCenterSubscribers/useGenericTransactionSubscriber.tsx:65-66
Timestamp: 2025-07-28T10:36:26.897Z
Learning: In ShapeShift web app transaction processing, prefer parallel async execution over sequential processing to avoid blocking when handling multiple transactions. Use forEach for concurrent operations rather than for...of loops to prevent slower transactions from blocking faster ones.
Learnt from: 0xApotheosis
PR: #10073
File: src/components/Layout/Header/ActionCenter/components/Details/ClaimDetails.tsx:10-11
Timestamp: 2025-07-24T21:05:13.642Z
Learning: In the ShapeShift web repository, translation workflow follows a two-step process: 1) First PR adds only English translations to src/assets/translations/en/main.json, 2) Globalization team handles follow-up PRs to add keys to remaining language files (de, es, fr, id, ja, ko, pt, ru, tr, uk, zh). Don't suggest verifying all locale files simultaneously during initial feature PRs.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/index.ts : Export unique functions/types from packages/swapper/src/index.ts if needed.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Leverage shared utilities (e.g., executeEvmTransaction, checkEvmSwapStatus) in swapper implementations when applicable.
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Validate inputs and log errors for debugging in swapper implementations.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Verify chain ID filtering in filterAssetIdsBySellable and filterBuyAssetsBySellAssetId methods.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/{constants,types}.ts : Register new swappers in packages/swapper/src/constants.ts and add them to the SwapperName enum in packages/swapper/src/types.ts.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : All swappers must conform to the Swapper and SwapperApi interfaces defined in packages/swapper/src/types.ts.
.cursor/rules/error-handling.mdc (14)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Validate inputs and log errors for debugging in swapper implementations.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Include comments explaining swap logic in swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Ensure adherence to Swapper and SwapperApi interfaces in code review.
Learnt from: 0xApotheosis
PR: #10073
File: src/components/Layout/Header/ActionCenter/components/Details/ClaimDetails.tsx:10-11
Timestamp: 2025-07-24T21:05:13.642Z
Learning: In the ShapeShift web repository, translation workflow follows a two-step process: 1) First PR adds only English translations to src/assets/translations/en/main.json, 2) Globalization team handles follow-up PRs to add keys to remaining language files (de, es, fr, id, ja, ko, pt, ru, tr, uk, zh). Don't suggest verifying all locale files simultaneously during initial feature PRs.
Learnt from: NeOMakinG
PR: #10121
File: src/hooks/useActionCenterSubscribers/useGenericTransactionSubscriber.tsx:65-66
Timestamp: 2025-07-28T10:36:26.897Z
Learning: In ShapeShift web app transaction processing, prefer parallel async execution over sequential processing to avoid blocking when handling multiple transactions. Use forEach for concurrent operations rather than for...of loops to prevent slower transactions from blocking faster ones.
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: gomesalexandre
PR: #10074
File: src/features/defi/providers/fox-farming/components/FoxFarmingManager/Withdraw/components/Confirm.tsx:192-194
Timestamp: 2025-07-24T10:07:54.919Z
Learning: For fox farming withdrawals in the ShapeShift web app, the architectural preference is to either not handle errors with old-style toast notifications or handle broadcast on-chain errors holistically through the action center system. On-chain errors are considered rare and not a major concern worth individual toast handling.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Leverage shared utilities (e.g., executeEvmTransaction, checkEvmSwapStatus) in swapper implementations when applicable.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Verify chain ID filtering in filterAssetIdsBySellable and filterBuyAssetsBySellAssetId methods.
Learnt from: NeOMakinG
PR: #10079
File: src/pages/Dashboard/components/DashboardHeader/DashboardHeaderWrapper.tsx:8-11
Timestamp: 2025-07-24T11:29:49.740Z
Learning: In the ShapeShift web app's mobile header implementation, dynamically calculating the top bar height for paddingTop would introduce maintenance complexity because the measured height might include safe area padding, which would be incorrect for the spacing use case. The hardcoded 56px approach is preferred over dynamic calculations to avoid this complexity and maintain code simplicity.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : All swappers must conform to the Swapper and SwapperApi interfaces defined in packages/swapper/src/types.ts.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Call / Static
🔇 Additional comments (1)
.cursor/rules/react-best-practices.mdc (1)
218-224:memorequirement appears in checklist but lacks supporting section.Checklist item 6 enforces wrapping all prop-receiving components with
React.memo, yet the document never explains when/why to do so (trade-offs with props that are unstable, refs, forwardRef etc.). Either:
- Add a “Component Memoization” subsection describing the rule and caveats, or
- Drop the checklist item to match current content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.cursor/rules/error-handling.mdc(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: NeOMakinG
PR: shapeshift/web#10136
File: src/lib/asset-service/service/encodedRelatedAssetIndex.json:1-1
Timestamp: 2025-07-29T10:22:27.011Z
Learning: PRs with titles starting with "feat: regenerate asset data" are routine daily asset updates that don't need detailed code analysis. Users prefer to skip automated reviews for these maintenance PRs using @coderabbitai ignore.
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use camelCase for variables and functions, PascalCase for types and interfaces, and kebab-case for filenames in swapper-related files.
.cursor/rules/error-handling.mdc (16)
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Validate inputs and log errors for debugging in swapper implementations.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Flag missing unit tests or error handling during code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Avoid side effects in swap logic within swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Include comments explaining swap logic in swapper implementation files.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Ensure adherence to Swapper and SwapperApi interfaces in code review.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Leverage shared utilities (e.g., executeEvmTransaction, checkEvmSwapStatus) in swapper implementations when applicable.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/**/*.ts : Use TypeScript with explicit types (e.g., SupportedChainIds) in all swapper-related files.
Learnt from: 0xApotheosis
PR: #10073
File: src/components/Layout/Header/ActionCenter/components/Details/ClaimDetails.tsx:10-11
Timestamp: 2025-07-24T21:05:13.642Z
Learning: In the ShapeShift web repository, translation workflow follows a two-step process: 1) First PR adds only English translations to src/assets/translations/en/main.json, 2) Globalization team handles follow-up PRs to add keys to remaining language files (de, es, fr, id, ja, ko, pt, ru, tr, uk, zh). Don't suggest verifying all locale files simultaneously during initial feature PRs.
Learnt from: NeOMakinG
PR: #10121
File: src/hooks/useActionCenterSubscribers/useGenericTransactionSubscriber.tsx:65-66
Timestamp: 2025-07-28T10:36:26.897Z
Learning: In ShapeShift web app transaction processing, prefer parallel async execution over sequential processing to avoid blocking when handling multiple transactions. Use forEach for concurrent operations rather than for...of loops to prevent slower transactions from blocking faster ones.
Learnt from: firebomb1
PR: shapeshift/web#0
File: :0-0
Timestamp: 2025-07-24T13:49:39.586Z
Learning: Translation-only PRs that sync localization files (like biweekly translation updates) typically don't benefit from detailed code analysis suggestions, and users may prefer to use @coderabbitai ignore for such routine maintenance PRs.
Learnt from: NeOMakinG
PR: #10136
File: src/lib/asset-service/service/encodedRelatedAssetIndex.json:1-1
Timestamp: 2025-07-29T10:22:27.011Z
Learning: PRs with titles starting with "feat: regenerate asset data" are routine daily asset updates that don't need detailed code analysis. Users prefer to skip automated reviews for these maintenance PRs using @coderabbitai ignore.
Learnt from: gomesalexandre
PR: #10074
File: src/features/defi/providers/fox-farming/components/FoxFarmingManager/Withdraw/components/Confirm.tsx:192-194
Timestamp: 2025-07-24T10:07:54.919Z
Learning: For fox farming withdrawals in the ShapeShift web app, the architectural preference is to either not handle errors with old-style toast notifications or handle broadcast on-chain errors holistically through the action center system. On-chain errors are considered rare and not a major concern worth individual toast handling.
Learnt from: NeOMakinG
PR: #10128
File: .cursor/rules/react-best-practices.mdc:8-14
Timestamp: 2025-07-29T10:27:23.388Z
Learning: The ShapeShift team practices aggressive memoization in React components as documented in .cursor/rules/react-best-practices.mdc. They use useMemo for all transformations, derived values, and conditional values, and useCallback for all event handlers and functions that could be passed as props. This approach was adopted after experiencing performance issues ("had hard time") and is their current established practice, though they acknowledge it may evolve in the future.
Learnt from: NeOMakinG
PR: #10079
File: src/pages/Dashboard/components/DashboardHeader/DashboardHeaderWrapper.tsx:8-11
Timestamp: 2025-07-24T11:29:49.740Z
Learning: In the ShapeShift web app's mobile header implementation, dynamically calculating the top bar height for paddingTop would introduce maintenance complexity because the measured height might include safe area padding, which would be incorrect for the spacing use case. The hardcoded 56px approach is preferred over dynamic calculations to avoid this complexity and maintain code simplicity.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : Verify chain ID filtering in filterAssetIdsBySellable and filterBuyAssetsBySellAssetId methods.
Learnt from: CR
PR: shapeshift/web#0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-07-24T09:43:11.699Z
Learning: Applies to packages/swapper/src/swappers//{.ts,endpoints.ts} : All swappers must conform to the Swapper and SwapperApi interfaces defined in packages/swapper/src/types.ts.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Install and Cache
🔇 Additional comments (1)
.cursor/rules/error-handling.mdc (1)
90-98: Verify availability ofAsyncResultOfutilityThe examples rely on
AsyncResultOffrom@shapeshiftoss/utils. If this helper is not yet published or is named differently, teams following the guide will hit runtime/compile-time errors.Consider adding a brief note or import path confirmation, or swap the example for an in-file helper to avoid broken references.
|
@coderabbitai ignore review now, too much back and forth already |
|
Tip For best results, initiate chat on the files or code changes. @NeOMakinG I understand - I'll skip the review as requested. Since the PR has already been merged and you've indicated there's been sufficient discussion, I won't provide additional review comments on this PR. 🧠 Learnings used |
Description
I did use cursor to generate cursor files, and then guided it through some better patterns, missing things
Note for the reviewers: if you think about anything else missing, post a comment and we will add it!
Issue (if applicable)
closes #10077
Risk
Low, not touching the codebase
Testing
Impossible to test tbh, you can always try to use cursor including those files and see if he is correctly helping you autocompleting and fixing things
Engineering
Operations
Screenshots (if applicable)
Summary by CodeRabbit