Repository navigation
Studio: move sidebar search into the header - #7304
Conversation
Put the search action as an icon button next to the sidebar toggle in the header instead of a full-width nav row, so New Chat is the only fixed row above the scrolling list. The search row is kept for the collapsed icon rail only. Also add a small bottom gap under New Chat when it is pinned during scroll.
There was a problem hiding this comment.
Code Review
This pull request moves the search button to the sidebar header, wrapping it alongside the close sidebar button, and hides the original search navigation row unless the sidebar is collapsed. It also dynamically adjusts the sidebar group's padding based on its scroll state. The feedback suggests hiding the search tooltip on mobile devices to prevent it from getting stuck on tap, and dynamically displaying either "⌘K" or "Ctrl+K" in the tooltip depending on the user's operating system.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| <TooltipContent | ||
| side="bottom" | ||
| sideOffset={6} | ||
| className="tooltip-compact" | ||
| className="tooltip-compact flex items-center gap-1.5" | ||
| > |
There was a problem hiding this comment.
On mobile devices, hover tooltips can get "stuck" on the screen after tapping the interactive element. To prevent this, we should hide the tooltip on mobile by passing hidden={isMobile} to the TooltipContent component, consistent with how other tooltips in the sidebar are configured.
| <TooltipContent | |
| side="bottom" | |
| sideOffset={6} | |
| className="tooltip-compact" | |
| className="tooltip-compact flex items-center gap-1.5" | |
| > | |
| <TooltipContent | |
| side="bottom" | |
| sideOffset={6} | |
| className="tooltip-compact flex items-center gap-1.5" | |
| hidden={isMobile} | |
| > |
There was a problem hiding this comment.
Good catch, applied in 7732c64. The header search button renders on mobile too, so its tooltip needed the same hidden={isMobile} guard the SidebarMenuButton tooltips use.
| <kbd className="rounded bg-black/10 px-1 py-px text-[10px] font-medium leading-none dark:bg-white/15"> | ||
| ⌘K | ||
| </kbd> |
There was a problem hiding this comment.
The keyboard shortcut in the tooltip is hardcoded to ⌘K. On non-Mac platforms (Windows/Linux), the standard modifier key is Ctrl rather than ⌘. Since the search dialog's event listener in chat-search-dialog.tsx supports both metaKey and ctrlKey, we should dynamically display ⌘K or Ctrl+K based on the user's platform to avoid confusion.
| <kbd className="rounded bg-black/10 px-1 py-px text-[10px] font-medium leading-none dark:bg-white/15"> | |
| ⌘K | |
| </kbd> | |
| <kbd className="rounded bg-black/10 px-1 py-px text-[10px] font-medium leading-none dark:bg-white/15"> | |
| {typeof navigator !== "undefined" && /Mac|iPod|iPhone|iPad/.test(navigator.userAgent) ? "⌘K" : "Ctrl+K"} | |
| </kbd> |
There was a problem hiding this comment.
Agreed, fixed in 7732c64. It now shows Cmd K on Mac and Ctrl K elsewhere. I used getClientPlatform() rather than a userAgent regex so it also covers navigator.userAgentData, and it stays correct on the web build where the Tauri titlebar helpers report false on a Mac browser.
The header search button only renders on mac/web where the brand row shows. On win/linux custom titlebars there's no header button, so keep the full-width search row visible instead of hiding it.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f79d2ce8d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| icon={Search01Icon} | ||
| label={t("shell.navigation.search")} | ||
| active={false} | ||
| className="hidden group-data-[collapsible=icon]:block" |
There was a problem hiding this comment.
Keep search visible with custom titlebars
When Studio runs in Tauri on Windows/Linux, shouldUseCustomWindowTitlebar() makes showSidebarBrand false, so the new header search button is not rendered because that header content is gated by {showSidebarBrand && ...}. Hiding this NavItem in the expanded sidebar therefore removes the only visible Search action for those users unless they collapse the sidebar; keep this row visible for the custom-titlebar branch or add the header button there too.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This was already handled in 25913ce, before this review landed. On custom-titlebar platforms (win/linux) showSidebarBrand is false, so the row keeps its default visibility instead of being hidden; only mac/web hide the row and use the header button. Verified across the platform matrix.
- Hide the search tooltip on mobile (hidden={isMobile}), matching the
SidebarMenuButton tooltip convention.
- Show Cmd K on Mac and Ctrl K elsewhere instead of a hardcoded glyph;
the search dialog binds both meta and ctrl. Uses getClientPlatform so
it is correct on web too, not just Tauri.
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What this does
Moves the Studio sidebar Search action out of its own full-width nav row and into the sidebar header, as an icon button sitting right next to the sidebar toggle. This keeps New Chat as the only fixed row above the scrolling thread list, which reads cleaner and matches the layout people expect.
Changes
Scope and risk