File modified on disk not reloaded when XAML Studio opened

Open
#32 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
desktop

Research direction

No files or tests are named. Start by tracing XAML Studio's caching and auto-save restore path, then compare its behavior with fresh disk content for an unmodified file. Done means reopening an unchanged file loads the latest disk version without overwriting in-progress changes.

Written by the indexing model from the issue text.

Description

bug good first issue

If you modify a file on disk outside of XAML Studio, it is not reloaded if that file is opened in XAML Studio when XAML Studio is re-opened.

I believe this is due to the caching/auto-save mechanism in XAML Studio, we're just loading the cached content of the file vs. loading fresh content from disk of the file's state.

We should only do that in the case that the file is unmodified, as otherwise we could lose in-progress state.

A separate feature would be having a file watcher for opened files to determine if they're changed outside of XAML Studio while running and warn the user of such like other applications, should create a separate tracking issue for that...

Dominant language
C#
Stars
450
Forks
47
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/XAMLStudio

All issues in dotnet/XAMLStudio

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.