When Repository File Tree Browser is closed it should not be accessible to user navigation

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Context

We need to find a way to remove/re-insert the FTB in an efficient and performant way without harming the CSS animations.

This is a better alternative than keeping it in and then dealing with the side-effects (ie, focus, etc.).

Keyboard Navigation Issue

@psjakubowska identified an accessibility issue in this comment:

Apart from restoring the focus, we should also block the access to the FTB when it's collapsed. Similar that is done with modals. I was able to tab through the FTB and fill in the filter bar, while it was collapsed.

Screen_Recording_2025-09-19_at_16.39.08

File tree browser is still interactive-able when collapsed

@brendan777 noticed, shortcut and search are still working when file tree browser is collapsed

Screen Recording Oct 5 2025 from GitLab.mov

Tooltip does not disappear

@alyssatrinh noted, when users close the file tree browser, the Show file tree browser tooltip is still lingering. #537970 (comment 2851725820)

Edited by Chaoyue Zhao