Note that we only hide excessive items in the menu but not the list on the welcome screen. The welcome screen has a scroll bar for the recent files list so it is at least manageable.
The way I limit the items is to hide the QAction in
KRecentFilesAction instead of outright removing them, because the model for the welcome screen still depends on the state of
KRecentFilesAction. This also means the file icons are still loaded regardless of whether the item is visible on-screen (but this is not a regression).
In the future, we can add a "More Recent Files..." action to show a pop-up with the full recent files listing and a text box for searching from the list. (Inspiration from VSCode but I'm sure there are other software with similar features.)
(Tell us how to test the changes you made.)