fix: persist elevated off override

This commit is contained in:
Peter Steinberger
2026-01-10 05:23:29 +01:00
parent e4abd06094
commit 66db6c749d
3 changed files with 17 additions and 10 deletions

View File

@@ -144,8 +144,8 @@ export async function applySessionsPatchToStore(params: {
} else if (raw !== undefined) {
const normalized = normalizeElevatedLevel(String(raw));
if (!normalized) return invalid('invalid elevatedLevel (use "on"|"off")');
if (normalized === "off") delete next.elevatedLevel;
else next.elevatedLevel = normalized;
// Persist "off" explicitly so patches can override defaults.
next.elevatedLevel = normalized;
}
}