lukasbach / pensieve

Desktop app for recording meetings from locally running apps and transcribing and summarizing them with a local LLM
https://pensieve.lukasbach.com/
17 stars 4 forks source link

Settings changes are not applied #1

Open osorioleomar opened 3 months ago

osorioleomar commented 3 months ago

Hi Lukas. I stumbled upon this project and I think the overall workflow is good.

I don't know if I am missing the saving button or hotkeys, but whenever I try to update the settings, nothing is being saved. Like if I try to change the model for Ollama, toggle off some options or change the transcription model, when I close the settings window and open it again, everything is reset.

Thank you.

lukasbach commented 3 months ago

Hey, thanks for your report!

There is a short delay between toggling an option and that being saved (about a second), you can see once the settings save the current state by the window icon at the top left, where it briefly switches to a success icon, that means the changes are applied. I will make sure that changes are saved on settings window close, but since you mentioned you tried toggling several options, I'm not sure this is actually the culprit.

The settings should be persisted to the file %appdata%\Pensieve\settings.json. Does this file exist for you (and have any contents?) As workaround, you might also be able to adjust settings in there directly, this is what the default settings look like.

osorioleomar commented 3 months ago

Thanks for the response. I noticed the changing icons on the top left before so I assumed every change is automatically saved. But in my case, everything just reverts back after closing the Settings screen. I tried to toggle off the Dark Mode, but nothing changes. When I close the window, it is On again. The settings.json is empty. I tried putting the contents of defaultSettings but nothing happened. I am maybe doing something wrong. Sorry, not a developer.

I will try with another computer. Maybe my device has the problem.

Also, in system tray, I try the Close option but nothing happens. I have to use Task Manager to close it. I only discovered this because when I can multi-click the icon, it spawns multiple sessions: https://prnt.sc/ub2ULv2V4NrZ

osorioleomar commented 3 months ago

settings.json Update: I was able to create the Settings.json and now I can change the Settings.

lukasbach commented 3 months ago

I have had another look, and unfortunately can't reproduce this even when I delete my settings file. I've added additional check to store the settings when the window is closed, so it doesn't matter anymore when the window is closed before the save timeout happens.

I've also added proper application logging in the last version 1.0.9. If you care to try again to see if you can still reproduce the error, I'd be happy to see what the app logs out. If not, I can also understand. Logs are stored in %USERPROFILE%\AppData\Roaming\Pensieve\logs\main.log.

TomSeestern commented 2 months ago

Had the Same thing happen just now on a fresh win11 install → applications settings are not being saved.

Log

The following log generates while: 1) Fresh start of application 2) open settings dialog 3) change a setting (Here: OpenAI API key + Model) 4) Close Settings dialog -> Settings not saving

pensieve/logs/Main.log:

[2024-07-01 08:42:29.740] [info]  App ready, running normally. Args: C:\Users\tom\AppData\Local\pensieve\app-1.0.11\Pensieve.exe
[2024-07-01 08:42:29.818] [info]  Search index initialized.
[2024-07-01 08:42:34.287] [error] Uncaught (in promise) Error: Error invoking remote method 'main': SyntaxError: C:\Users\tom\AppData\Roaming\Pensieve\settings.json: Unexpected end of JSON input
[2024-07-01 08:42:41.223] [error] Uncaught (in promise) Error: Error invoking remote method 'main': SyntaxError: C:\Users\tom\AppData\Roaming\Pensieve\settings.json: Unexpected end of JSON input
[2024-07-01 08:42:50.197] [error] Uncaught (in promise) Error: Error invoking remote method 'main': SyntaxError: C:\Users\tom\AppData\Roaming\Pensieve\settings.json: Unexpected end of JSON input
[2024-07-01 08:42:53.513] [error] Uncaught (in promise) Error: Error invoking remote method 'main': SyntaxError: C:\Users\tom\AppData\Roaming\Pensieve\settings.json: Unexpected end of JSON input

pensieve/settings.json:

file is existing but its completely empty

Workaround:

  1. Stop/Kill application via Task manager
  2. Delete settings.json
  3. Start application
  4. Change a setting → Settings.json is generated and filled properly

→ Settings are now being saved

lukasbach commented 2 months ago

This is interesting. I can't reproduce the app creating an empty settings file, but with the empty settings file at least I can reproduce the issue of saving not working. I added an additional workaround so that it can save over an empty settings file. I can't find the reason for what might be creating the empty settings file, but at least that should solve the symptoms, and the issue should not occur in the latest version. Thanks @TomSeestern for the details, that was very helpful.