Skip to content

Reopen-closed-tab works for images, pdfs, and previews#669

Open
RA1NCS wants to merge 4 commits into
athasdev:masterfrom
RA1NCS:feat/reopen-closed-tab
Open

Reopen-closed-tab works for images, pdfs, and previews#669
RA1NCS wants to merge 4 commits into
athasdev:masterfrom
RA1NCS:feat/reopen-closed-tab

Conversation

@RA1NCS
Copy link
Copy Markdown
Contributor

@RA1NCS RA1NCS commented May 8, 2026

No description provided.

@mehmetozguldev mehmetozguldev self-requested a review May 9, 2026 11:36
Copy link
Copy Markdown
Member

@mehmetozguldev mehmetozguldev left a comment

Choose a reason for hiding this comment

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

Thanks, the image/pdf direction looks good and the merged result passes typecheck plus the existing editor tests.

I don’t think this is ready yet because the “previews” part does not actually reopen preview tabs. Markdown/HTML/CSV previews are opened with a virtual :preview path, but this change stores only path/name/isPinned and then reopens through handleFileSelect(path, false). That will try to resolve the virtual preview path as a real file instead of recreating the preview from its source file/content.

Please store enough closed-tab metadata to distinguish editor/image/pdf/binary/preview/diff tabs and reopen previews through the preview buffer path/source data, not plain handleFileSelect on the virtual preview path. Also either include diff support or remove the “diffs” claim from the code comment.

@RA1NCS
Copy link
Copy Markdown
Contributor Author

RA1NCS commented May 11, 2026

Addressed review. Closed-tab history now stores enough buffer metadata to reopen editor, image, pdf, binary, preview, and diff tabs correctly. Preview tabs reopen from their preview source data, diff tabs reopen from stored diff content/diffData, and plain file-backed tabs still go through handleFileSelect.

RA1NCS added 3 commits May 11, 2026 00:02
- restore markdown, html, csv preview tabs with their preview state intact
- reopen diff tabs from saved diff data instead of dropping back to file open flow
- keep closed-tab history typed so different tab kinds do not overwrite each other
@RA1NCS RA1NCS force-pushed the feat/reopen-closed-tab branch from 7c11f49 to 3019634 Compare May 11, 2026 04:03
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.

2 participants