Skip to content

feat: regular decisions#3

Merged
taeyangcode merged 2 commits into
mainfrom
dev
Oct 4, 2025
Merged

feat: regular decisions#3
taeyangcode merged 2 commits into
mainfrom
dev

Conversation

@taeyangcode
Copy link
Copy Markdown
Collaborator

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 4, 2025

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

Project Deployment Preview Comments Updated (UTC)
application-grader Ready Ready Preview Comment Oct 4, 2025 1:00am

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/schema/airtable.ts

export const Decision = Schema.Literal("accept", "reject");
export type Decision = typeof Decision;
export type Decision = typeof Decision.Type;
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
export type Decision = typeof Decision.Type;
export type Decision = Schema.Schema.Type<typeof Decision>;

Copilot uses AI. Check for mistakes.
Comment thread src/lib/utils/airtable.ts
applicationsBegan: Object.keys(reviewsByEmail).length,
regularRoundApplications:
Object.keys(reviewsByEmail).length + applicationsNotReviewed.length,
totalApplications: applications.size,
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
totalApplications: applications.size,
totalApplications: applications.length,

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@nnicolee nnicolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@taeyangcode taeyangcode merged commit d8a295d into main Oct 4, 2025
3 checks passed
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.

3 participants