Difficulty: Advanced
Type: Refactor
Summary
Replace prompt, alert, and confirm usage in management pages with accessible dashboard UI components so pass and member actions are testable, consistent, and user-friendly.
Current Behaviour
The passes page uses prompt() for editing pass names and alert() for mutation errors. The members page uses prompt() for role changes, confirm() for removals, and alert() for mutation errors. These browser dialogs are hard to style, difficult to test reliably, and provide limited accessibility or validation support.
Expected Behaviour
Management actions should use in-app forms, modals, confirmation dialogs, and toast or inline error states. Users should see consistent pending, success, validation, and rollback feedback without relying on blocking browser dialogs.
Suggested Implementation
Create reusable management dialog components for editing pass fields, changing member roles, confirming destructive actions, and displaying mutation errors. Replace direct calls to prompt, alert, and confirm with controlled React state. Ensure keyboard navigation, focus trapping, labels, and error messages are accessible.
Files or Areas Likely Affected
apps/dashboard/app/passes/page.tsx
apps/dashboard/app/members/page.tsx
apps/dashboard/components/
apps/dashboard/lib/hooks/useOptimisticMutation.ts
apps/dashboard/test/
Acceptance Criteria
Additional Notes
This should be implemented before adding more complex management flows, since future create/edit actions can reuse the same dialog patterns.
Difficulty: Advanced
Type: Refactor
Summary
Replace
prompt,alert, andconfirmusage in management pages with accessible dashboard UI components so pass and member actions are testable, consistent, and user-friendly.Current Behaviour
The passes page uses
prompt()for editing pass names andalert()for mutation errors. The members page usesprompt()for role changes,confirm()for removals, andalert()for mutation errors. These browser dialogs are hard to style, difficult to test reliably, and provide limited accessibility or validation support.Expected Behaviour
Management actions should use in-app forms, modals, confirmation dialogs, and toast or inline error states. Users should see consistent pending, success, validation, and rollback feedback without relying on blocking browser dialogs.
Suggested Implementation
Create reusable management dialog components for editing pass fields, changing member roles, confirming destructive actions, and displaying mutation errors. Replace direct calls to
prompt,alert, andconfirmwith controlled React state. Ensure keyboard navigation, focus trapping, labels, and error messages are accessible.Files or Areas Likely Affected
apps/dashboard/app/passes/page.tsxapps/dashboard/app/members/page.tsxapps/dashboard/components/apps/dashboard/lib/hooks/useOptimisticMutation.tsapps/dashboard/test/Acceptance Criteria
prompt().prompt().confirm().alert().Additional Notes
This should be implemented before adding more complex management flows, since future create/edit actions can reuse the same dialog patterns.