Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughAdds a new client React component Changes
Sequence Diagram(s)(Skipped — changes are UI-component replacements and small hook flag additions; no new multi-component control flow requiring a sequence diagram.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used🧠 Learnings (10)📚 Learning: 2026-01-10T04:52:06.148ZApplied to files:
📚 Learning: 2026-01-10T04:52:06.148ZApplied to files:
📚 Learning: 2026-01-10T04:52:06.148ZApplied to files:
📚 Learning: 2026-01-10T04:52:06.148ZApplied to files:
📚 Learning: 2026-01-10T04:52:06.148ZApplied to files:
📚 Learning: 2026-01-10T04:52:06.148ZApplied to files:
📚 Learning: 2026-01-10T04:52:06.148ZApplied to files:
📚 Learning: 2026-01-10T04:52:06.148ZApplied to files:
📚 Learning: 2026-01-10T04:52:06.148ZApplied to files:
📚 Learning: 2026-01-10T04:52:06.148ZApplied to files:
🔇 Additional comments (1)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/hooks/useSupplyMarket.ts (1)
69-94: Addquery.enabledguard touseBalancehook.The
useReadContracthook hasquery: { enabled: !!account }butuseBalanceis missing it. Without this guard,useBalancewill attempt to fetch even whenaccountis undefined, which can cause unnecessary requests or errors.Diff
const { data: ethBalance, refetch: refetchETH, isFetching: isRefetchingEth, } = useBalance({ address: account, chainId: market.morphoBlue.chain.id, + query: { + enabled: !!account, + }, });
🤖 Fix all issues with AI agents
In @src/features/positions/positions-view.tsx:
- Around line 38-39: Remove the leftover debug console.log call printing 'User
vaults:' in the positions view component (the console.log referencing
isVaultsLoading and vaults). Delete that statement entirely from the component
(positions-view.tsx) so no debug logging remains before merge.
🧹 Nitpick comments (3)
src/features/market-detail/components/position-stats.tsx (1)
4-5: Looks good: RefetchIcon wiring matches disabled/refresh state.Optional: pass a
classNamesize explicitly here too (some call sites useh-4 w-4) so the icon size doesn’t depend on RefetchIcon’s internal default.Also applies to: 199-208
src/modals/supply/supply-modal-content.tsx (1)
129-136: Disable the balance refetch button whileisRefetchingBalanceto avoid spamming refetch.Proposed diff
<button type="button" onClick={() => void refetchBalance()} className="opacity-50 transition hover:opacity-100" aria-label="Refetch balance" + disabled={isRefetchingBalance} > <RefetchIcon isLoading={isRefetchingBalance} /> </button>src/hooks/useSupplyMarket.ts (1)
19-32:isRefetchingBalanceis based onisFetching; name/semantics may be misleading.
If you intend “manual refetch in progress”, you may want a different signal (or rename toisFetchingBalance).Also applies to: 414-427
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
src/components/ui/refetch-icon.tsxsrc/features/autovault/components/vault-detail/modals/vault-settings-modal.tsxsrc/features/autovault/vault-view.tsxsrc/features/history/components/history-table.tsxsrc/features/market-detail/components/position-stats.tsxsrc/features/markets/components/table/markets-table-actions.tsxsrc/features/positions/components/rebalance/rebalance-modal.tsxsrc/features/positions/components/supplied-morpho-blue-grouped-table.tsxsrc/features/positions/components/user-vaults-table.tsxsrc/features/positions/positions-view.tsxsrc/features/rewards/components/reward-table.tsxsrc/hooks/useSupplyMarket.tssrc/modals/borrow/components/add-collateral-and-borrow.tsxsrc/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/modals/supply/supply-modal-content.tsx
🧰 Additional context used
🧠 Learnings (27)
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/src/features/positions/**/*.{ts,tsx} : Import CollateralIconsDisplay from `@/features/positions/components/collateral-icons-display` for displaying collateral icons with configurable maxDisplay and iconSize
Applied to files:
src/modals/supply/supply-modal-content.tsxsrc/features/autovault/vault-view.tsxsrc/features/market-detail/components/position-stats.tsxsrc/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/modals/borrow/components/add-collateral-and-borrow.tsxsrc/features/autovault/components/vault-detail/modals/vault-settings-modal.tsxsrc/features/positions/components/rebalance/rebalance-modal.tsxsrc/features/markets/components/table/markets-table-actions.tsxsrc/features/history/components/history-table.tsxsrc/features/rewards/components/reward-table.tsxsrc/features/positions/components/supplied-morpho-blue-grouped-table.tsxsrc/components/ui/refetch-icon.tsxsrc/features/positions/components/user-vaults-table.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Import MarketIdentity from `@/components/MarketIdentity` with modes: `Normal`, `Focused`, `Minimum` and focus options: `Collateral`, `Loan`
Applied to files:
src/modals/supply/supply-modal-content.tsxsrc/features/market-detail/components/position-stats.tsxsrc/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/modals/borrow/components/add-collateral-and-borrow.tsxsrc/features/markets/components/table/markets-table-actions.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Import IconSwitch from `@/components/ui/icon-switch` for switch/toggle components with optional icon
Applied to files:
src/modals/supply/supply-modal-content.tsxsrc/features/autovault/vault-view.tsxsrc/features/market-detail/components/position-stats.tsxsrc/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/modals/borrow/components/add-collateral-and-borrow.tsxsrc/features/autovault/components/vault-detail/modals/vault-settings-modal.tsxsrc/features/positions/components/rebalance/rebalance-modal.tsxsrc/features/markets/components/table/markets-table-actions.tsxsrc/features/history/components/history-table.tsxsrc/features/rewards/components/reward-table.tsxsrc/features/positions/components/supplied-morpho-blue-grouped-table.tsxsrc/components/ui/refetch-icon.tsxsrc/features/positions/components/user-vaults-table.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Import MarketDetailsBlock from `@/components/common/MarketDetailsBlock` for displaying market details with configurable mode and options
Applied to files:
src/modals/supply/supply-modal-content.tsxsrc/features/market-detail/components/position-stats.tsxsrc/modals/borrow/components/add-collateral-and-borrow.tsxsrc/features/markets/components/table/markets-table-actions.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/src/components/layout/**/*.{ts,tsx} : Use TransactionIndicator component in navbar to show background transactions that can be restored to modal view when clicked
Applied to files:
src/modals/supply/supply-modal-content.tsxsrc/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/modals/borrow/components/add-collateral-and-borrow.tsxsrc/features/positions/components/rebalance/rebalance-modal.tsxsrc/features/markets/components/table/markets-table-actions.tsxsrc/features/history/components/history-table.tsxsrc/features/positions/components/supplied-morpho-blue-grouped-table.tsxsrc/components/ui/refetch-icon.tsxsrc/features/positions/components/user-vaults-table.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Use local state (useState) for single-trigger modals with depth 0-1
Applied to files:
src/modals/supply/supply-modal-content.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/src/features/*vault*/**/*.{ts,tsx} : Prefer `font-zen` for vault UI surfaces
Applied to files:
src/features/autovault/vault-view.tsxsrc/features/positions/positions-view.tsxsrc/features/autovault/components/vault-detail/modals/vault-settings-modal.tsxsrc/features/positions/components/user-vaults-table.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/src/components/shared/**/*.{ts,tsx} : Place cross-feature components (TokenIcon, AccountIdentity) in `src/components/shared/`
Applied to files:
src/features/autovault/vault-view.tsxsrc/features/market-detail/components/position-stats.tsxsrc/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/modals/borrow/components/add-collateral-and-borrow.tsxsrc/features/autovault/components/vault-detail/modals/vault-settings-modal.tsxsrc/features/positions/components/rebalance/rebalance-modal.tsxsrc/features/markets/components/table/markets-table-actions.tsxsrc/features/history/components/history-table.tsxsrc/features/rewards/components/reward-table.tsxsrc/features/positions/components/supplied-morpho-blue-grouped-table.tsxsrc/components/ui/refetch-icon.tsxsrc/features/positions/components/user-vaults-table.tsx
📚 Learning: 2024-11-25T09:39:42.148Z
Learnt from: antoncoding
Repo: antoncoding/monarch PR: 87
File: app/home/HomePage.tsx:17-39
Timestamp: 2024-11-25T09:39:42.148Z
Learning: In `app/home/HomePage.tsx`, the `useEffect` hook depends on `[showCustomized]` because changing `showCustomized` triggers updates to the yield and risk terms.
Applied to files:
src/features/autovault/vault-view.tsxsrc/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/modals/borrow/components/add-collateral-and-borrow.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Import AccountIdentity from `@/components/common/AccountIdentity` with variants: `badge`, `compact`, `full`
Applied to files:
src/features/autovault/vault-view.tsxsrc/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/features/autovault/components/vault-detail/modals/vault-settings-modal.tsxsrc/features/markets/components/table/markets-table-actions.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Use useMemo hook for computed/derived data
Applied to files:
src/features/autovault/vault-view.tsxsrc/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/features/positions/components/rebalance/rebalance-modal.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Use useState for local UI state within a single component
Applied to files:
src/features/market-detail/components/position-stats.tsxsrc/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/modals/borrow/components/add-collateral-and-borrow.tsxsrc/features/positions/components/rebalance/rebalance-modal.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Don't chain useEffect hooks; use useMemo instead
Applied to files:
src/modals/borrow/components/withdraw-collateral-and-repay.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/src/providers/**/*.{ts,tsx} : Don't fetch in Context providers; use React Query instead
Applied to files:
src/modals/borrow/components/withdraw-collateral-and-repay.tsxsrc/features/rewards/components/reward-table.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Import Modal components from `@/components/common/Modal` and use the custom Modal wrapper for consistent typography, corner radius, background, blur, and z-index
Applied to files:
src/features/autovault/components/vault-detail/modals/vault-settings-modal.tsxsrc/features/positions/components/rebalance/rebalance-modal.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/src/components/layout/**/*.{ts,tsx} : Use GlobalTransactionModals component in layout to automatically render process modals for all tracked transactions without component-level ProcessModal
Applied to files:
src/features/positions/components/rebalance/rebalance-modal.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Use global Zustand store pattern (Pattern 2) for nested modals to avoid Radix-UI maximum update depth errors
Applied to files:
src/features/positions/components/rebalance/rebalance-modal.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Import TableContainerWithHeader from `@/components/common/table-container-with-header` for tables with titles and optional action buttons
Applied to files:
src/features/markets/components/table/markets-table-actions.tsxsrc/features/history/components/history-table.tsxsrc/features/rewards/components/reward-table.tsxsrc/features/positions/components/supplied-morpho-blue-grouped-table.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Import TablePagination from `@/components/common/TablePagination` for paginated tables
Applied to files:
src/features/markets/components/table/markets-table-actions.tsxsrc/features/history/components/history-table.tsxsrc/features/rewards/components/reward-table.tsxsrc/features/positions/components/supplied-morpho-blue-grouped-table.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/src/hooks/use{Processed,Filtered,*}*.ts : Use derived hooks located in `src/hooks/use{Processed|Filtered}{Entity}.ts` for computed/derived data
Applied to files:
src/hooks/useSupplyMarket.ts
📚 Learning: 2024-10-07T14:38:04.384Z
Learnt from: antoncoding
Repo: antoncoding/monarch PR: 57
File: src/hooks/useRebalance.ts:112-114
Timestamp: 2024-10-07T14:38:04.384Z
Learning: In `src/hooks/useRebalance.ts`, adding a delay is necessary because Rabby wallet cannot handle sequential requests.
Applied to files:
src/hooks/useSupplyMarket.ts
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Use useStyledToast hook from `@/hooks/useStyledToast` for success and error toasts
Applied to files:
src/hooks/useSupplyMarket.ts
📚 Learning: 2025-12-09T10:06:39.848Z
Learnt from: antoncoding
Repo: antoncoding/monarch PR: 231
File: src/hooks/useDeployMorphoMarketV1Adapter.ts:3-3
Timestamp: 2025-12-09T10:06:39.848Z
Learning: In Wagmi v3, useConnection is the correct hook to obtain the connected wallet address, chainId, and connection status (isConnected). This replaces the useAccount hook from Wagmi v2. In your code under src/hooks, use: const { address, chainId, isConnected } = useConnection() from 'wagmi' to access the connected wallet information.
Applied to files:
src/hooks/useSupplyMarket.ts
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/src/hooks/queries/use*.ts : Use React Query for fetching external data (API, blockchain) with queries located in `src/hooks/queries/use{Entity}Query.ts`
Applied to files:
src/features/rewards/components/reward-table.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Never use raw HTML `<table>` tags; use Table components from `@/components/ui/table`
Applied to files:
src/features/rewards/components/reward-table.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/src/components/ui/**/*.{ts,tsx} : Place pure UI primitives (Button, Badge, Table) in `src/components/ui/`
Applied to files:
src/features/positions/components/supplied-morpho-blue-grouped-table.tsx
📚 Learning: 2026-01-10T04:52:06.148Z
Learnt from: CR
Repo: antoncoding/monarch PR: 0
File: docs/DEVELOPER_GUIDE.md:0-0
Timestamp: 2026-01-10T04:52:06.148Z
Learning: Applies to docs/**/*.{ts,tsx} : Use IconSwitch sizes: `xs`, `sm`, `md`, `lg`
Applied to files:
src/features/positions/components/supplied-morpho-blue-grouped-table.tsx
🧬 Code graph analysis (11)
src/modals/supply/supply-modal-content.tsx (1)
src/components/ui/refetch-icon.tsx (1)
RefetchIcon(12-40)
src/features/positions/positions-view.tsx (1)
src/hooks/queries/useUserVaultsV2Query.ts (1)
useUserVaultsV2Query(106-131)
src/modals/borrow/components/withdraw-collateral-and-repay.tsx (1)
src/components/ui/refetch-icon.tsx (1)
RefetchIcon(12-40)
src/modals/borrow/components/add-collateral-and-borrow.tsx (1)
src/components/ui/refetch-icon.tsx (1)
RefetchIcon(12-40)
src/features/autovault/components/vault-detail/modals/vault-settings-modal.tsx (1)
src/components/ui/refetch-icon.tsx (1)
RefetchIcon(12-40)
src/features/positions/components/rebalance/rebalance-modal.tsx (1)
src/components/ui/refetch-icon.tsx (1)
RefetchIcon(12-40)
src/features/markets/components/table/markets-table-actions.tsx (1)
src/components/ui/refetch-icon.tsx (1)
RefetchIcon(12-40)
src/features/history/components/history-table.tsx (1)
src/components/ui/refetch-icon.tsx (1)
RefetchIcon(12-40)
src/features/rewards/components/reward-table.tsx (1)
src/components/ui/refetch-icon.tsx (1)
RefetchIcon(12-40)
src/features/positions/components/supplied-morpho-blue-grouped-table.tsx (1)
src/components/ui/refetch-icon.tsx (1)
RefetchIcon(12-40)
src/features/positions/components/user-vaults-table.tsx (1)
src/components/ui/refetch-icon.tsx (1)
RefetchIcon(12-40)
🔇 Additional comments (13)
src/features/positions/components/user-vaults-table.tsx (1)
4-4: Clean icon replacement.The migration from
ReloadIcontoRefetchIconis properly implemented with theisLoadingprop.Also applies to: 72-72
src/features/positions/positions-view.tsx (1)
34-34: Proper refetching state threading.The
isVaultsRefetchingstate is correctly destructured and passed toUserVaultsTable.Also applies to: 126-126
src/components/ui/refetch-icon.tsx (1)
12-32: Animation management works for common cases.The component correctly starts spinning immediately when loading begins and waits for animation completion before stopping. The
animationiterationlistener ensures smooth transitions.Note: If
isLoadingtoggles very quickly (before the animation starts), theanimationiterationevent won't fire, but this is unlikely in practice.src/modals/borrow/components/withdraw-collateral-and-repay.tsx (1)
2-2: Icon replacement looks good.The
RefetchIconis properly integrated with theisRefreshingstate.Also applies to: 150-153
src/features/markets/components/table/markets-table-actions.tsx (1)
3-3: Consistent icon migration.The
RefetchIconreplacement follows the same pattern as other files in this PR.Also applies to: 44-44
src/features/autovault/vault-view.tsx (1)
5-6: LGTM! Clean refactoring to unified loading indicator.The RefetchIcon component centralizes the spin animation logic and provides a consistent API across the codebase. The
isLoadingprop correctly reflectsvaultDataLoadingstate.Also applies to: 204-204
src/features/history/components/history-table.tsx (1)
11-12: LGTM! Consistent with the refactoring pattern.The loading state correctly combines multiple sources (history, markets, position) and is properly passed to RefetchIcon.
Also applies to: 421-421
src/features/rewards/components/reward-table.tsx (1)
4-5: LGTM! Correctly uses the prop-based loading state.The
isRefetchingprop is properly forwarded to RefetchIcon, maintaining the parent-controlled loading state pattern.Also applies to: 169-169
src/features/positions/components/rebalance/rebalance-modal.tsx (1)
2-2: LGTM! Modal header auxiliary action updated correctly.The RefetchIcon is properly integrated into the auxiliaryAction slot with the correct loading state.
Also applies to: 243-248
src/features/autovault/components/vault-detail/modals/vault-settings-modal.tsx (1)
4-4: LGTM! Consistent refactoring in modal auxiliary action.The RefetchIcon correctly uses
vaultDataQuery.isLoadingto reflect the query state, maintaining the same behavior as before.Also applies to: 92-97
src/features/positions/components/supplied-morpho-blue-grouped-table.tsx (1)
6-8: Good swap to RefetchIcon; loading state is consistent with disabled state.Also applies to: 169-177
src/modals/borrow/components/add-collateral-and-borrow.tsx (1)
1-4: LGTM: icon size override + isLoading/disabled are aligned.Also applies to: 125-139
src/modals/supply/supply-modal-content.tsx (1)
35-53: Nice: balance refetch state is now exposed and used directly in the UI.
Greptile OverviewGreptile SummaryThis PR introduces a unified Key ChangesNew Component (
Hook Enhancement (
Consistency Improvements
Integration QualityThe component integrates well with existing patterns:
Confidence Score: 4/5
Important Files ChangedFile Analysis
|
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: src/modals/supply/supply-modal-content.tsx
Line: 129:136
Comment:
The refetch button is missing a `disabled` attribute to prevent multiple simultaneous refetch requests. While the RefetchIcon shows the loading state visually, users can still click the button repeatedly during the refetch operation, potentially causing unnecessary network requests.
```suggestion
<button
type="button"
onClick={() => void refetchBalance()}
disabled={isRefetchingBalance}
className="opacity-50 transition hover:opacity-100"
aria-label="Refetch balance"
>
<RefetchIcon isLoading={isRefetchingBalance} />
</button>
```
How can I resolve this? If you propose a fix, please make it concise. |
Unify refetching style
Summary by CodeRabbit
New Features
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.