fix(nav): 지표면이 필요 없는 화면은 준비 화면을 거치지 않도록
파일을 아직 올리지 않은 새 프로젝트에서 대시보드 -> 파일 입력으로 이동하면 준비 화면(B11)이 확정 지표면을 찾다 실패해 "담당자에게 연락" 장애 안내를 띄웠다. 파일 입력 화면은 3D 지표면을 쓰지 않으므로 준비 자체가 필요 없다. - goToWorkflowStage: 담아 둔 지표면을 실제로 쓰는 B04/B05로 갈 때만 준비 화면 경유, 나머지(B03/B06~B09)는 바로 이동 - 확정 지표면이 없을 때는 장애가 아니라 순서 문제이므로 전용 표식(PRELOAD_NO_SURFACE)을 던지고, 준비 화면은 안내 문구 + [파일 입력 화면으로] 버튼을 보여 준다 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -279,6 +279,14 @@ export function readPreloadTarget(): string | null {
|
||||
/** 준비 화면이 표시할 단계 안내. ratio가 null이면 진행률을 모른다는 뜻이다. */
|
||||
export type PreloadReporter = (label: string, ratio: number | null) => void;
|
||||
|
||||
/**
|
||||
* 아직 확정된 지표면이 없다는 뜻의 오류 표식.
|
||||
*
|
||||
* 고장이 아니라 "분석·확정이 아직 안 끝난 정상 상태"다. 준비 화면이 이 표식을 보고
|
||||
* 장애 안내 대신 다음에 할 일(파일 입력)을 안내한다.
|
||||
*/
|
||||
export const PRELOAD_NO_SURFACE = "PRELOAD_NO_SURFACE";
|
||||
|
||||
/** 확정된 지표면의 3D 파일과 그 등고선을 보관함에 채운다(준비 화면에서 호출).
|
||||
*
|
||||
* 사용자가 실제로 보는 것은 이 둘이라 이것만 챙긴다 — 포인트클라우드·배수유역은 제외
|
||||
@@ -293,7 +301,7 @@ export async function preloadSurfaceAssets(
|
||||
): Promise<string> {
|
||||
report("확정된 지표면을 확인하는 중…", null);
|
||||
const confirmed = await fetchConfirmedSurface(projectId);
|
||||
if (!confirmed.model_id) throw new Error("확정된 지표면 모델이 없습니다.");
|
||||
if (!confirmed.model_id) throw new Error(PRELOAD_NO_SURFACE);
|
||||
|
||||
const smooth = confirmed.smooth ?? false;
|
||||
const interval = confirmed.contour_interval_m ?? 1.0;
|
||||
|
||||
@@ -36,8 +36,21 @@ export async function fetchWorkflowState(projectId: string): Promise<WorkflowSta
|
||||
return data.workflow_state ?? data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 담아 둔 지표면 자료를 실제로 쓰는 화면.
|
||||
*
|
||||
* 이 화면들만 준비 화면(B11)을 거친다. 파일 입력·수량·상세설계·설계도서는 3D 지표면을
|
||||
* 쓰지 않으므로, 확정 지표면이 없다고 준비 화면에서 막히면 안 된다 — 파일을 아직 올리지
|
||||
* 않은 새 프로젝트에서 파일 입력 화면조차 못 들어가던 문제(2026-08-08).
|
||||
*/
|
||||
const PRELOAD_REQUIRED_ROUTES: readonly RoutePath[] = [ROUTES.B04_PREPROCESS, ROUTES.B05_PROFILE];
|
||||
|
||||
export function goToWorkflowStage(projectId: string, route: RoutePath): void {
|
||||
localStorage.setItem(CURRENT_PROJECT_ID_KEY, projectId);
|
||||
if (!PRELOAD_REQUIRED_ROUTES.includes(route)) {
|
||||
navigateTo(route);
|
||||
return;
|
||||
}
|
||||
void routeAfterPreloadCheck(projectId, route);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { createProgressCircle } from "@ui/ui_template_progress";
|
||||
import {
|
||||
markProjectPreloaded,
|
||||
preloadSurfaceAssets,
|
||||
PRELOAD_NO_SURFACE,
|
||||
purgeOtherProjects,
|
||||
readPreloadTarget,
|
||||
} from "../A00_Common/b_asset_cache";
|
||||
@@ -64,10 +65,32 @@ export async function renderB11Loading(root: HTMLElement): Promise<void> {
|
||||
markProjectPreloaded(projectId, signature);
|
||||
navigateTo(target);
|
||||
} catch (error) {
|
||||
// 확정 지표면이 아직 없는 것은 고장이 아니라 순서 문제다 — 장애 안내 대신 할 일을 알린다.
|
||||
if (error instanceof Error && error.message === PRELOAD_NO_SURFACE) {
|
||||
showNoSurface();
|
||||
return;
|
||||
}
|
||||
const detail = error instanceof Error ? ` (${error.message})` : "";
|
||||
showFailure(`${t("B11_Loading_Failed")}${detail}`);
|
||||
}
|
||||
|
||||
function showNoSurface(): void {
|
||||
progress.root.hidden = true;
|
||||
message.textContent = t("B11_Loading_NoSurface");
|
||||
actions.replaceChildren(
|
||||
createButton({
|
||||
label: t("B11_Loading_Btn_FileInput"),
|
||||
variant: "filled",
|
||||
onClick: () => navigateTo(ROUTES.B03_FILE_INPUT),
|
||||
}),
|
||||
createButton({
|
||||
label: t("B11_Loading_Btn_Dashboard"),
|
||||
variant: "ghost",
|
||||
onClick: () => navigateTo(ROUTES.B01_ACCOUNT),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
function showFailure(text: string): void {
|
||||
progress.root.hidden = true;
|
||||
message.textContent = text;
|
||||
|
||||
@@ -521,6 +521,11 @@ export const ui_locales_b2 = {
|
||||
"자료를 준비하지 못했습니다. 분석 결과나 저장 경로에 문제가 있을 수 있습니다. 담당자에게 연락해 주세요.",
|
||||
"Could not prepare the data. The analysis result or storage path may be broken. Please contact support.",
|
||||
],
|
||||
B11_Loading_NoSurface: [
|
||||
"아직 확정된 지표면이 없습니다. 필수 파일을 올리면 지표면 분석이 자동으로 진행되고, 끝나면 이 화면이 자료를 준비합니다.",
|
||||
"No confirmed surface yet. Upload the required files — the surface analysis runs automatically, and this screen prepares the data once it finishes.",
|
||||
],
|
||||
B11_Loading_Btn_FileInput: ["파일 입력 화면으로", "Go to file input"],
|
||||
B11_Loading_Btn_Continue: ["그래도 화면으로 이동", "Continue anyway"],
|
||||
B11_Loading_Btn_Dashboard: ["대시보드로", "Back to dashboard"],
|
||||
B11_Status_Flow_Title: ["결재 진행 상태", "Payment Progress"],
|
||||
|
||||
Reference in New Issue
Block a user