Bug 410017 - Omit non-existent items from recent documents list
Summary: Omit non-existent items from recent documents list
Status: CONFIRMED
Alias: None
Product: frameworks-activities-stats
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.60.0
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-20 03:01 UTC by Alexander Potashev
Modified: 2023-10-27 15:45 UTC (History)
4 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 Alexander Potashev 2019-07-20 03:01:42 UTC
SUMMARY
Non-existent folders in recent documents ask to choose application.

STEPS TO REPRODUCE
1. Attach a USB Flash Drive.
2. Mount and open it in Dolphin, for me it mounted as /run/media/aspotashev/985D-39FF
3. Unmount and disconnect the USB Flash Drive.
4. In the Application Launcher, go to "Recent" and click on "985D-39FF".

OBSERVED RESULT
A dialog "Choose application" is opened.

EXPECTED RESULT
It should notify me that the folder does not exist anymore, and possibly remove it from the "Recent" section of application launcher.

SOFTWARE/OS VERSIONS
Operating System: Fedora 30
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.4
Kernel Version: 5.1.16-300.fc30.x86_64
OS Type: 64-bit
Processors: 2 × Intel® Celeron® CPU B800 @ 1.50GHz
Memory: 3,8 ГиБ

ADDITIONAL INFORMATION
Comment 1 Méven Car 2019-07-22 09:05:17 UTC
I can reproduce more simply :

1. Create a repertory, open it in dolpin
2. Delete the repertory
3. Open the entry from the kickoff/kicker menu

Same results as original report.

This concerns KAcitivitieStats lib as well.
Comment 2 Nate Graham 2019-07-22 17:38:08 UTC
So is this a bug in KActivitiesStats, or in the UI that's presenting the data?
Comment 3 Méven Car 2019-07-22 18:19:09 UTC
It is more like a missing feature:
Avoid displaying recent documents/folders that have been deleted.

It might be fixed in KactivityStats/kactivimanagerd : disabling entries that are not available/have been deleted, either observing the filesystem, or stating the files when querying excluding them in the results.

Or in dolphin/KFileWidget remove the activity resource when a file/folder is deleted/unmounted, ignoring changes outside of those supported apps scope.

But the fix is not obvious, as either way have important downsides.
I would favor the first option as it is closer to what a user would expect but more complicated to implement.
Comment 4 Nate Graham 2019-07-22 23:44:22 UTC
Yeah, I agree.
Comment 5 Ivan Čukić 2019-07-25 09:51:28 UTC
This should be requested by KAStats - src/resultmodel.cpp:507

KAMD mostly does not care whether something is a file or not - it just deals with urls. The clients choose what is added and what is forgotten.

Can you check what the URL is of that item in the recents?