@devries-cameron20 / t3code Mirror · read-only / commits / 115739c1e0
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 05:45 UTC

fix(web): keep the project filter menu aligned with its trigger

Yash Singh committed Nov 3, 2026 at 12:13 UTC 115739c1e02e181d6c176a4d8b43716f8f83d1d4
3 files changed +6 -10
apps/web/src/components/Sidebar.tsx
+2 -4
@@ -1032,7 +1032,6 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
1032 const projectScopeFilter = useComboboxFilter();
1033 const allProjectSnapshotsReady = useAllEnvironmentProjectSnapshotsReady();
1034 const allProjectConfigsReady = useAtomValue(environmentProjects.projectConfigsReadyAtom);
1035 - const headerSearchRef = useRef<HTMLDivElement | null>(null);
1035 // Safari may click after Ctrl+click opens settings; suppress that selection until the picker reopens.
1036 const suppressNextScopeChangeRef = useRef(false);
1037 const highlightedProjectScopeKeyRef = useRef<string | null>(null);
@@ -2990,7 +2989,6 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
2989 fixedHeader={
2990 <SidebarGroup className="z-[1]">
2991 <SidebarThreadHeader
2993 - searchFieldRef={headerSearchRef}
2992 hasProjects={projectGroups.length > 0}
2993 projectScope={
2994 <Combobox
@@ -3061,8 +3059,8 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
3059 {/* Refocusing the trigger after a pointer close shows its focus ring and opens its tooltip. */}
3060 <ComboboxPopup
3061 align="start"
3064 - anchor={headerSearchRef}
3065 - className="max-w-[min(18rem,var(--available-width))] overflow-hidden"
3062 + collisionAvoidance={{ side: "flip", align: "shift" }}
3063 + className="w-[min(18rem,var(--available-width))] overflow-hidden"
3064 finalFocus={(closeType) => closeType === "keyboard"}
3065 >
3066 <ComboboxSearchInput
apps/web/src/components/sidebar/SidebarThreadHeader.tsx
+1 -6
@@ -13,7 +13,6 @@ import { SidebarInput, SidebarMenuButton } from "../ui/sidebar";
13 import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
14
15 export interface SidebarThreadHeaderProps {
16 - searchFieldRef?: RefObject<HTMLDivElement | null>;
16 hasProjects: boolean;
17 projectScope: ReactNode;
18 onNewProject: () => void;
@@ -33,7 +32,6 @@ export interface SidebarThreadHeaderProps {
32 }
33
34 export function SidebarThreadHeader({
36 - searchFieldRef,
35 hasProjects,
36 projectScope,
37 onNewProject,
@@ -60,10 +58,7 @@ export function SidebarThreadHeader({
58
59 return (
60 <div className="flex items-center gap-1">
63 - <div
64 - ref={searchFieldRef}
65 - className="flex h-8 min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-sidebar-muted-foreground hover:bg-sidebar-row-hover hover:text-sidebar-foreground focus-within:bg-sidebar-row-hover focus-within:text-sidebar-foreground focus-within:ring-1 focus-within:ring-inset focus-within:ring-ring/70"
66 - >
61 + <div className="flex h-8 min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-sidebar-muted-foreground hover:bg-sidebar-row-hover hover:text-sidebar-foreground focus-within:bg-sidebar-row-hover focus-within:text-sidebar-foreground focus-within:ring-1 focus-within:ring-inset focus-within:ring-ring/70">
62 <SearchIcon className="size-4 shrink-0 text-(--sidebar-icon-color)" />
63 <SidebarInput
64 ref={searchInputRef}
apps/web/src/components/ui/combobox.tsx
+3
@@ -139,6 +139,7 @@ function ComboboxPopup({
139 sideOffset = 4,
140 alignOffset,
141 align = "start",
142 + collisionAvoidance,
143 anchor: anchorProp,
144 ...props
145 }: ComboboxPrimitive.Popup.Props & {
@@ -147,6 +148,7 @@ function ComboboxPopup({
148 alignOffset?: ComboboxPrimitive.Positioner.Props["alignOffset"];
149 side?: ComboboxPrimitive.Positioner.Props["side"];
150 anchor?: ComboboxPrimitive.Positioner.Props["anchor"];
151 + collisionAvoidance?: ComboboxPrimitive.Positioner.Props["collisionAvoidance"];
152 }) {
153 const { chipsRef, multiple } = React.use(ComboboxContext);
154 const anchor = anchorProp ?? (multiple ? chipsRef : undefined);
@@ -157,6 +159,7 @@ function ComboboxPopup({
159 align={align}
160 alignOffset={alignOffset}
161 anchor={anchor}
162 + collisionAvoidance={collisionAvoidance}
163 className="z-[130] select-none"
164 data-slot="combobox-positioner"
165 side={side}