refactor(qt): extract search_bridge.rs from the QbzBridge god-object

QbzBridge carried five domains (Settings, Search, Playlist, Genre filter,
Discover config); its own boot() comment called the split "TEMP (phase 23)".
TRACK-RULES section 2 requires one cxx-qt bridge per domain. This moves the
Search domain out verbatim, ahead of the cortinilla parity work, so the
refactor and the behaviour change stay separately reviewable.

QbzSearch (search_bridge.rs) takes 7 properties and 11 invokables. Two
deliberate changes ride the move:

  - selected_index -> cortinilla_selected_index. It is cortinilla-only
    state and the bare name on an app-wide singleton is a collision hazard.
  - cortinilla_scroll_y f32 -> f64, unifying with the immersive twin in
    immersive_bridge.rs, which was already f64.

cortinilla_query is declared here but not yet wired; C2 wires it, which is
what makes Enter carry the text the user actually typed instead of the last
successfully loaded payload's query.

Every Rust writer of a moving property was re-pointed BY HAND, never by
regex over the multi-line ui() closures: the seven crate::ui( sites in
search_qt.rs plus two that live outside it and that the QML-only xref audit
cannot see - settings_qt.rs (the live Settings > Appearance path) and
main.rs toggle_intelligent_search. All 48 QML consumer sites across
Cortinilla.qml, HeaderBar.qml and SearchView.qml were updated, including the
one Connections block, whose onSelectedIndexChanged handler was renamed with
its property.

A stale 6.0 base in flat_index_content_y is left in place and annotated: it
mirrors a Flickable viewport margin rather than content space, so every row
reports 6px low. C4 corrects it with its unit test; this commit is a move.

Contract: qbz-nix-docs/qt-frontend/2026-08-03-cortinilla-parity, commit C0.

Gate: build clean (no new warnings), 256/256 tests, qml_resolution_audit
214 files, qml_singleton_xref 28 bridges with QbzSearch resolving, offscreen
smoke 0 complaints + home published.

cc
This commit is contained in:
vicrodh committed 2026-08-03 15:24:25 -06:00
1 parent 07b0ba818e
commit fa433d465b
11 files changed
+309 -172

No files matched your search

+8
View File
@@ -116,6 +116,14 @@ ApplicationWindow {
// after QbzSession like every domain singleton. The B2 dispatcher
// (AppShell-root Keys.onPressed) is the only other QML side.
QbzHotkeys.boot()
// Search (2026-08-03 cortinilla-parity contract, commit C0): the
// domain extracted from QbzBridge. Its position among the other
// domain singletons is not load-bearing — every boot() here runs
// before the first key or click — but the LINE is: boot() is what
// registers the Qt-thread hop, and without it `search_bridge::ui()`
// is a silent no-op, so the dropdown would never repaint and
// nothing would be logged (TRACK-RULES, singleton boot order).
QbzSearch.boot()
QbzShell.boot()
QbzPlayer.boot()
QbzQueue.boot()