fix(472-6 6-B 저장 뒤 초안 되씀): 노선 저장 성공 뒤 묶음이 노선 초안 비움을 「버림」으로 보고 초안 전 관 · 구조물 초안을 세션에 되쓰던 흠 — 저장이면 초안 전 값 버림(commitRouteFacilities)

- 화면 검증(검증_sub8)에서 찾음 — 저장 뒤 옹벽 초안이 끌기 전 자리(600)로 남아 다음 [저장]이 옛 자리로 되돌릴 뻔함
- design_pipeline_page 네 줄(commit) · routeSaved 가 노선 초안 비우기 전에 부름 · 시험 test_472_6_route_save

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 12:34:38 +09:00
co-authored by Claude Opus 5.5
parent 4b6800e387
commit a3d24cf494
5 changed files with 26 additions and 3 deletions
@@ -128,6 +128,7 @@ interface PagePipeline {
reconcile(): Promise<number>;
ownsCross: boolean;
detail(): SectionDetailResponse | null;
commit(): void;
dispose(): void;
}
@@ -177,6 +178,9 @@ export const pipelineDetail = (projectId: string): SectionDetailResponse | null
export const pagePipeline = (projectId: string): DesignPipeline | null =>
pages.get(projectId)?.pipe ?? null;
/** 노선 초안을 저장함(472-6 6-B) — 초안 전 관 · 구조물을 버림(노선 초안이 비어도 「버림」 되돌림 안 함). */
export const commitRouteFacilities = (projectId: string): void => pages.get(projectId)?.commit();
export function disposePagePipeline(projectId: string): void {
pages.get(projectId)?.dispose();
pages.delete(projectId);
@@ -639,6 +643,7 @@ function createPagePipeline(
reconcile,
ownsCross: Boolean(options.savedCross),
detail: () => draftDetailOf(projectId),
commit: () => void (beforeDraft = null),
dispose() {
disposed = true;
setDraftSectionDetail(projectId, null);