From 12c06a61be77ed1f7b8ab644d30355e5880df9ba Mon Sep 17 00:00:00 2001 From: Stephen Zhou Date: Thu, 2 Jul 2026 19:53:33 +0800 Subject: [PATCH] fix(web): keep app sort filter with header filters (#38324) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- web/app/components/apps/__tests__/list.spec.tsx | 8 ++++---- web/app/components/apps/app-list-header-filters.tsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/app/components/apps/__tests__/list.spec.tsx b/web/app/components/apps/__tests__/list.spec.tsx index e5a9e4f4127..6fc9e47258a 100644 --- a/web/app/components/apps/__tests__/list.spec.tsx +++ b/web/app/components/apps/__tests__/list.spec.tsx @@ -429,7 +429,7 @@ describe('List', () => { expect(screen.getByRole('button', { name: 'common.operation.create' }))!.toBeInTheDocument() }) - it('should render search before the right aligned actions', () => { + it('should render filters and search before the right aligned actions', () => { renderList() const creatorsButton = screen.getByRole('button', { name: 'Creators' }) @@ -439,9 +439,9 @@ describe('List', () => { const createButton = screen.getByRole('button', { name: 'common.operation.create' }) expect(snippetsLink).toHaveAttribute('href', '/snippets') - expect(creatorsButton.compareDocumentPosition(searchInput) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy() - expect(searchInput.compareDocumentPosition(sortButton) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy() - expect(sortButton.compareDocumentPosition(snippetsLink) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy() + expect(creatorsButton.compareDocumentPosition(sortButton) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy() + expect(sortButton.compareDocumentPosition(searchInput) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy() + expect(searchInput.compareDocumentPosition(snippetsLink) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy() expect(snippetsLink.compareDocumentPosition(createButton) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy() }) diff --git a/web/app/components/apps/app-list-header-filters.tsx b/web/app/components/apps/app-list-header-filters.tsx index f31c1052ecc..824e77dd7d2 100644 --- a/web/app/components/apps/app-list-header-filters.tsx +++ b/web/app/components/apps/app-list-header-filters.tsx @@ -66,6 +66,7 @@ export function AppListHeaderFilters({ triggerClassName="min-w-0" /> +
-