I think adding toggles is not a bad idea indeed. Now we have the tree like that, from a lichess analysis all the variations should be shown by default (expanded).
And we could have to toggles actions:
expand/collapse all,
show mine/opponent. Theses are not persisted preferences, just toggles.
Additional comments:
while the above toggles deal moreso with expanding the trees, I think there should be a way to turn off OPPONENTS analysis completely. When you're scanning colored moves, have the option for moves only colored just for yourself.
my retort to Veloce's 2nd bullet: I do think I would prefer the toggles persist. For example I personally would prefer the plus icon to default collapsed (so that I can individually expand one at a time so I don’t have as much showing at once). But I can also see why someone else may want them expanded. Hence why I’d rather default my own toggle preference there.
Per discord discussion:
Veloce:
Additional comments: