Skip to content

feat(web): tier progress display, error boundary, toast system, modal focus trap#353

Open
Xueen-code wants to merge 1 commit into
SO4-Markets:mainfrom
Xueen-code:feat/tier-progress-error-boundary-toast-modal
Open

feat(web): tier progress display, error boundary, toast system, modal focus trap#353
Xueen-code wants to merge 1 commit into
SO4-Markets:mainfrom
Xueen-code:feat/tier-progress-error-boundary-toast-modal

Conversation

@Xueen-code

Copy link
Copy Markdown

Summary

  • Web referrals: tier progress display #312 — Extract TierProgress to apps/web/src/features/referrals/components/shared/tier-progress.tsx; renders zero, partial, and maxed-out tier fixtures with tier label, ARIA progressbar, and next-tier threshold copy; 12 unit tests stable in jsdom.
  • Web shared: error boundary fallback #313apps/web/src/shared/components/ErrorBoundary.tsx — class-based error boundary with reset() via "Try again" button and optional fallback prop; console.error is mocked in tests to contain noise; 7 unit tests including retry re-render flow.
  • Web shared: toast notification system #314apps/web/src/shared/components/toast/useToast hook + ToastProvider; supports success, error, info variants; auto-dismiss with vi.useFakeTimers() (no real sleeps); manual dismiss; toast queuing; 8 unit tests.
  • Web shared: modal focus trap and escape #315apps/web/src/shared/components/Modal.tsxrole="dialog" with focus trap (Tab/Shift+Tab), Escape-to-close, trigger-ref focus-return on close, backdrop click dismiss; tests use @testing-library/user-event keyboard navigation; 8 unit tests.

Test plan

  • bun run --cwd apps/web test passes for all new test files.
  • No real timers in toast tests — fake timers only.
  • Console error noise is contained in ErrorBoundary tests via vi.spyOn.

closes #312
closes #313
closes #314
closes #315

… with focus trap

- apps/web/src/features/referrals/components/shared/tier-progress.tsx — extracted
  TierProgress from affiliates-tab; renders zero/partial/maxed-out fixtures with
  ARIA progressbar and tier labels; 12 unit tests
- apps/web/src/shared/components/ErrorBoundary.tsx — class-based boundary with
  reset() callback and optional fallback prop; 7 unit tests including retry flow
- apps/web/src/shared/components/toast/ — useToast hook + ToastProvider; supports
  success/error/info variants, auto-dismiss with fake timers, manual dismiss, queue;
  8 unit tests
- apps/web/src/shared/components/Modal.tsx — dialog with focus trap, Escape-to-close,
  trigger-ref focus-return, backdrop click dismiss; 8 unit tests using user-event

closes SO4-Markets#312
closes SO4-Markets#313
closes SO4-Markets#314
closes SO4-Markets#315
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Xueen-code is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Xueen-code 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant