feat: add undo toast for skip, apply, and status moves

Accidental skips and status changes can be reversed within a few seconds via toast Undo, including bulk actions and keyboard shortcuts.
This commit is contained in:
2026-07-15 12:55:47 -04:00
parent 6a5c9e8cc4
commit d3d9130bbf
16 changed files with 542 additions and 41 deletions
+2 -1
View File
@@ -322,7 +322,8 @@ export interface UpdateJobInput {
selectedProjectIds?: string;
pdfPath?: string;
tracerLinksEnabled?: boolean;
appliedAt?: string;
/** Pass `null` to clear (e.g. undo mark-as-applied). */
appliedAt?: string | null;
coverLetter?: string | null;
sponsorMatchScore?: number;
sponsorMatchNames?: string;
+11
View File
@@ -66,11 +66,22 @@ export type JobActionRequest =
};
};
/** Snapshot used by client Undo toasts after skip / apply / move. */
export type JobStatusRestore = {
jobId: string;
status: Job["status"];
};
export type JobActionResult =
| {
jobId: string;
ok: true;
job: Job;
/** Present when the action can be reversed (e.g. skip). */
undo?: {
previousStatus: Job["status"];
alsoSkipped?: JobStatusRestore[];
};
}
| {
jobId: string;