gui: fix bypass banner not appearing until session switch

QML's property var change detection doesn't reliably trigger
binding updates when comparing to null. Added explicit bool
hasPendingBypass property that properly triggers visibility.
This commit is contained in:
Levi Neely 2026-10-06 13:56:28 +02:00
parent a4378c1be4
commit 5882192ae9
1 changed files with 5 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Item {
property bool sidebarVisible: true
property int maxVisibleBlocks: 80
property var pendingBypass: null // {sessionId, id, cmd, cwd}
property bool hasPendingBypass: false
signal toggleSidebar()
// Do not opt the chat pane into focus navigation.
activeFocusOnTab: false
@ -146,7 +147,7 @@ Item {
color: "#fff3e0" // amber light
border.color: "#ff9800"
border.width: 1
visible: chatPane.pendingBypass !== null
visible: chatPane.hasPendingBypass
z: 100
ColumnLayout {
@ -189,6 +190,7 @@ Item {
if (chatPane.pendingBypass) {
ollie.resolveBypass(chatPane.pendingBypass.sessionId, chatPane.pendingBypass.id, true)
chatPane.pendingBypass = null
chatPane.hasPendingBypass = false
}
}
}
@ -199,6 +201,7 @@ Item {
if (chatPane.pendingBypass) {
ollie.resolveBypass(chatPane.pendingBypass.sessionId, chatPane.pendingBypass.id, false)
chatPane.pendingBypass = null
chatPane.hasPendingBypass = false
}
}
}
@ -594,6 +597,7 @@ Connections {
cmd: cmd,
cwd: cwd
}
chatPane.hasPendingBypass = true
}
}
}