Skip to content

Retain working file name and handle across sessions - #328

Merged
milanofthe merged 1 commit into
mainfrom
fix/save-filename-retention
Aug 2, 2026
Merged

Retain working file name and handle across sessions#328
milanofthe merged 1 commit into
mainfrom
fix/save-filename-retention

Conversation

@milanofthe

@milanofthe milanofthe commented Aug 2, 2026

Copy link
Copy Markdown
Member

Fixes #327.

Save always suggested the default file name after a reload: the autosave snapshot overwrote the model name with 'Autosave', and restoring a session never re-attached the file name or the File System Access handle.

  • autosave keeps the working file's name in the snapshot metadata
  • the current file reference (name + handle) is persisted in IndexedDB next to the autosave blob (same structured-clone mechanism as the recents list) and cleared on New
  • restoring a session (editor prompt, landing preview, loadAutoSave) re-attaches the reference, so Save writes back to the original file on Chromium (after the permission re-prompt) and suggests the correct name in the download fallback on Firefox/Safari

Verified end-to-end: load model, reload, restore; the Save button targets the original file again.

@milanofthe
milanofthe merged commit 4212d7e into main Aug 2, 2026
4 checks passed
@milanofthe
milanofthe deleted the fix/save-filename-retention branch August 2, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File name retention for saving in PathView

1 participant