Skip to content

Commit f1663c8

Browse files
committed
fix: don't overflow so much
1 parent 52bf4b8 commit f1663c8

3 files changed

Lines changed: 25 additions & 14 deletions

File tree

frontend/src/components/AgentStatus.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ export function AgentStatus() {
165165
className="border rounded-lg p-4 space-y-3"
166166
>
167167
{/* Agent Header */}
168-
<div className="flex items-center justify-between">
169-
<div className="font-mono text-sm font-semibold">{agent.agent_id}</div>
170-
<Badge className={getStateColor(agent.conn_state)}>
168+
<div className="flex items-center justify-between gap-2">
169+
<div className="font-mono text-sm font-semibold truncate min-w-0" title={agent.agent_id}>{agent.agent_id}</div>
170+
<Badge className={`${getStateColor(agent.conn_state)} shrink-0`}>
171171
{agent.conn_state}
172172
</Badge>
173173
</div>
174174

175175
{/* Pool Target */}
176-
<div className="text-xs text-muted-foreground">
176+
<div className="text-xs text-muted-foreground truncate" title={`${agent.pool_target.host}:${agent.pool_target.port}`}>
177177
Pool: {agent.pool_target.host}:{agent.pool_target.port}
178178
</div>
179179

frontend/src/components/MessageTable.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ export function MessageTable({ messages, selectedMessageId, onSelectMessage, new
7878
<CardContent className="p-0 flex-1 overflow-hidden">
7979
<div className="overflow-auto h-full w-full">
8080
<table className="w-full text-sm table-fixed">
81+
<colgroup>
82+
{showSessionColumn && <col className="w-[140px]" />}
83+
<col className="w-[120px]" />
84+
<col className="w-[130px]" />
85+
<col className="w-[190px]" />
86+
<col className="w-[48px]" />
87+
<col />
88+
<col className="w-[56px]" />
89+
<col className="w-[72px]" />
90+
<col className="w-[80px]" />
91+
</colgroup>
8192
<thead className="bg-muted sticky top-0 z-10">
8293
<tr>
8394
{showSessionColumn && (
@@ -117,9 +128,9 @@ export function MessageTable({ messages, selectedMessageId, onSelectMessage, new
117128
)}
118129
<td className="p-3 font-mono text-xs">{formatTime(message.ts_recv)}</td>
119130
<td className="p-3">{getDirectionBadge(message.direction)}</td>
120-
<td className="p-3 font-mono">{getMethod(message)}</td>
121-
<td className="p-3 font-mono text-xs">{getMessageId(message)}</td>
122-
<td className="p-3 font-mono text-xs max-w-xs overflow-hidden">
131+
<td className="p-3 font-mono truncate" title={getMethod(message)}>{getMethod(message)}</td>
132+
<td className="p-3 font-mono text-xs truncate">{getMessageId(message)}</td>
133+
<td className="p-3 font-mono text-xs truncate" title={JSON.stringify(message.decoded?.params || message.decoded?.result) ?? undefined}>
123134
{truncate(
124135
JSON.stringify(message.decoded?.params || message.decoded?.result),
125136
50

frontend/src/components/SessionList.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,22 +170,22 @@ export function SessionList({ sessions, selectedSessionId, onSelectSession, onSe
170170
)}
171171

172172
{/* Peer IP:Port and Message Count */}
173-
<div className="flex items-center justify-between mb-1">
174-
<span className="font-mono text-xs opacity-90">
173+
<div className="flex items-center justify-between gap-2 mb-1">
174+
<span className="font-mono text-xs opacity-90 truncate min-w-0" title={session.peer}>
175175
{session.peer}
176176
</span>
177-
<Badge variant="secondary">{session.message_count}</Badge>
177+
<Badge variant="secondary" className="shrink-0">{session.message_count}</Badge>
178178
</div>
179179

180180
{/* Pool Connection Status */}
181181
{session.pool_host && (
182182
<div className="mt-2 pt-2 border-t">
183183
<div className="text-xs font-medium mb-1">Target Pool:</div>
184-
<div className="flex items-center justify-between">
185-
<span className="font-mono text-xs opacity-90">
184+
<div className="flex items-center justify-between gap-2">
185+
<span className="font-mono text-xs opacity-90 truncate min-w-0" title={`${session.pool_host}:${session.pool_port}`}>
186186
{session.pool_host}:{session.pool_port}
187187
</span>
188-
<div className="flex items-center gap-2">
188+
<div className="flex items-center gap-2 shrink-0">
189189
<Badge
190190
variant={session.pool_connected ? "default" : "destructive"}
191191
className={session.pool_connected ? "bg-green-600" : "bg-red-600"}
@@ -207,7 +207,7 @@ export function SessionList({ sessions, selectedSessionId, onSelectSession, onSe
207207
</div>
208208
</div>
209209
{session.pool_peer && session.pool_connected && (
210-
<div className="text-xs opacity-75 mt-1">
210+
<div className="text-xs opacity-75 mt-1 truncate" title={`→ ${session.pool_peer}`}>
211211
{session.pool_peer}
212212
</div>
213213
)}

0 commit comments

Comments
 (0)