Bug 473174

Summary: Result area shows "No matches" before the search even finished
Product: [Plasma] plasmashell Reporter: medin <med.medin.2014>
Component: Application Launcher (Kickoff) widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aspotashev, bugseforuns, mikel5764, nate, niccolo, noahadvs, qydwhotmail
Priority: NOR    
Version First Reported In: 6.2.4   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.5.4
Sentry Crash Report:
Attachments: Result area shows "No matches" before the search even finished

Description medin 2023-08-08 21:17:41 UTC
Created attachment 160843 [details]
Result area shows "No matches" before the search even finished

If you type something fast, you will see that message "No matches" appears for lapse of time, then final results appear. Normally, it should show something like "Searching..." while the search is running. See attached video for more info.
Comment 1 Nate Graham 2023-08-09 19:16:56 UTC
Can reproduce.
Comment 2 Nate Graham 2023-08-25 19:10:38 UTC
This bit maybe isn't working as expected:

Connections {
    target: kickoff.runnerModel
    function onQueryFinished() {
        showAnimation.restart()
    }
}
Comment 3 Fushan Wen 2023-12-10 08:29:36 UTC
Cannot reproduce in Plasma 6. Maybe it's already fixed?
Comment 4 Nate Graham 2023-12-11 20:29:10 UTC
Hmh, neither can I!
Comment 5 Patrick Silva 2024-01-09 12:04:49 UTC
Sometimes I can reproduce on neon unstable by searching for "rules" - the KCM.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.91.90
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.1
Graphics Platform: Wayland
Comment 6 Nate Graham 2024-01-10 16:58:24 UTC
I can reproduce that too.
Comment 7 Alexander Potashev 2024-12-28 16:20:53 UTC
Still reproducible here:

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.6-200.fc41.x86_64 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.4 ГиБ of RAM
Graphics Processor: Mesa Intel® HD Graphics 530
Comment 8 Bug Janitor Service 2025-11-19 20:19:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6028
Comment 9 cwo 2025-11-22 09:28:37 UTC
Git commit 8f40ffbd2baa8a0992b29864c4e3272ed0144b4b by Christoph Wolk.
Committed on 22/11/2025 at 08:47.
Pushed by cwo into branch 'master'.

applets/kicker: don't emit queryFinished if still querying

The kicker backend passes the RunnerManager's queryFinished signal
forward, if there are no querying runners remaining. Both kicker's
frontend and kickoff use this to display "No matches". This doesn't
work, because RunnerManager emits this signal when the query is
finished for any reason, including when it is aborted. This is
particularly troublesome in kickoff, as it aggregates the results
on the krunner side, and only uses one query itself. So the following
happens:

- the user types the first letter, the number of querying models is set
  to 1, and the query is started
- the user types the second letter, the number of querying models is set
  to 1, and the query is started
- the first query is aborted (as it's replaced be the new one), and the
  RunnerManager sends the queryFinished signal to the kicker backend
- the kicker backend receives the signal, reduces the number of querying
  models by 1 (now 0), and signals kickoff that the query is finished
- the frontend displays "No matches" with a query still running
- the actual results come in and replace the placeholder

Similar things can happen in Kicker, but it's less common there, as it
has multiple querying models and so will often have actual results ready
when the internal tracker of running queries inappropriately hits zero.

Instead, we adapt how we track the running queries to Krunner's
semantics, and add the number of newly started queries to the number of
querying models, rather than setting it to that value. This accounts for
the signals that the to-be-aborted queries send, and solves the
issue in both kickoff and kicker.
FIXED-IN: 6.5.4

M  +1    -1    applets/kicker/runnermodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/8f40ffbd2baa8a0992b29864c4e3272ed0144b4b
Comment 10 cwo 2025-11-22 11:58:58 UTC
Git commit 5bed96c04b709c32faaa4f20039a5f8346745507 by Christoph Wolk.
Committed on 22/11/2025 at 11:23.
Pushed by cwo into branch 'Plasma/6.5'.

applets/kicker: don't emit queryFinished if still querying

The kicker backend passes the RunnerManager's queryFinished signal
forward, if there are no querying runners remaining. Both kicker's
frontend and kickoff use this to display "No matches". This doesn't
work, because RunnerManager emits this signal when the query is
finished for any reason, including when it is aborted. This is
particularly troublesome in kickoff, as it aggregates the results
on the krunner side, and only uses one query itself. So the following
happens:

- the user types the first letter, the number of querying models is set
  to 1, and the query is started
- the user types the second letter, the number of querying models is set
  to 1, and the query is started
- the first query is aborted (as it's replaced be the new one), and the
  RunnerManager sends the queryFinished signal to the kicker backend
- the kicker backend receives the signal, reduces the number of querying
  models by 1 (now 0), and signals kickoff that the query is finished
- the frontend displays "No matches" with a query still running
- the actual results come in and replace the placeholder

Similar things can happen in Kicker, but it's less common there, as it
has multiple querying models and so will often have actual results ready
when the internal tracker of running queries inappropriately hits zero.

Instead, we adapt how we track the running queries to Krunner's
semantics, and add the number of newly started queries to the number of
querying models, rather than setting it to that value. This accounts for
the signals that the to-be-aborted queries send, and solves the
issue in both kickoff and kicker.
FIXED-IN: 6.5.4


(cherry picked from commit 8f40ffbd2baa8a0992b29864c4e3272ed0144b4b)

Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>

M  +1    -1    applets/kicker/runnermodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/5bed96c04b709c32faaa4f20039a5f8346745507