16.x now has a button to “Collapse All” and “Expand All”, in the Files and Tags views.
Before that, I was using the GitHub - OfficerHalf/obsidian-collapse-all plugin.
But 16.x doesn’t add commands that can be assigned to hotkeys, so I cannot uninstall the above plugin yet.
Add “Collapse All” and “Expand All” commands to the palette so that I can assign hotkeys.
Keep the above plugin installed and have redundant collapse/expand icons in the Files and Tags views (one from Core, and one from the plugin).