Repository navigation
feat(app): remember settings between launches - #72
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 7
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
View settings, per-device stream options and Slim mode are saved to ~/.simutil/desktop-settings.json, separate from the CLI's settings.yaml and state.json. A missing or corrupt file falls back to defaults.
6034d50 to
154dad4
Compare
| // Write then rename: quitting mid-save never leaves half a file. | ||
| final tmp = File('$_path.tmp'); | ||
| await tmp.writeAsString(json, flush: true); | ||
| await tmp.rename(_path); |
There was a problem hiding this comment.
WARNING: Settings changes silently stop persisting on Windows after the first save
File.rename over an existing destination fails on Windows (Win32 MoveFileW does not replace an existing file). $_path is created by the first successful save, so every later tmp.rename(_path) throws, is swallowed by the catch, and only debugPrinted — subsequent settings changes are lost on Windows and never survive a restart.
Delete the destination before renaming (ignoring a missing-file error), or write to a uniquely-named temp file and replace atomically.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (7 files)
Fix these issues in Kilo Cloud Reviewed by free · Input: 86.8K · Output: 32.7K · Cached: 86.7K |
Description
The desktop app now remembers its settings between launches: stream layout, headless mode, grid recording quality, Slim mode, and each device's stream options (frame and scrcpy resolution, frame rate, bit rate, show touches, stay awake, screen off).
~/.simutil/desktop-settings.json, separate from the CLI'ssettings.yamlandstate.json.Type of Change
Summary by CodeRabbit