Is there a way to make all the tables collapsed by default in selfhosted grist? Maybe with the custom css file? Right now if user collapses all the tables, they are all open again as soon as user leaves the page.
There is a simmilar thread about it Remember collapsed navigation items and favorites
I think you are talking about the left-side listing of pages, where pages may be grouped, and groups may be collapsed.
You are right that currently the collapsed state is not remembered. There is an issue in [UI Issue] Option to collaps left side bar pages by default · Issue #425 · gristlabs/grist-core · GitHub, which also includes some other related ideas (such as buttons to collapse-all or expand-all).