Silence config dialog warnings and dedupe HTTP error messages#4
Open
Plenvorik wants to merge 1 commit into
Open
Silence config dialog warnings and dedupe HTTP error messages#4Plenvorik wants to merge 1 commit into
Plenvorik wants to merge 1 commit into
Conversation
Two small cosmetic cleanups. Silence QML config-dialog warnings. Opening the widget's settings logs nine warnings like "FormLayout does not have a property called cfg_claudeRefreshSecsDefault" and "... called title". KDE's KCM framework writes `cfg_<key>Default` and `title` onto the config page root as initial properties; without matching declarations the writes fail loudly. Functionally harmless — the "Reset to defaults" button still recovers values from main.xml — but noisy. Declare the missing properties with defaults kept in sync with main.xml, and accept `title` as a no-op property so KCM's initial write succeeds. Dedupe HTTP error messages. `classify_http_failure()` always concatenates "<status>: <api_msg>", but the API body often begins with the same label, producing "Rate limited: Rate limited. Please try again later.". Now if `api_msg` starts with the status label (case-insensitive), we use `api_msg` verbatim; otherwise the concat path is unchanged. Both changes are KDE only; the GNOME extension is untouched.
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.
Two small cosmetic cleanups.
Silence config-dialog QML warnings. Opening the widget's settings
dialog logs nine warnings of the form
FormLayout does not have a property called cfg_claudeRefreshSecsDefault(one percfg_*key)plus
FormLayout does not have a property called title. KDE's KCMframework writes
cfg_<key>Defaultandtitleonto the config pageroot as initial properties; without matching declarations the writes
fail loudly. Functionally harmless — the "Reset to defaults" button
still recovers values from
main.xml— but noisy injournalctl.This declares the missing properties with defaults kept in sync with
main.xml, and acceptstitleas a no-op so KCM's initial writesucceeds silently.
Dedupe HTTP error messages.
classify_http_failure()alwaysconcatenates
"<status>: <api_msg>", but the API body frequentlybegins with the same label, producing messages like
"Rate limited: Rate limited. Please try again later."Now ifapi_msgstarts with our status label (case-insensitive), we useapi_msgverbatim; otherwise the concat path is unchanged. Coveredby manual tests for 401 / 429 / 500 with and without body overlap.
Both changes are KDE only; the GNOME extension is untouched.