Repository navigation
Conversation
Per-request catch fallbacks turned a failed /counters or multi_counter_enabled load into disabled mode with an empty list, so the counterLoadFailed toast never ran. Let failures reach it; the settings route already returns the default for a missing key.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
PR Summary by QodoReport counters settings load failures
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
Related work
Issue / Discussion: None (audit finding F-15)
Summary
CountersSettingsTabwrapped the/settings/multi_counter_enabledand/countersrequests in per-request.catch()fallbacks. A 429, 500 or network failure therefore silently showed multi-counter as disabled with an empty list, and the existingcounterLoadFailedtoast never ran. An owner could think the counters were gone and recreate them.The fallbacks are removed in both
loadDataand the mount effect, so failures reach the existing catch. The fallbacks were not needed for a missing key, becauseGET /settings/multi_counter_enabledalready returns the'false'default fromOPTIONAL_SETTING_DEFAULTS.Scope
No new failed-load or retry UI. The tab keeps its default state and now shows the error toast.
Verification
Commands run:
npm run lint,npm run build:frontendnpx playwright test e2e/settings-request-budget.spec.ts --project=chromiumoxfmt --check,git diff --checkResults: all passed. The new test "Counters tab reports a failed counters load instead of showing an empty list" fails without the fix (checked against a frontend build with the fix removed). It sits at the end of the spec file so it doesn't conflict with the sibling Save All phone-validation PR.
Compatibility & data safety
Cross-cutting surfaces
Developer documentation
Contributor checklist