+
{column(
"Pending & Unmatched",
pending,
"Nothing waiting.",
+ (temp) => (
+ setModalId(temp.temp_id)}
+ onRetry={() => retry(temp, "iqdb")}
+ onDismiss={() => dismiss(temp)}
+ />
+ ),
pending.length > 0 ? (
{modalId ? (
diff --git a/frontend/src/lib/types.ts b/frontend/src/lib/types.ts
index e19c2e6..ec1bb06 100644
--- a/frontend/src/lib/types.ts
+++ b/frontend/src/lib/types.ts
@@ -388,6 +388,28 @@ export interface TempUpload {
updated_at: string;
}
+/** One upload the pipeline indexed while the page was watching. */
+export interface UploadCompletion {
+ id: string;
+ filename: string;
+ j_id: string;
+ resolution: string;
+ post_id: number | null;
+ thumbnail_url: string | null;
+ at: string;
+}
+
+/** Response of POST /api/uploads/ — a pending row or an instant completion. */
+export interface UploadStagingResult {
+ temp_id: string;
+ original_filename: string;
+ status: "pending" | "visual_match" | "completed" | "error";
+ resolution: string;
+ library_j_id: string | null;
+ preview_url: string | null;
+ e621_post_id?: number | null;
+}
+
/** Progress of the server-side staged-upload pipeline. */
export interface UploadStatus {
status: "idle" | "running" | "paused" | "error";
@@ -400,6 +422,8 @@ export interface UploadStatus {
error: string;
outstanding: number;
waiting: { md5: number; visual: number; iqdb: number };
+ /** Session notification feed: indexed uploads, newest first. */
+ recent_completions: UploadCompletion[];
updated_at: string | null;
}