diff --git a/ui/src/components/AgentConfigForm.render.test.tsx b/ui/src/components/AgentConfigForm.render.test.tsx index 2e977b1281a..760012f0666 100644 --- a/ui/src/components/AgentConfigForm.render.test.tsx +++ b/ui/src/components/AgentConfigForm.render.test.tsx @@ -398,12 +398,18 @@ describe("AgentConfigForm environment selector", () => { expect(result.container.textContent).toContain("Advanced runtime"); expect(result.container.textContent).toContain("runtime adapter fields"); - expect(runtime?.compareDocumentPosition(environment as Node) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy(); + expect((runtime?.compareDocumentPosition(environment as Node) ?? 0) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy(); expect(runtime?.textContent).not.toContain("Environment variables"); expect(runtime?.textContent).not.toContain("Working directory (deprecated)"); expect(environment?.parentElement?.textContent).toContain("Environment variables"); expect(danger?.textContent).toContain("danger adapter fields"); expect(danger?.textContent).toContain("Working directory (deprecated)"); + expect([...result.container.querySelectorAll("h2")].map((heading) => heading.textContent?.trim())).toEqual([ + "Runtime", + "Environment", + "Schedule & Runs", + "Danger & Legacy", + ]); }); it("keeps an existing non-runnable override visible so it can be cleared", async () => { diff --git a/ui/src/components/AgentConfigForm.tsx b/ui/src/components/AgentConfigForm.tsx index 5dbeee42a59..4ea378f0856 100644 --- a/ui/src/components/AgentConfigForm.tsx +++ b/ui/src/components/AgentConfigForm.tsx @@ -968,6 +968,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) { MAX_TURN_CONTINUATION_MAX_DELAY_SEC, ); const configurationShell = props.configurationShell === true; + const CardSectionHeading = configurationShell ? "h2" : "h3"; const sectionVisible = (section: string) => !props.identityOnly && (!props.visibleConfigurationSections || props.visibleConfigurationSections.has(section)); const advancedRuntimeKeys = [ @@ -1100,7 +1101,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) { {sectionVisible("runtime") &&
{cards - ?

{configurationShell ? "Runtime" : "Adapter"}

+ ? {configurationShell ? "Runtime" : "Adapter"} : Adapter } {showInlineAdapterTestEnvironmentButton && ( @@ -1480,7 +1481,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) { // Render the environment read-only instead of the selectable picker.
{cards - ?

Environment

+ ? Environment :
Environment
}
@@ -1505,7 +1506,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) { ) : showEnvironmentOverrideControl ? (
{cards - ?

Environment

+ ? Environment :
Environment
}
@@ -1572,7 +1573,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) { {sectionVisible("schedule") && (isCreate && showCreateRunPolicySection ? (
{cards - ?

{configurationShell ? "Schedule & Runs" : "Run Policy"}

+ ? {configurationShell ? "Schedule & Runs" : "Run Policy"} :
Run Policy
}
@@ -1593,7 +1594,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) { ) : !isCreate ? (
{cards - ?

{configurationShell ? "Schedule & Runs" : "Run Policy"}

+ ? {configurationShell ? "Schedule & Runs" : "Run Policy"} :
Run Policy
}
@@ -1696,7 +1697,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) { {configurationShell && sectionVisible("danger") && (
-

Danger & Legacy

+ Danger & Legacy
{hasAdapterDangerFields ? ( diff --git a/ui/src/components/agent-configuration-shell.tsx b/ui/src/components/agent-configuration-shell.tsx index da58b23b6aa..b061e96c7a3 100644 --- a/ui/src/components/agent-configuration-shell.tsx +++ b/ui/src/components/agent-configuration-shell.tsx @@ -102,7 +102,7 @@ export function AgentConfigurationRail({ const shown = agentConfigurationSections.filter((section) => visibleSections.has(section.id)); return ( <> -
+
-