Dark theme by default (stored choices kept); updateChannel pref; new peach icon (transparent); packaged device evidence
ci / linux-arm64-cross (push) Successful in 2m29s
ci / linux-x64 (push) Successful in 3m11s

This commit is contained in:
omar committed 2026-10-24 06:13:08 +03:00
1 parent 41e90fb5e8
commit 456041bfde
15 files changed
+363 -45

No files matched your search

+31
View File
@@ -59,3 +59,34 @@ test('a corrupted saved list on disk falls back to the default', () => {
cleanup();
}
});
test('theme: a new profile or a prefs file without the key starts dark', () => {
const { file, cleanup } = tempFile();
try {
assert.equal(new Prefs(file).get().theme, 'dark');
fs.writeFileSync(file, JSON.stringify({ voiceVolume: 80 }));
assert.equal(new Prefs(file).get().theme, 'dark');
fs.writeFileSync(file, JSON.stringify({ theme: 'sepia' }));
assert.equal(new Prefs(file).get().theme, 'dark', 'invalid stored value falls back to the default');
} finally {
cleanup();
}
});
test('theme: stored choices survive an update and are never rewritten', () => {
const { file, cleanup } = tempFile();
try {
for (const theme of ['light', 'system', 'dark']) {
fs.writeFileSync(file, JSON.stringify({ theme }));
const p = new Prefs(file);
assert.equal(p.get().theme, theme);
p.set({ voiceVolume: 90 }); // unrelated write keeps the choice
assert.equal(JSON.parse(fs.readFileSync(file, 'utf8')).theme, theme);
}
const p = new Prefs(file);
p.set({ theme: 'light' });
assert.equal(new Prefs(file).get().theme, 'light', 'light persists across restart');
} finally {
cleanup();
}
});