Repository navigation
Conversation
Settings.set dropped the key for any falsy value, so POSTing [], {}, false,
0 or "" returned 200 but left nothing stored. aw-webui then fell back to
its defaults on reload: deleting every category or alert goal brought the
defaults back, and unchecking a default-on toggle did not persist.
Only null deletes now, matching aw-server-rust, which stores any JSON
value verbatim.
Git-Session-Id: 13b9747e-b0b2-4f45-87b6-509c3b6fef7f
Contributor
Author
Review guide (auto-posted)Structured warm-up for reviewers — what changed, what to run, where to look. Key files
Suggested verification
Known risks / watch points
Suggested review focus
Generated by |
[Medium impact] Safe to merge; no blocking issues found. SummarySettings now keep empty lists, empty objects,
Reviews (2) · Last reviewed commit: "test(settings): check the stored type, s..." · Reviewed by Greptile |
Git-Session-Id: 13b9747e-b0b2-4f45-87b6-509c3b6fef7f
Contributor
Author
|
@greptileai review |
Contributor
Author
|
CI-green and mergeable (Greptile 5/5) — waiting only on a maintainer click. This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Settings.setremoved the key for any falsy value.POST /api/0/settings/<key>with[],{},false,0or""returned 200 and echoed the value, but nothing was stored, andGETthen returnednull.aw-webui falls back to its defaults when a key is missing. In practice:
classes: []) restores the default categories on the next loadAlerts.vueseeds them when nothing is stored)devmodein dev builds) doesn't persistOnly
nulldeletes now. aw-server-rust'ssetting_setalready stores any JSON value verbatim.Test:
test_falsy_value_is_stored_not_deletedcovers[],{},false,0and""through the REST endpoint. It failed on master for all five values and passes with the fix. The oldtest_falsy_value_deletes_key_on_successenshrined the bug for"", so it now asserts deletion viaNoneonly. The full suite passes: 317 passed (test_client.pyexcluded, since it needs a live server).