Renaming Files Closes Same File on Synced Devices

Steps to reproduce

  1. Create a file/note on one device & leave that file open.
  2. Go to a synced device and open the same file/note.
  3. Rename said file on either device. It will close/disappear on the other device. It doesn’t matter which device does the renaming, the result will be the same.

Did you follow the troubleshooting guide? [Y/N]

I only use a few plugins to begin with, but I did try it again with my personal vault in restricted mode and default theme with no snippets, etc. - plain vanilla everything & the result was the same.

Expected result

I expected any synced device that had that file open at the time of it being renamed to update the file’s name while keeping it open OR at WORST, close it with a dialog explaining why & which file had been closed.

After I’d renamed many files and had them open on multiple devices and I suddenly noticed that many were missing I had a very difficult time trying to recreate the layout I’d started with. Well… I was never fully successful, but…

Actual result

The file was closed on any synced device that also had it open (even if it wasn’t currently displayed).

Environment

Desktop Environment:
SYSTEM INFO:
Obsidian version: v1.8.4
Installer version: v1.6.7
Operating system: Windows 10 Pro 10.0.19045
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

Mobile Environment:
SYSTEM INFO:
Operating system: android 14 (samsung SM-S711U1)
Obsidian version: 1.8.4 (186)
API version: v1.8.4
Login status: logged in
Language: en
Catalyst license: none
Live preview: on
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

I’ll just answer about this part, with a potential workaround for now. Save a workspace. Then you can use that to restore your view on the other device. Workspaces - Obsidian Help

Thank you, that might be at least a partial temporary solution.

I’m not sure how a Workspace would handle loading a file that’s since been renamed though. I think from such past accidental scenarios it just opened an empty tab in it’s place.

That’s an area I’ve been wanting to test, but haven’t had the time. It looks like I may need to make time…

Yeah it likely won’t work. I meant after you’ve lost your open tabs, as a workaround.

Not sure if I consider this a bug. It’s not tied to Obsidian Sync either. I agree that probably at least a notification would be nice.

Right, I can see now that in the strictest sense of the word “bug” as it relates to software, my issue is in fact not a bug…

However, what led me to feel as though it were a bug is that, IMHO what I see/feel as one of Obsidian’s core strengths is that one can rename files without need of worry of breaking links. That was so liberating I (unknowingly) assumed it to be all-reaching; it was nearly a paradigm shift as a user experience.


Regardless, if it were to work as I expected I can see it as being a huge advantage of one using the official Obsidian Sync service over a 3rd party of DIY solution.

If this would be better branded as a feature request, how could we most easily proceed with the conversion?

It would be great if Obsidian could keep track somehow. I know for example git does not. If you rename a file tracked in git, it shows up as a delete and new file. Googling indicates some apps keep a pointer to files, but I have no idea if Obsidian can do that.

What I do know is that you’ve never been able to externally rename a file and have links automatically update. You’ve always had to do it from inside the app. Which is also why this isn’t specific to Sync. If you rename a file in the OS, the tab will also close, and links will break. (Which can be a great feature when you’re trying to repair a mistake without propagating a bunch of changes across your vault.)

Right, I’ve always understood that external changes (renaming a file) as you mentioned don’t propagate & why. That’s completely understandable.

When using Obsidian to do the renaming though I’ve came to expect it to handle the details of updating renamed files so as to keep a smooth user experience. I understand that that is my fault of expecting Obsidian’s typical link updating of renamed files to extend to other renaming scenarios, such as the one my initial post described.

1 Like