Skip to content

편집 프로토콜의 구현 간 동등성과 조합 안전성을 보장한다 #713

Description

@developer-1px

Goal Anchor

승인 근거와 범위

사용자가 FE 편집의 표준 프로토콜 관점 review/smell check 결과를 받은 뒤 “진행해 도와줘”로 실행을 요청했습니다. 이 이슈는 리뷰 1~6과 그 계약을 완성하는 데 필요한 public closure를 담당합니다. A2UI 책임 배치(리뷰 7)는 독립 이슈/PR로 처리합니다. Temporal dependency는 검토 후보이며 이 이슈에서 배포 구조를 재편하지 않습니다.

완료 조건

  1. Core: 최종 JSON 값이 동일한 복합 add/remove/replace batch는 빈 applied change와 무통지를 반환합니다. reference와 독립 구현의 관찰 결과가 같아야 합니다.
  2. Editing transaction/history: commit 중 subscriber가 만든 외부 변경을 자기 변경으로 흡수하지 않습니다. move/copy의 undo가 다른 필드의 변경을 지우지 않고, subscriber 등록 순서에 관계없이 결과 snapshot과 notification의 시점/순서가 일관되어야 합니다.
  3. Domain identity: Document·Order·Object·Tree·Calendar의 기본 ID 생성이 동시 replica 생성·병합 및 재생성 뒤에도 충돌하지 않습니다. 기존 createId 주입점과 domain identity 유효성을 유지하고 ID 기반 명령의 대상이 유일해야 합니다.
  4. Selection: Document·Order·Object·Sheet·Tree·Database·Kanban·Calendar·Annotation은 외부 삭제 뒤 유효한 selection을 publish합니다. Rich Text는 외부 text 변경을 통과한 위치를 보존합니다. 공통 Editing이 변경 전 값·applied change·변경 후 값의 mapping 경계를 소유하고 domain별 해석은 domain owner에 둡니다.
  5. History 연결: 기존 Editing과 Collaboration selective history를 공식 API로 연결해 toolbar·Cmd/Ctrl+Z·native history input·canUndo/canRedo·selection 복원이 같은 history를 사용하도록 합니다. Local 기본 사용은 계속 지원하고, 협업 문서를 넣는 것만으로 local inverse history가 selective history인 것처럼 동작하지 않게 합니다.
  6. 검증: 같은 실제 editor 시나리오를 local·독립 구현·collaboration에 주입해 조합 계약을 검증합니다. 영향을 받는 실제 사이트 입력 경로를 확인하고, synthetic 이벤트와 native/실기기 증거를 구분합니다. 사용할 수 없는 브라우저/실기기 기능을 성공이나 지원 증거로 보고하지 않습니다.

재현 근거

  • { x: 1 }/temp add 후 remove: reference는 applied 2개·notification 1회, 독립 구현은 applied 0개·무통지.
  • 목록 move의 document subscriber가 other: 0 → 99를 commit하면 session undo가 other까지 0으로 복원.
  • 두 Document replica에서 각각 block.insert: 병합 후 block-1이 중복되고 text.replace가 첫 블록만 수정.
  • 선택한 블록을 외부에서 삭제하면 snapshot.selection이 삭제된 blockId를 보존.
  • ab|cd 앞에 외부 X 삽입 뒤 !를 입력하면 Xa!bcd가 됨.
  • remote change 뒤 editor.undo는 history.empty이지만 같은 runtime.history.undo는 내 변경만 정상 취소. Rich Text Web은 editor.undo를 직접 호출.

완료 증거

  • 각 원인에 대한 실패→통과 회귀 및 구현 간 동일 시나리오.
  • 영향 package test/typecheck/build, standard:check, workspace:check, API reference/문서·site guard.
  • 전체 diff와 기존 consumer의 호환성 검토, 실제 사이트 경로 및 사용 불가 검증 기록.
  • Issue↔PR의 완료 조건과 구현/검증 대응 확인.

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