Repository navigation
fix(web): keep the vocabulary list when it failed to load - #15244
Conversation
|
Verified against main — the fix is correct end to end, and it comes with the regression test the repo's Definition of Done asks for. Thanks!
Checks pass on this head; no auth, workflow, or dependency surfaces touched. Leaving for routine human maintainer merge review. 🤖 Automated review on behalf of the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Web fix: getCustomVocabulary now returns null on failed fetch instead of empty list, and settings page treats null as not-loaded (disables add, shows load-error message) instead of silently saving a truncated list. New component test covers load-failure, null-result, and success paths. CI green. Confidence 5/5.
) Fixes #15245 The settings page keeps the daily summary as not loaded when the fetch fails, instead of falling back to on at 22:00, so the toggle stays disabled and nothing is saved until the real settings arrive. Same shape as the vocabulary list in #15244. Added `src/components/settings/__tests__/SettingsDailySummary.test.tsx`, fails on main (it saves hour 22) and passes now. Failure-Class: none <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/15246?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Fixes #15243
getCustomVocabularynow returns null when the fetch fails instead of an empty list, and the settings page treats null as not loaded: the add button stays disabled and nothing is saved until the real list arrives.Added
src/components/settings/__tests__/SettingsVocabulary.test.tsx, fails on main (it saves just the new word) and passes now.Failure-Class: none