Skip to content

Comments

file state tracking with visual indicators for deleted and recreated files#4318

Open
djad04 wants to merge 4 commits intomapeditor:masterfrom
djad04:file-deletion-restoration-handler-system
Open

file state tracking with visual indicators for deleted and recreated files#4318
djad04 wants to merge 4 commits intomapeditor:masterfrom
djad04:file-deletion-restoration-handler-system

Conversation

@djad04
Copy link
Contributor

@djad04 djad04 commented Feb 6, 2026

File lifecycle tracking system that detects on-disk deletions, modifications, and restorations, provides clear visual feedback through tab styling, tooltips, context menus, and warning banners, and allows recovery of deleted files with the option to override disk changes using the in-memory version or reload the disk version

Features Implemented

File Deletion Detection

When a file is detected as missing from disk :

Tab turns red with strikethrough text

Screenshot 2026-02-05 155536

Tooltip shows "deleted" suffix

  • When hovering over the tab, the tooltip displays the filename with "deleted" appended

Right-click context menu adds "Restore" and "Save As" options

Screenshot 2026-02-06 135054

File deleted warning banner

Screenshot 2026-02-05 155536

File Recreated Detection

When a previously deleted file is recreated on disk, :

Modification Check

  • When a deleted file reappears on disk we compare modification timestamps:
  • If the timestamp is identical: the file is treated as unchanged; the tab returns to its normal state and the warning banner is hidden.
  • If the timestamp differs: a recreated state is triggered, the tab changes to yellow, and a warning banner is displayed.

Warning banner updates to "FileRecreated" state

  • action buttons: "Reload" and "Overwrite"
  • Helps user decide whether to reload the new file or overwrite it with current in-memory version
Screenshot 2026-02-05 161004

Save Handling

When attempting to save a document whose file has been recreated on disk with different content:
a conflict popup appears
Screenshot 2026-02-05 193913


@bjorn bjorn force-pushed the file-deletion-restoration-handler-system branch from 8105b56 to cb44351 Compare February 11, 2026 14:33
@bjorn bjorn linked an issue Feb 21, 2026 that may be closed by this pull request
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.

Make "file not found" behavior more source control friendly

1 participant