v0.2.8 Cut A — 이미지 렌더링 + 앱 아이콘 (F22 + chore) #26
Reference in New Issue
Block a user
Delete Branch "worktree-v028-cut-a-image-icon"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
v0.2.8 Cut A — F22 (이미지 렌더링) + chore (앱 아이콘). 작은 polish cut.
<img src="inkling-media://${m.relPath}">. main process 에 custom protocol 등록 (inkling-media://),<profileDir>/media/하위 파일 서빙 + path traversal 두 layer 검사 (raw URL../%2e%2e차단 + normalize startsWith). 클릭 시inbox:open-mediaIPC →shell.openPath로 OS 기본 viewer 열기.assets/icon.svg(이전 turn 작성) →electron-icon-builder+sharp(SVG → PNG 1024 fallback) +finalize-icons.mjs(출력 위치 정규화) →build/icon.{ico,icns,png}산출 +package.jsonbuild.win/mac/linux.icon 매핑.변경 내역 (6 commits)
470384bTask 1 —inkling-media://custom protocol + path traversal 검사f6bea62Task 2 — NoteCard 이미지<img>렌더링 + onClick (cast 임시)9cdea15Task 3 — IPCinbox:open-media+ path traversal + NoteCard cast 정리4d4dac5Task 4 — 앱 아이콘 (assets/icon.svg → ICO/ICNS/PNG) + electron-builder config29259eeTask 5 — v0.2.8 release + dogfood F22 promoted 마킹6db449fchore — final review minor 3건 cleanup (no-op replace 제거 / 빈 relPath 거절 / alt="" 코멘트)테스트 / 빌드
<img>2 + IPC 2)build/icon.ico(361 KB, 7 multi-res) +build/icon.icns(119 KB) +build/icon.png(45 KB, 1024×1024)Mac/Linux 빌드 핸드오프
npm run dist:linux또는dist:mac머지 후 release 단계에서 검증 가능. macOS host 에서 dmg/AppImage/deb 산출 가능 (이전 v0.2.7 release 와 동일 흐름).Test Plan
Inkling Setup 0.2.8.exe빌드 + 설치)inkling-media://media/../etc/passwd) 가 403 응답 + OS viewer 열리지 않는지🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- electron-icon-builder + sharp devDep 추가 - assets/icon.svg → build/icon.{ico,icns,png} 산출 + git 추적 - electron-icon-builder 가 SVG 직접 input 안 받음 (Jimp MIME 에러) — sharp 로 SVG → PNG 1024 변환 후 input - scripts/svg-to-png.mjs (sharp 사용 SVG→PNG) + scripts/finalize-icons.mjs (build/icons/ → build/ 정규 위치 정리) - package.json build.{win,mac,linux}.icon 키 추가 - .gitignore: build/icons/ 와 build/icon-source.png (중간 산출물) 무시, build/icon.* 는 추적 - typecheck 0 errors + 472/472 단위 통과 유지 (회귀 없음) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>코드 리뷰 — v0.2.8 Cut A
Scope: 6 commits / +2300+ insertions (대부분 build/icon.* 바이너리)
Spec coverage ✅ 10/10
Cut A design 의 모든 섹션이 task 매핑됨.
470384b)<img>f6bea62)9cdea15)../%2e%2e+ normalize startsWith 두 layer)4d4dac5)코드 품질
Strengths
app.whenReady()이전registerSchemesAsPrivileged()— Electron 표준 준수Requestconstructor 의 normalize 회피하는 minimal mock 패턴 — traversal 검사 로직 검증 의도 정확openMedia: Promise<{ ok: true } | { ok: false; reason: string }>discriminated union — Task 2 임시 cast → Task 3 정식 시그니처로 정리Minor (PR 머지 전 cleanup
6db449f에서 모두 처리됨)→inklingMedia.ts:39의 no-op replace${url.host}${url.pathname}로 단순화→inbox:open-media의 빈 relPath 검사 부재typeof relPath !== 'string' || relPath.length === 0명시 거절NoteCard→ 한 줄 코멘트 추가alt=""decorative 의도 불명확Critical / Important 없음.
Architecture
protocol/inklingMedia.ts가 inferMime + scheme 등록 + handler 등록 세 책임 분리.<img>(renderer 표시) ↔inkling-media://(asset 서빙) ↔inbox:open-media(OS viewer) 세 경로 명확히 분리mediaRoot + sepstartsWith) 동일Risk 잔재
inkling-media://동작 미확인. release 후 수동 검증.dist:mac/dist:linux미수행. 머지 후 macOS host 핸드오프 (이전 v0.2.7 release 와 동일 흐름).머지 권장
v0.2.8+npm run dist:win→ Windows exe 빌드dist:mac+dist:linux후 dmg/AppImage/deb 추가 attachOverall
Ready to merge. Spec 100% coverage, 472 unit + 1 e2e + typecheck 0, defense in depth 보안, 3 minor 모두 fix. Cut B (v0.2.9) 로 진행 가능.
🤖 Reviewed by Claude Opus 4.7 (1M context)