Description
The "Search files and folders" input remains visible in the top-right of the repository view even after a file has been opened. The search bar is only relevant to the directory/tree view and should not appear when a single file's contents are being displayed.
Steps to Reproduce
- Go to a public repository (e.g.,
entrius/gittensor)
- Open the Code tab — the file/folder list and the "Search files and folders" input are shown (expected)
- Click any file (e.g.,
.env.example)
- Observe the file contents view
Expected Behavior
When a file is opened, the "Search files and folders" input should be hidden (or replaced with an in-file search), since there is no file/folder list visible to filter.
Actual Behavior
The "Search files and folders" input is still rendered in the top-right of the file view, even though no list is shown for it to filter. Typing into it has no visible effect in this context, which is confusing.
Screenshots
- Directory view — search input is appropriate here:
(attach Image 1: repo root showing folders/files)
- File view (
.env.example) — search input should not be shown here:
(attach Image 2: opened file contents)
Environment
- Page:
entrius/gittensor → Code tab → .env.example
Suggested Fix
Conditionally render the "Search files and folders" input only when the file tree / directory listing is the active view. When a single file is opened, either hide the input or swap it for an in-file content search.
Description
The "Search files and folders" input remains visible in the top-right of the repository view even after a file has been opened. The search bar is only relevant to the directory/tree view and should not appear when a single file's contents are being displayed.
Steps to Reproduce
entrius/gittensor).env.example)Expected Behavior
When a file is opened, the "Search files and folders" input should be hidden (or replaced with an in-file search), since there is no file/folder list visible to filter.
Actual Behavior
The "Search files and folders" input is still rendered in the top-right of the file view, even though no list is shown for it to filter. Typing into it has no visible effect in this context, which is confusing.
Screenshots
(attach Image 1: repo root showing folders/files)
.env.example) — search input should not be shown here:(attach Image 2: opened file contents)
Environment
entrius/gittensor→ Code tab →.env.exampleSuggested Fix
Conditionally render the "Search files and folders" input only when the file tree / directory listing is the active view. When a single file is opened, either hide the input or swap it for an in-file content search.