fix(472 덧 폼 옮김 ↶): 열린 관 폼이 ↶ ↷ 로 옮겨진 관을 따라감 — 옛 자리 칸(17+15)이 남고 고름이 풀리던 흠

- 관 목록 받기(followPipeList)가 「고른 관 사라짐」으로 먼저 고름을 풀어 폼 다시 엶이 안 돎 → 사라진 관 하나 · 새로 선 관 하나면 그 관으로 고름을 옮긴 뒤 목록을 받음 · 폼 다시 엶 · 알약 고름도 따라감
- 시험 test_472_5_shop_owner 배선 단언 글을 새 줄로(옛 줄 글 그대로 단언 · 동작 같음 + 따라감)
- 위키 rules · operations_b05 줄(관 자리 읽기 한 벌 · 관 지움 ↶ 정본 설계 · 폼 따라감)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 11:50:52 +09:00
co-authored by Claude Opus 5.5
parent ff21ef21b7
commit 5f9dec9310
4 changed files with 24 additions and 7 deletions
+16 -4
View File
@@ -574,15 +574,27 @@ export function createStructuresSection(
getStructures: () => [...structures],
setPipeFacilities(pipes) {
const before = pipeFacilities;
const at = selectedPipeChainage;
pipeFacilities = pipes.map((pipe) => ({ ...pipe }));
const near = (pipe: PipeFacilityItem) =>
at !== null && Math.abs(pipe.chainage_m - at) < PIPE_MATCH_M;
const was = before.find(near);
const stay = pipeFacilities.find(near);
// 고른 관이 그 자리를 떠남(폼 옮김 ↶ ↷) = 새로 선 관 하나로 따라감 — 폼이 닫히거나 옛 자리 칸이 남지 않게
// (472 덧 · 목록 항목엔 id 가 없음 · 한 차례 = 관 하나 옮김)
const fresh = pipeFacilities.filter(
(pipe) => !before.some((old) => Math.abs(old.chainage_m - pipe.chainage_m) < PIPE_MATCH_M),
);
const moved =
was && !stay && fresh.length === 1 && tempPipeChainage === null ? fresh[0] : undefined;
if (moved) selectedPipeChainage = moved.chainage_m;
followPipeList(panelContext, pipeFacilities);
// 열린 관 폼 — 값이 밖에서 바뀌면(되돌리기 · 다른 보기) 새 값으로 다시 엶 · 고치던 실시간 반영 · 임시 배치는
// 둠(472-5 · 옛 칸 값이 다음 조작에 되쓰이던 흠)
const at = selectedPipeChainage;
if (at === null || applyingLive || tempPipeChainage !== null) return;
const near = (pipe: PipeFacilityItem) => Math.abs(pipe.chainage_m - at) < PIPE_MATCH_M;
const now = pipeFacilities.find(near);
if (now && JSON.stringify(now) !== JSON.stringify(before.find(near))) loadPipeForm(now);
const now = stay ?? moved;
if (now && JSON.stringify(now) !== JSON.stringify(was)) loadPipeForm(now);
if (moved) callbacks.onPipeSelect(moved.chainage_m); // 고름(알약 · 측점선)도 따라감
},
selectPipeByChainage(chainageM) {
if (chainageM !== null) callbacks.onReveal?.();
@@ -28,7 +28,7 @@ source: ["docs/raw/조사/2026-10-19_470_B05B06_데이터흐름.md", "docs/raw/
| 조작 | 처음 놓이는 곳 | 브라우저 즉시 셈(모듈) | 서버 뒤 셈(API) | [저장]·[확정] 때 | 사본 | 위치(파일:줄) |
|---|---|---|---|---|---|---|
| 구조물 추가 · 옮김 · 지움 | 보기 메모리(B05 `ownStructures` · B06 `structures`) → 시설 줄 `set` → 세션 `structures` | 시설 줄(알약 · 비정규 측점 · 소단 사본 `berm`) · 묶음 stations → 갈아끼움(정본 표본 유지) · 짝 있는 옮김만 종단 꼭짓점 따라감 · 짝 없는 새 측점 = 꼭짓점 안 세움 · cross 면적 | — | `PUT /route/structures`(초안 그대로) → 횡단 차례 측점 세움 · 면적 Node | 11 | `design_shared.ts:303-322` · `B05_Profile_UI_Page_Structures.ts:98-118` · `design_facility_lane.ts:209-217` · `common_util_structure_station.ts:356` · `B05_Profile_Structures_Router.py:386-405` |
| 관 추가 · 옮김 · 지움(B05 배수판) | 배수판 메모리(`facilityStore` · `pipeEditor`) → 세션 `pipes` · `pipe-ids` | 구조물과 같음 · 관 길이 다시 셈 · 일반 측점 자리 관 지움 = 갈아끼움 | 배수유역 `/drainage/detail-basins`(저장 안 함) | `PUT /drainage/pipe-points`(관 차례) · 관 옵션 예약 있으면 같은 파일 한 번 더(관 옵션 차례) · 서버 유역 · 측점 세움 | 14 | `B05_Profile_UI_Drainage_Panel.ts:150-153 · 405-421 · 574-655` · `B05_Profile_Api_Pipes_Draft.ts:30-37` · `B04_PreProcess_Router_Basins.py:538 · 574-633` |
| 관 추가 · 옮김 · 지움(B05 배수판) | 배수판 메모리(`facilityStore` · `pipeEditor`) → 세션 `pipes` · `pipe-ids` | 구조물과 같음 · 관 길이 다시 셈 · 일반 측점 자리 관 지움 = 갈아끼움 · 관 지움 ↶ = 그 측점 정본 설계 · 열린 관 폼은 ↶ ↷ 로 옮겨진 관을 따라감(`B05_Profile_UI_Structures_Panel.ts` setPipeFacilities) | 배수유역 `/drainage/detail-basins`(저장 안 함) | `PUT /drainage/pipe-points`(관 차례) · 관 옵션 예약 있으면 같은 파일 한 번 더(관 옵션 차례) · 서버 유역 · 측점 세움 | 14 | `B05_Profile_UI_Drainage_Panel.ts:150-153 · 405-421 · 574-655` · `B05_Profile_Api_Pipes_Draft.ts:30-37` · `B04_PreProcess_Router_Basins.py:538 · 574-633` |
| 추가 측점 | 세션 `plus-stations` | 시설 줄 · 묶음 stations · 갈아끼움 · 미리보기 `/section/preview-stations` · 꼭짓점 안 세움 | — | `PUT /section/plus-stations` · 서버 x · y · 측점 세움 | 5 | `B05_Profile_UI_Profile_CrossModal.ts:205-246` · `B05_Profile_Api_PlusStations.ts:44-76 · 128-145` · `B06_Section_Router_Stations.py:428-472` |
## 종단(계획고)
+2 -1
View File
@@ -16,7 +16,7 @@ source: ["CLAUDE.md §5", "docs/raw/조사/2026-10-19_465_요구272_값안변함
| 상세 가게 메모리 = 페이지 수명 — 떠남 = `forgetSectionMemory` · [저장] · [확정] · [초기화] · 노선 저장 = `invalidateSectionDetail` | `design_page.ts:294` · `design_shared.ts:428 · 435` · `design_reset.ts:41` · `design_view_profile.ts:469` · `B05_Profile_UI_RouteEdit_Apply.ts:171 · 211` | `test_272_detail_memory` |
| [폐기] = 세션 고침 칸만 지움 · 메모리는 떠남(dispose)이 비움 | `design_leave.ts:85-87` · `design_page.ts:286-295` | `test_346_4_design_leave` |
| 조용한 차례(열 때 · 노선 초안 버림) 끝 = 가게 측점 · 종단 = 지금 상세 측점 · 저장 기준 · 같은 목록은 다시 안 냄 | `design_pipeline_page_publish.ts` shown · opened · `design_pipeline_page.ts:392-393 · 530` | `test_272_drop_store_stations` |
| 노선 초안 없는 차례 = 서버 정본 측점 기하 · 표본을 브라우저 값으로 안 덮음(같은 자리 0.01 m · 축 1e-3 → 앞 횡단 → 그 자리 옛 횡단 → 저장 정본) | `logic/B06_Section_Station_Swap.ts:171-182 · 238-247` · `B06_Section_Section_Store.ts:241-248` | `test_272_swap_keeps_canon` |
| 노선 초안 없는 차례 = 서버 정본 측점 기하 · 표본을 브라우저 값으로 안 덮음(같은 자리 0.01 m · 축 1e-3 → 앞 횡단 → 그 자리 옛 횡단 → 저장 정본) · 지금 상세에 없던 측점이 정본 자리로 돌아옴(관 지움 ↶) = 정본 설계 | `logic/B06_Section_Station_Swap.ts:171-182 · 241-249 · 304-315` · `B06_Section_Section_Store.ts:241-248` | `test_272_swap_keeps_canon` |
| 노선 초안 차례 = 새 · 옮긴 측점만 브라우저 지반 표본 | `logic/B06_Section_Station_Swap.ts:249-251` | `test_346_2_station_swap` |
| 다시 셈 입력 물러섬 = 세션 고름 → 저장 정본 설계 → config 기본값 · 고름 단추는 메모리 상세 설계를 안 덮음 | `B06_Section_Cross_Refresh.ts:402-408` · `B06_Section_UI_Page_Design_Sync.ts:59-104` | `test_272_choice_undo` |
| 소단 사본 쓰는 자리 = 시설 줄 하나(B05 만 열어도) · 같으면 안 씀 · 사본 없으면 저장분 `design.berm` | `design_facility_lane.ts:151-166` · `B06_Section_Cross_Refresh.ts:362-368` | `test_272_berm_source` |
@@ -32,6 +32,7 @@ source: ["CLAUDE.md §5", "docs/raw/조사/2026-10-19_465_요구272_값안변함
| B05 · B06 캐시 = 한 벌 · [저장] 한 번에 함께 나감 | `design_shared.ts:395-448` · `design_save.ts:237` | — |
| 관 · 구조물 주인 = 가게 칸 하나 — 화면 사본은 가게 알림으로 맞춤(제 쓰기는 같은 값 · 남 고침은 다시 실음) | `design_view_profile.ts` 가게 구독 · `design_view_cross.ts` onShop · `B06_Section_UI_Page_Structures_Panel.ts` seen | `test_472_5_shop_owner` |
| 정본 자리 = 값을 낳은 주인 — 노선 시설 = `pipe_points.json` · `structures.json` · 횡단 값 = 횡단 패치 | `B05_Profile_Api_Pipes_Draft.ts:30-37` · `B05_Profile_Structures_Router.py:386-405` · `B06_Section_Section_Store.ts:449` | — |
| 관 자리 읽기 한 벌 = 지금 노선에 얹은 관 지점(측점 계획 · 관 지점 GET · 서버 상세 형상 얹기 · 화면) — 지문 어긋난 옛 저장분도 같은 자리 | `B06_Section_Engine_Attach.py` saved_pipes · `B05_Profile_Engine_Sections.py:210` | `test_472_d_pipe_route_attach` |
## 바꿀 때 할 일
+5 -1
View File
@@ -119,6 +119,10 @@ def test_배선() -> None:
# 열린 관 폼 — 밖에서 바뀐 값(되돌리기 · 다른 보기)으로 다시 엶(옛 칸 값 되쓰던 흠)
form = _read("B05_Profile", "B05_Profile_UI_Structures_Panel.ts")
assert "if (at === null || applyingLive || tempPipeChainage !== null) return;" in form
assert "JSON.stringify(now) !== JSON.stringify(before.find(near))) loadPipeForm(now);" in form
assert "if (now && JSON.stringify(now) !== JSON.stringify(was)) loadPipeForm(now);" in form
# 고른 관이 그 자리를 떠남(폼 옮김 ↶ ↷) = 새로 선 관 하나로 따라감 — 목록 받기(고름 풂) 앞(472 덧)
assert form.index("if (moved) selectedPipeChainage = moved.chainage_m;") < form.index(
"followPipeList(panelContext, pipeFacilities);"
)
history = _read("B05_Profile", "B05_Profile_UI_Profile_History.ts")
assert "announceDesignStore(projectId);" in history