Repository navigation
Perf: memoize status chip, cache balance fetch, lazy-load confetti banner; doc test:watch - #964
Merged
Kingsman-99 merged 4 commits intoOct 20, 2026
Conversation
…ache layer fetchUsdcBalance() was hitting the RPC on every call (WalletConnect header polls it on connect, PayModal polls it on open), bypassing the blockchainCache module already used for quotes/invoices. Added a 'balance' cache kind with a 10s TTL and routed fetchUsdcBalance through blockchainCache.getOrFetch, so concurrent/rapid reads for the same wallet collapse onto one RPC simulation.
…row re-renders StatusChip is rendered once per invoice row (tables can have hundreds of rows) and only takes a primitive status string prop. Wrapping it in React.memo lets rows whose status hasn't changed skip re-rendering the chip when the table re-renders for unrelated reasons (sort, selection toggles on other rows, column visibility).
…ti bundle cost ReleaseBanner was statically imported in the invoice detail page even though it only renders when an invoice transitions to 'released', and it pulls in canvas-confetti eagerly. Converted the import to next/dynamic (ssr: false) so that component and dependency are only fetched when the banner actually needs to show.
test:watch (vitest --changed) and test:watch:all already existed in package.json but weren't documented anywhere, so the continuous-testing workflow for local development wasn't discoverable. Added a README section pointing to them.
|
@valoryyaa-byte Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@valoryyaa-byte is attempting to deploy a commit to the kingsman-99's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses four performance/testing-infrastructure issues. The codebase already had substantial work done in each area, so these are the concrete, real gaps found after reviewing the current code rather than blanket changes:
StatusChipinInvoiceTableis rendered once per invoice row and only takes a primitivestatusstring prop. Wrapped it inReact.memoso rows whose status hasn't changed skip re-rendering the chip when the table re-renders for unrelated reasons (sort, selection toggles, column visibility).fetchUsdcBalance(called fromWalletConnecton wallet connect andPayModalon open) was hitting the RPC on every call, bypassing the existingblockchainCachemodule already used for quotes/invoices. Added abalancecache kind (10s TTL) and routed the fetch throughblockchainCache.getOrFetch.ReleaseBannerwas statically imported in the invoice detail page even though it only renders once an invoice is released, and it pulls incanvas-confettieagerly. Converted tonext/dynamic(ssr: false) so both the component and the dependency load on demand.test:watch(vitest --changed) andtest:watch:allalready existed inpackage.jsonbut weren't documented anywhere. Added a README section describing the continuous-testing workflow for local dev.Closes #911
Closes #910
Closes #909
Closes #908