Mac: Command+R Refreshes the Whole App

Steps to reproduce

On Mac, inside app, press Command+R

Expected result

Not really sure what is supposed to happen, but what actually happened is definitely debatable.

Actual result

The whole app refreshes like a web page. I guess that’s because the app is built with web technologies.

Environment

  • Operating system: macOS 10.14.6
  • Obsidian version: 0.8.15

Additional information

Nothing really. Super easy to reproduce.

@jianhaoz indeed, that is what Cmd + R is supposed to do.

1 Like

It is, only if it’s in a browser or something that’s supposed to be refreshed. But in this case, how does refreshing the whole app make sense? Even if the app is an electron app or something similar, no one is expecting it to behave like a web page.

I would expect it to only refresh the current window, as well. In Chrome, it only refreshes the one tab, not all open tabs. But the more I think about it, this kind of makes sense to refresh the whole app (for Obsidian).

Perhaps the need for resheshing is different when all the files are local, and so an app-wide refresh makes more sense. In a browser, each tab is pulling info from a different datasource. But with Obsidian, it’s all just one set of files in your local vault. If something isn’t displaying correctly, an app-wide refresh is probably in order.

That’s an interesting point. If you have two vaults open, does it refresh both?
I suppose it might because they are both active. And, in any case, there’s only one app (?) where chromium browsers have many instances.

1 Like

Right! Another layer to the Obsidian side that’s not present in the Chrome analogy.

Personally, I think the best ‘default’ refresh would be ‘Vault’-wide, as opposed to a single window, or the entire app.

My point 1:
From your example: even if Chrome refreshes all tabs, it won’t refresh the ui. I can’t find an example of any app refreshes its ui.

My point 2:
If something is rendered wrong, it means there’s a bug. A refresh could possibly be a workaround. But I don’t think this should take a such a commonly used shortcut.

My final point:
An app is using web technology doesn’t mean it has to behave like a web page.

If you’re talking about refreshing a part of the app, which means a part of a web page, I still don’t think it makes sense technically, (that may also make obsidian too complicated for no good reason), because if the web page crashed I don’t think refreshing a part of it helps in any way. If this “feature” acts as a workaround for bugs, it definitely makes more sense to refresh the whole app but hide the option somewhere.

Well, I can’t speak for the devs as to why the refresh behaves the way it does. I do think it ‘feels’ inconsistent with Chrome, but is that really a problem?

I was only speculating as to why this behavior may make more sense given the single, local file system.

It may actually be a bug. I don’t know. But if it’s intentional, I can see the single file system being the basis for this decision.

No. I just tested on v0.9.0, MacOS, with multiple vaults open.

Only the active vault is refreshing. So it’s not app-wide, but not isolated to the current window, either.

1 Like

You mean the current pane? There’s only one window per vault.

Yes, I just realized you can’t open the same vault twice. It just redirects you to the currently open instance.

So Window-wide refresh = Vault-wide. At first I was thinking you could have two instances of the same vault open, like Chrome having multiple windows each with a set of tabs open.

It’s not that complicated. When you have two vaults open, it’s technically two separate web pages (from what I see in 0.85). So it’s basically the default refresh behavior of Chrome. Each window of the app is basically a Chrome window (with only one tab which contains the obsidian app) without the Chrome UI.

Ok, I’m thinking of each note as a separate tab (webpage) since it has a unique file path (URL).

But you’re saying all the notes are just elements in a single page (being the entire vault window), right?

I assume this will be default Electron behaviour.

1 Like

Right, it’s not like that. The app including the UI is like a single page application. And one window is one instance of the app.

I actually find this feature useful, e.g., when customizing CSS.

Regardless, it’s an Electron thing. Discord also refreshes the whole window. I’m sure it’s possible to remap the behaviour, but as implied by the OP, it might not be easy to determine what it should do instead.

I have often found myself wanting to refresh just the current pane. I can, of course, close and then reopen the pane, but that seems kind of silly and I too had expected to have a “refresh pane” command somewhere. Actually, I’ve found that if I close and reopen a pane with dynamic content (tasks query for example) I get the same view back unless I open in edit mode and “change” the page.

Update: as of 0.13.31, the shortcut is gone.