Skip to content

Allow the reopening of closed data URL files - #601

Merged
agarny merged 3 commits into
opencor:mainfrom
agarny:issue600
Nov 5, 2026
Merged

agarny merged 3 commits into
opencor:mainfrom
agarny:issue600

Conversation

@agarny

@agarny agarny commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #600.

Copilot AI lite review requested due to automatic review settings November 5, 2026 11:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread src/renderer/src/components/OpenCOR.vue Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the change, so it is suitable to proceed.

No open issues 🎉

1 resolved since last review

Review effort: Lite

@agarny
agarny merged commit 1d78432 into opencor:main Nov 5, 2026
9 checks passed
@agarny
agarny deleted the issue600 branch November 5, 2026 11:19
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.

Allow the reopening of closed data URL files

2 participants