fix(studio): retain file handle on Ctrl+S for opened documents#189
Open
ahnbu wants to merge 1 commit intoedwardkim:develfrom
Open
fix(studio): retain file handle on Ctrl+S for opened documents#189ahnbu wants to merge 1 commit intoedwardkim:develfrom
ahnbu wants to merge 1 commit intoedwardkim:develfrom
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
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.