Repository navigation
Allow the reopening of closed data URL files - #601
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The native recent-file clear action bypasses the renderer cleanup, allowing potentially large cached data-URL entries to remain until eviction or application exit.
1 open issue
What changed in this PR
This PR enables reopening closed data URL files during the current session by retaining their in-memory contents and coordinating recent-file handling between the renderer and Electron main process. It fixes #600.
Changes:
- Retains data URL contents and synthetic filenames for reopening.
- Adds Electron-side tracking, cleanup, and non-persistent handling for data URL recent files.
- Updates release metadata, changelogs, dependencies, and lockfiles.
Review findings:
src/main/MainWindow.ts:278— Data URL paths can be incorrectly added to the Reopen menu when pending files are discarded before reaching the renderer. Moderate; 1 vote.src/renderer/src/components/OpenCOR.vue:1702— Renderer-held data URL contents are not released when the native Electron recent-file menu is cleared. Moderate; 3 votes.
| File | Description |
|---|---|
src/renderer/src/components/OpenCOR.vue |
Stores data URL contents and restores them through web and Electron reopen flows. |
src/renderer/src/common/common.ts |
Updates documentation describing data URL reopening behavior. |
src/renderer/package.json |
Updates the renderer version and Vue/Vite dependencies. |
src/renderer/changelog.json |
Documents the new data URL reopening capability. |
src/renderer/bun.lock |
Locks updated renderer dependencies. |
src/main/MainWindow.ts |
Manages data URL paths in session recent files while filtering persistence and renderer-loss cleanup. |
package.json |
Updates the root package version and dependency ranges. |
bun.lock |
Locks updated root dependency resolutions. |
Review effort: Lite
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.

Fixes #600.