fix(settings): validate seasonalThemeOverride; commit page zoom on blur; GIF picker opt-in
- seasonalThemeOverride is coerced to 'auto' when the persisted value is outside the union, like every other enum setting (tested). - PageZoomInput commits on blur as well as Enter. - New gifPickerEnabled setting (default off) with a disclosure that GIF searches go to Giphy; the picker doesn't mount and the composer button is hidden while off. Fixes #74 Fixes #75 Fixes #68 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
@@ -56,6 +56,18 @@ test('coerces unknown persisted denoise model / ringtone id back to defaults', (
|
||||
assert.equal(valid.ringtoneId, 'chime');
|
||||
});
|
||||
|
||||
test('coerces unknown persisted seasonalThemeOverride back to auto', () => {
|
||||
setStored(null);
|
||||
const defaults = getSettings();
|
||||
assert.equal(defaults.seasonalThemeOverride, 'auto');
|
||||
|
||||
setStored(JSON.stringify({ seasonalThemeOverride: 'retired-theme' }));
|
||||
assert.equal(getSettings().seasonalThemeOverride, 'auto');
|
||||
|
||||
setStored(JSON.stringify({ seasonalThemeOverride: 'earthday' }));
|
||||
assert.equal(getSettings().seasonalThemeOverride, 'earthday');
|
||||
});
|
||||
|
||||
test('merges stored values over defaults', () => {
|
||||
setStored(JSON.stringify({ callNoiseSuppression: 'off', someUnknownKey: 1 }));
|
||||
const s = getSettings();
|
||||
|
||||
Reference in New Issue
Block a user