From cd3a74ba1ac92d94663e36b998805eaf7dd1d2d8 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 18:15:22 +0000 Subject: [PATCH 1/2] fix(website): open the Hub menu apps in the same tab Cinematic Studio and Re-shoot are comfy.org pages, so they now open in the same tab like the rest of the Hub menu. --- apps/website/e2e/header-models-navigation.spec.ts | 6 +++--- .../common/HeaderMain/HeaderMainDesktop.test.ts | 6 ++---- .../components/common/HeaderMain/HeaderMainMobile.test.ts | 5 ++--- apps/website/src/data/mainNavigation.test.ts | 8 ++++++-- apps/website/src/data/mainNavigation.ts | 6 ++---- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/apps/website/e2e/header-models-navigation.spec.ts b/apps/website/e2e/header-models-navigation.spec.ts index 984329b858d..0eefacf6dfd 100644 --- a/apps/website/e2e/header-models-navigation.spec.ts +++ b/apps/website/e2e/header-models-navigation.spec.ts @@ -120,7 +120,7 @@ for (const { locale, path } of [ } } -test('Hub menu marks only external links with the arrow', async ({ +test('Hub menu apps open in the same tab and only external links carry the arrow', async ({ context, page }) => { @@ -143,13 +143,13 @@ test('Hub menu marks only external links with the arrow', async ({ name: 'Cinematic Studio', exact: true }) - await expect(cinematicStudio).toHaveAttribute('target', '_blank') + await expect(cinematicStudio).not.toHaveAttribute('target', '_blank') await expect(cinematicStudio.getByTestId('external-link-arrow')).toHaveCount( 0 ) const reshoot = dropdown.getByRole('link', { name: 'Re-shoot', exact: true }) - await expect(reshoot).toHaveAttribute('target', '_blank') + await expect(reshoot).not.toHaveAttribute('target', '_blank') await expect(reshoot.getByTestId('external-link-arrow')).toHaveCount(0) await desktopLinks diff --git a/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.test.ts b/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.test.ts index 4c6042d5e93..684ec6acdb3 100644 --- a/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.test.ts +++ b/apps/website/src/components/common/HeaderMain/HeaderMainDesktop.test.ts @@ -99,13 +99,11 @@ describe('HeaderMainDesktop', () => { }) it.for(['Cinematic Studio', 'Re-shoot'])( - 'opens the %s app in a tab of its own', + 'opens the %s app in the same tab', async (name) => { const menu = await openHub() - const link = menu.getByRole('link', { name }) - expect(link).toHaveAttribute('target', '_blank') - expect(link).toHaveAttribute('rel', 'noopener') + expect(menu.getByRole('link', { name })).not.toHaveAttribute('target') } ) diff --git a/apps/website/src/components/common/HeaderMain/HeaderMainMobile.test.ts b/apps/website/src/components/common/HeaderMain/HeaderMainMobile.test.ts index fd52b9925d8..5d4ec90f9d8 100644 --- a/apps/website/src/components/common/HeaderMain/HeaderMainMobile.test.ts +++ b/apps/website/src/components/common/HeaderMain/HeaderMainMobile.test.ts @@ -56,9 +56,8 @@ describe('HeaderMainMobile', () => { '/hub/apps/reshoot/', '/hub/apps/' ]) - expect(screen.getByRole('link', { name: 'Re-shoot' })).toHaveAttribute( - 'target', - '_blank' + expect(screen.getByRole('link', { name: 'Re-shoot' })).not.toHaveAttribute( + 'target' ) expect(screen.getByRole('link', { name: 'All apps' })).not.toHaveAttribute( 'target' diff --git a/apps/website/src/data/mainNavigation.test.ts b/apps/website/src/data/mainNavigation.test.ts index a0cbf779f5a..013f2775967 100644 --- a/apps/website/src/data/mainNavigation.test.ts +++ b/apps/website/src/data/mainNavigation.test.ts @@ -139,9 +139,13 @@ describe('getMainNavigation', () => { { label: 'Cinematic Studio', href: '/hub/apps/cinematic-studio/', - newTab: true + newTab: undefined }, - { label: 'Re-shoot', href: '/hub/apps/reshoot/', newTab: true } + { + label: 'Re-shoot', + href: '/hub/apps/reshoot/', + newTab: undefined + } ], allLink: { label: 'All apps', href: '/hub/apps/' } } diff --git a/apps/website/src/data/mainNavigation.ts b/apps/website/src/data/mainNavigation.ts index 70284dcefec..f9c5c07f83e 100644 --- a/apps/website/src/data/mainNavigation.ts +++ b/apps/website/src/data/mainNavigation.ts @@ -150,13 +150,11 @@ export function getMainNavigation( items: [ { label: t('nav.cinematicStudio'), - href: routes.cinematicStudio, - newTab: true + href: routes.cinematicStudio }, ...when(hubSections.reshoot, { label: t('nav.reshoot'), - href: routes.reshoot, - newTab: true + href: routes.reshoot }) ], allLink: { label: t('nav.hubAllApps'), href: routes.hubApps } From a332a7086e3afaa0aafdf116f7c85ce8321c52ea Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 18:27:46 +0000 Subject: [PATCH 2/2] test(website): require no target at all on the Hub menu app links --- apps/website/e2e/header-models-navigation.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/website/e2e/header-models-navigation.spec.ts b/apps/website/e2e/header-models-navigation.spec.ts index 0eefacf6dfd..6e8c09767a8 100644 --- a/apps/website/e2e/header-models-navigation.spec.ts +++ b/apps/website/e2e/header-models-navigation.spec.ts @@ -143,13 +143,13 @@ test('Hub menu apps open in the same tab and only external links carry the arrow name: 'Cinematic Studio', exact: true }) - await expect(cinematicStudio).not.toHaveAttribute('target', '_blank') + await expect(cinematicStudio).not.toHaveAttribute('target') await expect(cinematicStudio.getByTestId('external-link-arrow')).toHaveCount( 0 ) const reshoot = dropdown.getByRole('link', { name: 'Re-shoot', exact: true }) - await expect(reshoot).not.toHaveAttribute('target', '_blank') + await expect(reshoot).not.toHaveAttribute('target') await expect(reshoot.getByTestId('external-link-arrow')).toHaveCount(0) await desktopLinks