Skip to content

ix(frontend): adaptive wallet polling, visibility-aware stats polling, QR fallback, StrictMode cleanup audit - #369

Merged
ALLEN-AYODEJI merged 2 commits into
Trellis-Ecosystem:masterfrom
Nexha-dev:ix/frontend-strict-mode-adaptive-polling-qr-fallback
Aug 30, 2026
Merged

ix(frontend): adaptive wallet polling, visibility-aware stats polling, QR fallback, StrictMode cleanup audit#369
ALLEN-AYODEJI merged 2 commits into
Trellis-Ecosystem:masterfrom
Nexha-dev:ix/frontend-strict-mode-adaptive-polling-qr-fallback

Conversation

@Nexha-dev

Copy link
Copy Markdown
Contributor

Summary

Closes #296
Closes #297
Closes #298
Closes #299

⚠️ Warning: per instructions, these changes were implemented but not tested/run. Please review and verify locally (including a StrictMode pass) before merging.

Test plan

  • Not run — implementation only, per request. Needs manual verification:
    • Trigger wallet phase transitions (disconnected → connected → unavailable) and confirm polling cadence changes and stops appropriately.
    • Background/foreground the tab and confirm contract-stats polling pauses/resumes with a fresh fetch.
    • Simulate no canvas support and confirm the QR fallback text renders with the copy/share buttons still usable.
    • Run the app under <StrictMode> and confirm no duplicate intervals/animations/warnings.

…ling, QR canvas fallback, and StrictMode ref-cleanup hygiene

- WalletContext: replace the fixed 3s account poll with per-phase intervals
  (5s connected, 30s disconnected, none while unavailable/detecting/connecting)
  plus exponential backoff on consecutive failures.
- useContractStats: pause the 60s poll while the tab is hidden, resume with an
  immediate fetch on visibility, and skip results from requests superseded by
  a newer one.
- AgreementIdGenerator: detect canvas support before generating the QR code
  and show a readable text-only fallback (with an explanatory message) when
  it's unavailable, instead of silently rendering nothing.
- useCountUp: null out the animation frame ref in its cleanup for consistency
  with the app's StrictMode ref-cleanup audit (NetworkBackground and
  useAgreementEvents were already fully compliant).

Closes Trellis-Ecosystem#296, Closes Trellis-Ecosystem#297, Closes Trellis-Ecosystem#298, Closes Trellis-Ecosystem#299
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@Nexha-dev 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

@ALLEN-AYODEJI
ALLEN-AYODEJI merged commit 62d88a9 into Trellis-Ecosystem:master Aug 30, 2026
1 of 5 checks 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

2 participants