From 1d31286904a6e1f17fecf0b9c9590f6a142ebab5 Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Fri, 16 Oct 2026 14:00:24 -0400 Subject: [PATCH] fix(mobile): navigate to activity sessions from the More drawer The activity row navigated and then called onClose, whose mobileTab-only replace navigation resolved against the pre-navigation location and overwrote the new route. Navigating alone drops mobileTab, which closes the drawer without discarding the destination. --- frontend/src/components/navigation/MoreDrawer.test.tsx | 4 ++-- frontend/src/components/navigation/MoreDrawer.tsx | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/navigation/MoreDrawer.test.tsx b/frontend/src/components/navigation/MoreDrawer.test.tsx index 95048ef7..34752591 100644 --- a/frontend/src/components/navigation/MoreDrawer.test.tsx +++ b/frontend/src/components/navigation/MoreDrawer.test.tsx @@ -346,7 +346,7 @@ describe('MoreDrawer', () => { expect(screen.queryByText('Session s1')).not.toBeInTheDocument() }) - it('navigates to the activity item and closes the drawer when a row is clicked', () => { + it('navigates to the activity item without a close that would replace the new route', () => { const navigateMock = vi.fn() vi.mocked(useNavigate).mockReturnValue(navigateMock) mockAuth() @@ -358,6 +358,6 @@ describe('MoreDrawer', () => { fireEvent.click(screen.getByRole('button', { name: /Session s1/ })) expect(navigateMock).toHaveBeenCalledWith('/repos/1/sessions/s1') - expect(handleClose).toHaveBeenCalled() + expect(handleClose).not.toHaveBeenCalled() }) }) diff --git a/frontend/src/components/navigation/MoreDrawer.tsx b/frontend/src/components/navigation/MoreDrawer.tsx index 690aef2b..fd82c588 100644 --- a/frontend/src/components/navigation/MoreDrawer.tsx +++ b/frontend/src/components/navigation/MoreDrawer.tsx @@ -185,12 +185,7 @@ export function MoreDrawer({ isOpen, onClose }: MoreDrawerProps) { {isOpen && ( - { - navigate(path) - onClose() - }} - /> + navigate(path)} /> )} {isSessionDetail && (