From e8698a7fe3f220507653f95cdb2a80211df41145 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 6 Oct 2026 11:44:34 +0900 Subject: [PATCH 01/85] =?UTF-8?q?chore(docs):=20=EA=B3=B5=EC=9C=A0=20?= =?UTF-8?q?=EC=9A=94=EA=B5=AC=20=EB=AC=B8=EC=84=9C=20=EB=A7=9E=EC=B6=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/raw/사용자요구/2026-10-05_수정요구.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/raw/사용자요구/2026-10-05_수정요구.md b/docs/raw/사용자요구/2026-10-05_수정요구.md index 740f9584f..241734bd4 100644 --- a/docs/raw/사용자요구/2026-10-05_수정요구.md +++ b/docs/raw/사용자요구/2026-10-05_수정요구.md @@ -160,3 +160,9 @@ (10-6 사용자 · 추가 요청) - 안전부대용지 그룹의 사토장의 기준측점 표현이 예전 코드입. 토취장과 동일하게 구성 + +(10-6 사용자 · 다음 수정) + - B05/B06의 종단도 내널에서 구조물 알약을 선택하면 정보 라벨이 나오는데 위치가 상하 제어 버튼에 가려져서 안보여 최상위로 올려주고 그럼 버튼이 가려지니까 Y축 방향으로 조금 쉬프트 해줘. 그리고 안에 내용은 중요한 정보만 보여주면 됨. 지금은 너무 많이 나와. 중요한 정보라면 아마 기준 측점 정보와 컨테이너가 있는 경우 제일 앞에 있는 옵션값만 있어도 될것같아. + +(10-6 사용자 · 신규 기능) +다음은 신규 기능이야. 구조물 조합을 지정해야하는 경우에가 있는데 이때 좌측 패널의 구조물 리스트의 항목들에 측점정보 좌측에 연결되었거나 연결되지 않은 정보를 알려주는 기능이 있었으면 함. 이때 구조물에 따라 선택이나 필수 정보들에 의해 램프와 램프의 색상으로 표현되게 하면 될것같아. 램프영역에 의해 글자들의 배열이 깨지는건 싫으니 별도의 영역을 먼저지정하고 램프는 3행 다열 구조로 구성해줘. 램프의 사이즈는 작아도 되니 현재의 리스트 높이를 깨지 않는 범위에서 진행해줘. From 8aea7b8cbf77b16b2c1e32e21ba71ca46e95bf35 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 6 Oct 2026 12:03:59 +0900 Subject: [PATCH 02/85] =?UTF-8?q?fix(structure):=20=EB=B9=88=20=C2=B7=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=20=EA=B3=A0=EB=A5=B4=EA=B8=B0=20=EC=B9=B8?= =?UTF-8?q?=EC=97=90=20=EA=B7=B8=EB=A6=BC=EC=9D=B4=20=EC=93=B0=EB=8A=94=20?= =?UTF-8?q?=EA=B0=92=20=ED=91=9C=EC=8B=9C(54-13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 명세 폼 고르기 칸 — 비었거나 자동 규칙이면 빈 보기 자리에 「값 (기본)」 · 「값 (자동)」 · 고른 값과 구별 · 저장 값 그대로 - 배관: 관경 · 유출 구조 = 정의 기본값 · 유입 구조 · 집수정 모양 · 벽 형태 = 횡단 기하 결과(세션 유입 형식 반영) - 옛 「자동(규칙)」(유입 기슭막이 + 형식 없음) = 「집수정 (자동)」 등 그림 결과 · 유입 구조를 고를 때까지 형식 revet 안 굳음 - 그림 값을 보이던 위 칸 아래를 고치면 그 위 값을 고른 것(집수정 높이 → 집수정) - 세월교 관경 · 유입 · 유출 / BOX 규격 · 유입 · 유출 = 정의 기본값(날개벽 설치 규칙 = 엔진과 같음) - 정의 그룹 꼴 칸 — 빈 칸에 정의 기본값이 있으면 「값 (기본)」 - 시험: ui_checks/54-13_그림값_표시.js Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NPJGtfXo6GMbcpiboQC4uK --- A00_Common/design/design_structure_form.ts | 58 +++- .../design/design_structure_pipe_calc.ts | 35 +++ A00_Common/design/design_view_cross.ts | 3 + .../B05_Profile_UI_Drainage_Facility.ts | 95 ++++++- .../B05_Profile_UI_Structures_Fields.ts | 9 +- .../tester/ui_checks/54-13_그림값_표시.js | 255 ++++++++++++++++++ 6 files changed, 441 insertions(+), 14 deletions(-) create mode 100644 resources/tester/ui_checks/54-13_그림값_표시.js diff --git a/A00_Common/design/design_structure_form.ts b/A00_Common/design/design_structure_form.ts index 4adf4a6c4..875291406 100644 --- a/A00_Common/design/design_structure_form.ts +++ b/A00_Common/design/design_structure_form.ts @@ -59,6 +59,14 @@ export interface SpecFormHooks { * [추가] · [빼기] 없음 · 줄면 끝에서부터 가림(값은 남음 · 54-10) · null = 모름(저장된 것 그대로) · * undefined = 손 [추가]. */ count?: (c: SpecContainer) => number | null | undefined; + /** 그림이 쓰는 값(54-13) — 고르기 칸이 비었거나 자동 규칙일 때 그 값 · 꼬리(「기본」 · 「자동」) · + * null = 없음. 보여 주기만(값 · 저장은 사용자가 고를 때만). `values` = 보이는 값(위 칸 반영). */ + shown?: ( + c: SpecContainer, + item: SpecItem, + values: Record, + index: number, + ) => { value: string; tag: string } | null; } export interface SpecForm { @@ -105,18 +113,27 @@ export function createSpecForm(links: SpecLinks | null, hooks: SpecFormHooks = { return slot; }; - const control = (c: SpecContainer, item: SpecItem, values: Instance): HTMLElement => { + const control = ( + c: SpecContainer, + item: SpecItem, + values: Instance, + tag?: string, + ): HTMLElement => { if (item.kind === "select") { const select = document.createElement("select"); const choices = choicesOf(item, values); + const now = values[item.id] ?? ""; + const drawn = choices.find((ch) => ch.value === now); + // 그림이 쓰는 값은 빈 보기 자리에 꼬리를 달아 보임 — 고른 값과 구별(54-13) + const name = drawn ? choiceLabel(c, item, drawn, names) : now; + const blank = !tag ? "— 안 정함 —" : name ? `${name} (${tag})` : tag; select.replaceChildren( - new Option("— 안 정함 —", ""), + new Option(blank, ""), ...choices.map((ch) => new Option(choiceLabel(c, item, ch, names), ch.value)), ); - const now = values[item.id] ?? ""; // 선택지 밖 옛 값은 그 값만 남겨 보임(지운 값을 몰래 바꾸지 않음) - if (now && !choices.some((ch) => ch.value === now)) select.add(new Option(now, now)); - select.value = now; + if (!tag && now && !drawn) select.add(new Option(now, now)); + select.value = tag ? "" : now; return select; } if (item.kind === "text") { @@ -139,7 +156,19 @@ export function createSpecForm(links: SpecLinks | null, hooks: SpecFormHooks = { return stepper(input, item.step ?? 0.1); }; - const onEdit = (c: SpecContainer, item: SpecItem, values: Instance, raw: string): void => { + const onEdit = ( + c: SpecContainer, + item: SpecItem, + values: Instance, + raw: string, + view: Instance, + ): void => { + // 그림 값을 보이던 위 칸 아래를 고침 = 그 위 값을 고른 것 — 다른 갈래 값은 비움(54-13) + const parent = item.by?.item; + if (parent && view[parent] !== values[parent]) { + values[parent] = view[parent]; + for (const child of c.items) if (child.by?.item === parent) values[child.id] = ""; + } values[item.id] = raw; if (item.split) { const order = [item.split, ...(recent.get(values) ?? []).filter((r) => r !== item.split)]; @@ -170,15 +199,26 @@ export function createSpecForm(links: SpecLinks | null, hooks: SpecFormHooks = { const title = containerTitle(c, names, groupNames[c.link]); const box = group(c.required ? title : `${title} ${index + 1}`); box.root.dataset.specContainer = c.id; + // 보이는 값 = 고른 값 + 그림이 쓰는 값(54-13) · 위 칸이 다른 갈래를 보이면 아래 칸은 빈 채로 + const view: Instance = { ...values }; + const tags = new Map(); + for (const item of c.items) { + if (item.by && view[item.by.item] !== values[item.by.item]) view[item.id] = ""; + const drawn = item.kind === "select" ? hooks.shown?.(c, item, view, index) : null; + if (!drawn) continue; + view[item.id] = drawn.value; + tags.set(item.id, drawn.tag); + } const fields = c.items - .filter((item) => item.kind === "auto" || !item.by || branchOf(item, values)) + .filter((item) => item.kind === "auto" || !item.by || branchOf(item, view)) .map((item) => { - const input = control(c, item, values); + const input = control(c, item, view, tags.get(item.id)); const wrap = labeled(itemLabel(c, item, names), input); wrap.dataset.specItem = `${c.id}.${item.id}`; + if (tags.has(item.id)) wrap.dataset.specShown = tags.get(item.id); const target = input.querySelector?.("input, select") ?? input; target.addEventListener("change", () => - onEdit(c, item, values, (target as HTMLInputElement | HTMLSelectElement).value), + onEdit(c, item, values, (target as HTMLInputElement | HTMLSelectElement).value, view), ); return wrap; }); diff --git a/A00_Common/design/design_structure_pipe_calc.ts b/A00_Common/design/design_structure_pipe_calc.ts index 6e60c27bf..357ab0857 100644 --- a/A00_Common/design/design_structure_pipe_calc.ts +++ b/A00_Common/design/design_structure_pipe_calc.ts @@ -25,6 +25,13 @@ export function setPipeExtraCountSource(source: (section: CrossSection) => numbe extraCountSource = source; } +/** 유입 형식을 대는 곳 — 횡단 보기의 세션 값 우선(`valueFor`) · 없으면 정본 patch(54-13). */ +type InletChoice = NonNullable["inlet_structure"]; +let inletSource: ((section: CrossSection) => InletChoice) | null = null; +export function setPipeInletSource(source: (section: CrossSection) => InletChoice): void { + inletSource = source; +} + /** 그 관의 주인 측점(관 자리에서 가장 가까운 측점) — 횡단 자료가 없으면 null. */ function ownerSection( chainageM: number | null, @@ -64,6 +71,34 @@ export function pipeExtraCount(chainageM: number | null): number | null { return computeStoredLayouts(probe, sections)?.culvert?.extraWalls.length ?? outlet; } +/** 그림이 쓰는 유입 · 유출 값(54-13) — 집수정 모양(없으면 null = 흙막이 벽) · 벽 형태(유입 · 유출 · + * 흙막이 n). 폼 빈 · 자동 칸에 보여 주기만. 횡단 자료가 없으면 null(모름). */ +export function pipeDrawn(chainageM: number | null): { + basin: string | null; + forms: Record; + extras: Array; +} | null { + const found = ownerSection(chainageM); + const design = found?.owner.design; + if (!found || !design) return null; + const { owner, sections } = found; + const outlet = extraCountSource?.(owner) ?? design.extra_wall_counts?.outlet ?? 0; + const counts = { basin: 0, ...design.extra_wall_counts, outlet }; + const inlet = inletSource?.(owner) ?? design.inlet_structure; + const probe = { + ...owner, + design: { ...design, extra_wall_counts: counts, inlet_structure: inlet }, + }; + const layout = computeStoredLayouts(probe, sections)?.culvert; + if (!layout) return null; + const formOf = (role: string) => layout.walls.find((w) => w.role === role)?.form ?? null; + return { + basin: layout.basin?.shape ?? null, + forms: { inlet: formOf("inlet"), outlet: formOf("outlet") }, + extras: layout.extraWalls.map((w) => w.form), + }; +} + /** 흙막이 높이 빈 칸 안내 — 관경 기준 최소 높이(엔진이 빈 칸을 이 값으로 그림). */ export function guardHeightHint(diameterMm: string): string { const d = Number(diameterMm || "1000") / 1000; diff --git a/A00_Common/design/design_view_cross.ts b/A00_Common/design/design_view_cross.ts index 065766020..0ce481802 100644 --- a/A00_Common/design/design_view_cross.ts +++ b/A00_Common/design/design_view_cross.ts @@ -76,6 +76,7 @@ import type { DesignPageHost } from "./design_page"; import { pipeExtraCount, setPipeExtraCountSource, + setPipeInletSource, setPipeSectionsSource, } from "./design_structure_pipe_calc"; import { @@ -296,6 +297,8 @@ export async function mountCrossView( }); // 배관 흙막이 개수 = 유출 단 수(54-1) — 세션 값 우선 setPipeExtraCountSource((section) => stationControls.extraWalls.countFor(section, "outlet")); + // 폼이 보이는 유입 그림 값(54-13) — 세션 형식 우선 + setPipeInletSource((section) => stationControls.inletStructure.valueFor(section)); const sectionView = createSectionView( (chainageM, change) => { diff --git a/B05_Profile/B05_Profile_UI_Drainage_Facility.ts b/B05_Profile/B05_Profile_UI_Drainage_Facility.ts index 35ee3c8ea..15d55e4c7 100644 --- a/B05_Profile/B05_Profile_UI_Drainage_Facility.ts +++ b/B05_Profile/B05_Profile_UI_Drainage_Facility.ts @@ -46,6 +46,7 @@ import { WING_OUT_KEYS, } from "./B05_Profile_UI_Drainage_Facility_Fields"; import { createSpecForm, type SpecLinks } from "../A00_Common/design/design_structure_form"; +import { branchOf } from "../A00_Common/design/design_structure_spec"; import { PIPE_SPEC } from "../A00_Common/design/design_structure_pipe"; import { BOX_SPEC, @@ -57,6 +58,7 @@ import { FORD_SPEC, withLegacyGuards } from "../A00_Common/design/design_structu import { fordHeightHint, fordHeightM } from "../A00_Common/design/design_structure_ford_calc"; import { guardHeightHint, + pipeDrawn, pipeExtraCount, pipeLengthM, } from "../A00_Common/design/design_structure_pipe_calc"; @@ -212,6 +214,8 @@ export interface FacilityOptionsForm { definition?: { spec_names?: Record; groups?: Array<{ id: string; name: string }>; + /** 옵션 정의 기본값 — 빈 고르기 칸이 그림 값을 보임(54-13). */ + options?: Array<{ key: string; default: unknown }>; } | null, ) => void; /** 배관 명세 컨테이너 「구조물 조합」 잇기 자리 — 폼이 패널 그룹 값에 이음(PLAN 52-1). */ @@ -267,7 +271,52 @@ export function createFacilityOptionsForm( clear: (key) => linkSource?.clear(key), set: (key, item) => linkSource?.set(key, item), }; + // 그림이 쓰는 값(54-13) — 빈 고르기 칸 = 정의 기본값(엔진 · 횡단도가 그 값으로 그림) · 보여 주기만 + let defaults: Record = {}; + const byDefault = (key: string | undefined): { value: string; tag: string } | null => { + const value = key ? defaults[key] : null; + return value === null || value === undefined || value === "" + ? null + : { value: String(value), tag: "기본" }; + }; + /** 빈 날개벽 설치 = 정의 기본 설치(옛 「있음」 · 빈 값 = 날개벽 · 엔진 `_wing_spec`). */ + const wingDefault = (key: string): { value: string; tag: string } => { + const value = String(defaults[key] ?? ""); + return { value: ["없음", "흙막이"].includes(value) ? value : "날개벽", tag: "기본" }; + }; + // 유입 「자동(규칙)」 = 기슭막이 + 유입 형식 auto(옛 값 · 정의 기본) — 그림은 지형 규칙이 집수정 · 흙막이를 + // 정함. 사용자가 유입 구조를 고를 때까지 저장도 그대로(흙막이 고름의 형식 revet 을 안 적음) + let inletAuto: { structure?: string | number } | null = null; + const inletIsAuto = (): boolean => + !!inletAuto && pipeForm.state().inlet?.[0]?.structure === "기슭막이"; + // 그림 계산은 한 번 그릴 동안 한 번만(칸마다 부름) + let drawnMemo: ReturnType | undefined; + const drawnNow = (): ReturnType => { + if (drawnMemo === undefined) { + drawnMemo = pipeDrawn(chainage); + queueMicrotask(() => (drawnMemo = undefined)); + } + return drawnMemo; + }; const pipeForm = createSpecForm(specLinks, { + shown: (c, item, values, index) => { + if (c.id === "inlet" && item.id === "structure" && (!values.structure || inletIsAuto())) { + const drawn = drawnNow(); + return drawn + ? { value: drawn.basin ? "집수정" : "기슭막이", tag: "자동" } + : { value: "", tag: "자동(지형 규칙)" }; + } + if (values[item.id]) return null; + if (item.id !== "form") return byDefault(branchOf(item, values)?.key); + const basin = c.id === "inlet" && values.structure === "집수정"; + const drawn = drawnNow(); + const form = basin + ? drawn?.basin + : c.id === "soil_add" + ? drawn?.extras[index] + : drawn?.forms[c.id]; + return form ? { value: form, tag: basin ? "자동" : "기본" } : null; + }, auto: (_c, item) => { if (item.id !== "length") return ""; const length = pipeLengthM(chainage); @@ -276,13 +325,21 @@ export function createFacilityOptionsForm( // 흙막이 개수 = 유출 「추가 기슭막이(단)」(54-1) count: (c) => (c.id === "soil_add" ? pipeExtraCount(chainage) : undefined), hint: (c, item, state) => { - const soil = c.id !== "inlet" || state.inlet?.[0]?.structure === "기슭막이"; + const soil = + c.id !== "inlet" || + (state.inlet?.[0]?.structure === "기슭막이" && !(inletIsAuto() && drawnNow()?.basin)); return item.id === "height" && soil ? guardHeightHint(state.pipe?.[0]?.diameter ?? "") : ""; }, onChange: (c, item) => { + if (c.id === "inlet" && item.id === "structure") inletAuto = null; if (c.id === "inlet" && (item.id === "structure" || item.id === "form")) inletStructureHandler?.(inletStructureOf()); emit(); + // 고른 뒤 그림이 바뀜 — 자동 표시를 새 그림으로 다시 그림(54-13) + if (c.id === "inlet") { + drawnMemo = undefined; + pipeForm.refresh(); + } }, }); // 조정창에서 옮겨 오는 행(단 수·옵션)이 붙을 자리 — 유입 · 유출 컨테이너 끝(2026-08-29 지시 4) @@ -303,6 +360,11 @@ export function createFacilityOptionsForm( const fordNeed = (): number | null => fordHeightM(fordFlow, Number(fordForm.state().ford?.[0]?.width ?? "")); const fordForm = createSpecForm(specLinks, { + shown: (c, item, values) => { + if (values[item.id]) return null; + if (c.id !== "ford") return wingDefault(c.id === "inlet" ? "wing_in" : "wing_out"); + return item.id === "diameter" ? byDefault("pipe_diameter_mm") : null; + }, hint: (c, item, state) => c.id === "ford" && item.id === "height" ? fordHeightHint(fordFlow, Number(state.ford?.[0]?.width ?? "")) @@ -368,7 +430,18 @@ export function createFacilityOptionsForm( }; // ── BOX암거 = 사용자 구조물 표 02 명세(PLAN 52-2) — 본체 · 유입 구조 · 유출 구조 ── - const boxForm = createSpecForm(specLinks, { onChange: () => emit() }); + const boxForm = createSpecForm(specLinks, { + onChange: () => emit(), + shown: (c, item, values) => { + if (values[item.id]) return null; + if (c.id !== "body") return wingDefault(c.id === "inlet" ? "wing_in" : "wing_out"); + const size = bodyOf({ + body_width_m: Number(defaults.body_width_m ?? 2), + body_height_m: Number(defaults.body_height_m ?? 2), + }).size; + return item.id === "size" && size ? { value: size, tag: "기본" } : null; + }, + }); // 날개벽 칸 — 세월교 · BOX 가 같은 조각을 쓰던 자리 · 조정 행은 명세 유입 · 유출 칸으로 옮겨 붙음 const wingInFields = createWingFields("날개벽(유입)", WING_IN_KEYS); const wingOutFields = createWingFields("날개벽(유출)", WING_OUT_KEYS); @@ -460,8 +533,10 @@ export function createFacilityOptionsForm( inletStructure: inletStructureOf, setInletStructure(value) { // 조정창 형식 → 유입 보호공 구조 · 형태(자동 = 고른 구조는 지키고 형태만 비움) - if (value === "revet") pipeForm.setValue("inlet", "structure", "기슭막이"); - else if (value !== "auto") pipeForm.setValue("inlet", "structure", "집수정"); + if (value === "revet") { + inletAuto = null; + pipeForm.setValue("inlet", "structure", "기슭막이"); + } else if (value !== "auto") pipeForm.setValue("inlet", "structure", "집수정"); if (value !== "revet" && pipeForm.state().inlet?.[0]?.structure === "집수정") pipeForm.setValue("inlet", "form", value === "auto" ? "" : value); syncVisibility(); @@ -505,9 +580,16 @@ export function createFacilityOptionsForm( // 받은 값만 칸에 — 없으면 「안 정함」(새 시설은 부르는 쪽이 등록부 기본값을 실어 줌 · 46-7). const groups = Object.fromEntries((definition?.groups ?? []).map((g) => [g.id, g.name])); const names = definition?.spec_names ?? {}; + defaults = Object.fromEntries((definition?.options ?? []).map((o) => [o.key, o.default])); if (facility === "pipe") { // 정의 파일의 옛 이름 「흙막이 추가」 — 명세 이름 「흙막이」가 앞섬(54-1) const { soil_add: _old, ...pipeNames } = names; + const kind = options.inlet_structure; + inletAuto = + options.inlet_type === "기슭막이" && + !["revet", "I", "L", "U"].includes(String(kind ?? "")) + ? { structure: kind } + : null; pipeForm.write(PIPE_SPEC, options, pipeNames, groups); } if (facility === "box_culvert") { @@ -537,6 +619,11 @@ export function createFacilityOptionsForm( // 고른 칸만 싣는다 — 「안 정함」은 빈 값(기본값을 몰래 확정으로 안 바꿈). if (current === "pipe") { Object.assign(options, pipeForm.read()); // 명세 컨테이너 값 = 옛 키 그대로(PLAN 52-1) + // 자동(규칙)은 고를 때까지 그대로 — 보여 주기만으로 파일이 안 바뀜(54-13) + if (inletIsAuto()) { + if (inletAuto!.structure === undefined) delete options.inlet_structure; + else options.inlet_structure = inletAuto!.structure; + } } else if (current === "box_culvert") { // 정본은 폭 · 높이 두 칸 — 규격이면 규격 수 · 사용자 입력이면 명세 숫자 칸(PLAN 52-2) Object.assign(options, boxForm.read(), bodyOptions(boxForm.state().body?.[0])); diff --git a/B05_Profile/B05_Profile_UI_Structures_Fields.ts b/B05_Profile/B05_Profile_UI_Structures_Fields.ts index 3ea90331b..8f446c04f 100644 --- a/B05_Profile/B05_Profile_UI_Structures_Fields.ts +++ b/B05_Profile/B05_Profile_UI_Structures_Fields.ts @@ -65,7 +65,14 @@ export function optionControl( // 툴팁 — 표가 아직 안 읽는 칸이면 그 사유가 먼저(넣어도 안 바뀜을 알아야 함), 아니면 비울 때의 뜻. const tip = option.not_in_table ?? option.empty_means ?? ""; if (option.input === "select") { - const blank = option.required ? "— 선택 —" : "— 안 정함 —"; + // 빈 칸이 쓰는 정의 기본값은 빈 보기에 꼬리를 달아 보임 — 값은 안 고름(54-13) + const fallback = option.default === null || option.default === "" ? null : option.default; + const blank = + fallback !== null && fallback !== undefined + ? `${label(String(fallback))} (기본)` + : option.required + ? "— 선택 —" + : "— 안 정함 —"; // 정의에서 뺀 선택지(48)를 고른 옛 값 — 그 값만 남겨 보임(값을 잃지 않음) const kept = value && !option.choices.includes(value) ? [value] : []; const element = select([ diff --git a/resources/tester/ui_checks/54-13_그림값_표시.js b/resources/tester/ui_checks/54-13_그림값_표시.js new file mode 100644 index 000000000..07f6a2918 --- /dev/null +++ b/resources/tester/ui_checks/54-13_그림값_표시.js @@ -0,0 +1,255 @@ +/* 54-13 — 좌측 폼 고르기 칸이 그림이 쓰는 값(기본값 · 자동 규칙 결과)을 보이는가 · 보여 주기만으로 값이 안 바뀌는가 + * 시작 화면: B06 횡단설계(#/b06-section) 또는 B05 종단설계(#/b05-profile) · 검증 프로젝트(sub6_검증) · 로그인 + * 부르는 법: 단계마다 한 번씩 — 앞에 `window.__m5413 = "단계";` · 결과 `sessionStorage.getItem("__5413_out_{단계}")` + * check → 목록의 배관 · 세월교 · BOX 전부를 열어 폼 글 ↔ 그림(B06 카드 SVG 글 · 벽 툴팁 · 상세 세트) 대조 · + * B05 에서 부르면 B06 에서 읽은 폼 글과 같은지 · 초안(관 지점 세션) 안 생김 + * old → 4+5 배관을 옛 「자동(규칙)」(유입 기슭막이 · 형식 없음)으로 초안에 넣고 새로 고침 + * oldpick→ (새로 고친 뒤) 폼 = 그림 · 관경만 고르면 유입 형식 안 굳음 · 흙막이 고르면 revet · 그림 벽 · + * 12+18 배관 집수정 높이 고침 = 집수정을 고른 것 + * box → 17+12 세월교(빈 칸) 대조 · 세션에서만 BOX 로 바꾸고 칸을 비워 규격 · 유입 · 유출 = 기본 · 저장 칸 없음 + * restore→ 초안 지우고 새로 고침 · 서버 관 지점 = 처음 사진 + * 쓰는 것: sessionStorage 만(서버 저장 없음) + * 기대 수치: 모든 단계 bad = [] + */ +(async () => { + const MODE = window.__m5413 || "check"; + const w = (ms) => new Promise((r) => setTimeout(r, ms)); + const until = async (fn, ms = 15000) => { + for (let t = 0; t < ms; t += 200) { + if (fn()) return true; + await w(200); + } + return false; + }; + const pid = localStorage.getItem("frd_current_project_id"); + const DRAFT = `aislo:draft:pipes:${pid}`; + const B06 = location.hash.includes("b06"); + const txt = (el) => el.innerText.replace(/\s+/g, " ").trim(); + const flat = (s) => String(s ?? "").replace(/\s+/g, ""); + const out = { mode: MODE, page: B06 ? "B06" : "B05", bad: [] }; + const bad = (what) => out.bad.push(what); + const done = () => sessionStorage.setItem(`__5413_out_${MODE}`, JSON.stringify(out)); + const api = async () => + (await (await fetch(`/api/projects/${pid}/drainage/pipe-points`)).json()).pipe_points; + const rows = () => [...document.querySelectorAll(".b05-route__irregular-list li")]; + const rowOf = (head) => rows().find((li) => txt(li).startsWith(head)); + const draft = (at) => { + const raw = sessionStorage.getItem(DRAFT); + const list = raw ? (JSON.parse(raw).value ?? JSON.parse(raw)) : null; + return list?.find((p) => Math.abs(p.chainage_m - at) < 0.51) ?? null; + }; + const spec = () => + [...document.querySelectorAll(".b05-structure__spec")].find((s) => s.offsetParent); + /** 폼 고르기 칸 `{항목: 보이는 글}` · 꼬리 표시(data-spec-shown) 칸 목록. */ + const formOf = () => { + const fields = {}; + const tagged = []; + for (const wrap of spec()?.querySelectorAll("[data-spec-item]") ?? []) { + const sel = wrap.querySelector("select"); + if (!sel) continue; + fields[wrap.dataset.specItem] = sel.options[sel.selectedIndex]?.text ?? ""; + if (wrap.dataset.specShown) tagged.push(wrap.dataset.specItem); + } + return { fields, tagged }; + }; + const detailAt = (at) => { + const key = Object.keys(sessionStorage).find((k) => k.includes("section-detail")); + const raw = key ? JSON.parse(sessionStorage.getItem(key)) : null; + const list = (raw?.value ?? raw)?.cross_sections ?? []; + return list.reduce( + (a, b) => (Math.abs(b.chainage_m - at) < Math.abs((a?.chainage_m ?? 1e9) - at) ? b : a), + null, + ); + }; + /** 그림 — 고른 카드 SVG 글 · 벽 툴팁(역할 + 형태). */ + const drawn = () => { + const svg = document.querySelector(".b06-cross-card--selected svg"); + if (!svg) return null; + return { + labels: [...svg.querySelectorAll(".b06-chart__culvert-label")].map((t) => t.textContent), + walls: [...svg.querySelectorAll(".b06-chart__culvert-revet title")].map( + (t) => t.textContent.split(" H=")[0], + ), + }; + }; + const open = async (head) => { + const row = await until(() => rowOf(head)).then(() => rowOf(head)); + if (!row) return (bad(`${head}: 목록에 없음`), false); + row.click(); + await until(() => spec() && (!B06 || document.querySelector(".b06-cross-card--selected svg"))); + await w(1200); + return true; + }; + const fire = (sel, value) => { + sel.value = value; + sel.dispatchEvent(new Event("change", { bubbles: true })); + }; + const selectOf = (item) => spec()?.querySelector(`[data-spec-item="${item}"] select`); + const SHAPE = { I형: "I형", L형: "ㄴ형", ㄷ형: "ㄷ형" }; + /** 폼 글 ↔ 그림 — 종류마다 그림이 쓰는 값을 따로 읽어 대조. */ + const compare = (head, at, kind) => { + const { fields, tagged } = formOf(); + const pic = B06 ? drawn() : null; + const set = detailAt(at); + const got = { head, fields, tagged, pic }; + const blank = Object.entries(fields).filter( + ([k, v]) => v === "— 안 정함 —" && !/^(soil_add|chute_add)/.test(k), + ); + if (blank.length) bad(`${head}: 빈 칸 글 ${blank.map(([k]) => k)}`); + if (!pic) return got; // B05 — 글 대조는 B06 사진과 + const head0 = (v) => flat(v).replace(/\((기본|자동)\)$/, ""); + if (kind === "pipe") { + const basin = pic.labels.find((l) => l.startsWith("집수정")); + const inlet = head0(fields["inlet.structure"]); + if ((inlet === "집수정") !== !!basin) bad(`${head}: 유입 ${inlet} ↔ 그림 ${basin ?? "벽"}`); + const form = head0(fields["inlet.form"]); + if (basin && !basin.includes(SHAPE[form] ?? "?")) bad(`${head}: 모양 ${form} ↔ ${basin}`); + for (const [side, role] of [ + ["inlet", "유입"], + ["outlet", "유출"], + ]) { + const wall = pic.walls.find((t) => t.startsWith(`${role} 기슭막이`)); + if (side === "inlet" && basin) continue; + const f = head0(fields[`${side}.form`]); + if (!wall || flat(wall) !== flat(`${role} 기슭막이 ${f}`)) + bad(`${head}: ${side} 형태 ${f} ↔ ${wall}`); + } + const d = Math.round((set?.culvert?.diameter_m ?? 0) * 1000); + if (tagged.includes("pipe.diameter") && head0(fields["pipe.diameter"]) !== String(d)) + bad(`${head}: 관경 ${fields["pipe.diameter"]} ↔ ${d}`); + } + if (kind === "ford") { + const label = pic.labels.find((l) => l.includes("Ø")) ?? ""; + if (!label.includes(`Ø${head0(fields["ford.diameter"])}`)) + bad(`${head}: 관경 ${fields["ford.diameter"]} ↔ ${label}`); + for (const side of ["in", "out"]) { + const wing = set?.ford?.[`wing_${side}`]?.installed; + const text = head0(fields[`${side === "in" ? "inlet" : "outlet"}.structure`]); + if (wing !== undefined && (text === "날개벽") !== wing) + bad(`${head}: ${side} ${text} ↔ 설치 ${wing}`); + } + } + if (kind === "box") { + const label = pic.labels.find((l) => l.startsWith("BOX")) ?? ""; + if (flat(label) !== `BOX${head0(fields["body.size"])}`) + bad(`${head}: 규격 ${fields["body.size"]} ↔ ${label}`); + } + return got; + }; + const KIND = { 배관: "pipe", 세월교: "ford", BOX암거: "box" }; + + try { + if (MODE === "check") { + if (!sessionStorage.getItem("__5413_orig")) + sessionStorage.setItem("__5413_orig", JSON.stringify(await api())); + const before = sessionStorage.getItem(DRAFT); + const heads = rows() + .map(txt) + .filter((t) => /^\d+\+\d+ (배관|세월교|BOX암거)/.test(t)); + const b06 = JSON.parse(sessionStorage.getItem("__5413_b06") ?? "{}"); + out.rows = []; + for (const t of heads) { + const head = t.split(" ").slice(0, 2).join(" "); + if (!(await open(head))) continue; + const station = head.split(" ")[0].split("+").map(Number); + const got = compare(head, station[0] * 20 + station[1], KIND[t.split(" ")[1]]); + out.rows.push(`${head} ${JSON.stringify(got.fields)} | ${JSON.stringify(got.pic)}`); + if (B06) b06[t] = got.fields; + else if (b06[t] && JSON.stringify(b06[t]) !== JSON.stringify(got.fields)) + bad(`${head}: B05 ${JSON.stringify(got.fields)} ≠ B06 ${JSON.stringify(b06[t])}`); + else if (!b06[t]) bad(`${head}: B06 사진 없음 — B06 에서 check 먼저`); + } + if (B06) sessionStorage.setItem("__5413_b06", JSON.stringify(b06)); + if (sessionStorage.getItem(DRAFT) !== before) bad("열기만 했는데 관 초안이 바뀜"); + out.count = heads.length; + } else if (MODE === "old") { + const list = (await api()).map(({ lonlat, ...rest }) => rest); + const pipe = list.find((p) => Math.abs(p.chainage_m - 85.05) < 0.51); + pipe.options = { ...pipe.options, inlet_type: "기슭막이" }; + delete pipe.options.inlet_structure; + sessionStorage.setItem(DRAFT, JSON.stringify(list)); + out.note = "초안 넣음 — 새로 고친 뒤 oldpick"; + done(); + location.reload(); + return; + } else if (MODE === "oldpick") { + await open("4+5 배관"); + out.start = compare("4+5 옛 자동", 85.05, "pipe"); + if (!flat(out.start.fields["inlet.structure"]).endsWith("(자동)")) + bad(`옛 자동 유입 글 ${out.start.fields["inlet.structure"]}`); + // 관경만 고름 — 유입 형식은 그대로(자동 유지) + fire(selectOf("pipe.diameter"), "1200"); + await w(2500); + out.afterDiameter = draft(85.05)?.options; + if (out.afterDiameter?.inlet_structure !== undefined) + bad(`관경만 골랐는데 형식 ${out.afterDiameter.inlet_structure}`); + if (out.afterDiameter?.inlet_type !== "기슭막이") + bad(`유입 저장 값 바뀜 ${out.afterDiameter?.inlet_type}`); + out.stillAuto = formOf().fields["inlet.structure"]; + // 흙막이를 고름 = 형식 revet · 그림 벽 + fire(selectOf("inlet.structure"), "기슭막이"); + await w(3500); + out.afterPick = draft(85.05)?.options; + if (out.afterPick?.inlet_structure !== "revet") + bad(`흙막이 골랐는데 형식 ${out.afterPick?.inlet_structure}`); + out.picked = compare("4+5 흙막이 고름", 85.05, "pipe"); + if (out.picked.fields["inlet.structure"] !== "흙막이") + bad(`고른 글 ${out.picked.fields["inlet.structure"]}`); + // 다른 관(자동 집수정) — 집수정 높이 고침 = 집수정을 고른 것 + await open("12+18 배관"); + const shown = formOf().fields["inlet.structure"]; + out.other = shown; + if (flat(shown) === "집수정(자동)") { + const h = spec().querySelector('[data-spec-item="inlet.height"] input'); + h.value = "1.5"; + h.dispatchEvent(new Event("change", { bubbles: true })); + await w(3000); + const o = draft(258.12)?.options; + out.basinEdit = o; + if (o?.inlet_type !== "집수정" || o?.inlet_basin_height_m !== 1.5) + bad(`집수정 높이 고침 저장 ${JSON.stringify(o)}`); + if (formOf().fields["inlet.structure"] !== "집수정") + bad(`높이 고친 뒤 글 ${formOf().fields["inlet.structure"]}`); + } + } else if (MODE === "box") { + await open("17+12 세월교"); + out.ford = compare("17+12 세월교", 352.14, "ford"); + const type = document.querySelectorAll( + ".b05-structure-section .b05-structure__grid select", + )[1]; + fire(type, "box_culvert"); + await until(() => rowOf("17+12 BOX암거")); + await w(3000); + // 새 종류는 정의 기본값이 값으로 실림(46-7) — 칸을 비워 옛 빈 저장과 같게 + for (const k of ["body.size", "inlet.structure", "outlet.structure"]) { + fire(selectOf(k), ""); + await w(1500); + } + await w(2000); + out.box = compare("17+12 BOX", 352.14, "box"); + const f = out.box.fields; + if (flat(f["body.size"]) !== "2.0×2.0(기본)") bad(`BOX 규격 ${f["body.size"]}`); + for (const k of ["inlet.structure", "outlet.structure"]) + if (flat(f[k]) !== "날개벽(기본)") bad(`BOX ${k} ${f[k]}`); + const o = draft(352.14)?.options ?? {}; + if (["body_width_m", "wing_in", "wing_out"].some((k) => k in o)) + bad(`보여 주기만 했는데 BOX 저장 칸 ${JSON.stringify(o)}`); + } else if (MODE === "restore") { + sessionStorage.removeItem(DRAFT); + // 고르기 단계가 남긴 B06 유입 형식 세션 · 그걸 얹은 상세 캐시(다시 받음) + for (const key of Object.keys(sessionStorage)) + if (key.includes(`inletstruct:${pid}`) || key.includes(`section-detail:${pid}`)) + sessionStorage.removeItem(key); + const orig = JSON.parse(sessionStorage.getItem("__5413_orig") ?? "null"); + const now = await api(); + out.same = JSON.stringify(now) === JSON.stringify(orig); + if (!out.same) bad("서버 관 지점이 처음 사진과 다름"); + done(); + location.reload(); + return; + } + } catch (error) { + bad(String(error?.stack ?? error)); + } + done(); +})(); From b2dd0b7cf380ef02e7bddaade62a412ed493c197 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 6 Oct 2026 12:04:33 +0900 Subject: [PATCH 03/85] =?UTF-8?q?chore(plan):=2054-16=20B05=20=C2=B7=20B06?= =?UTF-8?q?=20=EC=9E=90=EB=A3=8C=20=ED=95=9C=20=EA=B3=B3=20=EC=A1=B0?= =?UTF-8?q?=EC=82=AC=20=EA=B2=B0=EA=B3=BC=20=EB=B3=B4=EA=B4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FJqWQpoB1RE7hiaQ2wH8qV --- docs/raw/조사/2026-10-06_54-16_자료_한곳.md | 91 +++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 docs/raw/조사/2026-10-06_54-16_자료_한곳.md diff --git a/docs/raw/조사/2026-10-06_54-16_자료_한곳.md b/docs/raw/조사/2026-10-06_54-16_자료_한곳.md new file mode 100644 index 000000000..8a1e5415e --- /dev/null +++ b/docs/raw/조사/2026-10-06_54-16_자료_한곳.md @@ -0,0 +1,91 @@ +# 54-16 B05 · B06 자료 한 곳 확인 (조사 · 보고만) + +- 기준 커밋 `2104cc359` · 검증 프로젝트 `sub8_검증`(`c81b21f8…`) · 노선 224 +- 측정: 같은 창 안 넘김은 ORCA 탭 + `orca eval`. 도중 ORCA 탭이 통째로 새로 만들어져 세션 초안이 사라짐(앱 흠 아님) → 저장 · 새로고침 시나리오는 측정 전용 헤드리스 Chrome(같은 프로브 · 화면 안 띄움). ORCA 탭은 닫음 +- 값 되돌림: 높이 2 · 관경 1000 · 60m 계획고 865.48 · 3+0 측구 일반 으로 저장해 되돌림 확인. 단 횡단 저장 때 서버가 면적을 다시 계산해 누가토량은 −13,417.5 → −12,843.4 로 바뀜(서버 정본 재계산 결과 · 되돌릴 값 아님) + +## ① 자료마다 쥔 곳 + +세션 키 꼴 `aislo:{bucket}:{name}:{project}[:{route}]` (`A00_Common/b_page_state.ts:229-238`). 설계 가게(`design_store`)는 따로 값을 들지 않고 이 키를 바로 읽고 씀(`A00_Common/design/design_store.ts:133-153`) · 구독자 0. + +| 자료 | 기준 자리 | 같이 쥔 곳(두 벌) | 쓰는 곳 | 읽는 곳 | +|---|---|---|---|---| +| 구조물 목록 | ss `draft:structures` | 종단 다리 `ownStructures` · 횡단 패널 `structures` · 한 벌 폼 `structures` · 한 벌 종단도 `structures` · 서버 `structures.json`(보일 때마다 다시 받음) · 가게 칸 `structures`(아무도 안 씀) | `B05_Profile/B05_Profile_Api_Structures.ts:305` ← `B05_Profile_UI_Page_Structures.ts:245` · `B06_Section/B06_Section_UI_Page_Structures_Panel.ts:177` | `B05_Profile_UI_Page_Structures.ts:331` · `B06_..._Structures_Panel.ts:345` · `B06_Section_Section_Store.ts:61` | +| 구조물 옵션 | 구조물 초안 안 `options` | 명세 폼 `state`(`A00_Common/design/design_structure_form.ts:278,286`) | 폼 commit | `B05_Profile_UI_Structures_Panel_Commit.ts:94` | +| 관 옵션 | 관 초안 안 `options` | 배수유역도 `facilityStore` · 횡단 캐시 culvert/ford/box 스펙 · ss `culvertopt` · ss `revetx`/`fordadjust`/`boxadjust` | 종단 `B05_Profile_UI_Drainage_Panel.ts:612` · 횡단 `B06_..._Structures_Panel.ts:277-284` · `B06_Section_UI_Page_Span_Control.ts:112` · `B06_Section_UI_Page_Ford_Controls.ts:204,398` | `design_view_cross.ts:623`(마운트 한 번) · 저장 `B06_Section_Api_Culvert_Options.ts:64` | +| 컨테이너 값 | 관 `options` 의 `soil_add_{n}_*` | ss `extrawall`(단 수) · ss `extraspan` + 캐시 `extra_spans` · ss `revetx` · 모듈 전역 `sectionsSource`/`extraCountSource`(나중에 선 보기가 이김) | `B06_Section_UI_Page_Station_Controls.ts:324` · `B06_Section_UI_Page_Span_Control.ts:78-80` · `B06_Section_UI_Page_Pipe_Options.ts:229` | `design_structure_spec.ts:112-140` · `design_view_cross.ts:298` · `design_structure_pipe_calc.ts:32,60` | +| 잇기 | 관 · 구조물 초안 `summary_item`/`group_items` | 배수유역도 `facilityStore` · ss `revetlink`(마운트 때 한 번) | `B05_Profile_UI_Drainage_Panel.ts:599-600` · `B06_..._Structures_Panel.ts:245-259` | `B05_Profile_UI_Structures_Panel_Commit.ts:114,198` | +| 관 지점 | ss `draft:pipes` | 배수유역도 `pipeEditor` + `facilityStore` · `shared.lastPipes` · 종단 보기 `lastPipes` · 횡단 패널 `pipeFacilities` · 한 벌 폼 `pipeFacilities` · 종단 다리 `pipeStations`/`pipeMarks` · 서버 `pipe_points.json` | `B05_Profile_Api_Pipes_Draft.ts:27` ← `Drainage_Panel.ts:397` · `B06_..._Structures_Panel.ts:430` | `Drainage_Panel.ts:404` · `B06_..._Structures_Panel.ts:350` · `B06_Section_Section_Store.ts:105` | +| 종단 계획선 | ss `draft:alignment-draft` | 모듈 전역 EditState Map(`B05_Profile_UI_Profile_Edit.ts:143,188`) · 한 벌 종단도 `store`/`base` | `B05_Profile_UI_Profile_Edit.ts:198` | `:97` · `B06_Section_UI_Page_Design_Sync.ts:132` | +| 횡단 설계 patch | 메모리 캐시 Map(`B06_Section/B06_Section_Section_Store.ts:178-201` · 두 보기 공유) | ss `result:section-detail` 사본(받을 때만 씀 · 고침 안 받음) · ss `crossdesign` · ss `rockb`/`cutslope`/`berm`/`crossw`/`inletstruct`/`basinadjust`/`std-cross` · 종단 보기 `currentSectionDetail` · 횡단 보기 `sectionDetail` | `B06_Section_Cross_Design_Session.ts:55` · `design_view_cross.ts:270-296,430` | `B06_Section_Cross_Refresh.ts:253`(재계산 때만) · `B06_Section_UI_Page_Persist.ts:377` · 마운트 `design_view_cross.ts:565-567,612` | +| 사토 | 구조물 목록 안 사토장 | 캐시 `design.spoil_fill_*` | 서버 저장 때만 `B06_Section_Server_Calc_Prebuild.py:197` | `B06_Section_Cross_Refresh.ts:316-327`(저장분 폭 그대로) | +| 선택 상태 | ss `draft:structure-pick` | 가게 `selection` + ss `draft:selection`(아무도 안 씀) · 횡단 `appliedPick` | `design_selection.ts:152,172` | `design_selection.ts:112` · `B05_Profile_UI_Structure_Pick_Session.ts:34` | + +## ② 재현 (측정) + +같은 창 안 넘김 · 저장 전 + +| 자료 | B05 바꿈 → B06 | B06 바꿈 → B05 | +|---|---|---| +| 구조물 옵션(돌쌓기 높이) | 맞음 — 폼 1.5 · 카드 H=1.5m | 맞음 — 1.8 | +| 관 옵션(관경) | 맞음 — 1200 | 맞음 — 800 | +| 종단 계획선(60m ▲) | 맞음 — 865.68 | 맞음 — 865.78 | +| 선택 | 맞음 — 같은 구조물 고름 | 맞음 | +| **누가토량(같은 초안)** | **어긋남 — B05 −13,478.3 · B06 −12,888.7** | 넘긴 뒤 B05 가 B06 값(−12,931.8)으로 바뀜 | + +저장 · 새로고침 (B05: 높이 1.2 · 관경 1200 · ▲2 → B06: 측구 L형 · 관경 800 · 높이 1.0) + +| 단계 | 높이 | 관경 | 60m 계획고 | 3+0 측구 | 누가토량 | 판정 | +|---|---|---|---|---|---|---| +| 새로고침 뒤 B05 (저장 전) | 1 | 800 | 865.68 | (B05 안 보임) | **−12,915.6** (직전 −12,931.8) | **옛 값** — L형 초안이 계산에 안 얹힘 | +| 새로고침 뒤 B05 에서 [저장] → 새 창 | 1 | 800 | 865.68 | **일반** | −13,494.6 | **옛 값** — 「편집 내용을 저장했습니다」인데 L형이 안 나감 | +| 같은 창 → B06 | 1 | 800 | 865.68 | **일반**(ss 엔 L형 초안 남음) | −13,494.6 | **옛 값** — 화면은 일반 · [저장]하면 L형이 나감(화면 ≠ 저장) | +| B06 에서 [저장] → 새 창 | 1 | 800 | 865.68 | L형 | −12,931.8 | 맞음 | +| B06 관경 1000 바꾸고 바로 [저장] → 새 창 | 1 | **800** | 865.68 | L형 | −12,931.8 | **옛 값** — `pipe-points` PUT 두 번 · 둘째(배수유역도 메모리 800)가 덮음 | + +재지 않은 것(코드 읽기만): 컨테이너 값 · 잇기 · 사토 + +## ③ 원인 + +두 벌 (6) + +| # | 자리 | 왜 | +|---|---|---| +| D1 | 관 목록 세 벌 — ss 초안 · 배수유역도 메모리 · 횡단 `pipeFacilities` | [저장]이 초안을 보낸 **뒤** 배수유역도 메모리를 한 번 더 PUT(`A00_Common/design/design_shared.ts:275-281` → `B05_Profile/B05_Profile_UI_Drainage_Panel.ts:636-642`) → 늦은 메모리가 새 값을 덮음 | +| D2 | 관 옵션 네 곳 — 관 초안 · 횡단 캐시 스펙 · `culvertopt` · `revetx`/`fordadjust`/`boxadjust` | 저장 차례상 `culvertopt` 가 관 초안 뒤에 나가 이김(`design_save.ts:217-222,282-285`) | +| D3 | 흙막이 단 수 두 벌 — ss `extrawall` · 관 `soil_add_{n}_*` | 컨테이너 수는 `extrawall` 을 따름 · 모듈 전역 `sectionsSource` 는 나중에 선 보기가 이김 | +| D4 | 구조물 목록 — ss 하나 + 메모리 셋 + 보일 때마다 서버 | 숨은 쪽은 보일 때 서버 + ss 로 다시 세움(`B05_Profile_UI_Page_Structures.ts:319-322` · `B06_..._Structures_Panel.ts:334-341`) | +| D5 | 종횡단 상세 — 메모리 캐시 · ss 사본 · 종단 `currentSectionDetail` · 횡단 `sectionDetail` | ss 사본은 제자리 고침을 안 받아 늘 옛 값 · 종단 쪽은 진입 때만 받음(`design_view_profile.ts:410,442`) | +| D6 | 가게 빈 칸 셋(`structures` · `sectionDetail` · `selection`) + `draft:selection` 키 | 실제 자리는 다른 키 — 「한 곳」이 겉모양뿐 · `subscribe` 구독자 0 | + +다른 보기로 갈 때 덮음 · 안 얹음 + +- **카드 선택 초안이 재계산 길에서만 얹힘** — `crossDesignChoices` 를 읽는 곳은 `B06_Section/B06_Section_Cross_Refresh.ts:253`(계획고 재계산)과 저장(`B06_Section_UI_Page_Persist.ts:377`)뿐 → 새로고침 · 저장 뒤 카드는 서버 설계(일반)를 보이고 ss 엔 L형이 남음 (재현 2 · 3) +- **일반 [저장]은 횡단 보기가 섰을 때만 횡단 초안을 보냄** — 안 섰으면 `saveCachedCrossPatches` 가 캐시 메모리만(`B06_Section_Section_Store.ts:259`) · ss 초안(`crossdesign` · `rockb` 등) 빠짐 · 그래도 「저장했습니다」 (재현 3) +- 종단 보기 onShow 가 횡단 자료를 다시 안 읽음(`B05_Profile_UI_Page_Life.ts:30-35` · `design_view_profile.ts:548-551`) · `applyPipes(lastPipes)`(`:550`)가 끝나지 않은 메모리 목록을 폼에 실음 +- 횡단 onShow 에 관 옵션 초안 다시 얹기 없음 — 마운트 때만(`design_view_cross.ts:623`) +- 종단 [저장] 뒤 캐시를 비워도(`B05_Profile_UI_Page_Actions.ts:154`) 숨은 횡단 `sectionDetail` 은 옛 객체 → `forwardPipeOptions`(`design_view_profile.ts:299`)가 버린 객체를 고침 +- 관을 전부 지운 빈 초안 `[]` 을 「없음」으로 봐 서버 목록을 받음(`Drainage_Panel.ts:405-407`) → [저장]이 지운 관을 되살림 + +한쪽만 알림 + +- **구조물 · 관 바꿈이 횡단 면적에 다시 얹히는 길이 횡단 쪽에만** — `refreshDetailForStructures`(`design_view_cross.ts:143`) · 종단 보기에서 바꾸면 종단 누가토량이 옛 면적 (재현 1: 같은 초안 −13,478.3 대 −12,888.7) +- `toAll("onPipesChanged")`(`design_shared.ts:158-161`) — 횡단 쪽 묶음(`B06_Section_UI_Section_View_Profile.ts:179-216`)에 받는 칸 없음 → 실제로는 종단만 받음 +- 「구조물 배치」 폼 알림은 지금 보기에만(`design_shared.ts:183`) +- 관 옵션 넘김 한 방향 — 종단 → 횡단 `forwardPipeOptions` · 횡단 → 종단은 초안 + 200ms 재읽기(`design_view_cross.ts:146`)뿐 +- 숨은 종단 보기는 관 목록을 담기만(`design_view_profile.ts:153`) → 횡단에서 [저장]하면 옛 비정규 측점이 `uphill` 로 나감(`B05_Profile_UI_Page_Actions.ts:128-134`) + +## ④ 한 곳으로 모을 갈래 (8 · 작은 것부터) + +목표: 자료 하나 = 세션 키 하나(가게 칸 하나) · 두 보기는 읽기만 · 바꿈 알림 한 길 · 보기 넘길 때 서버로 덮지 않음 · [저장]은 세션 키를 그대로 보냄(5장 데이터 3층) + +| 차례 | 갈래 | 크기 | 고치는 재현 | +|---|---|---|---| +| 1 | 저장 줄기 관 한 번 — 둘째 `side.savePipes()` PUT 을 빼고 초안 하나만(시설 되붙이기는 초안 쪽에서) · `design_shared.ts:275-281` | 작음 | 관경 바로 저장 옛 값 | +| 2 | 카드 선택 초안(`crossdesign` · `rockb` · `cutslope` 등)을 상세를 **불러올 때 한 번** 캐시에 얹음(`B06_Section_Section_Store.ts` load) — 재계산 길에만 두지 않음 | 작음~중간 | 새로고침 뒤 카드 일반 · B05 누가토량 어긋남 | +| 3 | 일반 [저장]이 보기와 무관하게 횡단 ss 초안을 늘 보냄(`saveCachedCrossPatches` 가 ss 초안 포함) | 작음~중간 | B05 [저장] L형 빠짐 | +| 4 | ss `result:section-detail` 사본 — 제자리 고침을 같이 쓰거나 지움 | 작음 | 새로고침 뒤 옛 사본 | +| 5 | 구조물 · 관 바꿈 → 횡단 상세 벽 · 면적 다시 얹기를 공용 한 길로(어느 보기에서 바꿔도) · 종단 `currentSectionDetail` 대신 `Section_Store` 캐시 하나만 읽음 | 중간 | 같은 초안 누가토량 두 값 | +| 6 | 관 목록 한 벌 — 배수유역도 메모리 · 횡단 `pipeFacilities` · `shared.lastPipes` 를 ss 초안 읽기 전용으로 · `onPipesChanged` 를 두 보기 모두 · 빈 초안 `[]` 도 초안으로 | 중간 | 관 지점 두 벌 | +| 7 | 관 옵션 한 자리 — `culvertopt` · `revetx` · `extrawall` 을 관 초안 `options` 로 모음 · 흙막이 단 수 한 벌 · 저장 차례 겹침 없앰 | 큼 | 관 옵션 네 곳 | +| 8 | 가게를 실제 한 창구로 — 자료마다 키 하나 · `subscribe` 알림으로 두 보기 다시 그림 · 빈 칸 정리 · 보기 onShow 서버 재조회는 초안 없을 때만 | 큼 | 두 벌 전반 | From e0953e333e85e9fa15e9877128b5b8307b4c66c8 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 6 Oct 2026 12:12:50 +0900 Subject: [PATCH 04/85] =?UTF-8?q?fix(ui):=20=EC=A2=8C=EC=B8=A1=20=ED=8C=A8?= =?UTF-8?q?=EB=84=90=20=EC=95=84=EB=9E=98=20=EB=8B=A8=EC=B6=94=20=EB=AC=B6?= =?UTF-8?q?=EC=9D=8C=20=ED=95=9C=20=EC=96=91=EC=8B=9D=20=C2=B7=20[=3F]=20?= =?UTF-8?q?=EC=A0=95=EC=82=AC=EA=B0=81=20=C2=B7=20=EC=A4=84=EB=B0=94?= =?UTF-8?q?=EA=BF=88=20=EC=97=86=EC=9D=8C(54-20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 공용 규칙 한 곳(overlay.css) — 단추 사이 --btn-group-gap · 고르게 늘되 글보다 좁아지지 않음 · 줄바꿈 막음 - [?] 너비 = 높이(32px) - B05·B06 전용 여백 규칙(design_dock.css) 지움 — 공용으로 옮김 - 치수 재기 ui_checks/54-20_좌측단추_치수.js - 전: 높이 31.7·45.7(B04 [이 모델 확정] · B07 [현재 도면 확정] 두 줄) · 여백 8/16 섞임 · B06 [종단 보기] 글이 단추 꽉 참 · [?] 36×31.7 - 후: B02~B09 높이 31.7 하나 · 글 14px Inter 500 하나 · 줄바꿈·넘침 0 · 좁은 패널(280px)도 같음 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01W4uKaV4ZBhsJN4GHG7yRj4 --- A00_Common/design/design_dock.css | 7 -- .../tester/ui_checks/54-20_좌측단추_치수.js | 83 +++++++++++++++++++ ui_template/ui_template_help.css | 7 +- ui_template/ui_template_overlay.css | 15 ++++ 4 files changed, 102 insertions(+), 10 deletions(-) create mode 100644 resources/tester/ui_checks/54-20_좌측단추_치수.js diff --git a/A00_Common/design/design_dock.css b/A00_Common/design/design_dock.css index dcfcf207f..e69de29bb 100644 --- a/A00_Common/design/design_dock.css +++ b/A00_Common/design/design_dock.css @@ -1,7 +0,0 @@ -/* 좌측 패널 아래 고정 영역의 단추 넷([초기화][저장][확정][보기 전환]) — 좁은 패널에서도 글자가 - 두 줄로 꺾이지 않게 안쪽 여백을 줄이고 줄바꿈을 막는다(계획서 24-2b). */ -.b05-route__dock .b05-route__actions .ui-btn, -.b05-route__dock .b06-profile__actions .ui-btn { - padding-inline: var(--spacing-8); - white-space: nowrap; -} diff --git a/resources/tester/ui_checks/54-20_좌측단추_치수.js b/resources/tester/ui_checks/54-20_좌측단추_치수.js new file mode 100644 index 000000000..e99c7b4dd --- /dev/null +++ b/resources/tester/ui_checks/54-20_좌측단추_치수.js @@ -0,0 +1,83 @@ +/* 54-20 — B02~B09 좌측 패널 아래 공통 단추 묶음([?] · [초기화] · [저장] · [확정] · [횡단 보기] …) 치수 + * 시작 화면: 아무 B 화면(로그인 · 환경 배정 storage 프로젝트가 현재 프로젝트) + * 부르는 법: orca eval --expression "$(cat 이 파일)" · 1분 넘으면 끊기므로 + * `window.__btn5420 = ["b05-profile", …];` 를 앞에 붙여 나눠 부름 + * 쓰는 것: 없음(주소 이동 · 재기만 · 끝나면 처음 주소로) + * 기대 수치: + * - 줄마다 보이는 단추 h 하나 · fs 하나 · ff 하나 · 줄 안 gap 하나 · wrap = false · over = false + * - [?] = 정사각(w = h) + * - 좁은 패널(narrow = true 로 패널 폭을 최소로 줄여 다시 잼)에서도 wrap · over 없음 + */ +(async () => { + const w = (ms) => new Promise((r) => setTimeout(r, ms)); + const vis = (n) => n && n.offsetParent !== null; + const start = location.hash; + const routes = window.__btn5420 ?? [ + "b02-proj-register", + "b03-file-input", + "b04-preprocess", + "b05-profile", + "b06-section", + "b07-design-detail", + "b08-quantity", + "b09-estimation", + ]; + const measure = () => { + const help = [...document.querySelectorAll(".ui-help-btn")].find(vis); + const rows = help + ? [help.closest(".ui-sidebar-actions") ?? help.parentElement] + : [...document.querySelectorAll(".ui-sidebar-actions")].filter(vis); + return rows.map((row) => { + const btns = [...row.querySelectorAll("button")].filter(vis); + const rr = row.getBoundingClientRect(); + return { + row: row.className, + rowW: Math.round(rr.width), + gap: getComputedStyle(help?.parentElement ?? row).gap, + btns: btns.map((b) => { + const s = getComputedStyle(b); + const r = b.getBoundingClientRect(); + const text = document.createRange(); + text.selectNodeContents(b); + return { + t: b.innerText.trim(), + cls: b.className, + h: +r.height.toFixed(1), + w: +r.width.toFixed(1), + fs: s.fontSize, + fw: s.fontWeight, + ff: s.fontFamily.split(",")[0], + pad: s.padding, + bd: s.borderWidth + " " + s.borderStyle, + rad: s.borderRadius, + top: +(r.top - rr.top).toFixed(1), + wrap: text.getBoundingClientRect().height > parseFloat(s.fontSize) * 1.6, + // 글이 단추 안쪽(여백 뺀 폭)을 넘거나 단추가 줄 밖으로 나감 + over: + text.getBoundingClientRect().width > + b.clientWidth - parseFloat(s.paddingLeft) - parseFloat(s.paddingRight) + 0.5 || + r.right > rr.right + 1, + }; + }), + }; + }); + }; + const out = []; + for (const route of routes) { + location.hash = `#/${route}`; + await w(4500); + const res = { page: route.slice(0, 3).toUpperCase(), rows: measure() }; + const panel = document.querySelector(".ui-workflow-overlay__panel--title"); + if (window.__btn5420narrow && panel) { + const was = panel.style.width; + panel.style.width = "var(--wf-left-panel-narrow-width)"; // 좁은 창(860px 아래) 폭 + await w(400); + res.narrowW = Math.round(panel.getBoundingClientRect().width); + res.narrow = measure(); + panel.style.width = was; + } + out.push(res); + } + location.hash = start; + return JSON.stringify(out); +})(); diff --git a/ui_template/ui_template_help.css b/ui_template/ui_template_help.css index 7c9f3f69e..3585bea06 100644 --- a/ui_template/ui_template_help.css +++ b/ui_template/ui_template_help.css @@ -2,9 +2,10 @@ .ui-sidebar-actions .ui-help-btn, .ui-help-btn { flex: none; - width: auto; - min-width: 2.25rem; - padding-inline: var(--spacing-12); + /* 정사각 — 너비 = 높이(글 한 줄 · 위아래 여백 · 테두리) */ + width: calc(1em + 2 * var(--spacing-8) + 2px); + min-width: 0; + padding-inline: 0; } .ui-help.ui-modal { diff --git a/ui_template/ui_template_overlay.css b/ui_template/ui_template_overlay.css index e7b8a37c0..cff809cab 100644 --- a/ui_template/ui_template_overlay.css +++ b/ui_template/ui_template_overlay.css @@ -368,6 +368,21 @@ min-width: 0; } +/* 아래 단추 묶음(54-20) — B03~B09 한 양식 · 사이 = --btn-group-gap · 고르게 늘되 글보다 좁아지지 + 않음 · 좁은 패널(280px)에서도 한 줄. 단추 줄 = [data-help-row](없으면 묶음 자신) */ +.ui-sidebar-actions:not(:has([data-help-row])), +.ui-sidebar-actions [data-help-row] { + gap: var(--btn-group-gap); +} + +.ui-sidebar-actions > .ui-btn:not(.ui-help-btn), +.ui-sidebar-actions [data-help-row] > .ui-btn:not(.ui-help-btn) { + flex: 1 1 0; + min-width: auto; + padding-inline: var(--spacing-4); + white-space: nowrap; +} + /* 사이드 패널 내부 컨테이너 공통 외곽선 — 기본 --color-border가 두 테마 모두 흐려 안 보인다는 보고(2026-08-05). 본문 보조색을 섞어 어느 테마에서든 뚜렷하게. 45%는 아직 흐리다는 재보고(2026-08-06)로 보조색 비중을 75%로 올렸다 — 테마 변수 From 976c9b28168cf6685fa8a4131465fc0508b12c52 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 6 Oct 2026 12:13:19 +0900 Subject: [PATCH 05/85] =?UTF-8?q?chore(plan):=2010-6=20=EB=8B=B5=20?= =?UTF-8?q?=E2=80=94=20=EC=9E=90=EB=A3=8C=20=EC=9D=BC=EC=9B=90=ED=99=94=20?= =?UTF-8?q?=EC=A0=9C=EC=95=88=20=C2=B7=20=EC=86=8D=EB=8F=84=20=EB=B3=B4?= =?UTF-8?q?=EC=95=88=201=EB=8B=A8=EA=B3=84=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FJqWQpoB1RE7hiaQ2wH8qV --- docs/raw/사용자요구/2026-10-05_수정요구.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/raw/사용자요구/2026-10-05_수정요구.md b/docs/raw/사용자요구/2026-10-05_수정요구.md index 32518256a..dfcf22aab 100644 --- a/docs/raw/사용자요구/2026-10-05_수정요구.md +++ b/docs/raw/사용자요구/2026-10-05_수정요구.md @@ -181,3 +181,10 @@ B05에서 3D 영역의 상단 버튼들 중 원근으로, 직교로 버튼의 (10-6 사용자 · 추가 요청) - 페이지의 좌측 패널의 공통항목으로 들어온 버튼 세트의 버튼 크기가 조금 이상함. 점검 + +(10-6 사용자 · 답) +1. 공통 › 횡단도: 이 부분은 요청을 잊음. 생각나면 다시 말하겠음. 이슈 닫음 +2. B05와 B06은 공간이 부족하여 분리되어있는 상태임. 공통양식으로 좌측 패널을 사용하는 이유이며 어느 페이지에서 수정하던 공유가 되고 해당 값에 의해 종단과 횡단이, 페이지 제어가 되어야함. 꼼꼼히 분석 후 일원화 방향으로 제안. 단, 현재의 좌측패널로 종횡단 제어가 되어야함. 불필요한 정보라면 삭제도 가능(특히 이전 B08의 수량산출로 넘어가는 정보들은 재정의 필요) +3. 반영 +4. 일단 유지 +5. 너의 편의대로 진행 From 14a9366b30f6fb0c81a4c0b35f11819bc74c19ff Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 6 Oct 2026 12:15:27 +0900 Subject: [PATCH 06/85] =?UTF-8?q?feat(structure):=20=EA=B5=AC=EC=A1=B0?= =?UTF-8?q?=EB=AC=BC=20=EB=AA=A9=EB=A1=9D=20=EC=A4=84=EB=A7=88=EB=8B=A4=20?= =?UTF-8?q?=EC=9E=87=EA=B8=B0=20=EB=9E=A8=ED=94=84=20=E2=80=94=20=EC=B8=A1?= =?UTF-8?q?=EC=A0=90=20=EC=99=BC=EC=AA=BD=20=EA=B3=A0=EC=A0=95=20=ED=8F=AD?= =?UTF-8?q?=20=EC=B9=B8=20=C2=B7=203=ED=96=89=20=C3=97=20=EC=97=B4=20?= =?UTF-8?q?=C2=B7=20=EC=B4=88=EB=A1=9D=20=EC=9D=B4=EC=9D=8C=20=C2=B7=20?= =?UTF-8?q?=EB=B9=A8=EA=B0=95=20=ED=95=84=EC=88=98=20=EB=AF=B8=EC=A7=80?= =?UTF-8?q?=EC=A0=95=20=C2=B7=20=EB=85=B8=EB=9E=91=20=EC=84=A0=ED=83=9D=20?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=EC=A0=95=20=C2=B7=20=ED=88=B4=ED=8C=81=20?= =?UTF-8?q?=EC=83=81=EC=9E=90=20=C2=B7=20=ED=95=AD=EB=AA=A9(54-15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 램프 자리 = 폼 잇기 줄 규칙(명세 컨테이너 · 인스턴스 · 배관 흙막이 지형 단 수 · 정의 그룹 · 종류 단위 · B군 없음) - 단 수 바뀜 · 횡단 자료 도착 때 목록 다시 그림 - 지정 줄 왼쪽 선 = 안쪽 그림자(글 시작 자리 같게) - ui_checks/54-15_잇기_램프.js Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013rJwJMVL4EE31y77TB11AP --- A00_Common/design/design_view_cross.ts | 1 + B05_Profile/B05_Profile_UI_Structures_List.ts | 94 ++++++- .../B05_Profile_UI_Structures_Panel.ts | 2 +- .../B05_Profile_UI_Style_Structures.css | 30 ++- resources/tester/ui_checks/54-15_잇기_램프.js | 242 ++++++++++++++++++ 5 files changed, 365 insertions(+), 4 deletions(-) create mode 100644 resources/tester/ui_checks/54-15_잇기_램프.js diff --git a/A00_Common/design/design_view_cross.ts b/A00_Common/design/design_view_cross.ts index 065766020..046fbeadf 100644 --- a/A00_Common/design/design_view_cross.ts +++ b/A00_Common/design/design_view_cross.ts @@ -576,6 +576,7 @@ export async function mountCrossView( } // 공유 캐시 — 종단 보기가 이미 받아 뒀으면 같은 객체를 즉시 재사용한다. sectionDetail = await loadSectionDetail(projectId, context.route_id); + structuresPanel.facility.recount(); // 단 수는 횡단 자료로 셈 — 흙막이 상자 · 목록 램프 다시(54-15) // 구조물 초안(저장 안 한 벽)은 저장소가 이미 얹어 준다. 면적만 여기서 다시 얹으면 // 첫 화면의 카드·유토곡선이 초안 기준으로 선다(2026-09-06 실측). if (sectionDetail) { diff --git a/B05_Profile/B05_Profile_UI_Structures_List.ts b/B05_Profile/B05_Profile_UI_Structures_List.ts index ee699ec95..9f75cc147 100644 --- a/B05_Profile/B05_Profile_UI_Structures_List.ts +++ b/B05_Profile/B05_Profile_UI_Structures_List.ts @@ -15,7 +15,17 @@ import { } from "./B05_Profile_Api_Structures"; import type { PipeFacilityItem } from "./B05_Profile_UI_Structures_Panel"; import { stationLabel as formatStation } from "../common_util/common_util_station"; -import { readSummaryItem, summaryTooltip } from "../common_util/common_util_summary_item"; +import { + readGroupItems, + readSummaryItem, + summaryLabel, + summaryTooltip, + type SummaryItem, +} from "../common_util/common_util_summary_item"; +import { STRUCTURE_SPECS } from "../A00_Common/design/design_structure_pipe"; +import { pipeExtraCount } from "../A00_Common/design/design_structure_pipe_calc"; +import { containerTitle, linkOf, readState } from "../A00_Common/design/design_structure_spec"; +import { asRoad } from "./B05_Profile_UI_Structures_Define"; export interface StructureListParams { /** 목록을 담을