Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a46a4d6
search icon selection behavior
mfortman11 Aug 28, 2025
e00b307
switch to search on input change
mfortman11 Aug 29, 2025
917abb2
Merge branch 'release-1.6.0' of github.com:langflow-ai/langflow into …
mfortman11 Aug 29, 2025
592731d
Merge branch 'release-1.6.0' into lfoss-1983
mfortman11 Aug 29, 2025
5ebe6a6
unit test fix
mfortman11 Aug 29, 2025
153aadf
Merge branch 'lfoss-1983' of github.com:langflow-ai/langflow into lfo…
mfortman11 Aug 29, 2025
ca6c3a2
Merge branch 'release-1.6.0' into lfoss-1983
mfortman11 Aug 29, 2025
9f3d9ab
test fix
mfortman11 Aug 29, 2025
f3e905c
Merge branch 'lfoss-1983' of github.com:langflow-ai/langflow into lfo…
mfortman11 Aug 29, 2025
e624ede
Merge branch 'release-1.6.0' into lfoss-1983
mfortman11 Sep 2, 2025
64c9e57
update test
mfortman11 Sep 2, 2025
a524732
Merge branch 'release-1.6.0' into lfoss-1983
mfortman11 Sep 2, 2025
97a42ce
Merge branch 'release-1.6.0' into lfoss-1983
mfortman11 Sep 2, 2025
8d5092c
✨ (frontend): add mock modules for @jsonquerylang/jsonquery and vanil…
Cristhianzl Sep 2, 2025
f07c6d0
[autofix.ci] apply automated fixes
autofix-ci[bot] Sep 2, 2025
a61d3e9
Merge branch 'release-1.6.0' of github.com:langflow-ai/langflow into …
mfortman11 Sep 2, 2025
9f58bd9
Merge branch 'release-1.6.0' into lfoss-1983
mfortman11 Sep 3, 2025
1c54751
Merge branch 'lfoss-1983' of github.com:langflow-ai/langflow into lfo…
mfortman11 Sep 3, 2025
395a165
Merge branch 'release-1.6.0' into lfoss-1983
mfortman11 Sep 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,8 @@ describe("SidebarSegmentedNav", () => {
expect(componentsButton).toHaveAttribute("data-active", "false");
});

it("sets active state for search when search is focused", () => {
mockUseSidebar.activeSection = "components";
mockUseSearchContext.isSearchFocused = true;
it("sets active state for search when activeSection is search", () => {
mockUseSidebar.activeSection = "search";
render(<SidebarSegmentedNav />);

const searchButton = screen.getByTestId("sidebar-nav-search");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const NAV_ITEMS: NavItem[] = [

export default function SidebarSegmentedNav() {
const { activeSection, setActiveSection, toggleSidebar, open } = useSidebar();
const { focusSearch, isSearchFocused, setSearch } = useSearchContext();
const { focusSearch, setSearch } = useSearchContext();
return (
<div className="flex h-full flex-col border-r border-border bg-background">
<SidebarMenu className="gap-2 p-1">
Expand All @@ -73,14 +73,10 @@ export default function SidebarSegmentedNav() {
}
}
}}
isActive={
activeSection === item.id ||
(item.id === "search" && isSearchFocused)
}
isActive={activeSection === item.id}
className={cn(
"flex h-8 w-8 items-center justify-center rounded-md p-0 transition-all duration-200",
activeSection === item.id ||
(item.id === "search" && isSearchFocused)
activeSection === item.id
? "bg-accent text-accent-foreground"
: "text-muted-foreground hover:bg-accent hover:text-accent-foreground",
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { useGetMCPServers } from "@/controllers/API/queries/mcp/use-get-mcp-serv
import { ENABLE_NEW_SIDEBAR } from "@/customization/feature-flags";
import { useAddComponent } from "@/hooks/use-add-component";
import { useShortcutsStore } from "@/stores/shortcuts";
import { getLocalStorage, setLocalStorage } from "@/utils/local-storage-util";
import { setLocalStorage } from "@/utils/local-storage-util";
import {
nodeColors,
SIDEBAR_BUNDLES,
Expand Down Expand Up @@ -76,12 +76,6 @@ export function useSearchContext() {
return context;
}

interface SearchProviderProps {
children: React.ReactNode;
searchInputRef: React.RefObject<HTMLInputElement>;
isSearchFocused: boolean;
}

// Create a provider that can be used at the FlowPage level
export function FlowSearchProvider({
children,
Expand Down Expand Up @@ -180,9 +174,20 @@ export function FlowSidebarComponent({ isLoading }: FlowSidebarComponentProps) {
isSearchFocused = false,
handleInputFocus = () => {},
handleInputBlur = () => {},
handleInputChange = () => {},
handleInputChange: originalHandleInputChange = () => {},
} = context;

const handleInputChange = useCallback(
(event: React.ChangeEvent<HTMLInputElement>) => {
originalHandleInputChange(event);
// Set active section to search when user first enters text
if (event.target.value.length > 0 && search.length === 0) {
setActiveSection("search");
}
},
[originalHandleInputChange, search, setActiveSection],
);

const showBetaStorage = getBooleanFromStorage("showBeta", true);
const showLegacyStorage = getBooleanFromStorage("showLegacy", false);

Expand Down
18 changes: 3 additions & 15 deletions src/frontend/tests/extended/features/loop-component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,27 +163,13 @@ test(

await page.getByTestId("canvas_controls_dropdown").click();

await zoomOut(page, 3);
await zoomOut(page, 2);
await page.getByTestId("canvas_controls_dropdown").click();

await page.getByTestId("div-generic-node").nth(5).click();

await page.waitForTimeout(1000);

await page.waitForSelector('[data-testid="more-options-modal"]', {
timeout: 100000,
});

await page.getByTestId("more-options-modal").click();

await page.waitForTimeout(1000);

await page.waitForSelector('[data-testid="expand-button-modal"]', {
timeout: 100000,
});

await page.getByTestId("expand-button-modal").click();

await page.getByTestId("input-list-plus-btn_urls-0").click();

// Configure components
Expand Down Expand Up @@ -230,6 +216,8 @@ test(
.click();

// Build and run
await page.getByTestId("title-Chat Output").click();
await page.keyboard.press(`ControlOrMeta+.`);
await page.getByTestId("button_run_chat output").click();
await page.waitForSelector("text=built successfully", { timeout: 30000 });

Expand Down
Loading