Task #324: form-002 인너 표 페이지 분할 결함 수정 (compute_cell_line_ranges 누적위치 기반)#327
Merged
Conversation
- 수행계획서/구현계획서 작성 - form-002.hwpx 현재 출력 캡처 (page 2 oveflow=-21.2px) - 셀[73] r=19 의 p[28] inner 표(연구개발계획서…)가 page 1 에 잘못 표시됨 확인
- 1차 패치: compute_cell_line_ranges 가시성 검사 추가 → 인너 표 page 1 제거됨 - 2차 패치: layout_partial_table 스킵 분기 추가 → page 2 로 옮겨가지 않음 (회귀) - 3-층 결함 식별: 1) cell.h(847px) vs 실제 콘텐츠(407px) 불일치 2) line-by-line vs vpos 누적 spacing 이중 계산 3) content_offset 기반 가시성 결정의 결함 - 단일 패치로 해결 불가 — Epic edwardkim#309 와 연결된 페이지네이션 엔진 리팩토링 영역 - 모든 코드 수정 revert, stage2 결과는 분석 보고로 마무리
근본 원인: - vpos 가 셀 중간에서 0으로 리셋되어 cell 시작부터의 누적위치 측정 불가 - compute_cell_line_ranges 가 잔량(remaining)만 추적하여 cum 정보 손실 - 중첩 표 atomic 문단의 가시성을 잔량 기반 heuristic 으로 판정 → 결함 수정: - compute_cell_line_ranges: cumulative position(cum) 기반으로 재작성 - 일반 문단: line 단위 누적, line_end_pos vs content_offset/limit 비교 - 중첩 표 atomic: para_end_pos 로 한쪽 페이지에만 배치 결정 - layout_partial_table: split-end 행의 atomic 스킵 분기 추가 검증: - form-002 page 1 인너 표(연구개발계획서…) 제거됨 (-41KB) - 모든 테스트 통과 (992 + 71) - 골든 form_002_page_0 갱신 (의도된 변경) closes edwardkim#324
- mydocs/report/task_m100_324_report.md: 최종 결과 보고서 - mydocs/orders/20260425.md: Task edwardkim#324 항목 추가
작업지시자 제보: form-002.hwpx page 2 의 인너 표(연구개발계획서…) 가 누락됨 (PDF 와 불일치). 원인: - layout_partial_table 의 분할 셀 렌더 루프에서, 일반 문단(nested table 없음) 이 offset 으로 완전 소비되어 line_ranges=(n,n) 마커로 스킵될 때 content_y_accum 을 갱신하지 않음 - 결과: 후속 nested-table 문단(p[28]) 의 content_y_accum 이 부정확하여, line 838 의 'nested_content_end <= split_start_content_offset' 판정이 잘못 fire → split_start 페이지에서 인너 표가 "이미 이전 페이지에 렌더링됨" 로 잘못 판정되어 스킵 수정: - has_nested_table=false 분기에서도 is_in_split_row 일 때 para_full_text_h 와 동일 계산식으로 content_y_accum 갱신 (line 599 부근) 검증: - form-002 page 2: 인너 표 정상 표출 (PDF 일치) — w=610 h=59.8 fill=#ffe7d8 - form-002 page 1: 인너 표 미표출 유지 (Task edwardkim#324 v1 효과 유지) - 992 + 71 테스트 통과, clippy 클린 - 골든 form_002_page_0 갱신 (의도)
이전 코드는 has_nested_table 셀에 대해 별도 분기를 두고 calc_nested_split_rows 에 raw split_start_content_offset (셀 전체 기준) 을 그대로 전달했는데, 이는 inner table 의 cell 내 위치를 무시하므로 visible height 계산이 부정확했다. 특히 form-002 page 2 의 cell[73] r=19 의 inner table p[28] (연구개발계획서…) 의 경우 cell 내 위치 ~758px 인데 offset 443 을 raw 로 전달하여 visible height = 0 으로 계산 → cell-clip-6 가 ~349px 로 작게 잡혀 inner table 가 SVG 클립에 가려짐. 수정: has_nested_table 분기 제거, 모든 셀에 대해 compute_cell_line_ranges + calc_visible_content_height_from_ranges 통일 경로 사용. v2 의 cum-position 기반 compute 가 nested table atomic 처리를 정확히 수행하므로 별도 분기 불필요. 검증: - form-002 page 2 cell-clip-6 height: 349.63 → 405.68 (inner table 영역 포함) - inner table 'GMP생산실증(건), 제품표준서(건), 비임상보고서(건), IND 신청(건)' 까지 모두 표출 (PDF 일치) - 992 + 71 테스트 통과, clippy 클린
# Conflicts: # mydocs/orders/20260425.md
Owner
|
@planet6897 님 — Task #324 작업 감사합니다. 처리
변경 본질
한 가지 안내이슈 #324 가 PR 제출 (06:11) 전에 자체 close (05:17) 되어 있었습니다. rhwp 메모리 규칙 ( CI 통과 직후 admin merge 진행하겠습니다. |
edwardkim
approved these changes
Apr 25, 2026
edwardkim
left a comment
Owner
There was a problem hiding this comment.
검증 완료 (992 lib + 6/6 svg_snapshot + clippy + wasm32 + 시각 검증). admin merge 진행.
edwardkim
added a commit
that referenced
this pull request
Apr 25, 2026
@planet6897 의 Task #324 (form-002 page 1 인너 표 중복 노출) PR 처리: - compute_cell_line_ranges 누적위치 기반 재작성 (v1) - layout_partial_table content_y_accum 갱신 (v2) - split-start row 통일된 계산 (v3) PR #327 → admin merge (commit 4fd4565). 이슈 #324 close. 산출물: - 트러블슈팅: mydocs/troubleshootings/cell_split_nested_table_visibility.md - PR 검토/처리 보고서 archive 이동 작성자 자체 close 한 이슈 #324 는 메모리 규칙 안내 후 정식 close. Co-Authored-By: Jaeook Ryu <planet6897@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
Apr 25, 2026
seanshin
pushed a commit
to seanshin/rhwp
that referenced
this pull request
Apr 25, 2026
…ADME 업데이트 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 26, 2026
edwardkim
added a commit
that referenced
this pull request
Apr 26, 2026
라이브러리 버전 동기화 (Cargo.toml / rhwp-vscode / npm/editor / rhwp-studio): 0.7.3 → 0.7.6 브라우저 확장 (rhwp-firefox): 0.2.1 → 0.2.2 (AMO 재제출용) - manifest strict_min_version 142 + viewer 번들 보안 sanitize 반영 본 사이클 외부 기여 PR: - #268/#334 (@oksure): replaceOne API - #279/#282 (@seanshin): 목차 리더 + 페이지번호 정렬 - #324/#327 (@planet6897): form-002 인너 표 페이지 분할 - #335 (@oksure): SVG/HTML draw_image base64 임베딩 - #338/#339 (@postmelee): Firefox AMO 워닝 해결 - #340/#341 (@planet6897): typeset 경로 정합 - #342/#343 (@planet6897): Task #321~#332 통합 + 회귀 해소 rhwp-firefox/README.md 에 v0.2.2 변경 이력 + 기여자 감사 섹션 추가 (@postmelee, @seanshin 인정). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
seanshin
pushed a commit
to seanshin/rhwp
that referenced
this pull request
Apr 26, 2026
- 최근 변경: v0.7.3 → v0.7.6 (2026-04-26) 교체 - PR edwardkim#266 (Task edwardkim#157), edwardkim#273 (Task edwardkim#267), edwardkim#282 (Task edwardkim#279) by @seanshin - PR edwardkim#256, edwardkim#327, edwardkim#341, edwardkim#343 by @planet6897 - PR edwardkim#334, edwardkim#335 by @oksure, PR edwardkim#339 by @postmelee - devel 섹션: 머지된 항목 제거, 현재 분석 중(edwardkim#362/edwardkim#345) + 계획 중(edwardkim#150/edwardkim#253) 반영 - 테스트 수: 891+ → 1000+ - README_EN.md 동일 내용 영문 반영
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/hwpx/form-002.hwpx의 외부 표 row 19 의 셀 안에 있는 1×1 내부 표 (연구개발계획서 제출시 다음의 항목의 정량적 목표치 및 상용화 수준 제시 필수) 의 페이지 분할 렌더링 결함 3건을 단계적으로 수정.closes #324
증상
PDF 기준 page 2 상단에 위치해야 할 인너 표가:
수정 내역 (3-단계)
v1 —
compute_cell_line_ranges누적위치 기반 재작성커밋: 4452894
cum)를 명시적으로 추적하는 방식으로 전면 재작성line_end_pos = cum + line_h와content_offset/content_limit비교para_end_pos로 "이전 페이지 완료" / "다음 페이지 미룸" 결정v2 —
layout_partial_tablecontent_y_accum 갱신 누락 수정커밋: 3d304cd
line_ranges=(n,n))이 스킵될 때content_y_accum미갱신!has_nested_table분기에is_in_split_row일 때para_full_text_h계산식으로content_y_accum갱신 추가v3 —
split-start rowcell visible height 통일된 계산커밋: e086ab4
has_nested_table셀 분기가calc_nested_split_rows에 rawsplit_start_content_offset(cell 전체 기준) 을 그대로 전달 → inner table 의 cell 내 위치 무시compute_cell_line_ranges+calc_visible_content_height_from_ranges통일 경로 사용변경 파일
src/renderer/layout/table_layout.rs::compute_cell_line_ranges— 누적위치 기반 재작성 (~140 줄)src/renderer/layout/table_partial.rs— v2: split-end atomic 스킵 +content_y_accum갱신, v3: 통일 경로 (-64 / +34줄)tests/golden_svg/form-002/page-0.svg— 골든 갱신 (의도)검증
form-002 페이지 1/2 (PDF 비교)
회귀 테스트
cargo test --release: 992 단위 + 71 통합 테스트 통과cargo clippy --release -- -D warnings: 클린tests/golden_svg/form-002/page-0.svg(의도된 변경)dump-pages
페이지 분할 결정 자체는 변경되지 않음 (page 1 rows=0..20, page 2 rows=19..26 동일).
알려진 후속 항목
diff=-21.2px가 단서. 본 Task 의 범위 밖이며 Epic 페이지네이션 엔진 LINE_SEG vpos 우선 모드 전환 (Epic) #309 의 후속 task 로 분리.산출물
mydocs/plans/task_m100_324.mdmydocs/plans/task_m100_324_impl.mdmydocs/working/task_m100_324_stage1.mdmydocs/working/task_m100_324_stage2.mdmydocs/working/task_m100_324_stage2_v2.mdmydocs/report/task_m100_324_report.md