Skip to content

fix(notifications): abort inflight fetch on unmount (#555) - #893

Open
TCROWN10 wants to merge 1 commit into
Iris-IV:mainfrom
TCROWN10:fix/555-abort-inflight-notifications
Open

fix(notifications): abort inflight fetch on unmount (#555)#893
TCROWN10 wants to merge 1 commit into
Iris-IV:mainfrom
TCROWN10:fix/555-abort-inflight-notifications

Conversation

@TCROWN10

Copy link
Copy Markdown

Summary

  • Abort in-flight fetchNotifications on unmount/wallet change via AbortController so remounts cannot call setNotifications after cleanup
  • Propagate abort signals through remote notification fetch (no local fallback on abort)
  • Add regression tests for unmount and wallet-change abort paths

Closes #555

Type of Change

  • Bug fix

Test plan

  • npm test -- --runTestsByPath src/__tests__/hooks/useNotifications.test.tsx
  • Confirm notification bell still polls while connected
  • Rapidly navigate away/back while notifications are loading and verify no console stale-state warnings

Use AbortController in useNotifications refresh/cleanup so a remount cannot
apply setNotifications from a previous poll (Iris-IV#555).

Co-authored-by: Cursor <cursoragent@cursor.com>
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@TCROWN10 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! 🚀

Learn more about application limits

@sshdopey

Copy link
Copy Markdown
Contributor

Auto-review failed (API error). Leaving PR for human review.

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.

[Bug] useNotifications setInterval doesn't abort inflight fetch on unmount — stale state update on remount

2 participants