From 566aa466b98568a2163b09767d2c28147754d830 Mon Sep 17 00:00:00 2001 From: Avi Date: Tue, 1 Sep 2026 11:48:43 -0500 Subject: [PATCH] Remove redundant 'Active profile' heading from identity card --- frontend/src/screens/HomeScreen.tsx | 3 +-- frontend/src/styles.css | 4 ---- frontend/src/test/HomeScreen.test.tsx | 7 +++---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/frontend/src/screens/HomeScreen.tsx b/frontend/src/screens/HomeScreen.tsx index 56204d1..e3bda60 100644 --- a/frontend/src/screens/HomeScreen.tsx +++ b/frontend/src/screens/HomeScreen.tsx @@ -77,11 +77,10 @@ export function HomeScreen({ onNavigate, onCreateProfile }: HomeScreenProps) { {active && ( -
+
-

Active profile

{active.label} diff --git a/frontend/src/styles.css b/frontend/src/styles.css index e82b52b..6ea2b17 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -1488,10 +1488,6 @@ select { min-width: 0; } -.home-identity-copy h2 { - margin: 0 0 4px; -} - .home-identity-name { margin: 0 0 4px; color: var(--text); diff --git a/frontend/src/test/HomeScreen.test.tsx b/frontend/src/test/HomeScreen.test.tsx index 03e8225..a43e92d 100644 --- a/frontend/src/test/HomeScreen.test.tsx +++ b/frontend/src/test/HomeScreen.test.tsx @@ -23,10 +23,9 @@ describe('HomeScreen', () => { const { onNavigate } = renderHome(backend); renderWithApp(); - // The active profile name appears both in the identity card and in the profile row. - const identityCard = (await screen.findByText('Active profile')).closest( - '.home-identity-card', - ) as HTMLElement; + // Wait for the identity card to appear after state loads. + const switchBtn = await screen.findByRole('button', { name: 'Switch profile' }); + const identityCard = switchBtn.closest('.home-identity-card') as HTMLElement; expect(within(identityCard).getByText('Alice')).toBeInTheDocument(); expect(within(identityCard).getByText(/npub1alice\.\.\./)).toBeInTheDocument();