From 4d58a8c722e6f757a477bf3544e82d3c87f8a18d Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 30 Oct 2025 16:24:13 +0000 Subject: [PATCH 1/4] Fix conversation list UI issues - Fix conversation list vertical cutoff by increasing max-height from 384px to 600px - Fix status field mapping from agent_status to status in ConversationInfo interface - Fix agent name display by using agent.kind instead of agent.name for Agent-Output schema - Update AgentExecutionStatus enum to match API schema (add waiting_for_confirmation and stuck) - Update status color classes and icons for new status values - Update AgentBase interface to use kind as primary field with name as fallback Co-authored-by: openhands --- example/src/components/ConversationManager.tsx | 17 +++++++++++------ example/src/utils/serverStatus.ts | 2 +- src/models/conversation.ts | 2 ++ src/types/base.ts | 6 +++++- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/example/src/components/ConversationManager.tsx b/example/src/components/ConversationManager.tsx index 27bb796..dedf070 100644 --- a/example/src/components/ConversationManager.tsx +++ b/example/src/components/ConversationManager.tsx @@ -172,7 +172,8 @@ export const ConversationManager: React.FC = () => { agent: conv.agent, created_at: conv.created_at, updated_at: conv.updated_at, - status: conv.status + // Map agent_status to status for display + status: conv.agent_status || conv.status })); setConversations(conversationData); @@ -192,7 +193,7 @@ export const ConversationManager: React.FC = () => { try { // Create a simple agent configuration const agent: AgentBase = { - name: 'CodeActAgent', + kind: 'Agent', llm: { model: settings.modelName, api_key: settings.apiKey || '' @@ -388,16 +389,18 @@ export const ConversationManager: React.FC = () => { }; const getAgentName = (agent: AgentBase) => { - return agent.name || 'Unknown Agent'; + return agent.kind || agent.name || 'Unknown Agent'; }; const getStatusColorClass = (status?: string) => { switch (status) { case 'running': return 'text-green-500'; - case 'stopped': return 'text-red-500'; + case 'idle': return 'text-gray-500'; case 'paused': return 'text-orange-500'; + case 'waiting_for_confirmation': return 'text-yellow-500'; case 'finished': return 'text-blue-500'; case 'error': return 'text-red-600'; + case 'stuck': return 'text-red-500'; default: return 'text-gray-500'; } }; @@ -405,10 +408,12 @@ export const ConversationManager: React.FC = () => { const getStatusIcon = (status?: string) => { switch (status) { case 'running': return '🔄'; - case 'stopped': return 'âšī¸'; + case 'idle': return 'â¸ī¸'; case 'paused': return 'â¸ī¸'; + case 'waiting_for_confirmation': return 'âŗ'; case 'finished': return '✅'; case 'error': return '❌'; + case 'stuck': return 'đŸšĢ'; default: return '❓'; } }; @@ -455,7 +460,7 @@ export const ConversationManager: React.FC = () => {

No conversations yet. Create your first conversation!

) : ( -
+
{conversations.map((conversation) => (
Date: Thu, 30 Oct 2025 16:30:31 +0000 Subject: [PATCH 2/4] Remove agent name from UI - Remove agent name display from conversation list items - Remove agent name from conversation details section - Remove unused getAgentName function - Clean up UI to focus on more relevant information Co-authored-by: openhands --- example/src/components/ConversationManager.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/example/src/components/ConversationManager.tsx b/example/src/components/ConversationManager.tsx index dedf070..e78c13f 100644 --- a/example/src/components/ConversationManager.tsx +++ b/example/src/components/ConversationManager.tsx @@ -388,10 +388,6 @@ export const ConversationManager: React.FC = () => { return new Date(dateString).toLocaleString(); }; - const getAgentName = (agent: AgentBase) => { - return agent.kind || agent.name || 'Unknown Agent'; - }; - const getStatusColorClass = (status?: string) => { switch (status) { case 'running': return 'text-green-500'; @@ -476,7 +472,6 @@ export const ConversationManager: React.FC = () => { ID: {conversation.id.substring(0, 8)}...
-
Agent: {getAgentName(conversation.agent)}
Created: {formatDate(conversation.created_at)}
Status: @@ -524,10 +519,7 @@ export const ConversationManager: React.FC = () => { {getStatusIcon(selectedConversation.status)} {selectedConversation.status || 'unknown'}
-
- Agent: - {getAgentName(selectedConversation.agent)} -
+
Model: {selectedConversation.agent.llm?.model || 'Unknown'} From 0dab6d875b6a59e6ce6eca6f33df74b22319e468 Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 30 Oct 2025 16:34:15 +0000 Subject: [PATCH 3/4] Left align conversation details in list items - Add text-left class to conversation content container - Ensures all conversation details (ID, Created date, Status) are left-aligned - Improves visual consistency and readability Co-authored-by: openhands --- example/src/components/ConversationManager.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/src/components/ConversationManager.tsx b/example/src/components/ConversationManager.tsx index e78c13f..8a78990 100644 --- a/example/src/components/ConversationManager.tsx +++ b/example/src/components/ConversationManager.tsx @@ -467,7 +467,7 @@ export const ConversationManager: React.FC = () => { }`} onClick={() => selectConversation(conversation.id)} > -
+
ID: {conversation.id.substring(0, 8)}...
From 606630add61aa1f236c44daa3aca6519c6bf13e2 Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 30 Oct 2025 16:38:12 +0000 Subject: [PATCH 4/4] Remove duplicate status field display - Remove duplicate 'Agent Status' field from conversation details - Consolidate to single 'Status' field that shows agent_status - Update all status refresh logic to use unified status field - Remove unused agentStatus from ConversationData interface - Clean up unused AgentExecutionStatus import - Eliminates confusing duplicate status information in UI Co-authored-by: openhands --- .../src/components/ConversationManager.tsx | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/example/src/components/ConversationManager.tsx b/example/src/components/ConversationManager.tsx index 8a78990..9541bfd 100644 --- a/example/src/components/ConversationManager.tsx +++ b/example/src/components/ConversationManager.tsx @@ -4,7 +4,6 @@ import { ConversationInfo, RemoteConversation, AgentBase, - AgentExecutionStatus, Event } from '@openhands/agent-server-typescript-client'; import { useSettings } from '../contexts/SettingsContext'; @@ -12,7 +11,6 @@ import { useSettings } from '../contexts/SettingsContext'; interface ConversationData extends ConversationInfo { remoteConversation?: RemoteConversation; events?: Event[]; - agentStatus?: AgentExecutionStatus; } // Utility function to extract displayable content from events @@ -136,7 +134,7 @@ export const ConversationManager: React.FC = () => { const status = await selectedConversation.remoteConversation!.state.getAgentStatus(); setConversations(prev => prev.map(conv => conv.id === selectedConversation.id - ? { ...conv, agentStatus: status } + ? { ...conv, status: status } : conv )); } catch (err) { @@ -146,13 +144,13 @@ export const ConversationManager: React.FC = () => { // Refresh every 2 seconds if the agent is running const interval = setInterval(() => { - if (selectedConversation.agentStatus === 'running') { + if (selectedConversation.status === 'running') { refreshStatus(); } }, 2000); return () => clearInterval(interval); - }, [selectedConversation?.id, selectedConversation?.agentStatus]); + }, [selectedConversation?.id, selectedConversation?.status]); const loadConversations = async (conversationManager?: SDKConversationManager) => { const mgr = conversationManager || manager; @@ -313,7 +311,7 @@ export const ConversationManager: React.FC = () => { remoteConversation.state.getAgentStatus().then(status => { setConversations(prev => prev.map(conv => conv.id === conversationId - ? { ...conv, agentStatus: status } + ? { ...conv, status: status } : conv )); }).catch(err => console.warn('Failed to update agent status:', err)); @@ -353,7 +351,7 @@ export const ConversationManager: React.FC = () => { // Update the conversation in our state with additional details setConversations(prev => prev.map(conv => conv.id === conversationId - ? { ...conv, remoteConversation, events, agentStatus } + ? { ...conv, remoteConversation, events, status: agentStatus } : conv )); @@ -532,12 +530,7 @@ export const ConversationManager: React.FC = () => { Updated: {formatDate(selectedConversation.updated_at)}
- {selectedConversation.agentStatus && ( -
- Agent Status: - {selectedConversation.agentStatus} -
- )} +
Total Events: {selectedConversation.events?.length || 0}