Bug 455436 - KRunner 5.25 does not show all profiles' actions from Firefox desktop file
Summary: KRunner 5.25 does not show all profiles' actions from Firefox desktop file
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.25.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-16 18:47 UTC by leepa
Modified: 2022-07-21 14:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments
Working Work profile with KRunner 5.24.5 (131.21 KB, image/png)
2022-06-16 18:47 UTC, leepa
Details
Not working Work profile with KRunner 5.25 (144.13 KB, image/png)
2022-06-16 18:48 UTC, leepa
Details
Working default profile with KRunner 5.25 (99.26 KB, image/png)
2022-06-16 18:48 UTC, leepa
Details
My firefox.desktop file (1.83 KB, application/x-desktop)
2022-06-16 18:49 UTC, leepa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description leepa 2022-06-16 18:47:54 UTC
Created attachment 149821 [details]
Working Work profile with KRunner 5.24.5

SUMMARY
***
I have two Firefox profiles: default-release and Work. Both were showing fine when typed into KRunner up to and included  5.24.5 [screenshot KRunner-Work_5.24.5].
Latest KRunner 5.25 shows only my default profile on the list [screenshot KRunner-Work_5.25].
Default profile shows fine on the list [screenshot KRunner-default_5.25].
My firefox.desktop file (attached) has not been changed.
***


STEPS TO REPRODUCE
1. Have more than one profile in Firefox
2. Invoke KRunner, type name of the non-default profile

OBSERVED RESULT
No item that would launch Firefox with non-default profile [screenshot KRunner-Work_5.24.5]

EXPECTED RESULT
Item on the list that would launch Firefox with this profile [screenshot KRunner-Work_5.25]

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 36
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.3
Kernel Version: 5.17.14-300.fc36.x86_64 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
I am using KDE packages from zawertun/kde COPR repository.
Things are working again if I downgrade (with dependencies) plasma-workspace package.
Comment 1 leepa 2022-06-16 18:48:28 UTC
Created attachment 149822 [details]
Not working Work profile with KRunner 5.25
Comment 2 leepa 2022-06-16 18:48:53 UTC
Created attachment 149823 [details]
Working default profile with KRunner 5.25
Comment 3 leepa 2022-06-16 18:49:45 UTC
Created attachment 149824 [details]
My firefox.desktop file
Comment 4 Alexander Lohnau 2022-06-17 05:11:59 UTC
Are you using https://github.com/alex1701c/krunner-firefox? KDE itself does not provide this feature.
Comment 5 leepa 2022-06-17 06:45:49 UTC
Indeed, I was using krunner-firefox. According to the readme:
> It saves the Desktop Actions for the profiles in a local copy of the firefox.desktop file.
> This mean you can search for the profiles in your normal launcher.

And according to https://docs.kde.org/stable5/en/plasma-desktop/plasma-desktop/krunner.html:
> KRunner supports “Desktop Actions” which are additional actions an application can offer (...)

So, I may have not been accurate in describing the issue:
KRunner 5.25 does not show entries corresponding to actions running my Work profile.

Maybe it is not KRunner's fault, I don't know - but it did work fine in 5.24.5.

Interestingly, the Work profile related actions (new-window and new-private-window) are the only ones that do not show on KRunner's list. Everything else shows fine: new-window and new-private-window for both without any profile and with default-release profile.

Note: I have disabled kruner-firefox plugin and "manage" firefox.desktop file manually.
Comment 6 Alexander Lohnau 2022-06-19 06:34:32 UTC
I will need to investigate this further. If you change the "Name=Work" lines to sth. like "Name=WorkProfile", it should work as expected.

Most likely the issue is that due to "work" giving a lot of results and the jumplist actions getting a too low relevance and is thus not shown. 

>Indeed, I was using krunner-firefox. According to the readme:

Thanks for the info. BTW. I wrote this plugin :)
Comment 7 leepa 2022-06-19 10:21:08 UTC
(In reply to Alexander Lohnau from comment #6)
> I will need to investigate this further. If you change the "Name=Work" lines
> to sth. like "Name=WorkProfile", it should work as expected.
I can live with this workaround ;) - thanks for the tip!

> >Indeed, I was using krunner-firefox. According to the readme:
> Thanks for the info. BTW. I wrote this plugin :)
Oh - super cool! This plugin really made life easier, so thank you :)
And it made me look closer at how .desktop files work, so even more kudos for your work!
Comment 8 Alexander Lohnau 2022-06-19 16:24:31 UTC
May I ask if you have different computer setups for Plasma 5.24/5.25? From looking at the screenshots it seems like the apps differ.

Based on my local testing, the category match of "Network" causes a higher relevance than the jumplist action "work". TBH this seems like a bug to me.

Once https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1779 is in, I will take care of adjusting it.
Comment 9 leepa 2022-06-19 17:04:30 UTC
(In reply to Alexander Lohnau from comment #8)
> May I ask if you have different computer setups for Plasma 5.24/5.25? From
> looking at the screenshots it seems like the apps differ.
No, this is the same system.

> Based on my local testing, the category match of "Network" causes a higher
> relevance than the jumplist action "work". TBH this seems like a bug to me.
Following your testing, the OnlyOffice Desktops and LibreOffice Writer appear on the list because of "Microsoft Works" keyword in their desktop files. So it seems the relevance algorithm has changed between the versions?
Comment 10 Alexander Lohnau 2022-07-03 07:46:07 UTC
>So it seems the relevance algorithm has changed between the versions?

The runner produces the same relevance in 5.24 and 5.25. I also could not find a change in the model that explains the different sorting.

>No, this is the same system.

Okay, did you downgrade your system? I am kindof wondering about different apps showing up int he screenshots.
Comment 11 leepa 2022-07-03 10:07:25 UTC
(In reply to Alexander Lohnau from comment #10)
> >No, this is the same system.
> 
> Okay, did you downgrade your system? I am kindof wondering about different
> apps showing up int he screenshots.

No, the only difference between the screenshots was downgraded plasma-workspace package (with deps).
Comment 12 Bug Janitor Service 2022-07-10 10:48:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1906
Comment 13 Alexander Lohnau 2022-07-21 09:04:47 UTC
Git commit 7f96e360c5e501b40fa059d73cea506ef0613eae by Alexander Lohnau.
Committed on 21/07/2022 at 08:47.
Pushed by alex into branch 'master'.

Increase relevance for jumplist actions when name is an exact match

M  +1    -1    runners/services/autotests/servicerunnertest.cpp
M  +4    -1    runners/services/servicerunner.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/7f96e360c5e501b40fa059d73cea506ef0613eae