Task #2374: [양식] 양식 컨트롤 값 변경을 record+역연산으로 기록 — 스냅샷 undo 무언 파괴 차단 - #2375
Merged
Conversation
…파괴 차단 체크박스/라디오/콤보/편집 필드의 setFormValue(InCell) 직접 쓰기 4곳이 미기록이라 undo 불가에 더해, 이후 스냅샷 undo 가 값 변경 이전 문서를 복원해 양식 값을 무언 파괴했다(edwardkim#2337 계급). 양식 모드에서는 executeOperation 이 snapshot 을 드롭하므로 kind:'record'(이미 적용된 뮤테이션의 기록, edwardkim#2337 F2 로 전 모드 허용)가 유일한 경로. - SetFormValueCommand(경량 역연산, 배치): targets {locator(본문/셀), beforeJson, afterJson} — execute=after 순방향, undo=before 역순. 라디오의 그룹 해제+선택 다중 쓰기를 1 엔트리로 원자화(개별 기록 시 undo 가 반쪽 상태를 만듦). - recordFormValueChanges 헬퍼: before==after 필터(이미 선택된 라디오 재클릭 등 유령 엔트리 방지, edwardkim#2338 FN 교훈) 후 record. - 4곳 배선: 체크박스(formHit.value 캡처)·라디오(getFormObjectInfo 값을 뮤테이션 전 캡처)·콤보(currentText)·편집 필드(formHit.text; Enter→blur 이중 커밋 1회 가드). 검증: npx tsc --noEmit, npm test 358/358(신규 가드 3). 브라우저(samples/form-01.hwp, 실제 handleFormObjectClick 경로) 게이트 6종 — ①체크박스 토글 기록·undo·redo ②양식 모드에서 record 기록(핵심 경로) ③라디오 기록+재클릭 no-op 0엔트리+undo ④편집 필드 "홍길동" 커밋 정확히 1엔트리(이중 발화 가드)·undo ⑤손실 게이트: page:hide(스냅샷) 후 체크박스 토글 → undo 1회가 체크박스만 원복하고 hide 보존(수정 전엔 스냅샷 복원이 값을 무언 파괴), 2회째 hide 원복 ⑥콤보 "계절 선택"→"봄" 기록·undo. 콘솔 에러 0. 범위 외: 누름틀 삽입(insert:field — 일반 모드 전용 snapshot 별건), PushButton(웹 비활성). Refs edwardkim#2374 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
edwardkim
added a commit
that referenced
this pull request
Jul 18, 2026
edwardkim
added a commit
that referenced
this pull request
Jul 18, 2026
edwardkim
added a commit
that referenced
this pull request
Jul 18, 2026
4 tasks
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
양식 컨트롤 값 변경(체크박스·라디오·콤보·편집 필드)이 히스토리를 우회해, undo 불가에 더해 이후 스냅샷 undo 가 값 변경을 무언 파괴하던(#2337 계급) 계급 1 미라우팅을 수정합니다. 양식 모드에서는 snapshot 이 게이트에서 드롭되므로, #2337 이 연
kind:'record'+ 경량 역연산 경로로 기록합니다 — 로드맵 #2369 Track 2 본체.Fixes #2374
변경
SetFormValueCommand(경량 역연산, 배치):targets {locator(본문/셀), beforeJson, afterJson}— execute=after 순방향, undo=before 역순. 라디오의 그룹 해제+선택 다중 쓰기를 1 엔트리로 원자화(개별 기록 시 undo 가 해제만 복원하는 반쪽 상태).recordFormValueChanges헬퍼: before==after 필터(이미 선택된 라디오 재클릭 등 유령 엔트리 방지 — Task #2337: [undo] 머리말/꼬리말·각주 편집 히스토리 기록 — 본문 스냅샷 undo의 무언 데이터 손실 차단 #2338 FN 교훈) 후executeOperation({kind:'record'}).formHit.value) · 라디오(getFormObjectInfo그룹 값) · 콤보(currentText) · 편집 필드(formHit.text, Enter→blur 이중 커밋 1회 가드).검증
npx tsc --noEmit,npm test358/358(신규 소스 가드 3 — 역연산 구조·record+no-op 필터·4곳 배선 핀).samples/form-01.hwp, 실제handleFormObjectClick경로) 게이트 6종:홍길동커밋 — Enter+blur 이중 발화에도 정확히 1 엔트리, undo 원복.page:hide(스냅샷) → 체크박스 토글 → undo 1회가 체크박스만 원복하고 hide 보존(수정 전엔 스냅샷 복원이 양식 값을 무언 파괴) → 2회째 hide 원복.계절 선택→봄기록·undo.범위 외
(a′) 이관 로드맵 #2369 의 Track 2(form 값·누름틀)에 속합니다.