rhwp-studio: 드래그 선택 하이라이트 오버플로우 수정#664
Closed
postmelee wants to merge 5 commits into
Closed
Conversation
5 tasks
edwardkim
added a commit
that referenced
this pull request
May 8, 2026
closes #658 4 commits 단계별 보존 (작업지시자 직접 결정): - e0ce874 Task #658: Add selection rect diagnostics - f3c7fc0 Task #658: Fix selection rect line boundaries - 99b3a5a Task #658: Reduce selection drag DOM churn - 5fa80bf Task #658: Finalize selection drag fix report 본질 정정: - 선택 rect 시작/끝 위치 영역의 cursor hit bias 영역 추가 — 줄바꿈 경계 영역 영역의 같은 문자 오프셋 영역 영역 이전 줄 끝 vs 다음 줄 시작 영역 구분 - SelectionRenderer 영역의 highlight div 영역 재사용 + 동일 rect 반복 렌더링 skip 영역 (DOM churn 영역 정정) - 드래그 영역 caret 업데이트 영역 가벼운 처리 영역 경로 추가 본 환경 검증: - cherry-pick 충돌 0건 (orders/20260507.md 자동 머지) - cargo test --release ALL PASS (1165 lib + issue_658 2/2) - TypeScript 빌드 통과 - clippy clean PR: #664 컨트리뷰터: @postmelee (Taegyu Lee) 후속 분리: #661 (드래그 시작 영역 영역 커서/스크롤 위치 튐 영역) → PR #718 영역
edwardkim
added a commit
that referenced
this pull request
May 8, 2026
PR #664 (Task #658): rhwp-studio 드래그 선택 하이라이트 오버플로우 수정 - merge commit: c6bf769 (4 commits 단계별 보존 no-ff merge — 작업지시자 직접 결정) - 본질 정정: cursor hit bias (cursor_nav.rs +118/-53) + selection-renderer DOM churn 정정 - 본 환경 결정적 검증 1165 lib + issue_658 2/2 + TypeScript clean + clippy clean - WASM 빌드 4,584,723 bytes - 작업지시자 시각 판정 ★ 통과 (exam_social.hwp 드래그 선택 페이지 폭 안 정합) 컨트리뷰터: @postmelee (Taegyu Lee) — 다회 사이클 영역 (PR #663 close → #664 재제출) 후속 분리: #661 (드래그 시작 영역 영역 커서/스크롤 위치 튐 영역) → PR #718 영역 closes #658 산출물: - mydocs/pr/archives/pr_664_review.md - mydocs/pr/archives/pr_664_report.md - mydocs/orders/20260508.md 갱신
Owner
|
@postmelee 님 PR 처리 완료입니다. 본 환경 검증 결과: 결정적 검증 통과:
WASM 빌드 (`pkg/rhwp_bg.wasm` 4,584,723 bytes) 후 작업지시자 시각 판정 ★ 통과:
처리: 4 commits 단계별 보존 no-ff merge.
본질 정정 영역의 정확성: `cursor_nav.rs` 영역의 cursor hit bias 추가 영역 (줄바꿈 경계 영역의 같은 문자 오프셋 영역의 이전 줄 끝 vs 다음 줄 시작 영역 구분) + `selection-renderer.ts` 영역의 highlight div 재사용 영역의 DOM churn 정정 영역. 회귀 차단 가드 영구 보존: `tests/issue_658_text_selection_rects.rs` (2 케이스) + `examples/inspect_658_selection.rs` (진단 도구). 후속 영역 분리 영역 정합: Issue #661 (드래그 시작 영역 영역 커서/스크롤 위치 튐 영역) → PR #718 영역의 깔끔한 분리 영역. 처리 보고서: `mydocs/pr/archives/pr_664_report.md` closes #658 |
edwardkim
added a commit
that referenced
this pull request
May 9, 2026
본질: rhwp-studio 영역 의 텍스트 드래그 선택 중 커서 / 스크롤 위치 영역 포인터 영역 무관 영역 의 튐 결함 정정. 기존 경로: mousemove 마다 hit-test → cursor focus 이동 → caret 갱신 + scrollCaretIntoView() 호출 → 선택 focus 의 다른 페이지/문단 순간 이동 시 스크롤 컨테이너 가 caret rect 추적 → 사용자 드래그 위치 ↔ 문서 스크롤 함께 튐. 정정 (드래그 중 caret 갱신 + 스크롤 책임 분리): 1. caret: 선택 상태 표시만 갱신 (scrollCaretIntoView 부재) 2. 스크롤: 포인터 edge 감지만 담당 (RAF 루프 + edge 48 px + step 2~20 px) 3. 편집 영역 외부 영역 도 드래그 지속 (document-level mousemove 등록/해제) 4. 포인터 좌표 저장 + 스크롤 발생 시 동일 좌표로 hit-test 재계산 신규 헬퍼 (input-handler.ts +128 LOC): - startTextSelectionDrag / stopTextSelectionDrag - updateTextSelectionDragPointer / updateTextSelectionDragFromPointer - hitTestFromClientPoint (clientX/Y parameter 분리) - updateTextSelectionDragAutoScroll / runTextSelectionDragAutoScroll - updateCaretDuringDrag (드래그 중 caret 갱신) input-handler-mouse.ts (+6/-9): - 3 곳 isDragging=true → startTextSelectionDrag(e) (드래그 시작 시 포인터 좌표 보존 + document mousemove 등록) - mousemove 분기: hit-test 직접 호출 → updateTextSelectionDragFromPointer 래퍼 (저장된 포인터 좌표 사용) - mouseup: isDragging=false → stopTextSelectionDrag 회귀 가드 e2e (drag-selection-autoscroll.test.mjs +86 LOC): - 70줄 문서 + 첫 줄 → 하단 edge 드래그 - scrollTop 0 → 1529 / hasSelection=true / focus 문단 69 / highlight 70 메인테이너 통합 정정 영역 (충돌 해결): - input-handler-mouse.ts (mousemove 분기): PR #718 영역 의 updateTextSelectionDragFromPointer 영역 채택 - input-handler.ts (hitTestFromClientPoint): PR #718 영역 의 clientX/Y parameter 영역 + devel 영역 의 PR #693 (Task #685+#689) getPageAtPoint (그리드 모드 click 좌표 정합) 영역 통합 - input-handler.ts (updateCaretDuringDrag): PR #718 영역 의 scrollCaretIntoView 부재 본질 + devel 영역 의 PR #664 (Task #658) caret.updateLive (깜박임 타이머 유지 본질) 영역 통합 검증: - cargo test --release: lib 1173 + 통합 ALL GREEN, failed 0 - cargo clippy --release: 신규 경고 0 - npx tsc --noEmit (rhwp-studio): clean - npm run build (rhwp-studio): PWA 정상 분리된 후속: - Issue #717: 표 셀 빈 영역 클릭 hit-test (PR #725 별도 처리 영역) Closes #661 Co-Authored-By: Taegyu Lee <86018802+postmelee@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
edwardkim
added a commit
that referenced
this pull request
May 9, 2026
- mydocs/pr/archives/pr_718_review.md (검토 문서, 충돌 본질 분석 + 메인테이너 통합 정정 방향)
- mydocs/pr/archives/pr_718_report.md (처리 보고서, 3건 충돌 해결 명시)
- mydocs/plans/archives/task_m100_661{,_impl}.md
- mydocs/orders/20260509.md: PR #718 행 + 본 사이클 패턴 라인 추가
처리 결과:
- 옵션 A — 5 commits 단계별 보존 cherry-pick + 메인테이너 통합 정정 + no-ff merge (95eea5f)
- 작업지시자 시각 판정 ★ 통과 (웹 에디터, 블럭 드래그 선택 기능)
- 충돌 3건 메인테이너 통합 정정 (PR #693 getPageAtPoint + PR #664 updateLive 영역 + PR #718 본질 영역 양립)
- WASM 빌드 4,607,734 bytes
- Issue #661 close 자동 정합
분리된 후속: Issue #717 OPEN (PR #725 별도 처리 영역)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
요약
samples/exam_social.hwp에서 드래그 선택 하이라이트가 실제 텍스트/페이지 폭을 넘어 확장되는 문제를 수정했습니다.동영상
변경 전
2026-05-07.13.28.24.mov
변경 후
2026-05-07.16.37.12.mov
Closes #658
원인
선택 rect 계산에서 시작/끝 오프셋 모두 동일한 렌더 트리 hit 탐색을 사용했습니다. 줄바꿈 경계에서는 같은 문자 오프셋이 이전 줄 TextRun의 끝이면서 다음 줄 TextRun의 시작일 수 있는데, 선택 시작점이 이전 줄 끝 좌표로 해석되면서 하이라이트가 오른쪽으로 과도하게 확장되었습니다.
변경 사항
inspect_658_selection진단 예제를 추가했습니다.SelectionRenderer가 기존 highlight div를 재사용하고 남는 노드는 숨기도록 변경했습니다.검증
cargo test --test issue_658_text_selection_rectscargo test --lib --releasecd rhwp-studio && npm run buildcargo run --example inspect_658_selectionsamples/exam_social.hwp선택 동작 확인956.6px1028.0px18 -> 3 -> 0visible nodes, 전체 노드 수 증가 없음후속 작업