fix: show View Update link when package name is empty; cross-link Agent+Update in command history
ChatTimeline: when updateLink exists but packageName is falsy, show 'View Update' instead of hiding the link entirely. Updates: clickable Agent/Update links in command history rows (UI-AGENT-UPDATE-CROSSLINKING).
This commit is contained in:
parent
8811ec9100
commit
5a284f1370
2 changed files with 19 additions and 5 deletions
|
|
@ -798,14 +798,14 @@ const ChatTimeline: React.FC<ChatTimelineProps> = ({ agentId, className, isScope
|
|||
<span className="text-gray-500"> (Exit Code: {entry.exit_code})</span>
|
||||
)}
|
||||
</span>
|
||||
{packageName && updateLink && (
|
||||
{updateLink && (
|
||||
<span>
|
||||
<span className="font-medium">Package:</span>{' '}
|
||||
<Link
|
||||
to={updateLink}
|
||||
className="text-green-700 hover:text-green-900 hover:underline"
|
||||
>
|
||||
{packageName}
|
||||
{packageName || 'View Update'}
|
||||
</Link>
|
||||
</span>
|
||||
)}
|
||||
|
|
@ -1110,13 +1110,13 @@ const ChatTimeline: React.FC<ChatTimelineProps> = ({ agentId, className, isScope
|
|||
{entry.hostname || 'View Agent'}
|
||||
</Link>
|
||||
|
||||
{packageName && updateLink && (
|
||||
{updateLink && (
|
||||
<Link
|
||||
to={updateLink}
|
||||
className="inline-flex items-center px-2.5 py-1.5 bg-green-50 text-green-700 rounded-md hover:bg-green-100 transition-colors font-medium"
|
||||
>
|
||||
<Package className="h-3 w-3 mr-1" />
|
||||
{packageName}
|
||||
{packageName || 'View Update'}
|
||||
</Link>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import { useParams, useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import { useParams, useNavigate, useSearchParams, Link } from 'react-router-dom';
|
||||
import {
|
||||
Package,
|
||||
CheckCircle,
|
||||
|
|
@ -1017,6 +1017,20 @@ const Updates: React.FC = () => {
|
|||
<span className="text-sm text-gray-900 font-mono truncate flex-1">
|
||||
{cmd.command_type}
|
||||
</span>
|
||||
<Link
|
||||
to={`/agents/${cmd.agent_id}`}
|
||||
className="text-xs text-blue-600 hover:text-blue-800 hover:underline flex-shrink-0"
|
||||
>
|
||||
Agent
|
||||
</Link>
|
||||
{cmd.params?.update_id && (
|
||||
<Link
|
||||
to={`/updates/${cmd.params.update_id}`}
|
||||
className="text-xs text-green-600 hover:text-green-800 hover:underline flex-shrink-0"
|
||||
>
|
||||
Update
|
||||
</Link>
|
||||
)}
|
||||
{cmd.is_retry && (
|
||||
<span className="text-xs text-amber-700 inline-flex items-center gap-1">
|
||||
<RotateCcw className="h-3 w-3" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue