Improve collector metadata progress and alignment
Stream completed metadata checks into the collector while preserving generation-based stale-result protection. Derive row statuses from verified availability, move analysis feedback into the sidebar, center table values under their headers, and keep the header synchronized during horizontal scrolling.
This commit is contained in:
+11
-2
@@ -32,9 +32,15 @@ export interface CollectorContainerPreparationRequest {
|
||||
}
|
||||
|
||||
export interface CollectorEnrichmentRequest {
|
||||
requestId: string;
|
||||
packages: CollectorPackage[];
|
||||
}
|
||||
|
||||
export interface CollectorEnrichmentProgress {
|
||||
requestId: string;
|
||||
result: CollectorInspectionResult;
|
||||
}
|
||||
|
||||
export interface CollectorInspectionResult {
|
||||
packages: CollectorPackage[];
|
||||
invalidCount: number;
|
||||
@@ -127,7 +133,10 @@ export function validateCollectorEnrichmentRequest(value: unknown): CollectorEnr
|
||||
throw new Error("Linksammler-Anreicherung ist ungültig");
|
||||
}
|
||||
const raw = value as Record<string, unknown>;
|
||||
if (Object.keys(raw).some((key) => key !== "packages")
|
||||
if (Object.keys(raw).some((key) => key !== "requestId" && key !== "packages")
|
||||
|| typeof raw.requestId !== "string"
|
||||
|| raw.requestId.length === 0
|
||||
|| raw.requestId.length > 160
|
||||
|| !Array.isArray(raw.packages)
|
||||
|| raw.packages.length === 0
|
||||
|| raw.packages.length > 2_000
|
||||
@@ -135,7 +144,7 @@ export function validateCollectorEnrichmentRequest(value: unknown): CollectorEnr
|
||||
|| raw.packages.reduce((sum, entry) => sum + (entry as CollectorPackage).links.length, 0) > 20_000) {
|
||||
throw new Error("Linksammler-Anreicherung ist ungültig");
|
||||
}
|
||||
return { packages: structuredClone(raw.packages) as CollectorPackage[] };
|
||||
return { requestId: raw.requestId, packages: structuredClone(raw.packages) as CollectorPackage[] };
|
||||
}
|
||||
|
||||
function collectorMarkerValue(value: string): string {
|
||||
|
||||
@@ -17,6 +17,7 @@ export const IPC_CHANNELS = {
|
||||
PREPARE_COLLECTOR_TEXT: "collector:prepare-text",
|
||||
PREPARE_COLLECTOR_CONTAINERS: "collector:prepare-containers",
|
||||
ENRICH_COLLECTOR_PACKAGES: "collector:enrich-packages",
|
||||
COLLECTOR_ENRICHMENT_PROGRESS: "collector:enrichment-progress",
|
||||
GET_START_CONFLICTS: "queue:get-start-conflicts",
|
||||
RESOLVE_START_CONFLICT: "queue:resolve-start-conflict",
|
||||
CLEAR_ALL: "queue:clear-all",
|
||||
|
||||
@@ -36,6 +36,7 @@ import type {
|
||||
import { isRealDebridWebAccountId } from "./real-debrid-accounts";
|
||||
import type {
|
||||
CollectorEnrichmentRequest,
|
||||
CollectorEnrichmentProgress,
|
||||
CollectorInspectionResult,
|
||||
CollectorTextPreparationRequest
|
||||
} from "./collector";
|
||||
@@ -87,6 +88,7 @@ export interface ElectronApi {
|
||||
prepareCollectorText: (request: CollectorTextPreparationRequest) => Promise<CollectorInspectionResult>;
|
||||
prepareCollectorContainers: (filePaths: string[], addedAt: number) => Promise<CollectorInspectionResult>;
|
||||
enrichCollectorPackages: (request: CollectorEnrichmentRequest) => Promise<CollectorInspectionResult>;
|
||||
onCollectorEnrichmentProgress: (callback: (progress: CollectorEnrichmentProgress) => void) => () => void;
|
||||
getPathForDroppedFile: (file: File) => string;
|
||||
getStartConflicts: () => Promise<StartConflictEntry[]>;
|
||||
resolveStartConflict: (packageId: string, policy: DuplicatePolicy) => Promise<StartConflictResolutionResult>;
|
||||
|
||||
Reference in New Issue
Block a user