Skip to content

Close remaining empty/error/loading gaps - #23

Merged
james2177 merged 1 commit into
mainfrom
pr19-empty-error-states
Jul 14, 2026
Merged

Close remaining empty/error/loading gaps#23
james2177 merged 1 commit into
mainfrom
pr19-empty-error-states

Conversation

@james2177

Copy link
Copy Markdown
Contributor

Summary

  • ActivityFeed silently rendered nothing when the feed request failed or genuinely had no items — isLoading only covered the initial fetch. Now distinguishes a "Live feed unavailable right now." error state from a "No fills yet." empty state, and still shows cached items if a later background refresh errors rather than replacing them with an error box.
  • IntentDetailPage rendered a blank card area when a request succeeded but returned no intent data, distinct from the network/404 error branch (!intent ? null : ...). Adds a "No details found for this intent." state.
  • ConnectWalletButton's failed-connect state only surfaced its error via a title tooltip — invisible to touch/keyboard users and easy to miss. Direct connect attempts now also fire a toast via the PR Wire solver leaderboard to real API #16 system. This is scoped to the component's own click handler rather than inside the wallet store's connect(), so it doesn't double-toast when useSwapSubmission/useAcceptIntent/useSolverRegistration call connect() internally — those already handle and toast their own errors.
  • Adds a branded src/app/not-found.tsx (Nav/Footer + a link home) in place of Next's default 404 page.

Test plan

  • npm run lint
  • npm test (9 new tests: ActivityFeed empty/error/cached-on-error, IntentDetailPage not-found, ConnectWalletButton toast-on-failure, NotFound render + main landmark; 139 total passing)
  • rm -rf .next && npm run build
  • Manually verified npm run dev returns a 404 status with the branded "Page not found" copy for an unmatched route

Branched off main (PR #18 already merged).

- ActivityFeed silently rendered nothing when the feed request failed
  or genuinely had no items (isLoading only covered the initial fetch).
  Now distinguishes a "Live feed unavailable right now." error state
  from a "No fills yet." empty state, and still shows cached items if
  a later background refresh errors.
- IntentDetailPage rendered nothing (a blank card area) when a request
  succeeded but returned no intent data, distinct from the network/404
  error branch. Adds a "No details found for this intent." state.
- ConnectWalletButton's failed-connect state only surfaced its error
  via a title tooltip, invisible to touch/keyboard users and easy to
  miss. Direct connect attempts now also fire a toast via the PR #16
  system — scoped to this component's own click handler (not inside
  the wallet store's connect()) so it doesn't double-toast when
  useSwapSubmission/useAcceptIntent/useSolverRegistration call
  connect() internally and already handle their own error toasts.
- Adds a branded src/app/not-found.tsx (Nav/Footer + a link home)
  in place of Next's default 404 page.
@james2177
james2177 merged commit 23ad23c into main Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant