Reopen-closed-tab works for images, pdfs, and previews#669
Conversation
mehmetozguldev
left a comment
There was a problem hiding this comment.
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.
|
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. |
- 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
7c11f49 to
3019634
Compare
No description provided.