From 39f69e603bd41eb87ca72f0f574257a743e4c9be Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 2 Aug 2026 18:48:30 +0000 Subject: [PATCH] fix(B123): pass notification bell as server slot in desktop header Client component cannot import async CampaignNotificationBellSlot directly; mirror CampaignMobileTopBar slot pattern to fix staff page hangs in e2e. --- docs/plans/orientacao-shell-sem-titulos-secao-impl.md | 8 ++++++++ src/app/(campaign)/campanha/(app)/layout.tsx | 4 +++- .../campaign/shell/CampaignDesktopHeader.tsx | 10 ++++------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/plans/orientacao-shell-sem-titulos-secao-impl.md b/docs/plans/orientacao-shell-sem-titulos-secao-impl.md index 28893abb..7d88573f 100644 --- a/docs/plans/orientacao-shell-sem-titulos-secao-impl.md +++ b/docs/plans/orientacao-shell-sem-titulos-secao-impl.md @@ -70,3 +70,11 @@ flowchart LR - [x] Aceite de produto da intenção ainda coberto - [x] Invariantes AGENTS/engineering-standards - [x] Testes unit mobile top bar + metadata resolver previstos + +## Débitos deferidos (/simplify) + +- **Registry único** (pathRules + metadata por página): defer — gatilho quando 3ª rota dinâmica exigir override; hoje catálogo + metadata explícita é legível. +- **Resolver único no provider** (evitar dupla resolução mobile/desktop): defer — custo negligível (~28 regex); revisit se bundle crescer. +- **Desktop header RSC** (slot bell sem client boundary): **corrigido** nesta entrega — `notificationBell` slot como mobile. +- **Subtitle desktop truncado** em uma linha: defer — validar com usuários; mobile já usa duas linhas. +- **Table-driven pathRules tests**: defer — cobertura smoke suficiente para B123; expandir se matcher quebrar de novo. diff --git a/src/app/(campaign)/campanha/(app)/layout.tsx b/src/app/(campaign)/campanha/(app)/layout.tsx index 37e65694..ab51b927 100644 --- a/src/app/(campaign)/campanha/(app)/layout.tsx +++ b/src/app/(campaign)/campanha/(app)/layout.tsx @@ -80,7 +80,9 @@ export default async function CampaignAppLayout({ children }: { children: React. } /> - + } + /> {/* Provider must wrap CampaignAppScrollChrome, not only page children: the mobile quick-actions drawer (B91/B100) mounts as a sibling of diff --git a/src/components/campaign/shell/CampaignDesktopHeader.tsx b/src/components/campaign/shell/CampaignDesktopHeader.tsx index 14e7c889..e8df3ba9 100644 --- a/src/components/campaign/shell/CampaignDesktopHeader.tsx +++ b/src/components/campaign/shell/CampaignDesktopHeader.tsx @@ -1,16 +1,14 @@ 'use client' -import { CampaignNotificationBellSlot } from '@/components/campaign/shell/CampaignNotificationBellSlot' +import type { ReactNode } from 'react' + import { CampaignPageChromeDisplay } from '@/components/campaign/shell/CampaignPageChromeDisplay' import { SidebarTrigger } from '@/components/ui/Sidebar' -import type { CampaignUser } from '@/payload-types' -export const CampaignDesktopHeader = ({ user }: { user: CampaignUser }) => ( +export const CampaignDesktopHeader = ({ notificationBell }: { notificationBell?: ReactNode }) => (
-
- -
+ {notificationBell ?
{notificationBell}
: null}
)