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
chore(frontend): kill-switch toggle and global-save retry paths have no tests #573
frontend/src/ladder.ts:323-350 (wireKillSwitchToggle) sends { laddering_enabled: toggle.checked } on change, but frontend/src/__tests__/ladder.test.ts never fires the toggle's change event and has no laddering_enabled assertion (the only matches are element ids). Dropping or renaming the field would pass the suite.
frontend/src/settings.ts:3553-3560: after await api.updateConfig(changedGlobal) the snapshot is advanced for each sent key. No test fails the global PUT and checks that a retry re-sends the field; the existing failure test (settings.test.ts:622) only covers the error toast. A mutant that advances the snapshot before the PUT survives.
Same block: the advance calls getFieldValue(id) after the PUT resolves, while changedGlobal was built from earlier values. A field edited while the PUT is in flight is recorded as saved without having been sent (same shape as snapshotAllFields, settings.ts:370). The test for item 2 should cover this case; fixing it means capturing the sent values before the await.
Acceptance
Tests: the toggle change sends exactly { laddering_enabled: <checked> }; a rejected global PUT followed by Save re-sends the field; an edit made during an in-flight PUT stays dirty afterwards.
Activity