That’s not backwards compatible and will never be merged into the core.
We already do have a list of $:/state/toc/
tiddlers. It’s easy to remove them. tiddlywiki.com has a toc, where elements are part of different toc-paths, since many tiddlers have 2 or more tags. It needs to be possible, to expand them individually. So 1 index is not enough.
It’s possible to open 2 or more tiddlers in the story-river that contain the same tocs, where open / close still needs to work independently.
My suggestion to modify the $qualify filter is the simples one and should be backwards compatible. It only needs 1 new state tiddler to expand and open the whole tree, while keeping the existing states intact. So after the new open-all-state tiddler is removed, the existing configuration will be automatically restored.
The toc-macros maintain a path
variable, that is used to create the unique states. In the future this variable can be used to expand and collapse elements of the toc that contains the tiddler which is selected in the story river. The selected tiddler could be highlighted in the toc.
The problem here is, that for tw-com this would open several toc-branches, since tiddlers have several tags. As I did extend the core toc-macro functions, I did not have an algorithm, that was able to create a unique “trail”, that would allow us to open only 1 specific toc-branch. Now with my trails- / bradcrumbs-plugin I do have an algorithm that probably could be used.
But that’s not implemented yet.
just some thoughts.