From 7b660769ef268e114e7994bb4561bc0d6da80099 Mon Sep 17 00:00:00 2001 From: eastagiletracker <310448263+eastagiletracker@users.noreply.github.com> Date: Thu, 13 Aug 2026 15:25:02 +0700 Subject: [PATCH] fix(accounts): keep the sidebar on the accounts page The accounts page rendered only its content with no NavBar, so navigating to /accounts dropped the sidebar and left the user with no way to move to another page. Wrap the content in the same flex + NavBar + main layout every other signed-in page uses, so the sidebar persists. Add a regression test asserting the accounts page renders the nav landmark. --- apps/frontend/src/app/accounts/page.tsx | 34 +++++++++++-------- .../test/components/AccountsPage.test.tsx | 10 ++++++ 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/apps/frontend/src/app/accounts/page.tsx b/apps/frontend/src/app/accounts/page.tsx index 010a80d3..330a9252 100644 --- a/apps/frontend/src/app/accounts/page.tsx +++ b/apps/frontend/src/app/accounts/page.tsx @@ -1,25 +1,31 @@ 'use client'; import React from 'react'; +import NavBar from '../components/Navbar'; import StaffCard from '../components/StaffCard'; import { facilitationTeam, teamMembers } from './mockUsers'; export default function AccountsPage() { return ( -
-

Accounts

-

Core BRANCH Facilitation Team

-
- {facilitationTeam.map(user => ( - - ))} -
-

BRANCH Team Members

-
- {teamMembers.map(user => ( - - ))} -
+
+ +
+
+

Accounts

+

Core BRANCH Facilitation Team

+
+ {facilitationTeam.map(user => ( + + ))} +
+

BRANCH Team Members

+
+ {teamMembers.map(user => ( + + ))} +
+
+
); } \ No newline at end of file diff --git a/apps/frontend/test/components/AccountsPage.test.tsx b/apps/frontend/test/components/AccountsPage.test.tsx index 2273c25f..9a4ec0be 100644 --- a/apps/frontend/test/components/AccountsPage.test.tsx +++ b/apps/frontend/test/components/AccountsPage.test.tsx @@ -33,4 +33,14 @@ describe('AccountsPage', () => { expect(cards?.length).toBeGreaterThan(0); } }); + + // Regression guard for #300: the accounts page is a signed-in app route, so + // it must keep the sidebar the way every other app page does. It used to + // render only its content with no NavBar, which stranded the user with no + // way to navigate away. + it('renders the sidebar so it persists on the accounts page', () => { + render(); + expect(screen.getByRole('navigation')).toBeInTheDocument(); + expect(screen.getAllByText('BRANCH').length).toBeGreaterThan(0); + }); }); \ No newline at end of file