From da5a9ebabfc34c79eab519c1c4f4eac37c557b9d Mon Sep 17 00:00:00 2001
From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com>
Date: Sun, 25 Oct 2026 19:27:05 -0400
Subject: [PATCH] fix(frontend): collapse the linked-server project header when
a tool panel is docked
---
.../components/repo/RemoteMultiRunButton.tsx | 12 ++++++---
.../schedules/RemoteSchedulesButton.tsx | 6 ++---
frontend/src/pages/RemoteProject.tsx | 26 +++++--------------
.../pages/__tests__/RemoteProject.test.tsx | 10 ++++++-
4 files changed, 28 insertions(+), 26 deletions(-)
diff --git a/frontend/src/components/repo/RemoteMultiRunButton.tsx b/frontend/src/components/repo/RemoteMultiRunButton.tsx
index 2ba6e834..a9600115 100644
--- a/frontend/src/components/repo/RemoteMultiRunButton.tsx
+++ b/frontend/src/components/repo/RemoteMultiRunButton.tsx
@@ -35,9 +35,15 @@ export function RemoteMultiRunButton({ serverId, directory }: { serverId: string
return (
<>
-
-
+
{title}
-
+
{server?.name ?? 'Linked server'}
{branch ? (
-
+
{branch}
@@ -95,31 +95,19 @@ function RemoteProjectContent({ serverId, directory }: { serverId: string; direc
<>
-
- {createSession.isPending ? (
-
- ) : (
-
- )}
- New Session
-
{createSession.isPending ? (
-
+
) : (
-
+
)}
+ New Session
>
) : null}
diff --git a/frontend/src/pages/__tests__/RemoteProject.test.tsx b/frontend/src/pages/__tests__/RemoteProject.test.tsx
index ca6c15c0..785b91ab 100644
--- a/frontend/src/pages/__tests__/RemoteProject.test.tsx
+++ b/frontend/src/pages/__tests__/RemoteProject.test.tsx
@@ -155,7 +155,7 @@ describe('RemoteProject', () => {
})
renderProject()
- fireEvent.click(screen.getAllByRole('button', { name: 'New Session' })[0])
+ fireEvent.click(screen.getByRole('button', { name: 'New Session' }))
await waitFor(() => {
expect(screen.getByTestId('session-route')).toBeInTheDocument()
@@ -163,6 +163,14 @@ describe('RemoteProject', () => {
expect(mocks.useCreateSession).toHaveBeenCalledWith('/home/me/app')
})
+ it('exposes the header actions with a single accessible name each', async () => {
+ renderProject()
+
+ expect(await screen.findByRole('button', { name: 'Schedules for /home/me/app' })).toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'Multi-run' })).toBeInTheDocument()
+ expect(screen.getByRole('button', { name: 'New Session' })).toBeInTheDocument()
+ })
+
it('shows a missing-directory state without rendering the session list', async () => {
renderProject('/servers/srv_kitchen/projects')