We bfs to find collapsed nodes, because we want to preserve the tree structure, this means that it is possible to have consecutive collapsed nodes at different levels in the tree. We can fix this by doing a second pass over the list of the nodes in the tree and collapse any siblings. I also removed the condition to not render the errors only trace view as this seems to be a case that we handle in our new design.
We bfs to find collapsed nodes, because we want to preserve the tree structure, this means that it is possible to have consecutive collapsed nodes at different levels in the tree. We can fix this by doing a second pass over the list of the nodes in the tree and collapse any siblings. I also removed the condition to not render the errors only trace view as this seems to be a case that we handle in our new design.