Closed dtkav closed 11 months ago
Hey @debanjum , thanks for the review. While this fix makes it possible to use local servers again (I am using it in my fork via BRAT ), I don't think it is ideal.
AFAICT this is still the only network check that updates the connection status setting, and command registration only runs when you load the plugin. This means that you need to configure the plugin via the settings page and then restart obsidian for it to take effect. This is an unexpected flow compared to other obsidian plugins I have used.
Here are some ideas to improve the UX:
settings.connectedToBackend
to true
on any successful network request to the API.settings.connectedToBackend
value which could be stale.IMHO it makes sense to:
Immediate term -- merge this so that there is a workaround for the regression.
Short term -- test the network connection and set settings.connectedToBackend
on edit to the url/api key fields (or with an explicit "test" button).
Longer term --
I have only skimmed the code base, so please take the above with a grain of salt.
Thanks for your work on Khoj.
Hey @dtkav, thanks for the well thought-out suggestions 👌🏾. Agree with the immediate, short and long term improvement suggestions for managing backend connectivity state. I'll merge this fix of yours in for now. And look into the short term solution in a bit
fixes #558