Bug 496179 - Kickoff: Recent folders appear as "unknown" icon under Places -> History
Summary: Kickoff: Recent folders appear as "unknown" icon under Places -> History
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) widget (show other bugs)
Version: 6.2.3
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-12 15:22 UTC by Luke Horwell
Modified: 2025-01-23 20:49 UTC (History)
6 users (show)

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


Attachments
Screenshot of Kicker Places Recent menu showing the unknown icon (89.69 KB, image/jpeg)
2024-11-12 15:22 UTC, Luke Horwell
Details
Comparing Dolphin Recent Files and Kicker's History lists (138.11 KB, image/jpeg)
2024-11-14 16:55 UTC, Luke Horwell
Details
Screenshot negating comment 3 (114.61 KB, image/jpeg)
2024-11-14 17:00 UTC, Luke Horwell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Horwell 2024-11-12 15:22:45 UTC
Created attachment 175759 [details]
Screenshot of Kicker Places Recent menu showing the unknown icon

SUMMARY

After navigating through files and folders in Dolphin, these appear as entries in the Kickoff "Places" menu under "History". However, regular folders are shown with an "unknown" question mark icon.

STEPS TO REPRODUCE
1. Trigger history of a folder in Dolphin. E.g. create a folder called "My Folder" and create a file "My File.txt" inside.
2. Open Kickoff, then Places -> History.

OBSERVED RESULT
Folders show a question mark icon.

EXPECTED RESULT
Folders use the default directory icon.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon Testing Edition (neon-testing-20241112-0034.iso)
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0

ADDITIONAL INFORMATION
Same happens on Arch Linux. It seems to have been broken for months, but I hadn't opened a report sooner as I (wrongly) assumed I messed something up with my custom mime types (these are fine). 

There is an older, similar bug 2 years ago (401579) that affected the older Kicker menu.

Folders with a custom icon seem to show as expected if it's an absolute path and not an icon name (e.g. "folder-git") in the accompanying .directory file.
Comment 1 Nate Graham 2024-11-13 17:00:46 UTC
I can reproduce the fact that folders show up in the "Files" section, but their icons look fine to me. This includes folders with no custom icon. I'm using current git master on Fedora 41 with Qt 6.8.0.

Méven, I recall you looking at something similar years ago; do you have any relevant memories here?
Comment 2 Méven Car 2024-11-14 09:40:38 UTC
(In reply to Nate Graham from comment #1)
> but their icons look fine to me. 

The icons are fine for me too. https://bugs.kde.org/show_bug.cgi?id=401579 may have some relevant history.

Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-arch1-1 (64-bit)
Graphics Platform: Wayland

> This includes folders with no custom icon. I'm
> using current git master on Fedora 41 with Qt 6.8.0.
> 
> Méven, I recall you looking at something similar years ago; do you have any
> relevant memories here?

I don't have any strong memory.

> > I can reproduce the fact that folders show up in the "Files" section, 

This is an old bug it seems.

recentusagemodel has a m_usage parameter to switch between the type of data it provides:
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/applets/kicker/plugin/recentusagemodel.cpp#L115
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/applets/kicker/plugin/recentusagemodel.cpp#L117

Except kicker does not set this usage:
https://invent.kde.org/plasma/plasma-desktop/-/blob/master/applets/kickoff/package/contents/ui/main.qml#L101
Comment 3 Luke Horwell 2024-11-14 16:55:00 UTC
Created attachment 175819 [details]
Comparing Dolphin Recent Files and Kicker's History lists

Tried testing again, a possible new discovery:

- For the folders in Kicker → Places → History that currently show a "?" icon, they definitely don't appear in Dolphin's "Recent Locations" view [recentlyused:/locations/]. The ones that are in Dolphin's recent locations are more likely to have a folder icon in Kicker → Places → History.  Attached is a screenshot to show this.

- The folder icon appears if added as a bookmark ("Add to Places"), but is lost again after removing ("Remove from Places"). 

I had another test on some VMs/distros, and I can replicate the "?" icon each time:
- EndeavourOS (Arch)
- KDE Neon (neon-user-20241110-0746.iso) 
- Fedora 41 KDE live session (Fedora-KDE-Live-x86_64-41-1.4.iso)   [Older: Plasma 6.2.1, Frameworks 6.7.0, Qt 6.7.2]

It's pretty erratic. At some point under EndeavourOS, all recent directories had a folder icon. After right clicking → "Forget All" and going through the folder tree & opening the same files, the folders are remembered with a "?" icon (except one folder). At some point, all recent directories showing "?" icons suddenly had their folder icons back. This didn't last long, since clearing the history and trying to replicate the state led to "?" folder icons again!

The bug doesn't trigger if "New Folder" is on the desktop. However, any subfolders in there will appear in Kicker's recent list with a "?" icon. The attachment also shows this.

That's odd that you both can't reproduce the "?" icons. Have you tried clearing the history first and/or afterwards? Did you try different areas of the file system?

Also, try right clicking a recent folder from your Kicker → Places → History / Files, and select "Properties". Do you see a folder icon in the properties dialog? Over here, there is an "?" icon both for the buggy item icons ("?") and items with working icons (e.g. "Home", "Documents", a places bookmark). It comes up with "No registered file type" even though it does open with Dolphin.
Comment 4 Luke Horwell 2024-11-14 17:00:00 UTC
Created attachment 175820 [details]
Screenshot negating comment 3

I might be wrong in my last comment about it being related to Dolphin's Recent Locations. In this screenshot, we can see it appear in both Dolphin and Kicker, but Kicker is still showing the "?" icon.
Comment 5 Bug Janitor Service 2024-11-16 12:36:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4920
Comment 6 Bug Janitor Service 2024-11-16 12:38:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kconfigwidgets/-/merge_requests/250
Comment 7 Méven 2024-11-19 11:02:34 UTC
Git commit fb6dec74550867bdf1089f45b5c6bc6a13e87891 by Méven Car.
Committed on 19/11/2024 at 11:02.
Pushed by meven into branch 'url-mime-496179'.

KRecentFilesAction: allow to specify mimeType for urls

And avoid saving to history hidden files and folders.

M  +15   -2    src/krecentfilesaction.cpp
M  +2    -0    src/krecentfilesaction.h

https://invent.kde.org/frameworks/kconfigwidgets/-/commit/fb6dec74550867bdf1089f45b5c6bc6a13e87891
Comment 8 Méven 2024-11-28 09:06:12 UTC
Git commit baca5221461ea28acc0159c71ec55b9dff636021 by Méven Car.
Committed on 25/11/2024 at 09:33.
Pushed by meven into branch 'master'.

KRecentFilesAction: allow to specify mimeType for urls

And avoid saving to history hidden files and folders.

M  +15   -2    src/krecentfilesaction.cpp
M  +12   -0    src/krecentfilesaction.h

https://invent.kde.org/frameworks/kconfigwidgets/-/commit/baca5221461ea28acc0159c71ec55b9dff636021
Comment 9 Bug Janitor Service 2024-11-29 08:42:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/867
Comment 10 Méven 2025-01-06 18:18:14 UTC
Git commit 5233d129fca917f806f19d2df8263e93c4edec4d by Méven Car.
Committed on 06/01/2025 at 16:39.
Pushed by meven into branch 'master'.

When marking recent folders access specify mimeType

M  +1    -1    CMakeLists.txt
M  +1    -1    src/dolphinmainwindow.cpp

https://invent.kde.org/system/dolphin/-/commit/5233d129fca917f806f19d2df8263e93c4edec4d
Comment 11 Méven 2025-01-06 18:36:26 UTC
Git commit f3ff1290129351623acd54e847edba5e245f436c by Méven Car.
Committed on 06/01/2025 at 18:18.
Pushed by meven into branch 'master'.

recentusagemodel: split files and folders

M  +21   -2    applets/kicker/plugin/recentusagemodel.cpp
M  +1    -0    applets/kicker/plugin/recentusagemodel.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/f3ff1290129351623acd54e847edba5e245f436c
Comment 12 Nate Graham 2025-01-23 20:49:49 UTC
This was fixed recently for Plasma 6.3!