Bug 365855 - Krunner's "Recent documents" results still there after "forgetting" recent docs in appdashboard
Summary: Krunner's "Recent documents" results still there after "forgetting" recent do...
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.7.1
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-19 10:47 UTC by Szczepan Hołyszewski
Modified: 2020-07-11 14:51 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szczepan Hołyszewski 2016-07-19 10:47:34 UTC
[Please note: in this report all strings marked with (*) are backtranslated from Polish l10n; they might be slightly different in the the English original.]

When I clear (i.e. "forget") Recent Documents(*) in appdashboard, these documents can still be found by typing part of a filename in Krunner. They display in a group labelled "Recent documents(*)".

Additionally there doesn't seem to be ANY way to clear recent documents history remembered by Krunner. The whole endeavour of covering one's tracks is thus completely defeated. Whenever someone is sitting beside who I don't want to be privy to my recent activity, I must remember not to use Krunner at all because something I don't want that person to see might show in the results.

Disabling recent history search in Krunner is not an acceptable workaround. I want to have the feature AND have control over it, rather than not have the feature.

Reproducible: Always

Steps to Reproduce:
1. Open a document, e.g. a spreadsheet
2. Clear recent files in the program you used to open the document (just to eliminate this variable)
3. In appdashboard, right click "Recent documents(*)" and choose "Forget about all documents(*)"
4. Activate Krunner and type a sufficiently long part of the filename of the document you opened in step 1

Actual Results:  
The file is shown in Krunner search results in a section named "Recent documents(*)", even though the appdashboard "Recent documents(*)" tab is empty.

Expected Results:  
The file should NOT be located by Krunner, at least not in the "Recent documents(*)" section.

I believe that the ability to erase tracks of recent activity is a major feature, and I believe that this feature is broken by this bug. Therefore I chose severity "Major: A major feature is broken".
Comment 1 Kai Uwe Broulik 2016-07-19 10:53:15 UTC
Eike, is there any additional step the runner needs to do?

It uses KRecentDocument::recentDocuments() to get them and updates the internal variable (is caching even needed?) using KDirWatch created/deleted/dirty on KRecentDocument::recentDocumentDirectory(). It doesn't use KActivitiesStats, though. Would porting to it fix that?
Comment 2 Eike Hein 2016-07-19 11:13:45 UTC
^ Yes. Basically KActivitiesStats reads in KRecentDocument::recentDocuments() into its sqlite db, which stuff can be deleted from. Doesn't actually reset KRecentDocument::recentDocuments() but kills the results ...
Comment 3 Kai Uwe Broulik 2016-07-19 11:15:47 UTC
Ok, so I'll migrate it to use KActivitiesStats which should get more precise (activity-related and what not) recent documents also and was something I wanted to do at some point anyway.
Comment 4 Eike Hein 2016-07-19 11:19:02 UTC
KActivitiesStats additionally also has other data sources (KActivities hooks all over the place, iirc also some Gnome stuff) so it's probably useful anyway.
Comment 5 piedro 2016-10-24 20:04:02 UTC
I think there might be even a bit more of a problem. 

Also krunner shows documents from folders I excluded beforehand. I do backups for customers, projects and other machines. I exclude these folders from searching and indexing obviously. 

Krunner still finds stuff that doesn't belong to me. So it seems that the settings for indexing and excluding folders from recent documents doesn't do the job. 

Also excluding some folders or patterns at a later time should delete them out of the database. 

Please ignore this comment if I misunderstood your approach and my concerns are already included in the proposed solution. A users history of recent activities and documents as useful as is should be the first focus of system security in my opinion... 

thx for reading, p.
Comment 6 Alexander Lohnau 2020-07-11 14:50:44 UTC
This has been fixed since KRunner uses the KActivityStats data.