Skip to content

Commit 08a1f76

Browse files
fix(web): Fix search bar not taking full width in TopBar (#909)
* fix(web): Fix search bar not taking full width in TopBar The right section of the TopBar had flex-1 unconditionally, splitting the bar into two equal halves. The SearchBar could only fill the left 50%, leaving a large empty gap. Now the right section uses shrink-0 when no centerContent is present, letting the SearchBar fill the remaining width. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: Update CHANGELOG for #909 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4b4fe1b commit 08a1f76

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111
- Fixed `og:image` URL resolving to `localhost` instead of the public domain when the app is deployed behind a reverse proxy. [#908](https://github.com/sourcebot-dev/sourcebot/pull/908)
12+
- Fixed search bar not taking the full width on the search results and browse pages. [#909](https://github.com/sourcebot-dev/sourcebot/pull/909)
1213

1314
## [4.11.3] - 2026-02-19
1415

packages/web/src/app/[domain]/components/topBar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { LogIn } from "lucide-react";
1212
import { useRouter } from "next/navigation";
1313
import { AppearanceDropdownMenu } from "./appearanceDropdownMenu";
1414
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
15+
import { cn } from "@/lib/utils";
1516

1617
interface TopBarProps {
1718
domain: string;
@@ -58,7 +59,7 @@ export const TopBar = ({
5859
{centerContent}
5960
</div>
6061
)}
61-
<div className="flex-1 flex flex-row justify-end items-center gap-2">
62+
<div className={cn("flex flex-row justify-end items-center gap-2", centerContent ? "flex-1" : "shrink-0")}>
6263
{actions}
6364
{session ? (
6465
<MeControlDropdownMenu

0 commit comments

Comments
 (0)