Skip to content

편집 확장의 identity·유효성·관찰 계약을 보강한다 #709

Description

@developer-1px

Goal Anchor

  • Outcome: Core 위의 편집 확장들을 조합해도 수정 범위, 노드 identity, domain 유효성, 선택과 관찰 계약이 보존됩니다.
  • Done:
    1. RichText의 escaped subtree 경로가 정확한 대상만 수정합니다.
    2. Document selection.move와 RichText node.move가 원래 노드 identity를 유지하여 동시 속성 편집을 잃지 않습니다.
    3. RichText가 잘못된 구조를 만드는 node.remove/node.move 및 public apply를 성공 처리하지 않습니다. 정상 Intent 경로의 같은 검증 누락도 확인하고 막습니다.
    4. Editing subscriber의 예외와 재진입이 완료된 편집 결과나 알림 순서를 깨지 않으며 snapshot selection 변경이 내부 상태와 history를 오염시키지 않습니다.
    5. 외부 변경 후 RichText 선택을 현재 topology에 맞게 보정하고, editor 내부 document 구독이 사용 종료 뒤 남지 않습니다.
    6. 두 RangeSelection family에서 앞 range가 제거되어도 살아남은 primary range identity를 유지합니다.
    7. Web clipboard binding이 지원하는 편집을 거절했을 때 browser 기본 동작으로 우회하지 못하도록 이벤트를 취소합니다. 지원하지 않는 형식의 pass-through는 유지합니다.
    8. 각 결함의 pre-fix 실패 / post-fix 성공 회귀 테스트와 관련 전체 테스트·타입·문서 검증으로 확인합니다.
  • Don't: Core나 Collaboration wire/schema를 확장하지 않습니다. 외부 변경 시 local inverse history를 초기화하는 기존 정책을 유지하며, 협업 selective history 통합과 의미 기반 외부 selection mapping 프로토콜의 전체 설계는 이번에 포함하지 않습니다. Composer의 인접 JSON 필드 apply, 정상 편집·undo/redo, 기존 public API, incremental typing 성능을 보존합니다. Calendar·Database·Annotation의 미병합 작업을 가져오거나 수정하지 않습니다. merge는 별도 승인 대상입니다.

근거와 정본 경계

사용자 요청: Core 밖 프로토콜 리뷰 후 “개선해줘”.
기준: origin/main 276c955. 기존 1,175 테스트는 통과하지만 public API 재현에서 위 계약 위반이 확인되었습니다.

  • RichText diff.ts의 자체 경로 파싱 → Core parsePointer 소비.
  • Editing document.ts / RichText editor.ts의 remove+add 이동 → identity 보존 이동.
  • RichText validation/topology/editor → domain 성공·실패와 선택 유효성 및 구독 lifecycle.
  • Editing session.ts → snapshot/history 소유권과 알림 전달.
  • Selection range/index.ts, range/materialized.ts → primary range 대응.
  • Web clipboard.ts → 처리 소유권과 default cancellation.
    새 보편 Editor/history 추상화나 Host 보완 코드를 만들지 않고 각 기존 owner에서 닫습니다.

검증 범위

public API 회귀 테스트(일반·fresh snapshot·협업 document), 이동과 동시 변경 통합, 구조 실패 원자성, 재진입·구독 해제, 두 range family, clipboard 거절 및 pass-through, 전체 package tests/build, 관련 Site consumer 및 문서 검사.
브라우저 확인 시 기존 Chrome 연결을 우선합니다. 미확인 native 동작은 확인된 것으로 보고하지 않습니다.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions