Loading
Highlight active diff file on selection in rapid diffs
What does this MR do and why?
The file browser tree did not highlight the active file in Rapid Diffs. This highlights the file the user explicitly selects (tree click, file finder, or hotkey navigation), matching the legacy diffs behaviour.
Scope is limited to selection-driven highlighting. Legacy highlights on selection, not on scroll, so no scroll tracking is added. A scroll-spy (highlight the file as you scroll) is a separate, net-new feature tracked in #602604 (closed).
Follow-ups
Legacy /diffs also sets the current file in a few cases this MR does not cover. These are deferred as separate parity follow-ups (all non-blocking, confirmed with @justin_ho during review):
- First-file highlight on initial load: #636757
- Highlight on line-number click: #636758 (closed)
- Highlight on note/discussion-link jump: #636759 (closed)
- Explicit store specs for the active-file selection: #636760 (closed)
Highlight-on-scroll (scroll-spy) remains tracked in #602604 (closed).
How to set up and validate locally
- Open an MR with several files in Rapid Diffs (desktop, multi-file mode).
- Click a file in the file browser tree (or use the file finder / hotkey navigation).
- Expect: the clicked file is highlighted in the tree.
Edited by Thomas Randolph