diff --git a/app/(app)/agents/[agentId]/AgentChatPanel.tsx b/app/(app)/agents/[agentId]/AgentChatPanel.tsx index 8982c4b..a73102b 100644 --- a/app/(app)/agents/[agentId]/AgentChatPanel.tsx +++ b/app/(app)/agents/[agentId]/AgentChatPanel.tsx @@ -343,7 +343,7 @@ export function AgentChatPanel({ return ( - +
@@ -369,7 +369,7 @@ export function AgentChatPanel({
- +
- +
@@ -72,59 +72,41 @@ export function AgentVoiceCallCard({ {AGENT_VOICE_STATE_LABELS[state]}
- {active ?
{duration}
: null}
- + {state === "unavailable" ? ( -

{agentName} has not reported a verified voice gateway and speech provider. Text availability does not enable voice.

+

{agentName} has not reported a verified voice gateway and speech provider. Text availability does not enable voice.

) : null} - {chatMirrorAvailable ? ( - <> -
- - -
-
- - -
- ) : null} -
+
{active ? ( <> - - End call +
+

{agentName}

+

{AGENT_VOICE_STATE_LABELS[state]}

+
+ {duration} + ) : ( <> - - {busy ? AGENT_VOICE_STATE_LABELS[state] : state === "failed" || state === "ended" ? "Retry voice call" : `Call ${agentName}`} - +
+

{agentName}

+

{AGENT_VOICE_STATE_LABELS[state]}

+
)}
+ {chatMirrorAvailable ? ( + <> +
+ + +
+
+ + +
+ ) : null} {error ?

{error}

: null} {remoteAudioStatus ?

{remoteAudioStatus}

: null} {state === "unavailable" ? ( -

+

Pending gateway capability and speech-provider configuration.

) : null} diff --git a/app/(app)/agents/[agentId]/page.tsx b/app/(app)/agents/[agentId]/page.tsx index e72b7b0..779a076 100644 --- a/app/(app)/agents/[agentId]/page.tsx +++ b/app/(app)/agents/[agentId]/page.tsx @@ -240,9 +240,9 @@ export default function AgentDetailPage({ params }: PageProps) { return (
-
- - +
+ +
@@ -250,7 +250,7 @@ export default function AgentDetailPage({ params }: PageProps) {
-
+
{agent.status === "provisioning" || agent.status === "failed" || diff --git a/tests/AgentChatPanel.test.tsx b/tests/AgentChatPanel.test.tsx index a66f03d..4ad77a8 100644 --- a/tests/AgentChatPanel.test.tsx +++ b/tests/AgentChatPanel.test.tsx @@ -159,5 +159,6 @@ describe("AgentChatPanel hibernation policy", () => { expect(screen.getByText("Saved voice turn")).toBeVisible(); expect(screen.getByText("A completed response")).toBeVisible(); expect(screen.queryByText(/responding live/i)).not.toBeInTheDocument(); + expect(screen.getByTestId("desktop-chat-heading")).toHaveClass("hidden", "md:grid"); }); }); diff --git a/tests/AgentVoiceCallCard.test.tsx b/tests/AgentVoiceCallCard.test.tsx index ce5eff0..29755b5 100644 --- a/tests/AgentVoiceCallCard.test.tsx +++ b/tests/AgentVoiceCallCard.test.tsx @@ -35,7 +35,9 @@ describe("AgentVoiceCallCard", () => { const call = screen.getByRole("button", { name: "Call Bragi" }); expect(call).toHaveClass("size-12", "rounded-full", "bg-emerald-600"); expect(call).toHaveAttribute("title", "Call Bragi"); - expect(screen.getAllByText("Call Bragi").length).toBeGreaterThan(0); + expect(screen.getByTestId("desktop-voice-heading")).toHaveClass("hidden"); + expect(screen.getByTestId("mobile-voice-header")).toHaveTextContent("BragiReady for voice"); + expect(screen.getByTestId("mobile-voice-header")).not.toHaveTextContent("Call Bragi"); }); it("shows a compact connecting indicator without a large action label", () => { @@ -76,5 +78,6 @@ describe("AgentVoiceCallCard", () => { expect(screen.getByRole("button", { name: "End call" })).toBeVisible(); expect(screen.getByRole("button", { name: "End call" })).toHaveClass("size-12", "rounded-full", "bg-red-600"); expect(screen.getByText("Call settings")).toBeVisible(); + expect(screen.getByTestId("mobile-voice-header")).toHaveTextContent("BragiVoice call in progress01:05"); }); });