Tier 0: render what the services already decided, honestly

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-25 00:24:30 -04:00
parent be0e55214b
commit 8b1205e4b8
38 changed files with 1474 additions and 260 deletions
@@ -39,10 +39,25 @@ SettingsPage {
// and the stored entry for vrrMode, which it does not report. Reading it
// from the service rather than rebuilding it here is what stops the page
// from showing one thing while an apply carries another.
//
// With one exception, and it is the whole reason this is not a one-liner.
// While the Keep-or-revert banner is up, nothing has been stored yet --
// confirm() is what writes -- so currentLayout() still answers vrrMode from
// the PREVIOUS stored record. The variable-refresh picker therefore snapped
// back to its old value the instant the change was applied, while the
// banner beside it asked whether to keep a change the page had just stopped
// showing. For the length of that window the requested layout is what the
// pickers must render: it is what was asked for, and it is what keeping
// will store.
readonly property var record: {
const name = root.monitor ? root.monitor.name : "";
if (name === "" || Displays.monitors.length === 0)
return null;
if (Displays.awaitingConfirmation && Displays.pendingRequestedLayout) {
const requested = Displays.pendingRequestedLayout.find(entry => entry.name === name);
if (requested)
return requested;
}
return Displays.currentLayout().find(entry => entry.name === name) ?? null;
}