Show all containers by default
Only showing running containers by default was originally made for Cockpit-Docker way back in the day. I don't know the reasoning for it, but I think it was because the old Cockpit-Docker page had containers on top and images below and when there were too many containers, you wouldn't be able to see the images, so only showing the running containers was probably a workaround back then. Cockpit-Podman originally inherited the Cockpit-Docker UI.
The old layout was especially a problem with how things used to work, as Cockpit-Docker and the previous incarnation of Cockpit-Podman had an image-based flow instead of our current container-based flow. You'd have to first download an image first, then launch a new container from the image. When we redesigned the page, we streamlined the flow so that images are an implementation detail instead, and you build a container now using a remote image (that is then downloaded in the background) or a local image — but this two step process is all mostly hidden away and included in the same step now. Images are now collapsed down by default, with the main interaction being pruning old, unused images (and sometimes viewing the images by expanding the group).
So, I'd like to suggest showing containers by default (just like the rest of Cockpit, where we show the states, even for things that aren't currently running or active).
We also want to improve filtering, but in doing so, we should make sure filter states are still filterable, so someone can show only running containers, for example.
I think the reasoning behind not showing all containers is to copy behaviour from podman(as well as docker) cli:
podman ps shows only running ones. You need to specify -a to see also the dead ones.
I am not super keen on changing behaviour to show all containers by default. Right now I have ~5 running ones and ~30 dead ones. When I visit the page I see just the few ones that are interesting for me. When I switch to see all of them I need to scroll through some testing containers just to see the ones I need.
I'm using Cockpit-Podman on my home server. When a container isn't running for whatever, it's invisible. I have to say "show" to start it up. I'm pretty sure others would also want to see containers that aren't running so they can start them too.
Nowhere else in Cockpit do we hide stopped VMs, systemd units, network devices, etc. by default.
You having ~30 containers that aren't in use is not typically how our users use containers. You're building and testing a lot for Cockpit-Podman; our users are typically not doing that.
I think the reasoning behind not showing all containers is to copy behaviour from podman(as well as docker) cli
I don't think copying cli is / was a design goal. Regardless, by using cockpit people without CLI experience will be able to manage their containers. Browsers handle vertical scrolling better than the terminal for this use case (terminal scrolls you to the bottom, of output unlike a browser).
I think it should show all containers by default. VM management GUIs show VMs that are turned off. Why should containers be treated differently?
In the context of cockpit it would be my expectation that most would have pet containers, not cattle containers. Cattle containers would likely be managed differently / K8s.