Repository navigation
fix(web): keep the daily summary settings when they fail to load - #15246
aryanorastar merged 2 commits into
Conversation
|
Verified against main — this closes the exact data-loss path from #15245, and the fix carries the regression tests the repo's Definition of Done asks for. Thanks!
Minor, non-blocking: while the settings are unavailable the row renders a silently disabled toggle — a "could not load" hint like the vocabulary section's three-way state would make the reason discoverable. Feel free to fold that in or skip it. 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: same shape as #15244 — daily summary settings now stay null (not-loaded) on fetch failure instead of a hardcoded default that could silently overwrite the user's real delivery time on next save. New component test covers load-failure and toggle-preserves-delivery-time. CI green. Confidence 5/5.
4fc63b9 to
e7f2e55
Compare
aryanorastar
left a comment
There was a problem hiding this comment.
Reviewed current head e7f2e556e006. origin/main still defaults a failed daily-summary load to { enabled: true, hour: 22 }, which overwrites the user's settings. This SHA keeps the last known settings and pins it. Hygiene SUCCESS. Not merging.
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