feat: regular decisions#3
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements regular decisions functionality by refactoring the application review system from a priority-based approach to a regular round system. The changes modify decision criteria, update schema definitions with strongly-typed column references, and improve the UI to reflect the new regular round process.
Key changes:
- Updated decision logic to require 1 accept for approval and 2 rejects for rejection
- Replaced hardcoded string literals with typed schema definitions for Airtable columns
- Refactored statistics calculation and UI to focus on regular round applications
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/schema/airtable.ts |
Added typed schema definitions for all Airtable application columns and updated field mappings |
src/lib/utils/util.ts |
Modified decision criteria from priority-based (2 accepts/1 reject) to regular (1 accept/2 rejects) |
src/lib/utils/airtable.ts |
Simplified application finding logic and refactored statistics to support regular round tracking |
src/app/(auth)/grade/page.tsx |
Updated function calls to use new regular round methods |
src/app/(auth)/grade/actions.ts |
Enhanced review submission with reviewer tracking and updated decision logic |
src/app/(auth)/grade/_components/statistics-card.tsx |
Modified UI to display regular round statistics with updated percentage calculations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| export const Decision = Schema.Literal("accept", "reject"); | ||
| export type Decision = typeof Decision; | ||
| export type Decision = typeof Decision.Type; |
There was a problem hiding this comment.
The Decision type export is inconsistent. Line 273 should use Decision.Type but the schema definition on line 272 creates a union, not a struct with a Type property. This should be export type Decision = Schema.Schema.Type<typeof Decision>; or the schema should be defined differently.
| export type Decision = typeof Decision.Type; | |
| export type Decision = Schema.Schema.Type<typeof Decision>; |
| applicationsBegan: Object.keys(reviewsByEmail).length, | ||
| regularRoundApplications: | ||
| Object.keys(reviewsByEmail).length + applicationsNotReviewed.length, | ||
| totalApplications: applications.size, |
There was a problem hiding this comment.
Using .size on an array instead of .length. The applications variable is an array from the Effect.allSuccesses result, not a Set, so it should use .length property.
| totalApplications: applications.size, | |
| totalApplications: applications.length, |
No description provided.