From a77236e56473b32e3e15add12654b4c0fb6d184f Mon Sep 17 00:00:00 2001 From: yyh <92089059+lyzno1@users.noreply.github.com> Date: Mon, 3 Aug 2026 21:41:29 +0800 Subject: [PATCH] fix(web): remove Web Apps loading skeleton (#39939) --- .../main-nav/__tests__/index.spec.tsx | 9 +- .../main-nav/components/web-apps-section.tsx | 128 ++++++------------ 2 files changed, 49 insertions(+), 88 deletions(-) diff --git a/web/app/components/main-nav/__tests__/index.spec.tsx b/web/app/components/main-nav/__tests__/index.spec.tsx index 28ffe7d69ea..9d85546e650 100644 --- a/web/app/components/main-nav/__tests__/index.spec.tsx +++ b/web/app/components/main-nav/__tests__/index.spec.tsx @@ -1335,15 +1335,14 @@ describe('MainNav', () => { ).toHaveAttribute('href', '/installed/installed-2') }) - it('renders web app skeleton rows while installed apps are loading', () => { + it('hides the installed web apps section while installed apps are loading', () => { mockInstalledAppsPending = true renderMainNav() - expect(screen.getByRole('region', { name: 'explore.sidebar.webApps' })).toHaveAttribute( - 'aria-busy', - 'true', - ) + expect( + screen.queryByRole('region', { name: 'explore.sidebar.webApps' }), + ).not.toBeInTheDocument() expect( screen.queryByRole('button', { name: 'explore.sidebar.webApps' }), ).not.toBeInTheDocument() diff --git a/web/app/components/main-nav/components/web-apps-section.tsx b/web/app/components/main-nav/components/web-apps-section.tsx index f23feeff089..e7d7918d432 100644 --- a/web/app/components/main-nav/components/web-apps-section.tsx +++ b/web/app/components/main-nav/components/web-apps-section.tsx @@ -38,39 +38,11 @@ import { usePathname } from '@/next/navigation' import { consoleQuery } from '@/service/client' import { hasPermission } from '@/utils/permission' -const webAppSkeletonClassName = - 'animate-pulse rounded bg-text-quaternary opacity-20 motion-reduce:animate-none' -const webAppSkeletonWidths = ['w-24', 'w-32', 'w-28'] const emptyInstalledApps: InstalledAppResponse[] = [] const selectInstalledApps = (data: InfiniteData) => data.pages.flatMap((page) => page.installed_apps) -function WebAppsHeaderSkeleton() { - return ( -