fix(studio): retain file handle on Ctrl+S for opened documents#189
Merged
Conversation
- showOpenFilePicker로 연 파일 handle을 보관하고 Ctrl+S 시 같은 파일에 바로 덮어쓰기 - handle이 없는 input 파일 열기 경로는 save picker와 download fallback 유지 - file-system-access 유틸과 단위 테스트 추가 Co-Authored-By: Codex <noreply@openai.com> # Conflicts: # rhwp-studio/src/command/commands/file.ts
edwardkim
approved these changes
Apr 19, 2026
edwardkim
left a comment
Owner
There was a problem hiding this comment.
LGTM ✅
검증
- 로컬 머지 시뮬 (devel + pr-189): 자동 머지 성공, 충돌 0
- TypeScript 컴파일: 에러 0
- Rust lib 회귀: 891 테스트 그린
- 단위 테스트 (4개): 작성자 환경 (Node 22+) 통과 보고 확인. 우리 메인테이너 환경 (Node 20) 에서는 `--experimental-strip-types` 미지원이라 직접 미실행, 빌드/타입 통과로 갈음
코드 검토
강점:
- `file-system-access.ts` 헬퍼 분리 — Chrome API 접근 격리, mock 가능
- `current-handle → save-picker → fallback` 분기 명확
- `loadDocument` / `createBlankDocument` 시 `currentFileHandle = null` 회귀 안전장치
- 단위 테스트로 분기별 동작 검증
좋은 기여 감사합니다. 머지 진행합니다.
edwardkim
added a commit
that referenced
this pull request
Apr 19, 2026
본 v0.5.0 → v0.7.3 (라이브러리) / 0.2.0 (확장) 배포 주기에 머지된 외부 기여자 6명을 README 3개 변경 이력에 추가: - @ahnbu — Ctrl+S file handle (PR #189, 기명시) - @bapdodi — 회전 도형 리사이즈 + Flip (PR #192) - @dreamworker0 — Windows CFB 경로 (PR #152) - @marsimon — HWP 그림 효과 SVG (PR #149) - @postmelee — 썸네일 + options CSP (PR #168) - @seunghan91 — HWPX Serializer + 다수 (PR #170, #161, #163, #153, #154) 각 README 끝에 "기여자 감사" 섹션 추가 — 6명 일괄 인정. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
showOpenFilePicker()when opening a document so rhwp-studio can retain the original file handleCtrl+Sand only fall back to save picker or download when no handle existsRoot Cause
The previous open flow used
<input type="file">, which only exposesFile.nameand not the original writable handle. As a result,Ctrl+Salways had to open a save dialog and the browser defaulted to its own last-used folder.Verification
docker compose --env-file .env.docker run --rm wasmnpm run buildnode --experimental-strip-types --test tests/file-system-access.test.tshttp://127.0.0.1:7700.hwpfile viashowOpenFilePickerCtrl+Ssaved back to the same fileNote
This is a clean replacement for the previously closed #180, scoped strictly to Ctrl+S file handle retention.
Closes #179.