fix(qt): bound the queue panels, and make the gate catch what it missed
Follow-up to 66ba12bd5, which fixed the coverflow but left two of its
neighbours and a gate that could not see either of them.
QueueTabsPanel built one ImmQueueRow per queue track when opened —
including every collapsed 0-height history slot, which on the reported
session was 1162 of 1935. The slot stays (its height is what makes the
collapsed-history arithmetic work); the row inside is now built only
within a viewport of the visible band.
SuggestionsPanel and AppShell's QueuePanel move behind Loaders. The
queue panel was never the freeze — its rows are paginated at 40 in
Rust — but a closed panel should not be constructed, and the audit
cannot know about a cap that lives on the other side of the bridge.
Gating it also let SuggestionsPanel drop the onVisibleChanged half of
its load hook: mounting IS becoming visible now.
The audit is the real content of this commit. Written narrow — only a
model fed by unbounded user data counts, because the wide rule reports
145 sites and a gate that noisy gets switched off in a day — it then
reported the pre-fix tree CLEAN. A gate that cannot catch the bug it
was written for is worth nothing, so it was tested against that tree
and fixed on two counts:
- CROSS-FILE. The `visible:` sat in ImmersiveView.qml while the two
Repeaters over the whole queue lived in CoverflowPanel.qml. There
is now a transitive index: a component is heavy if its own file has
an unbounded view or if it mounts something that does.
- MULTI-LINE. The coverflow's gate spans two lines, so a first-line
read saw `QbzShaderScene.scene === 0`, matched no known gate, and
skipped it.
With both, it finds all five mounts on the pre-fix tree, including the
two that froze the app. Known gates also grew past tab predicates: the
coverflow was keyed on QbzImmersive.mode.
Verified on a copy of the real session state with the 1935-row queue
restored: launches to a painted Discover, idle at 1.0% CPU.
cc
This commit is contained in:
6 files changed
+174
-90
No files matched your search
@@ -1055,11 +1055,26 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
CardMenu {
|
||||
id: rowMenu
|
||||
menuWidth: 224
|
||||
entries: root.menuModel()
|
||||
onPicked: function (a) { root.menuAction(a) }
|
||||
// LAZY. This is a QtQuick.Controls Popup with a Repeater over its
|
||||
// entries, and it was built EAGERLY for every row — so a long list
|
||||
// constructed one whole popup per visible row, and rebuilt them all
|
||||
// on every scroll step, to show a menu only ever opened on click.
|
||||
// Same lazy-Loader idiom this file already uses for the clipboard
|
||||
// helper and the info modal.
|
||||
Loader {
|
||||
id: rowMenuLoader
|
||||
active: false
|
||||
sourceComponent: CardMenu {
|
||||
menuWidth: 224
|
||||
entries: root.menuModel()
|
||||
onPicked: function (a) { root.menuAction(a) }
|
||||
}
|
||||
}
|
||||
/// Build the popup on first use, then open it. Called by `openRowMenu`
|
||||
/// below, which owns the empty-menu guard.
|
||||
function openRowMenuLazy(anchor, x, y) {
|
||||
rowMenuLoader.active = true
|
||||
rowMenuLoader.item.openAtCursor(anchor, x, y)
|
||||
}
|
||||
|
||||
// TrackContextMenu.slint, in its order. Every row here reaches a live
|
||||
@@ -1074,7 +1089,7 @@ Rectangle {
|
||||
function openRowMenu(anchor, x, y) {
|
||||
if (root.menuModel().length === 0)
|
||||
return
|
||||
rowMenu.openAtCursor(anchor, x, y)
|
||||
root.openRowMenuLazy(anchor, x, y)
|
||||
}
|
||||
|
||||
function menuModel() {
|
||||
|
||||
Reference in new issue
Block a user