Skip to content

fix(code-browser): hide file search when viewing a file#1258

Open
sunlight7777777 wants to merge 1 commit into
entrius:testfrom
sunlight7777777:fix/hide-search-on-file-view
Open

fix(code-browser): hide file search when viewing a file#1258
sunlight7777777 wants to merge 1 commit into
entrius:testfrom
sunlight7777777:fix/hide-search-on-file-view

Conversation

@sunlight7777777
Copy link
Copy Markdown

@sunlight7777777 sunlight7777777 commented May 21, 2026

The "Search files and folders" input was still rendered when a file
was open, even though there's no file list to filter at that point.
Conditionally render GoToFileSearch only in directory view.

Screenshots

  • Directory view — search input is appropriate here:
    (attach Image 1: repo root showing folders/files)
Image
  • File view (.env.example) — search input should not be shown here:
    (attach Image 2: opened file contents)
Image

Fixes #1256

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 21, 2026
@anderdc anderdc added enhancement New feature or request and removed bug Something isn't working labels May 22, 2026
Copy link
Copy Markdown
Collaborator

@anderdc anderdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please scope this down to what #1256 asks for. Keep: the RepositoryCodeBrowser.tsx change wrapping GoToFileSearch in {!isFile && (...)}. Drop: the package-lock.json changes — they remove @heroicons/react, @mui/lab, @types/dompurify, and react-tooltip and aren't mentioned in the description. That's a lockfile regeneration unrelated to #1256; revert package-lock.json so this PR is just the one-file fix.

@sunlight7777777 sunlight7777777 force-pushed the fix/hide-search-on-file-view branch from 4766002 to 959cb44 Compare May 22, 2026 23:35
@sunlight7777777
Copy link
Copy Markdown
Author

@anderdc fixed it!
Please check again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] "Search files and folders" input still visible when viewing a file

2 participants