Watch
1
0
Fork
You've already forked souveraine
0

settings: don't render a missing ack budget as "waits 0s"

An older sessiond has no lock_ack_budget_secs. Show the upgrade note instead of
inventing a number.
This commit is contained in:
Fimeg 2026-07-25 18:57:48 -04:00
commit 9ab1cfbccc

View file

@ -236,13 +236,27 @@ ContentPage {
}
}
// Only claim the ordering guarantee when the daemon actually reports
// the field. An older sessiond has no lock_ack_budget_secs, and
// rendering that absence as "waits 0s" would be the page inventing a
// number the same class of lie as the timers this section replaced.
StyledText {
Layout.fillWidth: true
visible: SessiondPolicy.available && SessiondPolicy.lockAckBudgetSecs > 0
wrapMode: Text.WordWrap
color: Appearance.colors.colSubtext
font.pixelSize: Appearance.font.pixelSize.smaller
text: Translation.tr("The screen never goes dark on an unlocked session. sessiond locks first and waits %1s for the compositor to acknowledge; if it cannot, it blanks anyway and records a security error rather than pretending the session locked.")
.arg(SessiondPolicy.lockAckBudgetSecs)
}
StyledText {
Layout.fillWidth: true
visible: SessiondPolicy.available && SessiondPolicy.lockAckBudgetSecs === 0
wrapMode: Text.WordWrap
color: Appearance.colors.colSubtext
font.pixelSize: Appearance.font.pixelSize.smaller
text: Translation.tr("This sessiond predates the lock-before-blank ordering. Update the souveraine package to get it.")
}
}
}