-
Notifications
You must be signed in to change notification settings - Fork 0
Dashboard Stabilization & Payments Hardening - Tracking #2
Copy link
Copy link
Open
Description
Prioritized Checklist
Blockers
- Checkout discount application →
NP12345should yield $0.00 and immediate dashboard access → currently reports partial balance and leaves user in pending state → ensure promotion logic zeroes total and bypasses payment-required gates - Checkout discount application →
MENTO12345should apply 99.9% reduction and surface updated total in UI → currently shows full price and fails on confirmation → wire promotion code lookup and totals display - Idempotent checkout retries → retries should not throw
idempotency_error→ currently duplicate attempts fail after partial session creation → derive idempotency keys from hashed payload - Intake progression gating → completing intake should unlock matching/dashboard routes → today users loop back to intake → repair RoleGuard and completion flag propagation
Core UX
- Student dashboard messaging composer → send button should dispatch Convex mutation and show toast → currently no-op → wire mutation + optimistic update
- Student billing history → "View billing portal" should open Stripe portal and list past invoices → button inert → connect to portal session API and render history table
- Admin finance filters & CSV → filters should drive query and CSV export button should download latest dataset → controls idle → connect Convex queries/actions and surface toast feedback
- Admin discount setup toggle → 99.9% discount button should show live status → now static → hook to promotion creation mutation and reflect state
- Preceptor dashboard match actions → accept/decline should update match and show toast → buttons disabled → wire mutations and optimistic state
- Notification-driven navigation → clicking notification should deeplink to match detail → now reloads dashboard root → fix router push + mark-read mutation
Nice-to-have
- Loading/skeleton states across dashboards → skeletons should replace blank panels → currently flashes empty divs → add skeleton components and aria labels
- Toast and error surfacing → success/failure should be confirmed visibly → now silent → standardize toast helpers
- E2E data-testids → selectors should rely on deterministic ids → currently brittle → add
data-testidattributes to critical actions
Repro Steps
- Checkout codes
- Log in as student, progress to checkout
- Apply
NP12345orMENTO12345 - Observe price mismatch and failed completion
- Intake loop
- Complete required intake steps
- Attempt to open
/dashboard/student - Note redirect back to intake flow
- Student messages
- Open student dashboard messages panel
- Enter text and click "Send"
- Console shows no network call, message not persisted
- Admin CSV export
- Navigate to admin finance view
- Adjust filters and click "Export CSV"
- Button does nothing, no download initiated
- Preceptor match actions
- Open preceptor dashboard matches list
- Click "Accept" or "Decline"
- Button remains disabled and no toast appears
Acceptance Criteria
- Discounts
NP12345andMENTO12345reliably update totals, succeed end-to-end, and grant access without manual intervention - Checkout flow produces deterministic idempotency keys; repeated submissions succeed without
idempotency_error - Intake completion flips access flag and RoleGuard routes users correctly per role
- Dashboard actions (messages, billing, finance filters, match actions) trigger Convex mutations/actions, update UI optimistically, and surface success/error toasts
- Loading, empty, and error states display accessible skeletons/placeholders; no console errors in happy paths
- Stripe, Netlify, and Sentry telemetry verified clean after fixes (no new dashboard-route errors)
- Playwright happy-path coverage exists for checkout (both codes), messaging send/read, and admin discount init
Local & CI Commands
npm run type-check
npm run lint
npm run test:unit:run
npm run test:e2eReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels