Watch the pref reach the screen, not just the function
Review pointed out that `dailyGroups` was well covered and the wiring to it was not: passing the wrong pref from App, binding the checkbox to a neighbour, or hardcoding `true` in Dailies each shipped with the suite green. Three of those are now caught by rendering the strip and the settings panel rather than the function behind them — verified by performing the mutations, not by reading the code. The fourth, App handing Dailies the wrong pref, is still uncovered: no test renders App, and closing it needs a feed and a click library this project does not have. Also pins the default. Flipping that one line silently empties Today's dailies for every existing reader, which is the whole argument of the comment above it, and nothing was watching — `defaults` is exported so the value and the upgrade path can both be asserted. And DATA-MODEL's enumeration of the prefs blob had gone stale; AGENTS.md names it as the doc to update when a stored key moves. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
4277c28e50
commit
dd8d7577b3
@@ -186,7 +186,7 @@ export interface Prefs {
|
||||
onboarded: boolean;
|
||||
}
|
||||
|
||||
function defaults(): Prefs {
|
||||
export function defaults(): Prefs {
|
||||
return {
|
||||
region: guessRegion(),
|
||||
hiddenGames: [],
|
||||
|
||||
Reference in New Issue
Block a user