Loop over next siblings and hide them one by one, until you hit an entry with an indentation level that is less than or equal to that of the current entry?
Take a look at the kidvis function in hn.js
It iterates across sibling comment elements, hides them, until it encounters one whose indent level is less than or equal to the initial indent level.
that makes sense. you're shadowbanned by the way, I had to vouch for your comment.