How to clear and manage recent file history in Portal? (related to Freedesktop and Flatpak)

How do I clear and manage recent file history in Portal? This setting seems to be distinct from other DE apps (Dolphin) or system preferences and is only reproducible from any flatpak using Portals. It is affecting every flatpak I have that uses Portals to open files and folders.

Fedora reports org.freedesktop.impl.portal.desktop.kde as the “name” of the window.
The window title is Select one or more files to open - Portal or Open Directory - Portal, one for files, the other for folders. Each recent list is separate.

I am aware this is not a Fedora issue directly, but I did not know where else to ask for help. If there is a more suitable forum that I should be asking instead, please let me know, thank you.

That’s the implementation of the FileChooser portal from xdg-desktop-portal-kde. Looking at the code, it typically creates a dialog using KFileWidget, except when opening a directory where it uses QFileDialog which uses a (different?) KDE dialog when in KDE.

Can you provide screenshots showing what the dialogs look like?

On GNOME, the GTK file dialog and nautilus use the same list which can be configured from Settings → Privacy.

Here are the screenshots, I redacted my folders and files. Clicking the down arrow in the red circle brings up the recent file or folder history in question.

I guess it makes sense for the lists to be different; one is files and the other is locations (directories).

It seems that KDE stores at least some of this in ~/.local/share/RecentDocuments. It should be possible to clear it using some KDE component.

Realised I did not update this thread, but a workaround has been found and is detailed here: How to manage and clear Portal's recent file history? · flatpak/xdg-desktop-portal · Discussion #1228 · GitHub