Skip to content

Fix: Fixed issue where thumbnails didn't refresh when file was updated#18436

Merged
yair100 merged 1 commit intofiles-community:mainfrom
workbysaran:sg/fix-thumbnail-not-updated
Apr 29, 2026
Merged

Fix: Fixed issue where thumbnails didn't refresh when file was updated#18436
yair100 merged 1 commit intofiles-community:mainfrom
workbysaran:sg/fix-thumbnail-not-updated

Conversation

@workbysaran
Copy link
Copy Markdown
Contributor

Resolved / Related Issues
Fixed an issue where files saved to an open folder by external applications (e.g. exporting a PDF from Microsoft Word) would show only the generic file type icon instead of the actual thumbnail.

Closes #18352

Steps used to test these changes

  1. Open any folder in Grid View
  2. Open an external application (e.g., Microsoft Word), create a document with a few pages, and export or save it as a PDF in the open folder
  3. Verify the PDF thumbnail appears correctly without needing to refresh
  4. Repeat with other file types and applications
  5. Verify files copied via File Explorer still show thumbnails correctly

@yair100
Copy link
Copy Markdown
Member

yair100 commented Apr 28, 2026

What's the underlying issue?

@workbysaran
Copy link
Copy Markdown
Contributor Author

When an external app (especially one that takes longer to finish writing) writes a file, the Windows thumbnail cache isn’t ready when the file first appears. The initial fetch returns null because the file is still being written, and later modify events don’t refresh the thumbnail.

Fix: If the first fetch returned null, the item was marked NeedsDelayedThumbnailLoad and retried on FILE_ACTION_MODIFIED events with a 500 ms debounce timer.

@yair100
Copy link
Copy Markdown
Member

yair100 commented Apr 28, 2026

I need to do a more thorough review, but it looks good at first glance.

Comment thread src/Files.App/ViewModels/ShellViewModel.cs
@yair100 yair100 added the ready to merge Pull requests that are approved and ready to merge label Apr 29, 2026
@yair100 yair100 changed the title Fix: Thumbnail not updating for files created by external application… Fix: Fixed issue where thumbnails didn't refresh when file was updated Apr 29, 2026
@yair100 yair100 merged commit ad4eacd into files-community:main Apr 29, 2026
11 of 12 checks passed
@yair100
Copy link
Copy Markdown
Member

yair100 commented Apr 29, 2026

Thank you!

@yamachari2025-ops
Copy link
Copy Markdown

The bug where PDF previews do not update has not been fixed.
4.0.51.0
10.0.22631.6199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Pull requests that are approved and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: PDF thumbnail not displaying until refresh

3 participants