Bug 428085 - "Often Used/Recent file" list doesn't work as expected
Summary: "Often Used/Recent file" list doesn't work as expected
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Menu (Kicker) (show other bugs)
Version: 5.20.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Ivan Čukić
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-10-22 06:40 UTC by Paolo Zamponi
Modified: 2020-11-21 06:38 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.77


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Zamponi 2020-10-22 06:40:17 UTC
STEPS TO REPRODUCE
1. Go to "Often Used/Recent file" list and right click on a file, then "Forget file": this file will remain in these lists.
2. Click on a file in your system (which doesn't belong to the "Often Used/Recent file" list): it won't be added to these lists.

OBSERVED RESULT
I'm not be able to add/delete items from these lists.

EXPECTED RESULT
I should be able to add/delete items from these lists.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed 20201019
(available in About System)
KDE Plasma Version: 5.20
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
These problems didn't affect Plasma 5.19 and previous versions.
"Forget All" works: the lists will be cleared.
"Applications" lists work as aspected.
By toggling Often Used/Recent file you will (maybe) find your file.
Comment 1 Alexander Lohnau 2020-10-25 17:26:51 UTC
It is not an issue with the forgetting not being applied, but rather the UI not being refreshed. When forgetting a file and the restarting plasmashell it is removed from the list.
Comment 2 Alexander Lohnau 2020-10-26 17:23:02 UTC
The query is constructed in plasma-workspace/applets/kicker/plugin/recentusagemodel.cpp:519 and it does not refresh when using a type other than any.

Unfortunately I am not familiar with the internals on how these queries are handled.
Comment 3 Méven Car 2020-10-30 05:52:22 UTC
1. I don't reproduce, this works fine on my Kubuntu, plasmashell 5.19.

It seems we have a regression.

2. That's a different bug and it be should be opened separately. Notice that "Click on a file in your system" depends on each app... You should focus on a specific app.
I imagine you meant Dolphin. Clicking i.e selecting a file should not add to the recent files or it would be meaningless.
Opening a file/folder will add it to the recent list, and if it does not it is a bug regarding the application opening the file. Recent files list are meant not to require any user input. Maybe your need is not well defined. Maybe you would like to whitelist/black list the files in the recent files or pin some.
In any case please open a new specific bug on this.
Comment 4 Paolo Zamponi 2020-10-30 08:17:14 UTC
(In reply to Méven Car from comment #3)
> 1. I don't reproduce, this works fine on my Kubuntu, plasmashell 5.19.
> 
Yes, this worked fine on my Tumbleweed 5.19, too.

> It seems we have a regression.
> 
> 2. That's a different bug and it be should be opened separately. Notice that
> "Click on a file in your system" depends on each app... You should focus on
> a specific app.
> I imagine you meant Dolphin. Clicking i.e selecting a file should not add to
> the recent files or it would be meaningless.
> Opening a file/folder will add it to the recent list, and if it does not it
> is a bug regarding the application opening the file. Recent files list are
> meant not to require any user input. Maybe your need is not well defined.
> Maybe you would like to whitelist/black list the files in the recent files
> or pin some.
> In any case please open a new specific bug on this.

Uh, sorry, I made some simplifications: please assume that "click" means "open", and yes, I meant Dolphin :) .
I'm not a programmer, but if I open a file (let's say an image) in Dolphin I think it should be added right away to the "Recent file" list (if it's not yet), and I think this list was meant to reopen it. Please look at the "Applications" list: it works in this way (both on Plasma 5.19 and 5.20), so my needs is simply that someone could "copy" its behavior :) ...
Comment 5 Méven Car 2020-11-01 05:43:16 UTC
(In reply to Paolo Zamponi from comment #4)
> (In reply to Méven Car from comment #3)
> > 1. I don't reproduce, this works fine on my Kubuntu, plasmashell 5.19.
> > 
> Yes, this worked fine on my Tumbleweed 5.19, too.
> 
> > It seems we have a regression.
> > 
> > 2. That's a different bug and it be should be opened separately. Notice that
> > "Click on a file in your system" depends on each app... You should focus on
> > a specific app.
> > I imagine you meant Dolphin. Clicking i.e selecting a file should not add to
> > the recent files or it would be meaningless.
> > Opening a file/folder will add it to the recent list, and if it does not it
> > is a bug regarding the application opening the file. Recent files list are
> > meant not to require any user input. Maybe your need is not well defined.
> > Maybe you would like to whitelist/black list the files in the recent files
> > or pin some.
> > In any case please open a new specific bug on this.
> 
> Uh, sorry, I made some simplifications: please assume that "click" means
> "open", and yes, I meant Dolphin :) .
If you are in single click mode, but we also have double click mode...

> I'm not a programmer, but if I open a file (let's say an image) in Dolphin I
> think it should be added right away to the "Recent file" list (if it's not
> yet), and I think this list was meant to reopen it. Please look at the
> "Applications" list: it works in this way (both on Plasma 5.19 and 5.20), so
> my needs is simply that someone could "copy" its behavior :) ...

This is the expected implemented behavior you describe.
Any open file should be visible when an application opens it.
And your example works : if from dolphin I open a picture with gwenview, it shows up in the recent menu.
If this does not work, this is a bug for the particular application, please fill a specific one.
This may be a Plasma 5.20 regression, but I would need a confirmation.
Comment 6 Paolo Zamponi 2020-11-01 13:09:27 UTC
(In reply to Méven Car from comment #5)
> (In reply to Paolo Zamponi from comment #4)
> > (In reply to Méven Car from comment #3)
> > > 1. I don't reproduce, this works fine on my Kubuntu, plasmashell 5.19.
> > > 
> > Yes, this worked fine on my Tumbleweed 5.19, too.
> > 
> > > It seems we have a regression.
> > > 
> > > 2. That's a different bug and it be should be opened separately. Notice that
> > > "Click on a file in your system" depends on each app... You should focus on
> > > a specific app.
> > > I imagine you meant Dolphin. Clicking i.e selecting a file should not add to
> > > the recent files or it would be meaningless.
> > > Opening a file/folder will add it to the recent list, and if it does not it
> > > is a bug regarding the application opening the file. Recent files list are
> > > meant not to require any user input. Maybe your need is not well defined.
> > > Maybe you would like to whitelist/black list the files in the recent files
> > > or pin some.
> > > In any case please open a new specific bug on this.
> > 
> > Uh, sorry, I made some simplifications: please assume that "click" means
> > "open", and yes, I meant Dolphin :) .
> If you are in single click mode, but we also have double click mode...

Tested also for the double click mode: opening in this way (i.e. with a double click) doesn't solve the problem....
> 
> > I'm not a programmer, but if I open a file (let's say an image) in Dolphin I
> > think it should be added right away to the "Recent file" list (if it's not
> > yet), and I think this list was meant to reopen it. Please look at the
> > "Applications" list: it works in this way (both on Plasma 5.19 and 5.20), so
> > my needs is simply that someone could "copy" its behavior :) ...
> 
> This is the expected implemented behavior you describe.
> Any open file should be visible when an application opens it.
Good to read this...
> And your example works : if from dolphin I open a picture with gwenview, it
> shows up in the recent menu.
...but I'm still wondering if you're using 5.19 or 5.20 version! As I wrote in the ADDITIONAL INFORMATION, "These problems didn't affect Plasma 5.19 and previous versions.". So: are you sure you referring to the 5.20 version?
> If this does not work, this is a bug for the particular application, please
> fill a specific one.
This affects ALL the applications I've tried, including LibreOffice and VLC! So, what should I do? Should I go there and open a bug saying "hey, since Plasma 5.20 if I open a file with your software I have to reboot my sistem to see it in Kicker's recents file"? I really don't understand your thought...
> This may be a Plasma 5.20 regression, but I would need a confirmation.
Looking at the history of this bug, it seems that Nate wrote "regression" in the "Keywords" section of this bug. Could this be enough? 
If I understood well, (sorry if I didn't) I can add that Alexander solved a bug (https://bugs.kde.org/show_bug.cgi?id=420951) which probably caused this issue due to a problem in a query, please see his comment #2...
Comment 7 Ivan Čukić 2020-11-19 17:43:06 UTC
Git commit 6faad8ed5f76510de06707836d6406e7177086a3 by Ivan Čukić.
Committed on 19/11/2020 at 17:39.
Pushed by ivan into branch 'ivan/event-filtering-for-files-and-directories'.

Add event filtering for files and directories

The df52b1a3 revision introduced Type::files and Type::directories special
resource type values for queries, but it omitted to support the same
special values in the ResultWatcher.

M  +10   -1    src/resultwatcher.cpp

https://invent.kde.org/frameworks/kactivities-stats/commit/6faad8ed5f76510de06707836d6406e7177086a3
Comment 8 Méven Car 2020-11-20 06:39:02 UTC
> Pushed by ivan into branch 'ivan/event-filtering-for-files-and-directories'.

https://invent.kde.org/frameworks/kactivities-stats/commit/6faad8ed5f76510de06707836d6406e7177086a3 does not concern master but a branch, this fix has not yet landed and its commit will be different.

https://invent.kde.org/frameworks/kactivities-stats/-/merge_requests/8
Comment 9 Ivan Čukić 2020-11-20 13:35:10 UTC
> not yet landed and its commit will be different.

It has, and the commit that fixes the issue is the one linked (it was a merge, not a rebase, so the sha is preserved)

Fix to be released in 5.77