Report renderer progress and detect stalled jobs

This commit is contained in:
2026-10-04 20:25:06 +05:00
parent 3b3cf6997c
commit 3bdf987916
11 changed files with 277 additions and 25 deletions

View File

@@ -0,0 +1,21 @@
export type ProcessingJob = {
state: string;
progress: number;
error: string | null;
updated_at: string;
lease_until: string | null;
};
// Stage ranges describe completed work, never an estimate of remaining time.
export function processingStage(progress: number) {
if (progress < 20) return "Downloading and checking the export";
if (progress < 25) return "Reading the terrain snapshot";
if (progress < 30) return "Indexing terrain blocks";
if (progress < 35) return "Loading block models and textures";
if (progress < 55) return "Building terrain geometry";
if (progress < 60) return "Preparing the scene";
if (progress < 85) return "Rendering panorama faces";
if (progress < 90) return "Rendering the surface map";
if (progress < 100) return "Saving processed images";
return "Processing complete";
}