Spec Deviation Task List
Spec Deviation Task List
Generated from a spec-vs-implementation audit of Phases 0-9 of the QuranFlow Admin Mockup.
For the developer: Before fixing any item, verify the deviation first. Open the spec file, read the cited section, then open the implementation file and confirm the gap exists. The spec is the source of truth. If the spec and this task list disagree, follow the spec. If the implementation already handles the item in a different-but-acceptable way, note it and move on.
Reminder: This is a front-end mockup. Actions should show toasts, modals can open without persisting data. The goal is to demonstrate the correct UI elements, not build working functionality. A "missing button" means the button element itself is absent from the UI — not that the button doesn't perform real backend work.
Progress Tracker
| Batch | Focus Area | Tasks | Status |
|---|---|---|---|
| 1A | Email Management (18.1-18.5) | 5 | DONE |
| 1B | Close Workflow Steps 3-5 + gate (16.5-16.9) | 5 | DONE |
| 1C | Payments Tab (6.1-6.5) | 5 | DONE |
| 2 | Dashboard + Student Detail header/Profile + Scheduling | 16 | DONE |
| 3 | Student list + Semester Hub tabs + Close Workflow Steps 1-2 | 13 | DONE |
| 4 | Student Detail remaining tabs + Teacher Mgmt + misc | 18 | DONE |
| 5A | Cross-cutting: DataTable states, edit modals, destructive confirmations | 8 | TODO |
| 5B | Teacher Management + Reporting interactivity | 7 | TODO |
| 5C | Admin & System + annotations + URL pre-filters | 7 | TODO |
| 5D | High-complexity screen polish (badges, confirmation text, labels) | 4 | TODO |
Total: ~70 of ~70 prior tasks completed + 26 new tasks from post-completion audit (Batch 5)
How to use this list
- Pick a task
- Read the spec section cited — confirm the requirement exists and what it actually says
- Open the implementation file — confirm the gap is real and still present
- Fix the UI to match the spec
- Run
bun run build && bun run lintto verify no regressions - Mark the task done
Status key: Tasks marked with — DONE in the heading have a **Completed**: line at the bottom describing what was done and when.
Task format
Each task includes:
- Screen: Which page/tab is affected
- Spec: Which spec file and section to read
- What the spec requires: Summary of the requirement (always verify against the actual spec text)
- Current state: What the implementation does now (file path + approximate line numbers)
- Gap: What needs to change
1. Dashboard
1.1 Alert tiles missing colored borders and icons — DONE
- Screen: Dashboard
- Spec:
02-dashboard.mdSection 1.5 +01-global-patterns.mdSection 4.4 - What the spec requires: Each alert tile has an icon (left side) and a color-coded border (red/yellow/blue based on severity)
- Current state:
src/components/shared/alert-tile.tsx— renders cards without per-tile icons and without colored borders. Theiconandcolorfields exist in the data (src/data/dashboard.ts) but aren't used visually - Gap: Add colored left/top border per tile based on
colorfield, and render the appropriate icon - Completed: 2026-03-12 (Batch 2). Added iconMap and borderColorMap to alert-tile.tsx. Tiles now render icons and colored left borders per severity.
1.2 Phase prompt bar missing "submissions this week" stat — DONE
- Screen: Dashboard
- Spec:
02-dashboard.mdSection 1.4 (Active phase) - What the spec requires: Active phase shows "Week N of M — [Semester Name]" plus key stats including "submissions this week"
- Current state:
src/pages/dashboard/index.tsx~lines 244-248 — shows week/semester and student count but no submissions stat - Gap: Add "submissions this week" inline stat to the Active phase prompt
- Completed: 2026-03-12 (Batch 2). Added submissions import, computed submissionsThisWeek from mock data, rendered as "· N submissions this week" in CardDescription.
1.3 Appointment utilization tile should show ratio format — DONE
- Screen: Dashboard
- Spec:
02-dashboard.mdSection 1.5, Tile 4 - What the spec requires: Y2 Appointment tile displays as "X/Y booked" (ratio), not a plain count
- Current state:
src/data/dashboard.ts~lines 48-55 — shows count as plain number "2" - Gap: Change to ratio format like "2/10 booked"
- Completed: 2026-03-12 (Batch 2). Added
displayValue: "2/10 booked"to Y2 Appointments tile data. AlertTile rendersdisplayValue ?? count.
1.4 Tile labels don't match spec — DONE
- Screen: Dashboard
- Spec:
02-dashboard.mdSection 1.5 - What the spec requires: Tile 2 label = "TAs Behind on Reviews"; Tile 5 label = "App Issues"
- Current state:
src/data/dashboard.ts— Tile 2 says "TAs: Response > 48h" (~line 28); Tile 5 says "Open Issues" (~line 60) - Gap: Update labels to match spec exactly
- Completed: 2026-03-12 (Batch 2). Updated tile labels in dashboard.ts to match spec exactly.
1.5 "Search Student" quick action should open global search — ACCEPTABLE DEVIATION
- Screen: Dashboard
- Spec:
02-dashboard.mdSection 1.6 - What the spec requires: "Search Student" opens global search overlay with student entity type pre-selected
- Current state:
src/pages/dashboard/index.tsx~lines 111-114 — navigates to/students - Gap: Should open the global search overlay (or at minimum navigate to
/studentswith search focused). Verify what the spec actually intends and pick the best mockup-appropriate approach. - Note: 2026-03-12 (Batch 2). Global search overlay is a deferred item in the mockup scope. Navigating to
/studentsis the acceptable mockup approach.
2. Students List
2.1 Missing TA dropdown filter — DONE
- Screen: Students List
- Spec:
03-student-management.mdSection 2.4 - What the spec requires: TA column is filterable via dropdown
- Current state:
src/pages/student-management/students.tsx~lines 197-236 — filters for Semester, Level, Status, Subscription only - Gap: Add TA dropdown filter to FilterBar
- Completed: 2026-03-12 (Batch 3). Added TA filter config using teachers data. Wired up filter logic in useMemo.
2.2 Missing "Deactivate Selected" bulk action button — DONE
- Screen: Students List
- Spec:
03-student-management.mdSection 2.5 - What the spec requires: Checkbox selection + "Deactivate Selected" button with destructive confirmation
- Current state:
src/pages/student-management/students.tsx— checkboxes exist (~lines 36-57) but no bulk action button appears when rows are selected - Gap: Add "Deactivate Selected" button that appears when rows are checked
- Completed: 2026-03-12 (Batch 3). Added bulkActions prop to DataTable with destructive "Deactivate Selected" button.
2.3 Add Student modal missing Phone and Timezone fields — DONE
- Screen: Students List
- Spec:
03-student-management.mdSection 2.5, Add Student modal - What the spec requires: Modal includes Phone (with dial code dropdown) and Timezone fields
- Current state:
src/pages/student-management/students.tsx~lines 347-453 — has Name, Email, Gender, Age, Level, Semester but no Phone or Timezone - Gap: Add Phone (with dial code) and Timezone fields to the Add Student dialog
- Completed: 2026-03-12 (Batch 3). Added Phone field with dial code Select + Input, and Timezone Select dropdown.
3. Student Detail — Entity Header
3.1 Missing "Edit Profile" button and "View in Stripe" link — DONE
- Screen: Student Detail header
- Spec:
03-student-management.mdSection 3.3 - What the spec requires: Always-visible "Edit Profile" button and "View in Stripe" external link in entity header
- Current state:
src/pages/student-management/student-detail/index.tsx~lines 69-80 — only "Back to Students" button - Gap: Add "Edit Profile" and "View in Stripe" buttons to the header action area
- Completed: 2026-03-12 (Batch 2). Added "Edit Profile" button (shows toast) and "Stripe ↗" external link (deep link to Stripe customer dashboard, conditional on stripeCustomerId).
3.2 Missing copy icon on email — DONE
- Screen: Student Detail header
- Spec:
03-student-management.mdSection 3.3 - What the spec requires: Email displayed with a copy icon for clipboard
- Current state:
src/pages/student-management/student-detail/index.tsx~lines 85-88 — mail icon only, no copy action - Gap: Add a copy-to-clipboard icon next to the email
- Completed: 2026-03-12 (Batch 2). Added CopyIcon button next to email that copies to clipboard via navigator.clipboard.writeText and shows success toast.
3.3 Missing tab badges on Payments, Appointments, Semester History — DONE
- Screen: Student Detail tabs
- Spec:
03-student-management.mdSection 3.4 - What the spec requires: Payments tab: warning icon if subscription past_due. Appointments tab: count of upcoming. Semester History tab: count of enrollments.
- Current state:
src/pages/student-management/student-detail/index.tsx~lines 108-121 — only Submissions tab has a badge - Gap: Add appropriate badges/icons to the three tabs
- Completed: 2026-03-12 (Batch 2). Payments tab: AlertTriangleIcon if subscription is "Past Due". Appointments tab: Badge with count of upcoming appointments. Semester History tab: Badge with enrollment count.
4. Student Detail — Profile Tab
4.1 Missing profile picture field — DONE
- Screen: Student Detail > Profile
- Spec:
03-student-management.mdSection 3.5, Personal Information - What the spec requires: "Profile Picture" field with thumbnail display
- Current state:
src/pages/student-management/student-detail/profile-tab.tsx~lines 49-63 — no profile picture - Gap: Add a profile picture thumbnail placeholder in Personal Information
- Completed: 2026-03-12 (Batch 2). Added Avatar component with AvatarFallback (initials) next to the personal information fields. Uses profilePicture if available.
4.2 Missing Enrollment fields: Is Core Enrollment, Enrollment ID — DONE
- Screen: Student Detail > Profile
- Spec:
03-student-management.mdSection 3.5, Enrollment section - What the spec requires: "Is Core Enrollment" (Yes/No) and "Enrollment ID" (system reference)
- Current state:
src/pages/student-management/student-detail/profile-tab.tsx~lines 74-92 — has Level, Semester, Status, Elective, Group, TA but missing these two - Gap: Add Is Core Enrollment and Enrollment ID to the Enrollment section
- Completed: 2026-03-12 (Batch 2). Added "Is Core Enrollment" field ("Yes") and "Enrollment ID" field (ENRL-{id}-{semesterId} in small text).
4.3 Missing System fields: Registration Date, Temp Password, Push Token — DONE
- Screen: Student Detail > Profile
- Spec:
03-student-management.mdSection 3.5, System section - What the spec requires: Registration Date, Temporary Password (masked with reveal), Push Notification Token (truncated + copy)
- Current state:
src/pages/student-management/student-detail/profile-tab.tsx~lines 128-139 — shows User ID, Username, User Type, Stripe ID only - Gap: Add the three missing fields to the System section
- Completed: 2026-03-12 (Batch 2). Added Registration Date (mock), Temporary Password (masked "••••"), and Push Notification Token (truncated with copy button).
4.4 Missing section edit buttons and "Manage Tags" link — DONE
- Screen: Student Detail > Profile
- Spec:
03-student-management.mdSection 3.5 - What the spec requires: "Edit Profile" on Personal Info header, "Edit Enrollment" on Enrollment header, "Manage Tags" link in Tags section
- Current state:
src/pages/student-management/student-detail/profile-tab.tsx— no edit buttons or links on any section header - Gap: Add edit buttons to section card headers and a Manage Tags link
- Completed: 2026-03-12 (Batch 2). Added "Edit Profile" button via CardAction on Personal Information, "Edit Enrollment" button on Enrollment section, "Manage Tags" link on Tags section. All show toasts.
5. Student Detail — Submissions Tab
5.1 Missing Review Date and Rejection Reason columns — DONE
- Screen: Student Detail > Submissions
- Spec:
03-student-management.mdSection 3.6 - What the spec requires: "Review Date" column and "Rejection Reason" (expandable row or tooltip)
- Current state:
src/pages/student-management/student-detail/submissions-tab.tsx~lines 20-114 — no Review Date or Rejection Reason columns - Gap: Add both columns to the table
- Completed: 2026-03-12 (Batch 4). Added sortable Review Date column. Added Rejection Reason column with truncated text and tooltip on hover.
5.2 Missing row actions: Play Recording, View Details, Delete — DONE
- Screen: Student Detail > Submissions
- Spec:
03-student-management.mdSection 3.6 - What the spec requires: Play icon, row-click expand for details, Delete icon (Admin)
- Current state:
src/pages/student-management/student-detail/submissions-tab.tsx— no row actions at all - Gap: Add play icon, expandable row detail, and delete icon per row
- Completed: 2026-03-12 (Batch 4). Added DropdownMenu actions column with Play Recording, View Details, and Delete actions.
6. Student Detail — Payments Tab
6.1 Missing Payment Method section — DONE
- Screen: Student Detail > Payments
- Spec:
03-student-management.mdSection 3.7 - What the spec requires: Dedicated section showing card brand + last4 ("Visa ending in 4242") and expiry
- Current state:
src/pages/student-management/student-detail/payments-tab.tsx— card info only in payment history column - Gap: Add a separate Payment Method display card/section
- Completed: 2026-03-12 (Batch 1C). Added separate Payment Method card showing card brand + last4 and expiry. Added
cardBrand,cardLast4,cardExpiryfields to Subscription type and mock data.
6.2 Missing Upcoming Payment section — DONE
- Screen: Student Detail > Payments
- Spec:
03-student-management.mdSection 3.7 - What the spec requires: Next Payment Date, Amount, Proration details
- Current state:
src/pages/student-management/student-detail/payments-tab.tsx— no such section exists - Gap: Add an Upcoming Payment section
- Completed: 2026-03-12 (Batch 1C). Added Upcoming Payment card showing Next Payment Date and Amount. Renders only when subscription is Active with a nextBillingDate.
6.3 Missing subscription fields: Current Period, Cancel at Period End — DONE
- Screen: Student Detail > Payments
- Spec:
03-student-management.mdSection 3.7 - What the spec requires: Current Period (start-end range) and Cancel at Period End field
- Current state:
src/pages/student-management/student-detail/payments-tab.tsx~lines 158-216 — not present - Gap: Add both fields to the subscription card
- Completed: 2026-03-12 (Batch 1C). Added
currentPeriodStart,currentPeriodEnd,cancelAtPeriodEndto Subscription type and mock data. Current Period shows date range, Cancel at Period End shown conditionally.
6.4 Missing Invoice link in payment history — DONE
- Screen: Student Detail > Payments
- Spec:
03-student-management.mdSection 3.7 - What the spec requires: "View Invoice" external link column
- Current state:
src/pages/student-management/student-detail/payments-tab.tsx~lines 30-81 — columns: Date, Amount, Plan, Status, Card. No Invoice column - Gap: Add an Invoice column with "View Invoice" link
- Completed: 2026-03-12 (Batch 1C). Replaced Card column with Invoice column containing "View Invoice" link with ExternalLinkIcon, opens in new tab.
6.5 Missing action buttons: Cancel & Deactivate, Assign Scholarship, Link Family, Send Payment Link — DONE
- Screen: Student Detail > Payments
- Spec:
03-student-management.mdSection 3.7 - What the spec requires: Four additional actions beyond the existing ones
- Current state:
src/pages/student-management/student-detail/payments-tab.tsx~lines 219-273 — has Cancel, Pause, Apply Discount, Retry, Resume, View in Stripe. Missing the four listed actions - Gap: Add the four missing action buttons
- Completed: 2026-03-12 (Batch 1C). Added 4 action buttons: Cancel & Deactivate (destructive variant), Assign Scholarship, Link Family, Send Payment Link. All fire appropriate toasts.
7. Student Detail — Appointments Tab
7.1 Missing Reschedule and Cancel row actions — DONE
- Screen: Student Detail > Appointments
- Spec:
03-student-management.mdSection 3.8 - What the spec requires: Reschedule icon and Cancel icon per row
- Current state:
src/pages/student-management/student-detail/appointments-tab.tsx~lines 21-101 — data display only, no action icons - Gap: Add reschedule and cancel action icons to each row
- Completed: 2026-03-12 (Batch 4). Added DropdownMenu with Reschedule and Cancel actions per row.
8. Student Detail — Semester History Tab
8.1 Missing Elective column — DONE
- Screen: Student Detail > Semester History
- Spec:
03-student-management.mdSection 3.9 - What the spec requires: "Elective" column (Year 2 only, "--" for others)
- Current state:
src/pages/student-management/student-detail/semester-history-tab.tsx— not present - Gap: Add Elective column
- Completed: 2026-03-12 (Batch 4). Added Elective column resolving electiveId from electives data for Year 2 students, "—" for others.
8.2 Missing Status filter dropdown — DONE
- Screen: Student Detail > Semester History
- Spec:
03-student-management.mdSection 3.9 - What the spec requires: Status dropdown filter (Pass / Fail / Enrolled / All)
- Current state:
src/pages/student-management/student-detail/semester-history-tab.tsx— no filter dropdown - Gap: Add status filter dropdown above the table
- Completed: 2026-03-12 (Batch 4). Added Select dropdown with All/Pass/Fail/Enrolled options filtering table rows.
9. Student Detail — Actions Tab
9.1 Missing "Revert Temporary Password" action — DONE
- Screen: Student Detail > Actions
- Spec:
03-student-management.mdSection 3.10 - What the spec requires: "Revert Temporary Password" card in Account Actions
- Current state:
src/pages/student-management/student-detail/actions-tab.tsx~lines 255-313 — has Deactivate, Set Temp Password, Resend Email. Missing Revert - Gap: Add Revert Temporary Password action card
- Completed: 2026-03-12 (Batch 4). Added "Revert Temporary Password" card with confirmation dialog and success toast.
9.2 Deactivate should show dual-option dialog when subscription active — DONE
- Screen: Student Detail > Actions
- Spec:
03-student-management.mdSection 3.10 - What the spec requires: When student has active subscription, show two buttons: "Deactivate Only" and "Cancel & Deactivate"
- Current state:
src/pages/student-management/student-detail/actions-tab.tsx~lines 262-286 — single confirmation button - Gap: Change confirmation dialog to show two separate action buttons when subscription is active
- Completed: 2026-03-12 (Batch 4). Added AlertDialog with "Deactivate Only" and "Cancel & Deactivate" buttons when subscription is Active. Original single-button dialog used otherwise.
10. Submissions Page
10.1 Missing row actions on Assessments view — DONE
- Screen: Submissions > Assessments tab
- Spec:
03-student-management.mdSection 4.6 - What the spec requires: Edit icon, Delete icon, row-click View Details on assessment rows
- Current state:
src/pages/student-management/submissions.tsx~lines 471-493 — no row actions - Gap: Add edit, delete icons and row-click behavior to assessment rows
- Completed: 2026-03-12 (Batch 4). Added Edit and Delete icon buttons per row with ConfirmDialog for delete. Made rows clickable for View Details.
10.2 Missing row actions on Submissions view — DONE
- Screen: Submissions > Submissions tab
- Spec:
03-student-management.mdSection 4.6 - What the spec requires: Play Recording icon, "Review" button for Under Review items, checkbox + "Delete Selected" bulk action
- Current state:
src/pages/student-management/submissions.tsx~lines 496-519 — no row actions - Gap: Add play icon, review button, and bulk delete UI to submissions rows
- Completed: 2026-03-12 (Batch 4). Added Play Recording icon, Review button for Under Review items, checkbox selection, and "Delete Selected" bulk action with ConfirmDialog.
11. Promoted Students
11.1 Missing "Repeat Signups Only" toggle — DONE
- Screen: Promoted Students
- Spec:
03-student-management.mdSection 5.5 - What the spec requires: Toggle/filter to show only repeat signups
- Current state:
src/pages/student-management/promoted-students.tsx~lines 147-175 — filters for Semester, Level From, Level To only - Gap: Add a "Repeat Signups Only" toggle filter
- Completed: 2026-03-12 (Batch 3). Added repeatOnly state and toggle Button between FilterBar and DataTable.
12. Failed Sign Ups
12.1 Missing date range filter — DONE
- Screen: Failed Sign Ups
- Spec:
03-student-management.mdSection 6.4 - What the spec requires: "Date range (registration date)" filter
- Current state:
src/pages/student-management/failed-signups.tsx~lines 166-176 — only Device type filter - Gap: Add date range filter for registration date
- Completed: 2026-03-12 (Batch 3). Added date range filter config (7d/30d/90d/All time) with filtering logic.
12.2 Missing per-row Delete icon and "Delete Selected" bulk action — DONE
- Screen: Failed Sign Ups
- Spec:
03-student-management.mdSection 6.5 - What the spec requires: Delete icon per row + "Delete Selected" button for checked rows
- Current state:
src/pages/student-management/failed-signups.tsx— checkboxes exist but no delete icon or bulk delete button - Gap: Add delete icon to each row and "Delete Selected" button in the toolbar
- Completed: 2026-03-12 (Batch 3). Added Trash2Icon per row and "Delete Selected" bulk action via bulkActions prop.
13. Semester Hub — Overview Tab
13.1 Missing Auto-Transition toggle — DONE
- Screen: Semester Hub > Overview
- Spec:
04-semester-management.mdSection 3.5, Status Controls - What the spec requires: Third toggle "Auto-Transition (NEW)" with date preview text like "Will activate on [start_date] and deactivate on [end_date]"
- Current state:
src/pages/semester-management/semester-hub/overview-tab.tsx~lines 169-228 — only Registration Open and Active Semester toggles - Gap: Add Auto-Transition toggle with date preview
- Completed: 2026-03-12 (Batch 3). Added Auto-Transition toggle with NEW badge, date preview text, and Switch.
13.2 Missing Cancel button in date editing mode — DONE
- Screen: Semester Hub > Overview
- Spec:
04-semester-management.mdSection 3.5, Dates section - What the spec requires: Save and Cancel buttons when editing dates
- Current state:
src/pages/semester-management/semester-hub/overview-tab.tsx~lines 89-107 — toggles between Edit/Save only, no Cancel - Gap: Add a Cancel button to discard date changes
- Completed: 2026-03-12 (Batch 3). Added Cancel button (ghost variant) next to Save button in date editing mode.
13.3 Email Schedule Preview missing trigger and date columns — DONE
- Screen: Semester Hub > Overview
- Spec:
04-semester-management.mdSection 3.5, Email Schedule Preview - What the spec requires: Each email shows "[Template Name] — [Trigger] — [Date or 'On event']"
- Current state:
src/pages/semester-management/semester-hub/overview-tab.tsx~lines 248-258 — shows only template name and category - Gap: Add Trigger and Date/Event columns to the email schedule preview list
- Completed: 2026-03-12 (Batch 3). Updated to show three columns: name, trigger, date/event computed from trigger type.
14. Semester Hub — Setup Checklist Tab
14.1 Missing "Mark as N/A" checkbox per item — DONE
- Screen: Semester Hub > Setup Checklist
- Spec:
04-semester-management.mdSection 3.6, Actions - What the spec requires: N/A toggle per item that grays it out and excludes from progress count
- Current state:
src/pages/semester-management/semester-hub/setup-checklist-tab.tsx~lines 223-255 — no N/A checkbox - Gap: Add N/A toggle per checklist item
- Completed: 2026-03-12 (Batch 4). Added naItems Set state and Checkbox per item. N/A items grayed out and excluded from progress count.
14.2 Missing "Add Note" per item — DONE
- Screen: Semester Hub > Setup Checklist
- Spec:
04-semester-management.mdSection 3.6, Actions - What the spec requires: Note icon per item, inline text input, saved note appears as small gray text below item
- Current state: Same file — no note icon or note text anywhere
- Gap: Add note icon and inline note display per checklist item
- Completed: 2026-03-12 (Batch 4). Added StickyNoteIcon button per item with inline Input. Saved notes appear as small gray text below item.
14.3 Missing expandable inline content preview for configured items — DONE
- Screen: Semester Hub > Setup Checklist
- Spec:
04-semester-management.mdSection 3.6, Inline Content Preview - What the spec requires: Configured items expand to show first 3 items + "View all X items" link
- Current state: Same file — configured items show count text and "Configure" link only
- Gap: Add expandable preview showing first 3 configured items
- Completed: 2026-03-12 (Batch 4). Added previewItems to checklist data. Configured items show Collapsible with first 3 items and "View all X items" link.
14.4 Missing amber left border on unconfigured items — DONE
- Screen: Semester Hub > Setup Checklist
- Spec:
04-semester-management.mdSection 3.6, States - What the spec requires: Unconfigured items have subtle amber left border
- Current state: Same file — amber circle icon and text present, but no left border
- Gap: Add
border-l-2 border-amber-400(or similar) to unconfigured items - Completed: 2026-03-12 (Batch 4). Added border-l-2 border-amber-400 to unconfigured non-N/A items.
15. Semester Hub — Enrollment Tab
15.1 Missing "Submission Progress" column with progress bar — DONE
- Screen: Semester Hub > Enrollment
- Spec:
04-semester-management.mdSection 3.7 - What the spec requires: "Submission Progress" shown as "X/Y" with mini progress bar
- Current state:
src/pages/semester-management/semester-hub/enrollment-tab.tsx~lines 119-134 — shows raw Submissions count only - Gap: Change to X/Y format with a small progress bar element
- Completed: 2026-03-12 (Batch 4). Changed to X/12 format with mini progress bar (bg-primary fill, bg-muted background).
15.2 Missing core enrollment toggle in Enroll Student modal — DONE
- Screen: Semester Hub > Enrollment
- Spec:
04-semester-management.mdSection 3.7, Actions - What the spec requires: Enroll Student modal includes "Optional: Core enrollment toggle"
- Current state: Same file ~lines 334-361 — has Student and Level only
- Gap: Add Is Core Enrollment toggle to the dialog
- Completed: 2026-03-12 (Batch 4). Added Switch component for Is Core Enrollment in Enroll Student dialog.
15.3 Missing "Assign TA" bulk action — DONE
- Screen: Semester Hub > Enrollment
- Spec:
04-semester-management.mdSection 3.7, Actions - What the spec requires: Checkbox selection + "Assign TA" button in bulk action bar
- Current state: Same file — checkboxes exist but no Assign TA button appears
- Gap: Add Assign TA bulk action button when rows are selected
- Completed: 2026-03-12 (Batch 4). Added "Assign TA" button in DataTable bulk action bar with Dialog and TA Select dropdown from teachers data.
16. Semester Hub — Close Workflow (Major)
The Close Workflow has the most significant deviations. Steps 3, 4, and 5 are placeholder summaries rather than the full per-student data tables the spec requires. Read
04-semester-management.mdSection 3.8 carefully before working on these.
16.1 Step 1: Missing filter bar — DONE
- Screen: Semester Hub > Close Workflow > Step 1
- Spec:
04-semester-management.mdSection 3.8, Step 1 - What the spec requires: Filter bar with Level, Meets Criteria, and EOC Result dropdowns
- Current state:
src/pages/semester-management/semester-hub/close-workflow-tab.tsx~lines 200-287 — raw table with no filter bar - Gap: Add FilterBar with the three specified dropdowns
- Completed: 2026-03-12 (Batch 3). Added 3 Select dropdowns (Level, Meets Criteria, EOC Result) with filteredEocStudents memo.
16.2 Step 1: Missing Override button and reason field — DONE
- Screen: Semester Hub > Close Workflow > Step 1
- Spec:
04-semester-management.mdSection 3.8, Step 1 Actions - What the spec requires: "Override" button per row with inline form (Pass/Fail dropdown + Reason text field)
- Current state: Same file — only a Pass/Fail dropdown, no Override button or reason field
- Gap: Add Override button per row with inline form
- Completed: 2026-03-12 (Batch 3). Added Override button per row toggling inline form with Pass/Fail dropdown and required reason field.
16.3 Step 1: meetsCriteria computation incomplete — DONE
- Screen: Semester Hub > Close Workflow > Step 1
- Spec:
04-semester-management.mdSection 3.8 - What the spec requires: Meets Criteria = submissions >= 12 AND final grade >= 3.5
- Current state: Same file ~line 169 — only checks
submissionCount >= 12, ignores grade - Gap: Add grade threshold check to meetsCriteria logic
- Completed: 2026-03-12 (Batch 3). Fixed to
submissionCount >= 12 && finalGrade >= 3.5.
16.4 Step 2: Missing filter bar and "Mark All as Leaving" button — DONE
- Screen: Semester Hub > Close Workflow > Step 2
- Spec:
04-semester-management.mdSection 3.8, Step 2 - What the spec requires: Filter bar (Level, Decision, Subscription). Both "Mark All Continuing" AND "Mark All Leaving" buttons. "Leave Reason" column with inline text field.
- Current state: Same file ~lines 364-496 — no filter bar, only "Mark All Continuing" button, no Leave Reason column
- Gap: Add filter bar, "Mark All as Leaving" button, and Leave Reason column
- Completed: 2026-03-12 (Batch 3). Added 3 filter dropdowns, "Mark All as Leaving" button, and Leave Reason column with inline Input.
16.5 Step 3: Needs full per-student data table — DONE
- Screen: Semester Hub > Close Workflow > Step 3
- Spec:
04-semester-management.mdSection 3.8, Step 3 - What the spec requires: Per-student table with columns (Student Name, Current Plan, Subscription Status, Action Needed, Family Plan?, Scholarship?, Payment Action) and per-row actions (Create, Handle, Skip)
- Current state: Same file ~lines 499-551 — summary card with 3 numbers and a single button
- Gap: Replace summary placeholder with full DataTable per spec
- Completed: 2026-03-12 (Batch 1B). Replaced placeholder with full per-student DataTable with all 7 spec columns. Added per-row Create/Handle/Skip buttons, bulk "Create Subscriptions for All", Skip dialog with reason field. Mark Step Complete blocked when Pending remain.
16.6 Step 4: Needs full per-student data table — DONE
- Screen: Semester Hub > Close Workflow > Step 4
- Spec:
04-semester-management.mdSection 3.8, Step 4 - What the spec requires: Per-student table with columns (Student Name, Has Active Subscription?, Account Status, Action, Handled?) and per-row actions (Cancel & Deactivate, Deactivate Only, Already Handled)
- Current state: Same file ~lines 554-606 — summary card with 3 numbers and a single button
- Gap: Replace summary placeholder with full DataTable per spec
- Completed: 2026-03-12 (Batch 1B). Replaced placeholder with full DataTable with all 5 spec columns. Added Cancel & Deactivate (destructive confirm), Deactivate Only, Already Handled checkbox, bulk "Deactivate All Leavers". Mark Step Complete blocked until all handled.
16.7 Step 5: Missing 5 metrics and Exception Details section — DONE
- Screen: Semester Hub > Close Workflow > Step 5
- Spec:
04-semester-management.mdSection 3.8, Step 5 - What the spec requires: 9 metrics total: Total Students Reviewed, Passed, Promoted (Continuing), Leaving, Failed, Subscriptions Created/Renewed, Accounts Deactivated, Subscriptions Cancelled, Exceptions/Skipped. Plus "Exception Details" expandable section.
- Current state: Same file ~lines 608-674 — only 4 metrics (Total, Passed, Promoted, Deactivated)
- Gap: Add the 5 missing metrics and the Exception Details section
- Completed: 2026-03-12 (Batch 1B). Expanded to all 9 metrics. Added expandable Exception Details section with table (Student Name, Step, Reason, Resolution) and 2 mock entries.
16.8 Gate override missing confirmation modal and badge — DONE
- Screen: Semester Hub > Close Workflow
- Spec:
04-semester-management.mdSection 3.8, Gate Override - What the spec requires: Override requires confirmation modal with "Reason for override" (required text field). Persistent orange "Overridden" badge on step title.
- Current state: Same file ~lines 753-756 — just shows toast and opens step
- Gap: Add confirmation modal with reason field, and "Overridden" badge
- Completed: 2026-03-12 (Batch 1B). Replaced toast-only override with Dialog requiring "Reason for override" text field. Orange "Overridden" badge persists next to step title. Overridden steps tracked in Set state.
16.9 Missing phase check and completed state details — DONE
- Screen: Semester Hub > Close Workflow
- Spec:
04-semester-management.mdSection 3.8, States - What the spec requires: If semester is in Setup/Active phase, show informational message. Completed state shows "completed on [date] by [admin name]" and renders steps in read-only mode.
- Current state: Same file — always shows stepper regardless of phase. Completed message has no date/name.
- Gap: Add phase check with info message, and add date/admin to completed state
- Completed: 2026-03-12 (Batch 1B). Added informational Alert when semester not in close phase. Updated completed state to show "Semester close completed on Mar 10, 2026 by Admin User". Steps read-only when complete.
17. Welcome Package
17.1 Missing Edit action on rows — DONE
- Screen: Welcome Package
- Spec:
04-semester-management.mdSection 4.5 - What the spec requires: Edit icon per row opening pre-filled edit modal
- Current state:
src/pages/semester-management/welcome-package.tsx~lines 132-171 — only Delete button - Gap: Add Edit icon and edit modal per row
- Completed: 2026-03-12 (Batch 4). Added Edit icon button per row opening EditResourceDialog with pre-filled name, description, file type fields.
17.2 Upload dialog should have file picker, not file type dropdown — DONE
- Screen: Welcome Package
- Spec:
04-semester-management.mdSection 4.5 - What the spec requires: "File (file picker — accepts PDF, DOC, DOCX, PNG, JPG, MP4)"
- Current state: Same file ~lines 276-326 — has a File Type dropdown instead of a file input
- Gap: Replace File Type dropdown with a file input element (can be non-functional for mockup)
- Completed: 2026-03-12 (Batch 4). Replaced File Type dropdown with file input accepting .pdf,.doc,.docx,.png,.jpg,.mp4.
18. Email Management (Major) — ALL 5 TASKS DONE
This screen has the most deviations in the Semester Management section. The current implementation is essentially a plain list of template names — it's missing the key data that makes email management useful (triggers, dates, editing capability).
18.1 Missing "Trigger" column (shows "Category" instead) — DONE
- Screen: Email Management
- Spec:
04-semester-management.mdSection 5.4 - What the spec requires: "Trigger" column showing when the email fires: "On registration", "Week 1 start", "Semester end", "On promotion", etc.
- Current state:
src/pages/semester-management/email-management.tsx~line 73 — shows "Category" (e.g., "Registration", "Follow-up") which is a grouping, not a trigger/event - Gap: Replace or supplement Category with a Trigger column showing the actual event/condition
- Completed: 2026-03-12 (Batch 1A). Replaced Category column with sortable Trigger column. Updated EmailTemplate type: replaced
category: EmailCategorywithtrigger: EmailTrigger. Added realistic trigger values to all 12+ templates.
18.2 Missing "Last Edited" column — DONE
- Screen: Email Management
- Spec:
04-semester-management.mdSection 5.4 - What the spec requires: "Last Edited" column with formatted date
- Current state: Same file — no Last Edited column
- Gap: Add Last Edited date column
- Completed: 2026-03-12 (Batch 1A). Added sortable "Last Edited" column formatted as "Mar 10, 2026". Added
lastEditedfield to EmailTemplate type and all mock data records.
18.3 Missing row actions: Edit, Delete, Preview, Test Send — DONE
- Screen: Email Management
- Spec:
04-semester-management.mdSection 5.5 - What the spec requires: Edit icon (opens pre-filled modal), Delete icon (destructive confirm), Preview (eye icon), Test Send button
- Current state: Same file ~lines 33-80 — no action icons on rows at all
- Gap: Add Edit, Delete, Preview, and Test Send action icons/buttons per row
- Completed: 2026-03-12 (Batch 1A). Added actions column with Edit (pencil icon, toast), Preview (eye icon, opens preview dialog with rendered template + Test Send button), Delete (trash icon, ConfirmDialog with destructive messaging per spec).
18.4 Create Template modal missing fields — DONE
- Screen: Email Management
- Spec:
04-semester-management.mdSection 5.5 - What the spec requires: Create form includes: Trigger dropdown (On Registration / Week Start / Semester End / On Promotion / On Failure / Custom Date), Body (rich text editor with template variables), Status (Active/Draft toggle)
- Current state: Same file ~lines 168-226 — only has Template Name, Subject, Category
- Gap: Add Trigger dropdown, Body editor (can be a textarea for mockup), and Active/Draft toggle
- Completed: 2026-03-12 (Batch 1A). Replaced Category dropdown with Trigger dropdown. Added Body textarea with template variable hints. Added Active/Draft toggle via Switch component.
18.5 Semester filter not wired up — DONE
- Screen: Email Management
- Spec:
04-semester-management.mdSection 5.3 - What the spec requires: Table should filter by selected semester
- Current state: Same file — semester selector is present but
data={emailTemplates}is passed unfiltered - Gap: Wire up semester filtering on the table data
- Completed: 2026-03-12 (Batch 1A). Added "All Semesters" option, data filtered by selectedSemesterId. Semester column appears only when "All Semesters" selected. Added
semesterIdfield to all email template records.
19. Tags
19.1 Missing Edit action on rows — DONE
- Screen: Tags
- Spec:
04-semester-management.mdSection 6.5 - What the spec requires: Edit icon per row, opens modal pre-filled with tag name
- Current state:
src/pages/semester-management/tags.tsx~lines 121-155 — only Delete button - Gap: Add Edit icon and edit modal per row
- Completed: 2026-03-12 (Batch 4). Added PencilIcon edit button per row opening EditTagDialog with pre-filled tag name.
20. Content — Recordings
20.1 Missing Level filter — DONE
- Screen: Recordings
- Spec:
05-content.mdSection 4.5 (Existing Capabilities) - What the spec requires: Filter by level and type
- Current state:
src/pages/content/recordings.tsx~lines 101-107 — only Semester filter - Gap: Add Level filter to the filter bar
- Completed: 2026-03-12 (Batch 4). Added Level filter to filterConfigs with all 6 options and wired up filtering logic.
20.2 "Invalid Date" bug in last row — DONE
- Screen: Recordings
- Spec: N/A (data bug)
- What the spec requires: Valid dates for all rows
- Current state:
src/pages/content/recordings.tsx+src/data/recordings.ts— last record has an invalid date string - Gap: Fix the mock data to use a valid date for the last recording
- Completed: 2026-03-12 (Batch 4). Fixed date generation formula that produced invalid Feb 30/32 dates. Used explicit date arrays rolling into March.
20.3 Return to Checklist banner missing semester name — DONE
- Screen: Recordings (also Tutorials, MCQ Questions)
- Spec:
05-content.mdSection 8.3 - What the spec requires: Banner says "Return to Setup Checklist for [Semester Name]"
- Current state:
src/pages/content/recordings.tsx~line 188 — says "Return to Setup Checklist" without semester name. Same issue intutorials.tsx~line 185 andmcq-questions.tsx~line 192 - Gap: Include semester name in the return banner text across all three files
- Completed: 2026-03-12 (Batch 4). Updated all 3 files to show "Return to Setup Checklist for [Semester Name]" by resolving semester from URL params.
21. Calendar View
21.1 Missing click-to-create-appointment on empty slots — DONE
- Screen: Calendar View
- Spec:
06-scheduling.mdSection 2.6 - What the spec requires: Click empty TA slot -> opens create appointment modal
- Current state:
src/pages/scheduling/calendar-view.tsx~lines 346-364 — empty slots have no onClick - Gap: Add onClick to empty calendar slots that opens a create appointment dialog
- Completed: 2026-03-12 (Batch 2). Added onClick to empty slots that opens a create appointment Dialog with Student, Date, Time, and TA fields.
21.2 Missing event detail modal on click — DONE
- Screen: Calendar View
- Spec:
06-scheduling.mdSection 2.6 - What the spec requires: Click existing event -> opens event detail modal
- Current state: Same file ~line 467 — has
cursor-pointerbut no onClick handler - Gap: Add onClick to event blocks that opens a view/edit detail modal
- Completed: 2026-03-12 (Batch 2). Added onClick to EventBlock that opens a detail Dialog showing Type, Date/Time, TA, Student, Level, and Status fields.
22. Live Sessions
22.1 Missing Edit and Delete row actions — DONE
- Screen: Live Sessions
- Spec:
06-scheduling.mdSection 3.7 - What the spec requires: All existing CRUD preserved — edit and delete per row
- Current state:
src/pages/scheduling/live-sessions.tsx— no row actions column, only Create Session header button - Gap: Add Edit and Delete action icons to each table row
- Completed: 2026-03-12 (Batch 2). Added actions column with DropdownMenu containing Edit (pencil icon, shows toast) and Delete (trash icon, destructive style, shows toast).
23. Upcoming Appointments
23.1 "Rescheduled To" column should not be sortable — DONE
- Screen: Upcoming Appointments
- Spec:
06-scheduling.mdSection 4.4 - What the spec requires: Rescheduled To — Sortable: No
- Current state:
src/pages/scheduling/appointments.tsx~lines 113-145 — has sort toggle - Gap: Add
enableSorting: falseto the Rescheduled To column definition - Completed: 2026-03-12 (Batch 2). Set
enableSorting: falseon the Rescheduled To column and replaced sortable header with plain text header.
23.2 Missing "View in Calendar" link per row — DONE
- Screen: Upcoming Appointments
- Spec:
06-scheduling.mdSection 4.6 - What the spec requires: "Calendar" link per row navigating to Calendar View filtered to that TA/date
- Current state: Same file — no calendar link exists
- Gap: Add a "Calendar" link/icon to each row
- Completed: 2026-03-12 (Batch 2). Added CalendarIcon column that links to
/scheduling/calendar?date=...for each row.
23.3 Create buttons should open modals, not just fire toasts — DONE
- Screen: Upcoming Appointments
- Spec:
06-scheduling.mdSection 4.6 - What the spec requires: "Create Group Appointment" modal (select group, date, TA); "Create Individual Appointment" modal (search student, date, TA)
- Current state: Same file ~lines 249-264 — both buttons just fire
toast.success()directly - Gap: Add dialog modals with the specified form fields for both create actions
- Completed: 2026-03-12 (Batch 2). Replaced both toast-only buttons with full Dialog modals. Individual: Student search, Date, Time, TA dropdown. Group: Group select, Date, Time, TA dropdown.
24. TA Schedules
24.1 Shows global holidays instead of TA-specific holidays — DONE
- Screen: TA Schedules
- Spec:
06-scheduling.mdSection 5.4 - What the spec requires: "TA Holidays: Personal holidays for this TA"
- Current state:
src/pages/scheduling/ta-schedules.tsx~lines 252-268 — imports and displays the globalholidaysarray - Gap: Should show TA-specific personal holidays (add per-TA holiday data to mock, or filter appropriately)
- Completed: 2026-03-12 (Batch 2). Added
taPersonalHolidaysmock data (per-TA record). Replaced global holidays import with TA-specific holidays. Section renamed to "Personal Holidays".
24.2 Timezone should be editable, not display-only — DONE
- Screen: TA Schedules
- Spec:
06-scheduling.mdSection 5.6 - What the spec requires: "Set Timezone: Timezone dropdown"
- Current state: Same file ~lines 142-146 — timezone shown as read-only text
- Gap: Make timezone a selectable dropdown (can just show toast on change for mockup)
- Completed: 2026-03-12 (Batch 2). Replaced static text with Select dropdown of 10 IANA timezone options. Shows toast on change.
25. Teacher Detail — Schedule Tab
25.1 Missing Personal Holidays section — DONE
- Screen: Teacher Detail > Schedule
- Spec:
07-teacher-management.mdSection 3.5 - What the spec requires: "Personal Holidays: TA-specific holidays" displayed
- Current state:
src/pages/teacher-management/teacher-detail/schedule-tab.tsx— no holidays section - Gap: Add a Personal Holidays card/section showing TA-specific holidays
- Completed: 2026-03-12 (Batch 4). Added Personal Holidays card with per-TA mock data showing holiday name and date.
26. Teacher Detail — Students & Groups Tab
26.1 Missing "Create Group" button — DONE
- Screen: Teacher Detail > Students & Groups
- Spec:
07-teacher-management.mdSection 3.6 - What the spec requires: "Create Group (Admin) — creates group assigned to this TA"
- Current state:
src/pages/teacher-management/teacher-detail/students-groups-tab.tsx— no Create Group button - Gap: Add Create Group button in the Groups section header
- Completed: 2026-03-12 (Batch 4). Added "Create Group" button in Groups header opening dialog with group name input.
26.2 Missing "Manage Group Members" action — DONE
- Screen: Teacher Detail > Students & Groups
- Spec:
07-teacher-management.mdSection 3.6 - What the spec requires: "Manage Group Members (Admin)" action available per group
- Current state: Same file — no such action exists
- Gap: Add Manage Members action per group row (icon or button)
- Completed: 2026-03-12 (Batch 4). Added UsersIcon ghost button per group row showing toast.
27. Teacher Detail — Performance Tab
27.1 "Reviews This Semester" and "Reviews Total" show same value — DONE
- Screen: Teacher Detail > Performance
- Spec:
07-teacher-management.mdSection 3.7 - What the spec requires: "Reviews This Semester" = current semester count; "Reviews Total" = all-time count (different numbers)
- Current state:
src/pages/teacher-management/teacher-detail/performance-tab.tsx~lines 63-64 — both usemetrics.reviewed - Gap: Add distinct mock values for semester vs. all-time review counts
- Completed: 2026-03-12 (Batch 4). Changed "Reviews Total" to
metrics.reviewed * 3 + 42for a distinct larger value.
28. Student Groups
28.1 "Protected" should be its own column, not an icon in Group Name — DONE
- Screen: Student Groups
- Spec:
07-teacher-management.mdSection 6.3 - What the spec requires: Dedicated "Protected" column
- Current state:
src/pages/teacher-management/student-groups.tsx~lines 54-56 — lock icon inside Group Name column - Gap: Move Protected indicator to its own column (e.g., Yes/No badge or lock icon in dedicated column)
- Completed: 2026-03-12 (Batch 4). Moved lock icon from Group Name to dedicated "Protected" column with Yes Badge / No text.
Summary by priority
High priority (significantly off-spec, structurally incomplete)
18.x Email Management (5 tasks)— ALL 5 DONE (Batch 1A, 2026-03-12)16.5-16.9 Close Workflow Steps 3-5 + gate + phase (5 tasks)— ALL 5 DONE (Batch 1B, 2026-03-12)6.x Payments Tab (5 tasks)— ALL 5 DONE (Batch 1C, 2026-03-12)
Medium priority (missing columns, filters, or action buttons)
1.1 Dashboard alert tile borders/icons— DONE2.1-2.3 Students list filter/actions— ALL DONE (Batch 3)3.1-3.3 Student Detail header— ALL DONE4.1-4.4 Profile tab fields— ALL DONE5.1-5.2 Submissions tab columns/actions— ALL DONE (Batch 4)7.1 Appointments tab actions— DONE (Batch 4)8.1-8.2 Semester History tab— ALL DONE (Batch 4)13.x-15.x Semester Hub Overview/Checklist/Enrollment— ALL DONE (Batches 3-4)16.1-16.4 Close Workflow Steps 1-2— ALL DONE (Batch 3)21.x-24.x Scheduling screens— ALL DONE
Lower priority (minor polish, badges, labels)
1.2-1.4 Dashboard labels and stats— ALL DONE- 1.5 Acceptable deviation (global search deferred)
9.x Actions tab extras— ALL DONE (Batch 4)10.x-12.x Submissions/Promoted/Failed page extras— ALL DONE (Batches 3-4)17.x, 19.x Welcome Package/Tags edit buttons— ALL DONE (Batch 4)20.x Content screen minor fixes— ALL DONE (Batch 4)25.x-28.x Teacher Management detail fixes— ALL DONE (Batch 4)
Batch 5: Post-Completion Audit
Generated from a 4-loop automated review (completeness, cross-reference consistency, workflow walkthrough, mockup-readiness) run against the admin-spec, then verified against the built mockup code. Focuses on gaps that remain after the initial 70-task implementation pass.
Audit methodology: Each gap was identified by the spec audit, then verified by reading the actual implementation file. Items already resolved by the implementation (even if the spec audit flagged them) are marked ALREADY DONE.
Reminder: This is a front-end mockup. Actions should show toasts, modals can open without persisting data. The goal is to demonstrate the correct UI elements, not build working functionality.
Batch 5A: Cross-Cutting Structural Gaps (8 tasks)
These affect multiple screens and should be fixed first since they establish patterns reused everywhere.
5A.1 DataTable: add loading state support
- Screen: All screens using DataTable (30+ screens)
- Spec:
01-global-patterns.mdSection 4.1 + 4.9 - What the spec requires: Section 4.9 states: "Initial page load: Skeleton screen (gray blocks matching layout)" and "Data refresh: Inline spinner next to the data section being refreshed." Section 4.1 (Data Table standard layout) implies every data table view cycles through loading → loaded → error states.
- Current state:
src/components/shared/data-table.tsxlines 33-41 —DataTablePropsinterface hascolumns,data,onRowClick,emptyMessage,emptyDescription,pageSize,bulkActions. NoisLoadingprop exists. Since all screens use static mock data imported synchronously, no async lifecycle triggers loading. - Gap: Add
isLoading?: booleanprop to DataTable
Loading state rendering specification (when isLoading is true):
| Element | Behavior |
|---|---|
| Table header row | Rendered normally — column headers visible so user sees structure during load |
| Table body | Replace data rows with 5 skeleton rows |
| Each skeleton cell | shadcn Skeleton component (import { Skeleton } from "@/components/ui/skeleton"), h-4 rounded, width varies by column index (first column: w-3/4, middle columns: w-1/2, last column: w-1/3) to create visual variety |
| Row height | Match normal row height (h-12 or py-3) |
| Animation | Skeleton's built-in pulse animation (shadcn default) |
| Pagination | Hidden — table.getPageCount() === 0 when loading |
| Filter bar | Remains visible and interactive — user can set filters before data arrives |
| Bulk selection | Disabled — checkbox column shows disabled skeleton |
| Empty state | Suppressed — never show empty state while loading |
Usage pattern (optional, for demonstrating on 1-2 key screens like Students List):
const [isLoading, setIsLoading] = useState(true)
useEffect(() => { const t = setTimeout(() => setIsLoading(false), 800); return () => clearTimeout(t) }, [])
Props to add to DataTableProps:
isLoading?: boolean // Shows skeleton rows instead of data
5A.2 DataTable: add error state support
- Screen: All screens using DataTable (30+ screens)
- Spec:
01-global-patterns.mdSection 4.9 - What the spec requires: Error states display inline error message with retry capability. Spec states: "Action processing: Button shows loading spinner, disabled until complete" and for Stripe data: "Shows 'Loading billing data...' with spinner; if slow (>3s), shows 'Fetching from Stripe...'" For general errors,
03-student-management.mdSection 3.4 specifies: "Each tab shows an inline error message with a 'Retry' button if its data fails to load." - Current state:
src/components/shared/data-table.tsx— no error handling props. If data fetch failed in production, the table would render with an empty array and show theemptyMessage, which is misleading (empty ≠ error). - Gap: Add
isError,errorMessage,onRetryprops to DataTable
Error state rendering specification (when isError is true):
| Element | Behavior |
|---|---|
| Layout | Centered vertically within the table body area (replaces all rows) |
| Icon | AlertTriangle from lucide-react, size-12, text-muted-foreground |
| Primary message | errorMessage prop value, or default: "Unable to load data. Please try again." |
| Secondary message (Stripe variant) | When errorMessage contains "Stripe": add "Showing cached data from local database." in text-muted-foreground text-sm below primary message |
| Retry button | <Button variant="outline" size="sm"> with RotateCcw icon + "Retry" text. Calls onRetry() on click. Hidden if onRetry prop not provided. |
| Table header | Still rendered (provides structural context even on error) |
| Pagination | Hidden |
| Filter bar | Remains visible (user may want to adjust filters before retry) |
| Minimum height | min-h-[200px] so the error state doesn't collapse to nothing |
Props to add to DataTableProps:
isError?: boolean // Shows error state instead of data
errorMessage?: string // Custom error message (default: "Unable to load data. Please try again.")
onRetry?: () => void // Called when Retry button clicked. If omitted, Retry button hidden.
Stripe-specific variant (for Student Detail Payments Tab payments-tab.tsx):
The Payments tab has its own error handling (lines 132-137 show an Alert variant="destructive" for "no subscription found"). The DataTable error state is for the payment history sub-table specifically. Confirmation text per spec 03-student-management.md Section 3.7:
- State "Stripe API error": Warning banner "Unable to load billing data from Stripe. Showing cached data." with yellow background + Retry button.
- State "Partial failure": Subscription section loads normally, payment history section shows "Payment history unavailable" in place of the table.
5A.3 Content screens: add edit modals (6 screens)
- Screen: Video Lessons, Resources, Recordings, Tutorials, MCQ Questions, Quizzes
- Spec:
05-content.mdSections 2-7 — all 6 screens list "Edit" as an existing capability under "Existing Capabilities (preserved)" - What the spec requires: Every content screen preserves the ability to edit existing content items. Per spec Section 2.4: "Edit [content type]" with trigger "Edit icon on row" and behavior "Opens edit modal/form pre-filled with existing data. On save: updates record. Toast: '[Name] updated.'"
- Current state: All 6 screens have Create dialogs but no Edit capability:
src/pages/content/video-lessons.tsx— no edit actionsrc/pages/content/resources.tsx— no edit actionsrc/pages/content/recordings.tsx— no edit actionsrc/pages/content/tutorials.tsx— no edit actionsrc/pages/content/mcq-questions.tsx— no edit actionsrc/pages/content/quizzes.tsx— no edit action
- Gap: Add edit modal to all 6 content screens
Implementation pattern (same for all 6 — refactor each screen's existing create dialog):
| Aspect | Create Mode (current) | Edit Mode (to add) |
|---|---|---|
| Dialog title | "Add [Content Type]" | "Edit [Content Type]" |
| Submit button text | "Add" or "Create" | "Save Changes" |
| Form fields | Empty defaults | Pre-filled from selected row data |
| Toast on submit | "[Name] created successfully" | "[Name] updated successfully" |
| Trigger | Header button "Add [Type]" | PencilIcon button in row actions column |
Row action column (add to each screen's columns array):
| Element | Detail |
|---|---|
| Column position | Rightmost, after existing columns |
| Column header | Empty string (no header text) |
| Width | Fixed w-[80px] |
| Edit trigger | <Button variant="ghost" size="icon"> with <PencilIcon className="size-4" /> |
| On click | setEditData(row.original) + open dialog |
| Delete trigger | Existing delete action if present, or add <TrashIcon> with ConfirmDialog |
State to add per screen:
const [editData, setEditData] = useState<ContentType | null>(null)
// Pass to dialog: editData={editData}, onOpenChange={open => { if (!open) setEditData(null) }}
Per-screen edit modal field tables — these are the fields each edit modal should pre-fill:
Video Lessons:
| Field | Type | Source for Pre-fill | Editable | Notes |
|---|---|---|---|---|
| Title | Text input | lesson.title |
Yes | Required |
| Semester | Select (from semesters data) |
lesson.semester |
Yes | NEW field — missing from create modal too (see 5A.7) |
| Level | Select (Level 0-4, Year 2) | lesson.level |
Yes | NEW field — missing from create modal too (see 5A.7) |
| Week | Number input | lesson.week |
Yes | Required |
| Video Count | Number input | lesson.videoCount |
Yes | Required |
| Duration | Text input | lesson.duration |
Yes | Format: "45 min" |
Resources:
| Field | Type | Source for Pre-fill | Editable |
|---|---|---|---|
| Title | Text input | resource.title |
Yes |
| Level | Select | resource.level |
Yes |
| Semester | Select | resource.semester |
Yes |
| File | File picker or text | resource.fileName |
Yes |
Recordings:
| Field | Type | Source for Pre-fill | Editable |
|---|---|---|---|
| Title | Text input | recording.title |
Yes |
| Semester | Select | recording.semester |
Yes |
| Session Date | Date picker | recording.sessionDate |
Yes |
| Duration | Text input | recording.duration |
Yes |
| Video URL | Text input (URL) | recording.videoUrl |
Yes |
Tutorials:
| Field | Type | Source for Pre-fill | Editable |
|---|---|---|---|
| Title | Text input | tutorial.title |
Yes |
| Level | Select | tutorial.level |
Yes |
| Semester | Select | tutorial.semester |
Yes |
| Pages | Number input | tutorial.pages |
Yes |
MCQ Questions:
| Field | Type | Source for Pre-fill | Editable |
|---|---|---|---|
| Question | Textarea | question.question |
Yes |
| Level | Select | question.level |
Yes |
| Semester | Select | question.semester |
Yes |
| Options | Number input | question.options |
Yes |
| Correct Option | Number input | question.correctOption |
Yes |
Quizzes:
| Field | Type | Source for Pre-fill | Editable | Notes |
|---|---|---|---|---|
| Title | Text input | quiz.title |
Yes | |
| Semester | Select | quiz.semester |
Yes | NEW field — missing from create modal too (see 5A.8) |
| Level | Select | quiz.level |
Yes | NEW field — missing from create modal too (see 5A.8) |
| Week | Number input | quiz.week |
Yes | |
| Question Count | Number input | quiz.questions |
Yes |
5A.4 Scheduling: add destructive confirmation dialogs (3 screens)
- Screen: Upcoming Appointments (cancel), Live Sessions (delete), Holidays (remove)
- Spec:
06-scheduling.md— Section 4.5 (Appointments): "Cancel Appointment: Cancel icon on row, Admin, Destructive: 'Cancel this appointment on [date] with [TA name]?'"; Section 3.5 (Live Sessions): destructive confirmation for delete; Section 6.5 (Holidays): destructive confirmation for remove - What the spec requires: All three use destructive confirmation dialogs from
01-global-patterns.mdSection 4.6: "Title: action-specific, Body: warning text explaining consequences in red, Buttons: Cancel (left, secondary) | [Action Name] (right, red/destructive)" - Current state:
src/pages/scheduling/upcoming-appointments.tsx— Cancel button firestoast.success()directly with no confirmationsrc/pages/scheduling/live-sessions.tsxline 195 — Delete in dropdown firestoast.success()directlysrc/pages/scheduling/holidays.tsx— TrashIcon firestoast.success()directly
- Gap: Wrap all three in
ConfirmDialog(already exists atsrc/components/shared/confirm-dialog.tsx)
Per-screen confirmation dialog specification:
Upcoming Appointments — Cancel:
| Element | Value |
|---|---|
| Trigger | XCircleIcon button on appointment row |
| Dialog variant | Destructive |
| Title | "Cancel Appointment?" |
| Description | "Cancel the appointment on {formatDate(appointment.dateTime)} with {appointment.taName}? The student will be notified." |
| Confirm button | "Cancel Appointment" (red) |
| Cancel button | "Keep" |
| On confirm toast | "Appointment cancelled successfully" |
| State needed | `const [cancelTarget, setCancelTarget] = useState<Appointment |
Live Sessions — Delete:
| Element | Value |
|---|---|
| Trigger | "Delete" item in DropdownMenu on session row (line 195) |
| Dialog variant | Destructive |
| Title | "Delete Session?" |
| Description | "Delete '{session.title}'? Students will no longer see this session on their schedule." |
| Confirm button | "Delete Session" (red) |
| Cancel button | "Keep" |
| On confirm toast | "Session '{session.title}' deleted" |
| State needed | `const [deleteTarget, setDeleteTarget] = useState<LiveSession |
Holidays — Remove:
| Element | Value |
|---|---|
| Trigger | TrashIcon button on holiday row |
| Dialog variant | Destructive |
| Title | "Delete Holiday?" |
| Description | "Delete '{holiday.name}' ({formatDate(holiday.date)})? All affected sessions will resume their normal schedule." |
| Confirm button | "Delete Holiday" (red) |
| Cancel button | "Keep" |
| On confirm toast | "Holiday '{holiday.name}' deleted" |
| State needed | `const [deleteTarget, setDeleteTarget] = useState<Holiday |
5A.5 Live Sessions: add edit modal
- Screen: Live Sessions
- Spec:
06-scheduling.mdSection 3.5 — "Edit session details" listed as existing capability to preserve - What the spec requires: Edit action opens modal pre-filled with session data
- Current state:
src/pages/scheduling/live-sessions.tsxline 187 — "Edit" item in dropdown menu firestoast.info("Edit session: ${row.original.title}")stub - Gap: Replace toast stub with actual edit dialog
Edit modal field table:
| Field | Type | Pre-fill Source | Editable | Required |
|---|---|---|---|---|
| Session Title | Text input | session.title |
Yes | Yes |
| Date | Date picker | session.date |
Yes | Yes |
| Time | Time input | session.time |
Yes | Yes |
| Zoom Link | Text input (URL) | session.zoomLink |
Yes | No |
| Level | Select | session.level |
No (display only) | — |
Approach: Refactor existing CreateSessionDialog to accept optional editSession prop. When provided: title changes to "Edit Session", button to "Save Changes", fields pre-filled. State: const [editSession, setEditSession] = useState<LiveSession | null>(null).
5A.6 Holidays: add edit modal
- Screen: Holidays
- Spec:
06-scheduling.mdSection 6.5 — "Edit" listed as existing capability - What the spec requires: Edit holiday opens modal pre-filled
- Current state:
src/pages/scheduling/holidays.tsx—PencilIconbutton firestoast.info()stub - Gap: Replace toast stub with actual edit dialog
Edit modal field table:
| Field | Type | Pre-fill Source | Editable | Required |
|---|---|---|---|---|
| Holiday Name | Text input | holiday.name |
Yes | Yes |
| Date | Date picker | holiday.date |
Yes | Yes |
| Type | Select (System-wide / Live Sessions only / Appointments only) | holiday.type |
Yes | Yes |
Approach: Refactor existing Add Holiday dialog to accept optional editHoliday prop. Same pattern as 5A.5.
5A.7 Video Lessons create modal: add semester/level fields
- Screen: Video Lessons
- Spec:
05-content.mdSection 2 — "All content is scoped to a semester" (business rule #6 from01-global-patterns.mdSection 7). Content screens show Semester + Level filter bars, implying content items belong to a semester and level. - What the spec requires: Content creation associates the item with a semester and level
- Current state:
src/pages/content/video-lessons.tsx— Create modal has Title, Week, Video Count, Duration. No Semester or Level selectors. Compare withsrc/pages/content/resources.tsxwhich correctly includes Level and Semester selectors in its create dialog. - Gap: Add Semester and Level dropdowns to create modal, matching the Resources pattern
Fields to add (insert after Title field in the dialog form):
| Field | Type | Options | Default | Required |
|---|---|---|---|---|
| Semester | Select | Populated from semesters data array, showing semester.name |
Current/active semester (first with isCurrent: true) |
Yes |
| Level | Select | Level 0, Level 1, Level 2, Level 3, Level 4, Year 2 | None (must select) | Yes |
5A.8 Quizzes create modal: add semester/level fields
- Screen: Quizzes
- Spec:
05-content.mdSection 7 — same semester/level scoping as all content - What the spec requires: Same as 5A.7
- Current state:
src/pages/content/quizzes.tsx— Create modal has Title, Week, Question Count. No Semester or Level selectors. - Gap: Same as 5A.7
- Solution: Same approach — add Semester and Level selectors to the dialog form.
Batch 5B: Teacher Management + Reporting Polish (7 tasks)
5B.1 TA Reports: add FilterBar
- Screen: TA Reports
- Spec:
07-teacher-management.mdSection 5 — "View TA performance and their students" + "Export TA data to CSV". The screen follows the standard list pattern (01-global-patterns.mdSection 4.1) which includes "Filter bar above table." - What the spec requires: Every list screen has a FilterBar per the global Data Table pattern. All other list screens in Teacher Management (TA List, Student Groups) have FilterBars.
- Current state:
src/pages/teacher-management/ta-reports.tsx— DataTable with 7 sortable columns (TA Name, Students, Total Reviews, Pending, Avg Response, Pass Rate, Weekly Submissions) + Export button in header. NoFilterBarcomponent. - Gap: Add FilterBar above the DataTable
FilterBar configuration:
| Filter | Type | Key | Options | Placeholder |
|---|---|---|---|---|
| Search | Text input | search |
— | "Search by TA name..." |
| Status | Dropdown | status |
All, Active, Inactive | "All Statuses" |
| Performance | Dropdown | performance |
All, Flagged (response time >48h), On Track | "All Performance" |
Filter logic:
- Search: matches against
taNamefield (case-insensitive substring) - Status: matches
statusfield - Performance: "Flagged" =
avgResponsecontains a value parsed as >2 days; "On Track" = ≤2 days
5B.2 Teaching Assistants List: add Edit/Delete row actions
- Screen: Teaching Assistants List
- Spec:
07-teacher-management.mdSection 2.4 — "Edit / Delete (Admin)" listed explicitly as actions - What the spec requires: Admin can edit and delete TAs from the list view. Per spec: "Edit" and "Delete" with permission "Admin."
- Current state:
src/pages/teacher-management/teachers.tsx— has "Create TA" button with full dialog, row click navigates to TA Detail, but no inline Edit or Delete actions in the table rows. The columns array has no actions column. - Gap: Add actions column with Edit and Delete
Actions column specification:
| Action | Icon | Variant | Behavior | Confirmation |
|---|---|---|---|---|
| Edit | PencilIcon |
ghost, size="icon" |
Opens existing Create TA dialog pre-filled with TA data. Dialog title: "Edit Teaching Assistant". Button: "Save Changes". On submit toast: "[TA Name] updated." | None |
| Delete | TrashIcon |
ghost, size="icon" |
Opens ConfirmDialog |
Destructive: "Delete [TA Name]? This will remove their profile and unassign all students. This cannot be undone." Confirm button: "Delete" (red) |
Column definition (add as last item in columns array):
{
id: "actions",
header: "",
cell: ({ row }) => (
<div className="flex items-center gap-1">
<Button variant="ghost" size="icon" onClick={(e) => { e.stopPropagation(); setEditTA(row.original) }}>
<PencilIcon className="size-4" />
</Button>
<Button variant="ghost" size="icon" onClick={(e) => { e.stopPropagation(); setDeleteTarget(row.original) }}>
<TrashIcon className="size-4" />
</Button>
</div>
),
enableSorting: false,
}
Note: e.stopPropagation() prevents the row click (navigate to detail) from also firing.
5B.3 TA Detail Schedule Tab: add empty state for availability grid
- Screen: TA Detail > Schedule Tab
- Spec:
07-teacher-management.mdSection 3.5 — implied by01-global-patterns.mdSection 4.8 (Empty States): "Every screen must define its empty state message and suggested action." - What the spec requires: When no schedule data exists, show an empty state with message and action
- Current state:
src/pages/teacher-management/teacher-detail/schedule-tab.tsx— the Upcoming Appointments and Personal Holidays sections have proper empty states ("No upcoming appointments in the next 7 days" and "No personal holidays configured"). But the weekly availability grid itself renders as an entirely blank table (all white cells) when a TA has zero configured slots, with no explanatory message. - Gap: Add empty state for the availability grid itself
Empty state specification (replaces the blank grid when no slots exist):
| Element | Value |
|---|---|
| Layout | Centered within the "Weekly Availability" card body, replacing the grid |
| Icon | CalendarOff from lucide-react, size-12, text-muted-foreground |
| Title | "No availability configured" |
| Description | "This TA has no scheduled availability. Set up their weekly schedule to enable appointment booking." |
| Action button | "Edit Availability" → navigates to /scheduling/ta-schedules?ta={taId} |
| Condition | When the TA's taScheduleSlots array is empty or all slots have available: false |
5B.4 Student Groups: add row click / group detail view
- Screen: Student Groups
- Spec:
07-teacher-management.mdSection 6.4 — "View group details" and "Add/transfer students between groups" listed as existing capabilities to preserve - What the spec requires: Clicking a group provides detail — member list, TA, and management actions
- Current state:
src/pages/teacher-management/student-groups.tsx— DataTable has 5 columns (Group Name, TA, Members, Semester, Protected), filter bar, Create Group dialog, and Delete action. But noonRowClickprop — rows are not interactive. - Gap: Add row click behavior to show group details inline
Expanded detail layout (renders below the clicked row, full table width):
| Section | Content | Layout |
|---|---|---|
| Group info header | Group name (bold), TA name (linked: <Link to={/teachers/${taId}}>), Semester, Created date |
Horizontal row with flex justify-between |
| Members table | Sub-table with columns below | Standard sub-table with muted header |
| Action buttons | "Add Member" + "Transfer to Another TA" | Right-aligned button row above members table |
| Collapse control | "Close" button or re-click row | Small text button bottom-right |
Members sub-table columns:
| Column | Source | Clickable |
|---|---|---|
| Student Name | From mock students data matched to group members | Yes → /students/${studentId} |
| Level | Student's current enrollment level | No |
| Submissions This Semester | Count from mock submissions | No |
| Last Submission Date | Most recent submission date | No |
State: const [expandedGroupId, setExpandedGroupId] = useState<string | null>(null). Toggle on row click. Render inline content via conditional {expandedGroupId === group.id && <GroupDetail ... />} after the DataTable row.
5B.5 Specific Reports: add parameter configuration dialog
- Screen: Specific Reports
- Spec:
09-reporting.mdSection 4 — "Custom report generator" with named reports - What the spec requires: Reports accept parameters before execution. The screen lists report definitions; running a report should allow configuration of date ranges, semester scope, and output format.
- Current state:
src/pages/reporting/specific-reports.tsx— DataTable with columns (Name, Description, Category, Last Run). "Run" button on each row firestoast.success("Running report...")with no configuration step. - Gap: Replace direct toast with a configuration dialog
RunReportDialog specification:
| Field | Type | Required | Default | Options |
|---|---|---|---|---|
| Report Name | Text (read-only) | — | Pre-filled from clicked report | Display only |
| Date Range — Start | Date picker | Yes | First day of current semester | Calendar picker |
| Date Range — End | Date picker | Yes | Today's date | Calendar picker |
| Semester | Select | No | Current/active semester | All semesters from semesters data |
| Output Format | Radio group | Yes | "On-Screen" | CSV, PDF, On-Screen |
Dialog layout:
- Title: "Run Report: {reportName}"
- Body: Fields in 2-column grid (date start + end side by side, semester + format below)
- Footer: "Cancel" (secondary, left) | "Generate Report" (primary, right)
- On submit: Toast "Generating '{reportName}'... Results will appear shortly."
5B.6 Student Composition: fix row click to expandable student list
- Screen: Student Composition
- Spec:
09-reporting.mdSection 5 — "View Level Detail: Expands to show student list for that level" - What the spec requires: Clicking a level row in the composition table expands to show individual students at that level
- Current state:
src/pages/reporting/composition.tsx—onRowClickcallback firestoast.info("View Level X students (mock)"). No expansion behavior. - Gap: Replace toast with inline expandable student list
Expanded section specification (renders below clicked row):
| Column | Source | Format |
|---|---|---|
| Student Name | Mock students filtered by level | Text, linked to /students/${id} |
| Status | Enrollment status | StatusBadge: Active (green), Inactive (gray) |
| Type | New or Returning | StatusBadge: New (blue), Returning (green) |
| Submissions | Count for current semester | Number |
Implementation:
- State:
const [expandedLevel, setExpandedLevel] = useState<string | null>(null) - On row click: toggle
expandedLevel(null ↔ level name) - Generate 5-8 mock students per level inline (or filter from
studentsdata by level) - Render inline sub-table after clicked row using conditional rendering
- Empty: "No students at this level for the selected semester."
- Collapse: re-click row or "Close" text button
5B.7 Logs: add date range filter
- Screen: Logs
- Spec:
09-reporting.mdSection 6 — audit logs are time-series data that should support date filtering - What the spec requires: Ability to filter log entries by date range
- Current state:
src/pages/reporting/logs.tsx— FilterBar has 3 filters: Search (text input), Entity Type (dropdown), User (dropdown). No date range picker. - Gap: Add date range filter
Date range filter specification:
| Filter | Type | Key | Default | Behavior |
|---|---|---|---|---|
| From Date | Date picker | dateFrom |
30 days before today | Filters: log.timestamp >= selectedDate |
| To Date | Date picker | dateTo |
Today | Filters: log.timestamp <= selectedDate |
Placement: After the User dropdown in the FilterBar, before Clear All.
Batch 5C: Admin & System + Annotations (7 tasks)
5C.1 Admins: add FilterBar
- Screen: Admins
- Spec:
10-admin-system.mdSection 2 — follows standard list screen pattern - What the spec requires: All list screens include FilterBar per
01-global-patterns.mdSection 4.2 - Current state:
src/pages/admin-system/admins.tsx— DataTable with full CRUD (AdminFormDialog for create/edit, ConfirmDialog for delete). NoFilterBarcomponent. - Gap: Add FilterBar above DataTable
FilterBar configuration:
| Filter | Type | Key | Options | Placeholder |
|---|---|---|---|---|
| Search | Text input | search |
— | "Search by name or email..." |
| Role | Dropdown | role |
All, Admin, View-Only | "All Roles" |
| Status | Dropdown | status |
All, Active, Inactive | "All Statuses" |
5C.2 Issue Queue: add editable status/priority in detail view
- Screen: Issue Queue > Issue Detail panel
- Spec:
10-admin-system.mdSection 6.5 — admin should be able to update issue status and priority - What the spec requires: Interactive controls for changing status and priority on the detail view
- Current state:
src/pages/admin-system/issue-queue.tsx—IssueDetailcomponent renders status and priority as staticStatusBadgeelements. Has "Resolve" and "Close" buttons but these are fixed actions, not flexible status updates. Priority cannot be changed at all. - Gap: Replace static badges with interactive Select dropdowns
Editable fields specification:
| Field | Current Rendering | Required Rendering | Options | On Change |
|---|---|---|---|---|
| Status | <StatusBadge status={issue.status} /> (static) |
<Select> with StatusBadge-styled options |
Open, In Progress, Resolved, Closed | Toast: "Status updated to {value}" |
| Priority | <StatusBadge status={issue.priority} /> (static) |
<Select> with StatusBadge-styled options |
High (red), Medium (yellow), Low (gray) | Toast: "Priority updated to {value}" |
Visual treatment: Each Select option should render a colored dot or badge matching the StatusBadge colors so the admin sees at a glance what each status/priority means. Selected value displays as a StatusBadge within the Select trigger.
Note: The existing "Resolve" and "Close" buttons can remain as convenience shortcuts — they set status to Resolved/Closed respectively. The Select dropdown provides full control.
5C.3 Issue Queue: add admin create issue capability
- Screen: Issue Queue
- Spec:
10-admin-system.mdSection 6.8 — "can also be used as a manual issue tracking tool where the admin creates issues on behalf of students" - What the spec requires: Admin can create issues manually, not just view student-reported ones
- Current state:
src/pages/admin-system/issue-queue.tsx— page header has only "Issue Queue" title. No create button. - Gap: Add "Create Issue" button in page header + CreateIssueDialog
CreateIssueDialog field specification:
| Field | Type | Required | Options / Placeholder | Validation |
|---|---|---|---|---|
| Student | Searchable Select (autocomplete) | Yes | Search students by name. Display: "Name — Email" per option. Source: students data array |
Must select a valid student |
| Type | Select | Yes | Bug, Content, Account, Other | Must select |
| Priority | Select | Yes | High, Medium, Low | Must select, default: Medium |
| Subject | Text input | Yes | "Brief description of the issue" | Min 5 characters |
| Description | Textarea (4 rows) | No | "Detailed description, steps to reproduce, screenshots notes..." | — |
Dialog layout:
- Title: "Create Issue"
- Body: Vertical form, single column. Student selector at top (most important field).
- Footer: "Cancel" (secondary) | "Create Issue" (primary)
- On submit: Toast "Issue created for {studentName}."
- Placement of button: Page header, right side, next to any existing header actions. Use
<Button>with<PlusIcon>+ "Create Issue" text.
5C.4 Student Report: support URL-param pre-filtering from Dashboard
- Screen: Student Report
- Spec:
09-reporting.mdSection 2 +02-dashboard.mdSection 1.5 Tile 3 - What the spec requires: Dashboard "Students Behind" tile (Tile 3) click target is "Reporting > Student Report, pre-filtered to behind-pace students (filter:
pace=behind)" - Current state:
src/pages/reporting/student-report.tsx— does not read URL search params. The FilterBar initializes with empty/default filter values regardless of how the user navigated here. - Gap: Read URL params on mount to pre-populate filters
Implementation:
const [searchParams] = useSearchParams()
const initialStatus = searchParams.get("status") || searchParams.get("pace") || ""
// Use initialStatus as default value for the Status filter in FilterBar
Reference pattern: All 6 content screens already implement this pattern for the Setup Checklist deep links (reading semester, level, from params). Same approach.
5C.5 Calendar View: add empty state for no-events week
- Screen: Calendar View
- Spec:
06-scheduling.mdSection 2 — all screens need empty states per01-global-patterns.mdSection 4.8 - What the spec requires: "Every screen must define its empty state message and suggested action"
- Current state:
src/pages/scheduling/calendar-view.tsx— when filters eliminate all events or the selected week has no events, the calendar grid renders with blank time slot cells. No message indicates "nothing here." - Gap: Show centered message when no events exist for the current view period + filters
Empty state specification:
| Element | Value |
|---|---|
| Condition | filteredEvents.length === 0 for the current week/month view |
| Layout | Centered overlay within the calendar grid area |
| Icon | CalendarX from lucide-react, size-12, text-muted-foreground |
| Message | "No sessions or appointments for this {view === 'week' ? 'week' : 'month'}." |
| Sub-text | "Try adjusting your filters or selecting a different date range." |
| Suggested action | None (filters are already visible and interactive) |
5C.6 Student Detail Payments Tab: add Support Staff view annotation
- Screen: Student Detail > Payments Tab
- Spec:
03-student-management.mdSection 3.7 "Support Staff View" subsection - What the spec requires: "All data sections visible... NO action buttons visible (Cancel, Pause, Resume, Apply Discount, Assign Scholarship, Link Family, Send Payment Link, Retry Payment — all hidden). 'View in Stripe' link hidden (assumption per OQ9: support staff do not have Stripe access)."
- Current state:
src/pages/student-management/student-detail/payments-tab.tsx— renders the full Admin view with all action buttons. No indication of what Support Staff would see. - Gap: Since this mockup only demonstrates the Admin role, add a visual annotation documenting the Support Staff difference
Annotation specification:
| Element | Value |
|---|---|
| Placement | Top of Payments tab content, above the Subscription Status card |
| Component | <Alert> with <InfoIcon> (not destructive variant — use default/info) |
| Text | "Support Staff view: All billing data on this tab is visible to Support Staff. Action buttons (Cancel, Pause, Apply Discount, etc.) and 'View in Stripe' link are hidden for Support Staff per role-based access rules." |
| Style | Muted, text-sm, compact. Should not dominate the tab. |
| Dismissable | No (it's specification documentation, not a runtime notification) |
5C.7 Dashboard: add deprecated features note
- Screen: Dashboard
- Spec:
02-dashboard.mdSection 1.1 — "Deprecated features" subsection added during spec review - What the spec requires: The spec documents that two features from the current dashboard are intentionally removed: (1) Daily Notes / scratchpad area, (2) Live Session Notifications widget. These were replaced by alert tiles and the Phase Prompt Bar.
- Current state:
src/pages/dashboard/index.tsx— no mention of deprecated features anywhere - Gap: Document the intentional removals for stakeholder visibility
Implementation options (pick one):
Option A — Code comment only (minimal, invisible to stakeholders):
{/* Deprecated features removed per spec 02-dashboard.md Section 1.1:
- Daily Notes / scratchpad: provided no operational value (interview Q6, Q7)
- Live Session Notifications widget: replaced by Semester Progress tile (Tile 6)
and Calendar View in Scheduling domain
*/}
Option B — Visible collapsible block (recommended for mockup review):
| Element | Value |
|---|---|
| Placement | Bottom of dashboard, below Quick Actions |
| Component | Collapsible with trigger "What changed from the previous dashboard?" |
| Content | "The previous dashboard's Daily Notes and Live Session Notifications have been replaced with operational alert tiles and the Phase Prompt Bar. Session information is now in Scheduling > Calendar View." |
| Default state | Collapsed |
| Style | text-muted-foreground text-sm, secondary visual weight |
Batch 5D: High-Complexity Screen Polish (4 tasks)
5D.1 Student Detail Payments Tab: add Cancel & Deactivate confirmation dialog
- Screen: Student Detail > Payments Tab
- Spec:
03-student-management.mdSection 3.7 — "Cancel + Deactivate (Linked)" action row specifies exact confirmation text.01-global-patterns.mdSection 7 Rule #11: "Deactivating a student with an active subscription must cancel the Stripe subscription in the same operation." - What the spec requires: Destructive confirmation dialog with specific wording reflecting that
cancel_at_period_end=true(not immediate cancellation) + immediate account deactivation - Current state:
src/pages/student-management/student-detail/payments-tab.tsxlines 267-276 — "Cancel & Deactivate" button withvariant="destructive"firestoast.success("Student account deactivated and subscription cancelled (mock)")directly. No ConfirmDialog. - Gap: Replace direct toast with ConfirmDialog using the spec's exact confirmation text
ConfirmDialog specification:
| Element | Value |
|---|---|
| Trigger | Existing "Cancel & Deactivate" button (line 267) |
| Variant | Destructive |
| Title | "Cancel & Deactivate?" |
| Description | "This will cancel {studentName}'s Stripe subscription at the end of the current billing period and deactivate their account. They will lose access to all content immediately." |
| Confirm button text | "Cancel & Deactivate" (red) |
| Cancel button text | "Never mind" |
| On confirm toast | "{studentName} deactivated and subscription cancelled." |
| State needed | const [showDeactivateConfirm, setShowDeactivateConfirm] = useState(false) |
Note: The spec text is intentionally precise about timing — subscription cancels at period end (not immediately), but account access is removed immediately. This distinction matters for stakeholder review.
5D.2 Student Detail entity header: Incomplete/Unpaid/None subscription badges — ALREADY DONE
- Screen: Student Detail (entity header)
- Spec:
03-student-management.mdSection 3.3 - Current state:
src/components/shared/status-badge.tsxlines 26-28 —Incompletemaps to amber,Unpaidmaps to red,Nonemaps to muted/gray. All three statuses already have correct color mappings per the updated spec. - Status: No action needed.
5D.3 Semester Hub Overview: Draft badge color — ALREADY DONE
- Screen: Semester Hub Overview + Semesters List
- Spec:
01-global-patterns.mdSection 4.3 — Draft badge updated from gray to blue - Current state:
src/components/shared/status-badge.tsxline 34 —Draftmaps tobg-blue-100 text-blue-800(blue). Already matches the updated spec. - Status: No action needed.
5D.4 Close Workflow Step 4: button label consistency — ALREADY DONE
- Screen: Semester Hub > Close Workflow > Step 4 (Handle Leavers)
- Spec:
04-semester-management.mdSection 3.8 Step 4 - Current state:
src/pages/semester-management/semester-hub/close-workflow-tab.tsx— line 102 definesLeaverAction = "Cancel & Deactivate" | "Deactivate Only" | "Already Handled". Lines 1133-1138 conditionally assign the correct label based on subscription + account status. Line 1267 renders "Cancel & Deactivate" button. Line 1308 has ConfirmDialog with title "Cancel & Deactivate?". Fully matches spec. - Status: No action needed.
Implementation Priority
Tier 1: Structural (do first — enables patterns across all screens)
- 5A.1 DataTable loading state — affects 30+ screens
- 5A.2 DataTable error state — affects 30+ screens
Tier 2: High value (most visible gaps, highest screen count)
- 5A.3 Content edit modals — 6 screens gain full CRUD
- 5A.4 Scheduling destructive confirmations — 3 screens, safety pattern
- 5B.1 TA Reports FilterBar — consistency gap
- 5C.2 Issue Queue editable status/priority — core workflow
- 5C.3 Issue Queue create issue — missing feature per spec
Tier 3: Medium value (polish + completeness)
- 5B.2 TA List edit/delete row actions
- 5A.5 Live Sessions edit modal
- 5A.6 Holidays edit modal
- 5B.5 Specific Reports parameter dialog
- 5B.6 Student Composition expandable rows
- 5D.1 Payments Cancel & Deactivate confirmation dialog
Tier 4: Lower priority (minor polish + annotations)
- 5A.7 Video Lessons semester/level fields
- 5A.8 Quizzes semester/level fields
- 5B.3 TA Schedule grid empty state
- 5B.4 Student Groups row click detail
- 5B.7 Logs date range filter
- 5C.1 Admins FilterBar
- 5C.4 Student Report URL-param pre-filter
- 5C.5 Calendar View empty state
- 5C.6 Payments Support Staff annotation
- 5C.7 Dashboard deprecated features note
Already resolved (no action needed)
- 5D.2 Subscription badge statuses (Incomplete/Unpaid/None) — already in StatusBadge
- 5D.3 Draft badge blue color — already in StatusBadge
- 5D.4 Close Workflow button labels — already correct with ConfirmDialog