feat: global search with Ctrl+K across containers, projects, volumes, images and networks #31
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/21-global-search"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #21
What
ui/qml/Search.qml, a singleton like Theme), so a page search and global search agree on fields: containers title/name/image/project, volumes name/driver/project, images repo/tags/id, networks name/driver/project/subnet.searchscreenshot scene ("shop": project, 4 containers, 2 volumes, image, network). README features + screenshot table updated. Every screenshot changed because the sidebar now has the Search entry.Tested
--mock --show: Ctrl+K from a focused page search; jump to a volume (page switch + select); jump to a container inside a collapsed project while the Containers search held an unrelated filter (filter cleared, project expanded, row selected).Screenshot


Stacked on #30 (#14) → #29 (#13).
F14 (from Nye's review): Ctrl+K did nothing with focus in the log view, an info value or the Files preview. Read-only
TextEdit/TextAreatake Ctrl+K (delete to end of line) before the windowShortcutsees it.Fixed in
23b6506: each read-only editor forwards Ctrl+K withKeys.onPressed: event => Search.forwardShortcut(event), and Main opens the palette onSearch.paletteRequested. Copy and selection still work, and a plain K is ignored. Checked live in--mock --showfrom the log view and an info row; local CI green.Review from Nye (posted for it; its token can't comment)
PR #31 (#21 global search) review — Nye, at
fcfedceGates: fmt, clippy (+mock), build (+mock), 51 tests: pass (C17).
By hand (--mock --show): Ctrl+K from page search field OK; blocked over Pull dialog OK; jump to stopped
container hidden by page filter (filter cleared) OK; child of collapsed stack (expanded) OK; image by short
ID with Images filter set (cleared) OK; Show all 7 in Containers fills page search OK; Escape returns focus OK.
F14 (medium) — Ctrl+K does nothing with focus in the log view
The read-only, selectable TextEdit on each log line (LogView.qml:330) accepts the Ctrl+K ShortcutOverride,
so Main.qml's window Shortcut never fires. Same elements: InfoRow.qml:106 TextEdit, FilesView.qml:425 TextArea.
Proof: tst_ctrlk.qml (qmltestrunner, offscreen) fails test_log_view_focused.
QT_QPA_PLATFORM=offscreen /usr/lib/qt6/bin/qmltestrunner -input tst_ctrlk.qml
Fix that works (tst_ctrlk_fixed.qml passes): the key press still reaches the TextEdit, so handle it there:
Keys.onPressed: event => { if (event.key === Qt.Key_K && (event.modifiers & Qt.ControlModifier)) { ; event.accepted = true } }
e.g. a
signal searchRequested()/ a shared handler, or reach window.openSearch(). Apply to LogView, InfoRow, FilesView preview.Please run tst_ctrlk.qml-style check against the real elements, or tell me and I'll recheck live.
Low notes (not blocking)
Images group has an exact "nginx". Consider ordering groups by their best rank.
stacks never carry those fields; worth a glance.
Low notes from Nye's review:
4877570. Groups are now ordered by their best match (ties keep the usual kind order), so "nginx" lists Images (exactnginx) first, then thewebcontainer. Tried live with--mock. Local CI green (fmt, clippy, build, tests, +mock). The README search screenshot ("shop") is unchanged.name/title(no image or project fields; seesrc/window/data.rsstack JSON), so nothing was lost.