SIGN IN SIGN UP

fix(sidebar): keep active branch when opening a multi-located guide

Guides listed in more than one sidebar group (~12% of guides) used to expand
every branch containing them and scroll to whichever active DOM node won,
because Rspress resolves "active" purely by link string.

Resolve a single active instance by its tree path instead. Selection order:
just-clicked instance, else the branch sharing the longest path prefix with
the previously-active one (persisted in sessionStorage), else the canonical
first-listed branch for cold deep-links. Highlight and scrollIntoView target
only that instance; a passive effect collapses the non-resolved branches while
leaving any shared parent family and manual toggles intact.
Y
Yoann Cosse committed
60ad86a7d0fbfc29f6f92cf8e43f91237de1f701
Parent: 6116048