diff --git a/frontend/src/v2/__tests__/V2AgentSettingsPage.test.tsx b/frontend/src/v2/__tests__/V2AgentSettingsPage.test.tsx index 1612b48a1..6eeae4d67 100644 --- a/frontend/src/v2/__tests__/V2AgentSettingsPage.test.tsx +++ b/frontend/src/v2/__tests__/V2AgentSettingsPage.test.tsx @@ -348,7 +348,7 @@ test('a partial installation owner cannot see identity-wide key controls', async renderPage(); expect(await screen.findByRole('heading', { name: 'Policy' })).toBeInTheDocument(); expect(await screen.findByText('Key management is unavailable for this agent. Ask an admin for access.')).toBeInTheDocument(); - expect(screen.getByRole('heading', { name: 'Pods' })).toBeInTheDocument(); + expect(screen.getByRole('columnheader', { name: 'Pods' })).toBeInTheDocument(); expect(screen.queryByRole('button', { name: 'Regenerate key' })).not.toBeInTheDocument(); expect(screen.queryByText('Laptop')).not.toBeInTheDocument(); expect(axios.get.mock.calls.some(([url]) => url === '/api/agent-memory/maya-claude/default')).toBe(false); diff --git a/frontend/src/v2/__tests__/V2AgentWakePods.test.tsx b/frontend/src/v2/__tests__/V2AgentWakePods.test.tsx index dce2de0c2..b59d17c49 100644 --- a/frontend/src/v2/__tests__/V2AgentWakePods.test.tsx +++ b/frontend/src/v2/__tests__/V2AgentWakePods.test.tsx @@ -188,12 +188,12 @@ describe('per-agent Wake and Pods settings', () => { view.rerender( , ); - expect((await screen.findAllByText('New pod')).length).toBe(2); + expect((await screen.findAllByText('New pod')).length).toBe(1); await act(async () => { finishOld({ data: { installations: [{ podId: 'pod-old', podName: 'Old pod', wakeOnMessage: true, boardWake: true, heartbeatMinutes: 60, }] } }); }); expect(screen.queryByText('Old pod')).not.toBeInTheDocument(); - expect(screen.getAllByText('New pod')).toHaveLength(2); + expect(screen.getByText('New pod')).toBeInTheDocument(); }); it('previews heartbeat turns against the plan cap before saving', async () => { diff --git a/frontend/src/v2/__tests__/v2-layout-invariants.test.ts b/frontend/src/v2/__tests__/v2-layout-invariants.test.ts index e6920c50f..65c3dd300 100644 --- a/frontend/src/v2/__tests__/v2-layout-invariants.test.ts +++ b/frontend/src/v2/__tests__/v2-layout-invariants.test.ts @@ -5053,8 +5053,8 @@ describe('GitHub gig card fits the chat column', () => { describe('agent Wake and Pods controls', () => { const css = read('../agents/v2-agent-wake-pods.css'); test('action buttons keep a visible surface over the v2 button reset', () => { - const save = ruleBody(css, '.v2-agent-settings .v2-agent-wake-pods .v2-agent-wake-pods__pod > button'); - const remove = ruleBody(css, '.v2-agent-settings .v2-agent-wake-pods .v2-agent-wake-pods__pod-row button'); + const save = ruleBody(css, '.v2-agent-settings .v2-agent-wake-pods .v2-agent-wake-pods__pod button'); + const remove = ruleBody(css, '.v2-agent-settings .v2-agent-wake-pods .v2-agent-wake-pods__remove'); expect(save).toContain('background: var(--v2-surface)'); expect(remove).toContain('background: var(--v2-surface)'); expect(remove).toContain('border: 1px solid var(--v2-border)'); @@ -5065,6 +5065,15 @@ describe('agent Wake and Pods controls', () => { expect(segment).toContain('display: flex'); expect(segment).toContain('flex-wrap: wrap'); }); + + it('keeps the settings header on one row with the tabs at its end', () => { + const css = fs.readFileSync(path.join(__dirname, '../agents/v2-agent-settings.css'), 'utf8'); + const head = ruleBody(css, '.v2-agent-settings__head'); + expect(head).toContain('display: flex'); + expect(head).toContain('align-items: center'); + expect(ruleBody(css, '.v2-agent-settings__head .v2-agent-settings__seg')).toContain('margin-left: auto'); + expect(ruleBody(css, '.v2-agent-settings__head .v2-agent-settings__seg [aria-current="page"]')).toContain('border-bottom: 0'); + }); }); describe('agent runtime and grants fit the Settings column', () => { diff --git a/frontend/src/v2/agents/V2AgentSettingsPage.tsx b/frontend/src/v2/agents/V2AgentSettingsPage.tsx index d6439d6b1..11e6cc1f4 100644 --- a/frontend/src/v2/agents/V2AgentSettingsPage.tsx +++ b/frontend/src/v2/agents/V2AgentSettingsPage.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; import { Link, useParams } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import axios from '../../utils/axiosConfig'; -import V2PageHead from '../components/V2PageHead'; +import V2Avatar from '../components/V2Avatar'; import V2AgentRuntimeGrants, { Runtime } from '../components/V2AgentRuntimeGrants'; import { AgentControlLoader } from '../components/V2AgentControlSection'; import { AgentConnection } from '../utils/agentConnection'; @@ -254,13 +254,18 @@ const V2AgentSettingsPage: React.FC = () => { return (
- {t('agentSettings.yourTeam')}} /> -
-