notaapp / talk

Issues and discussions for the notes app, Nota.
https://nota.md
59 stars 1 forks source link

Workspace actions ineffective #388

Closed petrbouchal closed 1 year ago

petrbouchal commented 1 year ago

Unless I am missing something, most workspace-related actions have no effect:

This is Nota Version 0.40.4 (Apple Silicon) running on MacOS 13.4 beta (the beta might be the cause?)

astoilkov commented 1 year ago

Hmm, very strange. In our reporting, there is an error from exactly 19 hours ago (when you wrote the issue). Our reporting is anonymous but it's probably you as this is the only real error in the system.

From what I see as the reason it's probably caused by corruption in the state of the app. You can go to ~/Library/Application Support/Nota and rename the state.json file (to something like state-corrupted.json). This will clear the state and should fix the problem.

Let me know what happens.

I will also investigate further to ensure this doesn't happen again and the user experience is better (an error is shown instead of nothing happening).

petrbouchal commented 1 year ago

Thanks for the prompt response. Yes, that was it - I removed state.json and the issue is resolved, all the steps I described now work as expected.

Somewhat surprisingly, this also reset all preferences - would it make sense to store these in a separate file? (On my end, I resolved this by copying the config object from the old state.json file, so no problem here.)

petrbouchal commented 1 year ago

(If this was just something peculiar going haywire on my machine, I wonder if it's worth any further treatment...)

astoilkov commented 1 year ago

Great, I'm happy the issue is resolved.

Yes, preferences are part of the state. Actually, everything that's not workspace related is inside that state.json. We can split the state.json file, but it's hard to determine what parts to separate. Splitting also increases the complexity of the code.

I think the best solution is to fix the problem which I plan to do.

I will close this because it doesn't describe well the underlying issue. However, I will work on the problem soon.