- {/* Header */}
-
-
-
- {loading ? (
-
- ) : currentApp ? (
+
{formatName(currentApp.first_name, currentApp.last_name)}
@@ -129,72 +107,73 @@ export default function GradingPage() {
{currentApp.status}
>
- ) : null}
-
-
-
-
- {applications.length > 0
- ? `${currentIndex + 1} of ${applications.length}`
- : "-"}
-
+ ) : null
+ }
+ currentIndex={currentIndex}
+ totalCount={applications.length}
+ onNavigateNext={navigateNext}
+ onNavigatePrev={navigatePrev}
+ canNavigatePrev={!loading && (currentIndex > 0 || !!prevCursor)}
+ canNavigateNext={
+ !loading && (currentIndex < applications.length - 1 || !!nextCursor)
+ }
+ detailsPanel={
+
+ {currentApp && (
+
+
+ Review Stats
+
+
+
+ {currentApp.reviews_completed} / {currentApp.reviews_assigned}{" "}
+ reviews completed
+
+
+
+ {currentApp.accept_votes} accept
+
+
+ {currentApp.reject_votes} reject
+
+
+ {currentApp.waitlist_votes} waitlist
+
+ {currentApp.ai_percent != null && (
+
+ AI: {currentApp.ai_percent}%
+
+ )}
+
+
+
+ )}
+
+ }
+ actionPanel={
+
+ }
+ emptyState={
+
+
+ No applications match the current filters.
+
-
-
- {/* Content */}
-
- {/* Left panel - Application details (75%) */}
-
-
-
-
- {/* Right panel - Grading (25%) */}
-
-
-
-
- {/* Navigation hint - pinned at bottom */}
-
-
- Use{" "}
-
- ←
- {" "}
-
- →
- {" "}
- arrow keys to navigate · Esc to go back
-
-
-
-
-
+ }
+ />
);
}
diff --git a/client/web/src/pages/superadmin/reviews/grading/components/GradingDetailsPanel.tsx b/client/web/src/pages/superadmin/reviews/grading/components/GradingDetailsPanel.tsx
deleted file mode 100644
index 42043e56..00000000
--- a/client/web/src/pages/superadmin/reviews/grading/components/GradingDetailsPanel.tsx
+++ /dev/null
@@ -1,86 +0,0 @@
-import { memo } from "react";
-
-import { Badge } from "@/components/ui/badge";
-import { Skeleton } from "@/components/ui/skeleton";
-import {
- DemographicsSection,
- EducationSection,
- EventPreferencesSection,
- ExperienceSection,
- LinksSection,
- PersonalInfoSection,
- ShortAnswersSection,
- TimelineSection,
-} from "@/pages/admin/all-applicants/components/detail-sections";
-import type { ApplicationListItem } from "@/pages/admin/all-applicants/types";
-import type { Application } from "@/types";
-
-interface GradingDetailsPanelProps {
- application: Application | null;
- listItem: ApplicationListItem | null;
- loading: boolean;
-}
-
-export const GradingDetailsPanel = memo(function GradingDetailsPanel({
- application,
- listItem,
- loading,
-}: GradingDetailsPanelProps) {
- if (loading) {
- return (
-
- {[...Array(4)].map((_, i) => (
-
-
-
-
-
- ))}
-
- );
- }
-
- if (!application) return null;
-
- return (
-
-
-
-
-
-
-
-
-
-
- {/* Review Stats */}
- {listItem && (
-
-
- Review Stats
-
-
-
- {listItem.reviews_completed} / {listItem.reviews_assigned} reviews
- completed
-
-
-
- {listItem.accept_votes} accept
-
-
- {listItem.reject_votes} reject
-
-
- {listItem.waitlist_votes} waitlist
-
- {listItem.ai_percent != null && (
- AI: {listItem.ai_percent}%
- )}
-
-
-
- )}
-
- );
-});
diff --git a/client/web/src/pages/superadmin/reviews/grading/components/GradingPanel.tsx b/client/web/src/pages/superadmin/reviews/grading/components/GradingPanel.tsx
index 7bb1f6c9..d2eee5f7 100644
--- a/client/web/src/pages/superadmin/reviews/grading/components/GradingPanel.tsx
+++ b/client/web/src/pages/superadmin/reviews/grading/components/GradingPanel.tsx
@@ -1,20 +1,12 @@
-import {
- Loader2,
- MessageSquare,
- Minus,
- ThumbsDown,
- ThumbsUp,
-} from "lucide-react";
+import { Minus, ThumbsDown, ThumbsUp } from "lucide-react";
import { memo } from "react";
import { Badge } from "@/components/ui/badge";
-import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import {
- Tooltip,
- TooltipContent,
- TooltipTrigger,
-} from "@/components/ui/tooltip";
+ GradingActionButtons,
+ ReviewerNotesList,
+} from "@/pages/admin/_shared/grading";
import type { ApplicationListItem } from "@/pages/admin/all-applicants/types";
import { getStatusColor } from "@/pages/admin/all-applicants/utils";
import type { ReviewNote } from "@/pages/admin/assigned/types";
@@ -68,116 +60,25 @@ export const GradingPanel = memo(function GradingPanel({
{listItem.waitlist_votes}
+ {listItem.ai_percent != null && (
+
+ AI: {listItem.ai_percent}%
+
+ )}
{/* Reviewer Notes */}
-
-
-
-
-
- {notesLoading ? (
-
Loading notes...
- ) : notes.length > 0 ? (
-
- {notes.map((note, idx) => (
-
-
-
- {note.admin_email}
-
-
- {new Date(note.created_at).toLocaleDateString()}
-
-
-
- {note.notes}
-
-
- ))}
-
- ) : (
-
- No reviewer notes
-
- )}
-
+