Conversation
…hing The async getAccountBlobs call had no error handling — if the API failed, the promise rejection was unhandled and the user saw no feedback. This adds: - try/catch around the API call with error state - Loading state while fetching - Cleanup on unmount to avoid state updates after cancellation - Proper error message display in the UI Co-Authored-By: Hermes Agent <noreply@nousresearch.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 6399d11. Configure here.
| return; | ||
| } | ||
| const getBlobs = async (): Promise<BlobMetadata[]> => { | ||
| const blobs = await getShelbyClient().coordination.getAccountBlobs({ |
There was a problem hiding this comment.
Empty state flashes before loading
Low Severity
isLoading starts as false and is left unchanged when account is missing, so the first paint after a wallet connect has no loading flag, no error, and empty blobs. The empty-state copy is shown until useEffect later sets isLoading. With autoConnect this flicker happens on page load and again on every reconnect.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6399d11. Configure here.
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.


Summary
The
AccountBlobscomponent had no error handling for thegetAccountBlobsAPI call. If the API failed, the promise rejection was unhandled and the user saw no feedback — just an empty state. This adds proper try/catch, loading state, and cleanup on unmount.Closes shelby/feedback#45
Problem
In
apps/cross-chain-accounts/components/AccountBlobs.tsx:useEffecthad an async function that returned a value but was called with.then()— if the API rejected, it became an unhandled promise rejection.Solution
isLoadingstate for UI feedback during fetch.cancelledflag) to prevent state updates after unmount.Files changed
apps/cross-chain-accounts/components/AccountBlobs.tsx— 39 additions, 10 deletionsTest plan
🤖 Generated with Hermes Agent (Nous Research)
Note
Low Risk
Localized UI and async lifecycle changes in one component; no auth, payments, or shared API contract changes.
Overview
AccountBlobsnow handles blob list fetches with explicit loading, error, and empty UI instead of treating failures like “no blobs.”The
useEffectfetch uses try/catch/finally, setsisLoading/error, clears error when the wallet disconnects, and uses acancelledcleanup so in-flight requests don’t update state after unmount or account/refreshTriggerchanges. Successful loads still populate the existing blob grid unchanged.Reviewed by Cursor Bugbot for commit 6399d11. Bugbot is set up for automated code reviews on this repo. Configure here.