Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Addresses type safety feedback on PR #836. The dashboard was using any[] for enrollments state, defeating TypeScript's type checking.

Changes:

  • Added Enrollment interface matching API response structure from /api/enrollment
  • Added Course interface for nested course data with _count, prerequisites, tags fields
  • Added EnrollmentStatus union type for status values
  • Replaced useState<any[]>([]) with useState<Enrollment[]>([]) on line 59
type Enrollment = {
    id: string;
    userId: string;
    courseId: string;
    status: EnrollmentStatus;
    progress: number;
    enrolledAt: string;
    completedAt: string | null;
    lastActivity: string;
    course: Course;
    stats: {
        totalLessons: number;
        completedLessons: number;
        progressPercentage: number;
    };
};

Types align with Prisma schema and computed stats from enrollment endpoint.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI mentioned this pull request Dec 5, 2025
@vercel
Copy link

vercel bot commented Dec 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
vets-who-code-app Error Error Dec 5, 2025 4:57am

Copy link
Contributor Author

Copilot AI commented Dec 5, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint.prisma.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/vets-who-code-app/vets-who-code-app/node_modules/prisma/build/child {&#34;product&#34;:&#34;prisma&#34;,&#34;version&#34;:&#34;6.10.1&#34;,&#34;cli_install_type&#34;:&#34;local&#34;,&#34;information&#34;:&#34;&#34;,&#34;local_timestamp&#34;:&#34;2025-12-05T04:54:14Z&#34;,&#34;project_hash&#34;:&#34;4713398e&#34;,&#34;cli_path&#34;:&#34;/home/REDACTED/work/vets-who-code-app/vets-who-code-app/node_modules/.bin/prisma&#34;,&#34;cli_path_has (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/vets-who-code-app/vets-who-code-app/node_modules/prisma/build/child {&#34;product&#34;:&#34;prisma&#34;,&#34;version&#34;:&#34;6.10.1&#34;,&#34;cli_install_type&#34;:&#34;local&#34;,&#34;information&#34;:&#34;&#34;,&#34;local_timestamp&#34;:&#34;2025-12-05T04:54:16Z&#34;,&#34;project_hash&#34;:&#34;4713398e&#34;,&#34;cli_path&#34;:&#34;/home/REDACTED/work/vets-who-code-app/vets-who-code-app/node_modules/.bin/prisma&#34;,&#34;cli_path_has (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update to address feedback from PR 836 Replace any[] with proper Enrollment type interface in dashboard Dec 5, 2025
Copilot AI requested a review from jeromehardaway December 5, 2025 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants