feat: add HWPX fragment paste support#950
Conversation
|
PR 검토가 늦는 점 양해의 말씀드립니다. |
0d25344 to
bebda1f
Compare
|
검토와 메인테이너 hands-on 테스트를 진행했습니다. 코드 측 PR #880 잔존 항목은 대부분 해소된 것으로 보이나, 실제 동작에서 두 가지 결함이 발견되어 본 PR 은 close 합니다. 메인테이너 테스트 결과테스트 경로:
발견된 결함1. 다이얼로그 종료 UX 결함"문서 제목 박스" 삽입 후 확인 버튼을 눌러도 다이얼로그가 닫히지 않습니다. 취소 버튼으로만 닫을 수 있습니다. 코드 위치: protected onConfirm(): boolean {
return false;
}
해결 방향 후보:
2. 빈 HWPX 문서 (paragraph 1 개) 에서 삽입 실패PR 이 fixture 로 추가한 원인 추정: frontend 의 PR 처리위 두 결함은 사용자가 자연스럽게 사용할 수 있는 시나리오가 아니라 판단되어 본 PR 은 close 합니다. 핵심 기능 자체 (raw HWPX fragment paste primitive, WASM bridge, HWPX 전용 gating) 는 PR #880 검토 시 평가한 대로 잘 설계되어 있고, PR #880 잔존 항목들 (예시 fragment 추가, HWP5 비호환 guard, 비공개 smoke 테스트 제거, 카탈로그 보안 강화) 도 성실히 반영해 주셔서 감사합니다. 재제출 시 권고 사항위 1, 2 외에도 본 검토에서 다음 사항이 확인되었습니다. 재제출 시 함께 반영 부탁드립니다. 필수
권고
기여 감사합니다. 위 사항이 반영된 새 PR 을 다시 보내주시면 재검토 진행하겠습니다. |
HWPX fragment paste support — 메인테이너 hands-on 테스트에서 동작 결함 2건 발견으로 close. 컨트리뷰터에게 재제출 권고. 발견 결함: - B1: 빈 HWPX 문서에서 after_para_idx 1 out of range - B2: 확인 버튼 무동작 — onConfirm() 항상 false 반환 기타 수정요청 항목 (재제출 시 권고): - M1: 비공개 task 참조 주석 (task_local_yangsik_paste_*) 제거 - M2: cross_document_migrate.rs (미사용 1011줄) 별도 PR 분리 - R1: yangsik 명명 UI ↔ 코드 불일치 해소 PR #880 잔존 6 항목 중 코드 측은 대부분 성실 반영 (예시 fragment, HWP5 비호환 guard, 카탈로그 보안 강화). 핵심 기능 설계도 양호. 그러나 end-to-end UX 게이트 미통과로 close. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- PR #950 (HWPX fragment paste support, dragonnite1221-lgtm) — 메인테이너 hands-on 테스트에서 B1 빈 HWPX paste 실패 + B2 확인 버튼 무동작 발견으로 close. 재제출 시 권고 사항 (B1+B2+M1+M2+R1) 정리. - PR #1039 (HWPX slash/backSlash 형태 enum 파싱 분리, planet6897, closes #1038) — merge 수용. "정량 게이트 충족 시 시각 판정 면제" 첫 권위 사례 (결정적 측정 3→0 + 회귀 가드 단위 테스트 4건 + parser-only scope 3 조건 동시 만족). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds HWPX fragment paste support, WASM bridge APIs, rhwp-studio insertion UI, bundled example yangsik fragments, and regression tests.
This is a follow-up to closed PR #880 and addresses the review feedback there.
Architecture note
This PR intentionally keeps two paste boundaries because they serve different safety contracts.
pasteHwpxFragmentRaw/fragment_paste.rsis the raw XML primitive. It performs byte-preserving section/header edits and owns HWPX ID remapping for raw snippets.pasteHwpxFragmentInDocument/fragment_paste_in_document.rsis the editor-facing bridge. It reuses the raw XML primitive, then reparses the updated section back intoDocumentCoreso rendering and later edit commands stay in sync.cross_document_migrate.rsis the IR migration primitive for future structured cross-document copy/paste. It stays separate from the raw HWPX fragment path because it operates onDocument/DocInfoIR, not byte-preserved HWPX XML. The convergence point is the command/API layer: raw HWPX fragments use the byte-preserving path now; structured IR copy/paste can use the migration primitive when that workflow is exposed.Review follow-up
origin/devel.as anycall by using the generated WASM binding type forpasteHwpxFragmentInDocument.saved/04-blank_hwpx_empty.hwpx.saved/04-blank_hwpx_empty.hwpx.build_occupied_setshelper.rhwp-studio/public/yangsik-fragments/so the dialog is non-empty and end-to-end testable by maintainers.양식 부품command to HWPX documents; HWP5 documents do not expose this unsupported XML-fragment operation.Validation
cargo test --test fragment_paste_integration --test fragment_paste_in_documentcargo test fragment_pastecd rhwp-studio && npm run buildgitleaks detect --source . --log-opts origin/devel..HEAD --redact --no-banner --verbosebasic-two-cell-table.xmlreturns200404