From abd3892731cac572da8074f27ba9c4ca1ca75430 Mon Sep 17 00:00:00 2001 From: Danielle Ali <44468613+dmariali@users.noreply.github.com> Date: Mon, 13 Jul 2026 16:58:31 -0400 Subject: [PATCH 1/6] feat(studio): coding agent adjust layout Signed-off-by: Danielle Ali <44468613+dmariali@users.noreply.github.com> --- .../Layouts/GlobalNav/index.test.tsx | 58 ++++++++++++- .../components/Layouts/GlobalNav/index.tsx | 42 +++++++-- .../ClaudeCodeHistoryPanel.test.tsx | 47 ++++++++-- .../ClaudeCodeHistoryPanel.tsx | 85 ++++++++----------- .../ClaudeCodeChatRoute/ClaudeCodeLayout.tsx | 2 +- .../historyPanel/ClaudeCodeArtifactsPane.tsx | 5 +- .../historyPanel/FloatingPanel.tsx | 38 +++++++++ .../historyPanel/constants.tsx | 26 ------ .../historyPanel/helpers.ts | 4 - .../ClaudeCodeChatRoute/historyPanel/types.ts | 2 - .../studio/src/util/hooks/useSidebarState.ts | 7 +- web/packages/studio/src/util/localStorage.ts | 1 - 12 files changed, 217 insertions(+), 100 deletions(-) create mode 100644 web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/FloatingPanel.tsx delete mode 100644 web/packages/studio/src/routes/agents/ClaudeCodeChatRoute/historyPanel/constants.tsx diff --git a/web/packages/studio/src/components/Layouts/GlobalNav/index.test.tsx b/web/packages/studio/src/components/Layouts/GlobalNav/index.test.tsx index 9a6e6e64a1..eab980271d 100644 --- a/web/packages/studio/src/components/Layouts/GlobalNav/index.test.tsx +++ b/web/packages/studio/src/components/Layouts/GlobalNav/index.test.tsx @@ -6,7 +6,7 @@ import { mockUseParams } from '@studio/tests/util/mockUseParams'; import { SIDE_NAV_OPEN_KEY } from '@studio/util/localStorage'; import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { generatePath, MemoryRouter } from 'react-router-dom'; +import { createMemoryRouter, generatePath, MemoryRouter, RouterProvider } from 'react-router-dom'; vi.mock('@studio/components/Breadcrumbs', () => ({ Breadcrumbs: () =>
, @@ -89,6 +89,62 @@ describe('GlobalNav', () => { expect(screen.getByText('NeMo Studio')).toBeInTheDocument(); }); + it('starts collapsed on the Code Agent route when no preference is saved', async () => { + createMatchMediaMock(true); + + await renderGlobalNav( + generatePath(ROUTES.workspace.claudeCodeChat, { workspace: 'test-workspace' }) + ); + + expect(screen.getByRole('button', { name: 'Expand sidebar' })).toBeInTheDocument(); + expect(screen.queryByText('NeMo Studio')).not.toBeInTheDocument(); + }); + + it('respects a saved expanded preference on the Code Agent route', async () => { + localStorage.setItem(SIDE_NAV_OPEN_KEY, JSON.stringify('true')); + createMatchMediaMock(true); + + await renderGlobalNav( + generatePath(ROUTES.workspace.claudeCodeChat, { workspace: 'test-workspace' }) + ); + + expect(screen.getByRole('button', { name: 'Collapse sidebar' })).toBeInTheDocument(); + expect(screen.getByText('NeMo Studio')).toBeInTheDocument(); + }); + + it('uses the Code Agent default during in-app navigation', async () => { + createMatchMediaMock(true); + const { GlobalNav } = await import('@studio/components/Layouts/GlobalNav/index'); + const router = createMemoryRouter( + [ + { + path: '*', + element: ( +