Review everything shipped this weekend, and fix what the reviewers caught

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-24 13:29:42 -04:00
parent ffce48964e
commit 07db1068f1
42 changed files with 959 additions and 219 deletions
@@ -57,7 +57,12 @@ Singleton {
const coerced = PreferenceSchema.coerce(key, value);
if (coerced === undefined)
return false;
if (root.values[key] === coerced)
// A json value comes out of coerce() with a fresh identity every time,
// so `===` never held for one and an identical write still bumped the
// revision. The revision is what drives the video restore, the scheme
// reconciliation and the theme coalesce timer, so re-storing the same
// display map ran all three again for a change nobody made.
if (root.sameStoredValue(key, coerced))
return true;
// Reassign rather than mutate: QML does not notify on in-place changes
@@ -70,6 +75,19 @@ Singleton {
return true;
}
// Whether the store already holds `coerced` for `key`. Scalars compare by
// value; json compares by serialization, which is the only comparison an
// object or array has here. Two equal objects written in a different key
// order serialize differently and are treated as a change -- that is the
// old behaviour, so the comparison can only ever remove churn, never
// swallow a real write.
function sameStoredValue(key: string, coerced: var): bool {
const stored = root.values[key];
if (PreferenceSchema.spec(key)?.type === "json")
return stored !== undefined && JSON.stringify(stored) === JSON.stringify(coerced);
return stored === coerced;
}
// Restores every schema default in one write. Complete by construction --
// there is no hand-maintained list to fall out of sync with the schema.
function resetDesktopDefaults(): void {
@@ -294,10 +294,14 @@ Singleton {
}
]
},
// Grouped with the workspaces rather than with focus, because a group is
// where a setting is found rather than what it is about: the slider that
// sets this is a schema-bound row on WorkspacesPage. The focus group
// routes to Notifications, which is where focusModes renders.
{
key: "focusDurationMinutes", type: "int", def: 45, min: 5, max: 180, step: 5,
unit: "min",
group: "focus",
group: "workspaces",
label: "Focus session length",
detail: "How long a focus session runs before it ends itself"
},