You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(settings): saving the Settings page reverts backend coverage propagation and an empty coverage field saves as 0 #522
After #500 the backend copies a changed default_coverage to service_configs. Saving the Settings page then undoes that propagation. Separately, an empty global coverage field saves as 0.
frontend/src/settings.ts:3560saveGlobalSettings PUTs every service with base?.coverage ?? settings.default_coverage, or the SP card's DOM value (3562-3566).
internal/api/handler_config.go:205updateServiceConfig overlays existing.Coverage = cfg.Coverage unconditionally, so the stale value wins.
No coverage confirm dialog exists; only term and payment have one.
frontend/src/settings.ts:3482Number('') is 0, and the check at 3483 accepts 0. wireInlineRangeValidation (:247) also accepts the empty string. Same pattern in frontend/src/plans.ts:1345.
Failure scenario
Probe: global coverage 50, ec2 and savings-plans-compute rows at 50. Set global to 0 and Save. Result: global 0, ec2 50, savings-plans-compute 50. Clearing the global coverage field and saving stores 0.
Context
Found in the #510 review. Related: #135 (closed), #225 (closed, same class for term/payment), #345.
Acceptance
Saving a changed global coverage leaves service rows at the propagated value, and an empty coverage field is rejected with an inline error instead of saving 0.
Activity