Watch
1
0
Fork
You've already forked souveraine
0

island: fix three defects found by actually loading the shell

The island had never been load-tested. All three were fatal or noisy and
none were visible by reading.

StyledToolTip takes `text`, not `content`. Two occurrences, each one a
hard "Cannot assign to non-existent property" that failed the entire
module chain up to shell.qml — the bar would not have come back.

The provider-health tooltip could never have shown even once fixed: a
MaterialSymbol has no `hovered`, and our own StyledToolTip fix treats a
non-hoverable parent as never-show. That block exists specifically so an
unavailable provider is not mistaken for "no sessions", so a tooltip was
the wrong carrier. Stated visibly now.

Island read root.QsWindow.window through a non-optional access; inside a
Loader the attached object is not resolved at construction and it threw.

Revealer takes implicitHeight from childrenRect, so anchoring its child
to its own centre closes a cycle once it sits in a Loader. ii-base hid it
by letting the layout drive the Revealer height directly.

Verified: qs -c souveraine reaches "Configuration Loaded" with no warning
naming any of these files.
This commit is contained in:
Fimeg 2026-08-11 14:46:41 -04:00
commit 783f09606a
3 changed files with 32 additions and 14 deletions

View file

@ -266,12 +266,16 @@ Item { // Bar content region
Component {
id: pomodoroComp
// The child is deliberately NOT anchored to the Revealer's centre.
// Revealer takes implicitHeight from childrenRect, so a child anchored
// to its parent closes a real cycle once the Revealer sits in a Loader
// (implicitHeight -> height -> child.y -> childrenRect -> ...). ii-base
// hid it by letting the layout drive the Revealer's height directly.
// The indicator has a fixed implicitHeight and the Loader carries
// Layout.alignment, so it centres without the anchor.
Revealer {
reveal: TimerService.pomodoroRunning
Layout.fillHeight: true
PomodoroBarIndicator {
anchors.verticalCenter: parent.verticalCenter
}
PomodoroBarIndicator {}
}
}

View file

@ -36,7 +36,10 @@ Item {
// cramped-ness. Values: "auto" | "dot" | "pill".
property string restingForm: "auto"
property var screen: root.QsWindow.window?.screen
// Optional all the way down: inside a Loader the attached QsWindow is not
// yet resolved at construction, and reading through it threw a TypeError
// before the bar had a window.
property var screen: root.QsWindow?.window?.screen ?? null
// Same test BarContent uses, so island and neighbours narrow together.
readonly property bool narrowBar: (Appearance.sizes.barShortenScreenWidthThreshold >= (screen?.width ?? 99999))
@ -168,7 +171,7 @@ Item {
StyledToolTip {
// Stale is worth saying out loud rather than only dimming: a dim
// island and a quiet one look identical at a glance.
content: AgentSessions.stale
text: AgentSessions.stale
? qsTr("Agent sessions — stale (%1)").arg(AgentSessions.lastError)
: AgentSessions.available
? qsTr("%1 agent session(s), %2 active").arg(AgentSessions.sessions.length).arg(AgentSessions.activeCount)

View file

@ -48,19 +48,30 @@ Rectangle {
// unavailable has no rows to hang the message on, and "no sessions"
// must never be confused with "not looking". Same family as every
// empty-result bug this project has hit.
//
// Stated visibly rather than in a tooltip. A MaterialSymbol has no
// `hovered`, and our StyledToolTip fix deliberately treats a
// non-hoverable parent as "never show" -- so a tooltip here could
// never have appeared, which is exactly the silent-absence failure
// this block exists to prevent.
Repeater {
model: ["souveraine", "claude", "codex"]
delegate: MaterialSymbol {
delegate: RowLayout {
id: providerHealthRow
required property string modelData
readonly property var p: AgentSessions.providers?.[modelData] ?? null
visible: p !== null && p.available === false
text: AgentSessions.providerIcon(modelData)
iconSize: Appearance.font.pixelSize.smaller
color: Appearance.colors.colOutlineVariant
StyledToolTip {
content: qsTr("%1 unavailable: %2")
.arg(AgentSessions.providerLabel(parent.modelData))
.arg(parent.p?.error ?? "unknown")
spacing: 3
MaterialSymbol {
text: AgentSessions.providerIcon(providerHealthRow.modelData)
iconSize: Appearance.font.pixelSize.smaller
color: Appearance.colors.colOutlineVariant
}
StyledText {
text: qsTr("%1 unavailable").arg(AgentSessions.providerLabel(providerHealthRow.modelData))
color: Appearance.colors.colOutlineVariant
font.pixelSize: Appearance.font.pixelSize.smallest
elide: Text.ElideRight
}
}
}