F6-L3 Import (v0.2.1 dogfood-feedback Track #3) #4

Merged
altair823 merged 5 commits from feat/f6-l3-import into main 2026-04-26 01:58:55 +00:00
Owner

요약

로드맵 3번째 항목 — F6-L3 Import: F5 export 트리를 읽어 DB 에 다시 적재. 트레이 메뉴 "백업에서 복원..." 트리거.

충돌 정책

상황 처리
id 신규 inserted (신규 노트)
id 매치 + rawText 동일 skipped (변경 없음)
id 매치 + rawText 상이 forked → 새 uuidv7 (slice §1.1 raw_text 불변 invariant 보호)

결정

결정
파싱 범위 F5 export 포맷만 (inkling_export_version: 1)
외부 lib 없음 (자체 minimal YAML 파서)
raw_text 추출 body 구조 기반 (h1 / blockquote / image ref 제거 후 잔여)
미디어 복사 항상 (skip 노트는 안 복사)
트리거 트레이 "백업에서 복원..." → 폴더 선택 → preview → confirm → run

구현 (5 commits)

  • fe6bbd3 plan
  • e8587c1 순수 parser (importFormat.ts) + 12+ round-trip 테스트
  • d76cca6 ImportService + NoteRepository.importNote/findRawTextById + 6 단위 테스트
  • e728a11 트레이 5번째 콜백 + preview/confirm 다이얼로그
  • 9407f39 promotion (F6-L3 별 spec 분기)

게이트

  • typecheck: 0 errors
  • 단위: 132/132 (108 → +24 신규: 18 importFormat + 6 ImportService)
  • e2e: 1/1
  • 스키마 변경: 0
  • 신규 dependency: 0

F5 와의 round-trip

parseExportNotecomposeMarkdown 의 정확한 역. 단위 테스트에서 round-trip 검증 (compose → parse → 동일 필드).

다음 항목

로드맵 4번: F1 Due Date — migration v2, 가장 큰 항목.

🤖 Generated with Claude Code

## 요약 로드맵 3번째 항목 — **F6-L3 Import**: F5 export 트리를 읽어 DB 에 다시 적재. 트레이 메뉴 "백업에서 복원..." 트리거. ## 충돌 정책 | 상황 | 처리 | |------|------| | id 신규 | inserted (신규 노트) | | id 매치 + rawText 동일 | skipped (변경 없음) | | id 매치 + rawText 상이 | forked → 새 uuidv7 (slice §1.1 raw_text 불변 invariant 보호) | ## 결정 | 결정 | 값 | |------|-----| | 파싱 범위 | F5 export 포맷만 (`inkling_export_version: 1`) | | 외부 lib | 없음 (자체 minimal YAML 파서) | | raw_text 추출 | body 구조 기반 (h1 / blockquote / image ref 제거 후 잔여) | | 미디어 복사 | 항상 (skip 노트는 안 복사) | | 트리거 | 트레이 "백업에서 복원..." → 폴더 선택 → preview → confirm → run | ## 구현 (5 commits) - `fe6bbd3` plan - `e8587c1` 순수 parser (importFormat.ts) + 12+ round-trip 테스트 - `d76cca6` ImportService + NoteRepository.importNote/findRawTextById + 6 단위 테스트 - `e728a11` 트레이 5번째 콜백 + preview/confirm 다이얼로그 - `9407f39` promotion (F6-L3 별 spec 분기) ## 게이트 - typecheck: 0 errors - 단위: 132/132 (108 → +24 신규: 18 importFormat + 6 ImportService) - e2e: 1/1 - 스키마 변경: 0 - 신규 dependency: 0 ## F5 와의 round-trip `parseExportNote` 는 `composeMarkdown` 의 정확한 역. 단위 테스트에서 round-trip 검증 (compose → parse → 동일 필드). ## 다음 항목 로드맵 4번: **F1 Due Date** — migration v2, 가장 큰 항목. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
altair823 added 5 commits 2026-04-26 01:58:50 +00:00
parseExportNote reverses composeMarkdown — minimal YAML parser
covering only the variants F5 emits (plain, single-quoted, block
scalar, tag/image lists). Body extraction strips h1 + blockquote +
image refs to recover rawText. Round-trip tested against
exportFormat.composeMarkdown.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three-state outcome per note: inserted (new id), skipped (id+rawText
match), forked (id match but rawText differs → new uuidv7 to preserve
raw_text invariant from slice §1.1). Media files copied into
MediaStore convention <profileDir>/media/{noteId}/{n}.{ext} with
new media DB rows.

NoteRepository.importNote handles full provenance: ai_status='done',
ai_provider, ai_generated_at, edited flags, intent fields, tags
with source preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Tray gets 5th callback. Directory chooser → preview (count of
new/skip/forked + media) → confirm message box → run. Slice §1.1
copy policy preserved (no '실패'/'끊김'). Notification on
success/failure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extracted to own spec. F6 진행 상태 라인 갱신.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
altair823 merged commit 9407f398c8 into main 2026-04-26 01:58:55 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: altair823-org/inkling#4