Bug 501903 - Two "Files" sections under "History"
Summary: Two "Files" sections under "History"
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) widget (other bugs)
Version First Reported In: 6.3.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-23 12:19 UTC by Patrick Silva
Modified: 2026-02-06 08:57 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.0
Sentry Crash Report:


Attachments
screenshot (307.71 KB, image/png)
2025-03-23 12:19 UTC, Patrick Silva
Details
screenshot (278.02 KB, image/png)
2025-03-23 12:19 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2025-03-23 12:19:05 UTC
Created attachment 179668 [details]
screenshot

STEPS TO REPRODUCE
1. open Kickoff
2. click on "Places" on bottom
3. click on "History"

OBSERVED RESULT
Two "Files" sections, as seen in the attached screenshot

EXPECTED RESULT
just one "Files" section

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Graphics Platform: Wayland
Comment 1 Patrick Silva 2025-03-23 12:19:49 UTC
Created attachment 179669 [details]
screenshot
Comment 2 Luke Horwell 2025-03-23 16:27:34 UTC
Can confirm. It looks like it lists items in chronological order, but each file/folder type causes a new group to start. Grouping by relative time ("Today", "Yesterday") would make more sense to me. Or, I'd be happier with no grouping at all, assuming it's sorting in chronological order, newest at top.

It's similiar for the "Frequently Used" list too - perhaps "Most frequent", "Occasionally" could be groups. Or likewise, grouping doesn't seem a necessity for that list either.
Comment 3 Nate Graham 2025-03-25 23:01:42 UTC
Can also reproduce. One is full of folders that should be in the Folders section.
Comment 4 Méven 2025-03-26 08:04:05 UTC
(In reply to Nate Graham from comment #3)
> Can also reproduce. One is full of folders that should be in the Folders
> section.

A work around is clicking (and opening the file in dolphin) once on folders that are «among» files.
The «home» folder won't be intertwined among files.

Technically this happens because the «Home» entry wasn't marked as having the inode/directory mimetype in plasma-activities database.
This should fix itself when opening those folders in dolphin.
I haven't identified where those entries are added only partially (without their mime-type), this shouldn't be too hard.

Some context:
https://invent.kde.org/frameworks/kconfigwidgets/-/merge_requests/250
https://invent.kde.org/system/dolphin/-/merge_requests/867
Comment 5 Bug Janitor Service 2026-02-05 14:02:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kactivitymanagerd/-/merge_requests/104
Comment 6 cwo 2026-02-06 08:57:59 UTC
Git commit 1c7c90802be9c7e92f7329d930d0fbc1c1082d50 by Christoph Wolk.
Committed on 05/02/2026 at 14:00.
Pushed by meven into branch 'master'.

service/Resources: actually save mimetype

RegisterMimeType returns early if the mimetype provided is not empty.
This means that for adding resource activity through the dbus interface
of kactivitymanagerd, the resource is registered, but the mimetype is
not set. (The recentlyused.xbel and LibreOffice spies directly send a
signal that causes the database to save them and do not go through
RegisterMimeType, so it works there, or at least for recentlyused.xbel;
I didn't test LibreOffice).

This causes several bugs and inconsistencies - PAStats has support
for filtering by mimetype category (files, directories, and any).
Dolphin and Kicker(dash) restrict their results to files (and in Dolphin
also directories), but kickoff does not, so Dolphin and Kicker only
contain recently used files that were added to recentlyused.xbel, not
all files. Kickoff includes all of them, but with empty mimetypes, which
still will result in files showing up with correct icons somehow, but
directories will show up with empty mimetypes and be labeled as a file,
not as a directory, and there may be duplicated entries (one with, one
without mimetype). It will also break the automated grouping, which uses
mimetypes; some mimetype-less folders will later be recognized as
folders through KFilePlacesModel, but after they are sorted so there may
end up being multiple Folders sections in a list that should be sorted
by that.

Instead, we only return early if no mimetype was set, which makes more
sense intuitively (why save it only when it's empty) and fixes all these
issues (except the duplicate sections in kickoff, which may not be
resolved immediately, but it should stop new ones from appearing, and
fix the existing ones as their mimetypes get added through regular use.
Related: bug 496179
FIXED-IN: 6.6.0

M  +1    -1    src/service/Resources.cpp

https://invent.kde.org/plasma/kactivitymanagerd/-/commit/1c7c90802be9c7e92f7329d930d0fbc1c1082d50