From 4716c31e19fcd816e6eed616bd0300e6a44d44e1 Mon Sep 17 00:00:00 2001 From: Petr Glaser Date: Wed, 30 Sep 2026 15:30:57 +0200 Subject: [PATCH] fix(ui): mark Shell and Party Registry SSR routes with their UI release marker The Cloudflare public-URL proof reads data-build-marker from each app's cloudflare.routes.ssr page. The marker was dropped from the Shell home page with the login flow and from Party Registry when Contacts merged into it, so /en (Shell, anonymous) and /en/contacts (Party Registry) rendered none. Shell: carry it on the root layout wrapper, so every route and auth state renders it. Party Registry: its pages double as Shell module pages and its root layout is pinned to the generated scaffold, so carry it on a new [lang] layout that only the vertical's own Worker renders. --- .../shared/ultramodern-build.ts | 1 + .../shell-super-app/src/routes/layout.tsx | 4 +++- .../tests/unit/layout.test.tsx | 8 ++++++++ .../src/routes/[lang]/layout.tsx | 14 ++++++++++++++ .../tests/components/language-layout.test.tsx | 19 +++++++++++++++++++ 5 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 app/verticals/party-registry/src/routes/[lang]/layout.tsx create mode 100644 app/verticals/party-registry/tests/components/language-layout.test.tsx diff --git a/app/apps/shell-super-app/shared/ultramodern-build.ts b/app/apps/shell-super-app/shared/ultramodern-build.ts index 94ee4f1c4..93519a289 100644 --- a/app/apps/shell-super-app/shared/ultramodern-build.ts +++ b/app/apps/shell-super-app/shared/ultramodern-build.ts @@ -55,3 +55,4 @@ const ultramodernBuildArtifact = resolveUltramodernBuildArtifact( ); export const ultramodernDeliveryUnit = ultramodernBuildArtifact.deliveryUnit; +export const ultramodernUiMarker = ultramodernBuildArtifact.surfaces.ui; diff --git a/app/apps/shell-super-app/src/routes/layout.tsx b/app/apps/shell-super-app/src/routes/layout.tsx index 499f6c48e..60b781778 100644 --- a/app/apps/shell-super-app/src/routes/layout.tsx +++ b/app/apps/shell-super-app/src/routes/layout.tsx @@ -1,10 +1,12 @@ import { Outlet } from '@modern-js/plugin-tanstack/runtime'; +import { ultramodernUiMarker } from '../../shared/ultramodern-build.ts'; + import './ui-kit.css'; import './index.css'; const Layout = () => ( -
+
); diff --git a/app/apps/shell-super-app/tests/unit/layout.test.tsx b/app/apps/shell-super-app/tests/unit/layout.test.tsx index 8652cca56..d42d5726f 100644 --- a/app/apps/shell-super-app/tests/unit/layout.test.tsx +++ b/app/apps/shell-super-app/tests/unit/layout.test.tsx @@ -11,6 +11,7 @@ import { afterEach, expect, it, rstest, test } from 'effect-rstest'; import type { ComponentProps, ReactNode } from 'react'; import { AppIdSchema } from '../../shared/api'; +import { ultramodernUiMarker } from '../../shared/ultramodern-build.ts'; import Layout from '../../src/routes/layout'; import { AuthenticatedDashboardLayout } from '../../src/routes/shell-frame'; @@ -153,6 +154,13 @@ test('leaves route content free of global user-perceivable UI', () => { expect(document.body.textContent?.trim()).toBe('Current route'); }); +test('marks every server-rendered Shell route with its UI release marker', () => { + const { container } = render(); + + const root = container.querySelector('[data-app-id="shell-super-app"]'); + expect(root?.dataset['buildMarker']).toBe(ultramodernUiMarker.build); +}); + test('renders the default Home dashboard contract and preserves page children', () => { render( ( +
+ +
+); + +export default LanguageLayout; diff --git a/app/verticals/party-registry/tests/components/language-layout.test.tsx b/app/verticals/party-registry/tests/components/language-layout.test.tsx new file mode 100644 index 000000000..7b0db15ee --- /dev/null +++ b/app/verticals/party-registry/tests/components/language-layout.test.tsx @@ -0,0 +1,19 @@ +import { cleanup, render } from '@testing-library/react'; +import { afterEach, expect, rstest, test } from 'effect-rstest'; + +import { ultramodernUiMarker } from '../../shared/ultramodern-build.ts'; +import LanguageLayout from '../../src/routes/[lang]/layout.tsx'; + +rstest.mock('@modern-js/plugin-tanstack/runtime', () => ({ + Outlet: () =>
Current route
, +})); + +afterEach(cleanup); + +test('marks every localized Party Registry route with its UI release marker', () => { + const { container } = render(); + + const root = container.querySelector('[data-build-marker]'); + expect(root?.dataset['buildMarker']).toBe(ultramodernUiMarker.build); + expect(root?.textContent).toBe('Current route'); +});