Skip to content

Dashboard Stabilization & Payments Hardening - Tracking #2

@thefiredev-cloud

Description

@thefiredev-cloud

Prioritized Checklist

Blockers

  • Checkout discount application → NP12345 should 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 → MENTO12345 should 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-testid attributes to critical actions

Repro Steps

  1. Checkout codes
    • Log in as student, progress to checkout
    • Apply NP12345 or MENTO12345
    • Observe price mismatch and failed completion
  2. Intake loop
    • Complete required intake steps
    • Attempt to open /dashboard/student
    • Note redirect back to intake flow
  3. Student messages
    • Open student dashboard messages panel
    • Enter text and click "Send"
    • Console shows no network call, message not persisted
  4. Admin CSV export
    • Navigate to admin finance view
    • Adjust filters and click "Export CSV"
    • Button does nothing, no download initiated
  5. Preceptor match actions
    • Open preceptor dashboard matches list
    • Click "Accept" or "Decline"
    • Button remains disabled and no toast appears

Acceptance Criteria

  • Discounts NP12345 and MENTO12345 reliably 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:e2e

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions