Task #1134: fix HWPX 셀 문단 id 전역 중복 수정#1
Merged
Mireutale merged 1 commit intoMay 31, 2026
Conversation
각 셀에서 enumerate() 인덱스를 재사용해 id="0", id="1" 등이 문서 전체에 중복 출력되던 문제를 수정한다. SerializeContext에 전역 para_id_counter를 추가하고, write_sub_list에서 ctx.next_para_id()를 사용해 문서 내 유일성을 보장한다.
Mireutale
pushed a commit
that referenced
this pull request
Jun 1, 2026
- mydocs/plans/task_m100_1151_v3.md: 수행계획서. Scope 재정의 후 v3 의 paragraph + sibling 표 + inline picture 시각 layout 정합 작업. - mydocs/plans/task_m100_1151_v3_impl.md: 구현계획서. Stage 3 + Stage 4 + Stage 5. - mydocs/tech/topandbottom_table_inline_picture_layout.md: v3 root cause 분석. paragraph_layout / shape_layout / layout.rs 의 picture 렌더 path 추적. Fix edwardkim#2 (paragraph_layout sibling 표 누적) 권장 + Fix #1/edwardkim#3 위험 분석. - mydocs/working/task_m100_1151_v3_stage3.md: Stage 3 완료 보고서. 진입점 진단 (layout.rs:4514 Task edwardkim#347 fallback), 변경 내용, SVG 좌표 시각 검증 (4 시나리오 한컴 정합), 자동 검증 결과 합산. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Mireutale
pushed a commit
that referenced
this pull request
Jun 1, 2026
- mydocs/working/task_m100_1151_v3_stage4.md: WASM 재빌드 + 자동 SVG 좌표 검증 + 사용자 직접 시각 시연 (4 시나리오 한컴 편집기 1:1 정합 확인). v1+v2 회귀 0, v3 helper 6 + v2 통합 4 + 전수 1442/0/6. - mydocs/plans/task_m100_1151_v4.md: 수행계획서. tac-img-02.hwp 의 셀 안 inline picture 클릭 hit-test 정합. 3-layer fault (ImageNode cell_index 누락 + rendering.rs JSON 직렬화 누락 + cursor_rect.rs 셀 안 picture skip). - mydocs/plans/task_m100_1151_v4_impl.md: 구현계획서. Stage 6 (Fix #1/edwardkim#2/edwardkim#3 + 단위 테스트) + Stage 7 (WASM 재빌드 + dev server 클릭 시연) + Stage 8 (통합 PR). - 이슈 edwardkim#1151 description: v4 scope 섹션 추가 (별도 gh issue edit). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Mireutale
pushed a commit
that referenced
this pull request
Jun 1, 2026
…_indices() helper audit 결과 (anti-pattern #1): paragraph_layout.rs 3 곳 + picture_footnote.rs 1 곳에서 동일한 cell_ctx → ImageNode 3 필드 (cell_index / cell_para_index / outer_table_control_index) 매핑 boilerplate 가 반복. Fix: CellContext 에 last_image_indices() 메서드 추가. 4 곳 호출 측을 helper 호출로 변경하여 boilerplate 제거. 동작 변화 없음 (model 동일). cargo test --lib 1445 passed (회귀 0), clippy/fmt clean.
Mireutale
pushed a commit
that referenced
this pull request
Jun 1, 2026
audit (Explore agent 2 회) 9 항목 평가 결과: - Fix (Stage 12~14): #1 (CellContext::last_image_indices) + edwardkim#4 (parse_cell_path_json / resolve_cell_paragraph_mut) + edwardkim#7 (make_picture_image_node) - 의도된 분리 분석 명시 (Stage 15 / 본 commit): edwardkim#2 (Table dual maintenance — serializer source-of-truth 차이) + edwardkim#3 (invalidate_page_tree_cache 분산 — setter 별 책임 명확화) - Skip / OK: edwardkim#5, edwardkim#6, edwardkim#8, edwardkim#9 별도 이슈 발급 불필요 — edwardkim#2 / edwardkim#3 모두 의도된 구조 확정. v6 최종 보고서 → v7 통합 보고서로 갱신 (v1~v7 누적 산출물 정리). 오늘 할일 (orders/20260530.md) 갱신. cargo test --lib 1445 passed (회귀 0).
Mireutale
pushed a commit
that referenced
this pull request
Jun 1, 2026
## 증상 samples/한셀OLE.hwp 등 OLE 미리보기 페이지를 rhwp-studio 에서 첫 로드 시 백지로 렌더되고, 두 번째 로드부터는 정상. 모듈 static IMAGE_CACHE 가 첫 로드 중 디코드한 HtmlImageElement 를 유지해 두 번째 호출에서만 img.complete() 분기로 즉시 그려지는 패턴. ## 원인 OLE/차트 미리보기는 PaintOp::RawSvg 로 emit (src/paint/json.rs:814) 되며 web_canvas RawSvg 핸들러는 단일 <image data:...> 또는 SVG 조각을 draw_image() 로 그려서 IMAGE_CACHE 비동기 디코드 경로를 그대로 탄다. 그런데 edwardkim#1154 v2 (PR edwardkim#1164) 의 디코드 안전망은 PaintOp::Image 만 image_count 에 포함시켜 RawSvg 케이스에서는: - rendering.rs collect() : image_count == 0 - page-renderer.ts scheduleReRender : if (imageCount <= 0) return 으로 200/600/1500ms 재시도 미발화 - prefetchFlowImages 정규식 ("type":"image") 도 rawSvg 미매칭 결과적으로 첫 렌더 후 캔버스가 백지로 남는다. ## 수정 1. src/document_core/queries/rendering.rs : collect() 가 PaintOp::RawSvg 도 image_count += 1 처리. scheduleReRender 재시도 발화 트리거. 2. rhwp-studio/src/view/page-renderer.ts : prefetchFlowImages 가 전체 JSON 의 data:image/MIME;base64,... 패턴을 직접 스캔하여 rawSvg 내장 데이터 URL 도 prefetch (중복 dedupe). 기존 image 항목 regex 는 유지. ## 검증 Puppeteer 측정 (samples/한셀OLE.hwp): | 시점 | 수정 전 load #1 | 수정 후 load #1 | 수정 후 load edwardkim#2 | |------|-----------------|-----------------|-----------------| | t+0ms | 6 (백지) | 1276 | 1276 | | t+1500ms | 6 (백지) | 1276 | 1276 | | t+3000ms | 6 (백지) | 1276 | 1276 | cargo test --lib document_core::queries::rendering : 6 passed. Closes edwardkim#1181
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.
변경 요약
각 셀에서 enumerate() 인덱스를 재사용해 id="0", id="1" 등이
문서 전체에 중복 출력되던 문제를 수정한다.
SerializeContext에 전역 para_id_counter를 추가하고,
write_sub_list에서 ctx.next_para_id()를 사용해 문서 내 유일성을 보장한다.
관련 이슈
closes edwardkim#1134
테스트
cargo test통과cargo clippy -- -D warnings통과스크린샷
변경 전후 비교가 필요한 경우 첨부해주세요.