Bug 433085 - When more than one runner is called, few results are displayed
Summary: When more than one runner is called, few results are displayed
Status: ASSIGNED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.21.0
Platform: Other Other
: NOR minor
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-02-17 16:10 UTC by Podagric
Modified: 2022-07-02 05:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Podagric 2021-02-17 16:10:58 UTC
SUMMARY
As discussed in X, I am opening this bug report.

Some plugins may have a need to display a larger number of results, but this is being very limited for values such as 5 and 7.

STEPS TO REPRODUCE
1. Create several things that can be displayed as results in the krunner, such as kate sections, recent files, etc
2. Try to access them through krunner
3. The result displayed may be much smaller than expected if multiple runners are called at the same time


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.21.0
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-arch1-1
Graphics Platform: X11
Comment 1 Podagric 2021-02-17 16:12:25 UTC
X = https://github.com/alex1701c/EmojiRunner/issues/4
Sorry, I forgot to put the link before sending 😅
Comment 2 Alexander Lohnau 2021-04-13 16:18:21 UTC
This is a really tricky one.

We are doing some balancing magic in milou/lib/resultsmodel.cpp:161. In the docstrings it is said:
> * Each category may occupy a maximum of 1/(n+1) of the given @c limit,
> * this means the further down you get, the less matches there are.
> * There is at least one match shown per category.

This basically means that if we have multiple categories which rank high but few have matches, the categorizes below with many matches aren't even allowed to display that many of their matches.

In the old SourcesModel we were getting all the matches and the check which ones we want to display. If we exceed the limit we would remove one match or just not add the new one.
Comment 3 Bug Janitor Service 2022-07-02 05:21:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/milou/-/merge_requests/44