Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat: add agent ID copy buttons
Adam Eivyfa5e7dae276a
diff --git a/.changelog/next/added-agent-3e585df7.md b/.changelog/next/added-agent-3e585df7.mdnew file mode 100644index 0000000000..96dd20191f--- /dev/null+++ b/.changelog/next/added-agent-3e585df7.md@@ -0,0 +1 @@+- Add copy buttons for agent IDs on active and historical agent cardsdiff --git a/client/src/components/cos/tabs/AgentCard.jsx b/client/src/components/cos/tabs/AgentCard.jsxindex b3d7afda7f..56d014c50a 100644--- a/client/src/components/cos/tabs/AgentCard.jsx+++ b/client/src/components/cos/tabs/AgentCard.jsx@@ -22,7 +22,8 @@ import {GitBranch,GitPullRequest,Sparkles,- RefreshCw+ RefreshCw,+ Copy} from 'lucide-react';import * as api from '../../../services/api';import OutputBlocks from '../OutputBlocks';@@ -402,6 +403,18 @@ export default function AgentCard({ agent, onPause, onKill, onDelete, onResume,<div className="flex items-center gap-2 flex-wrap min-w-0 flex-1"><Cpu size={16} aria-hidden="true" className={`shrink-0 ${inactive ? 'text-gray-500' : 'text-port-accent animate-pulse'}`} /><span className="font-mono text-sm text-gray-400 truncate">{agent.id}</span>+ <button+ type="button"+ onClick={(event) => {+ event.stopPropagation();+ copyToClipboard(agent.id, 'Agent ID copied to clipboard');+ }}+ className="p-1 rounded text-gray-500 hover:bg-port-border/60 hover:text-white transition-colors shrink-0"+ title="Copy agent ID"+ aria-label="Copy agent ID"+ >+ <Copy size={13} aria-hidden="true" />+ </button>{remote && peerName && (<span className="px-1.5 py-0.5 text-xs bg-port-accent/20 text-port-accent rounded shrink-0" title={`Remote agent on ${peerName}`}>{peerName}diff --git a/client/src/components/cos/tabs/AgentCard.test.jsx b/client/src/components/cos/tabs/AgentCard.test.jsxindex 1d4ca31900..68df107d27 100644--- a/client/src/components/cos/tabs/AgentCard.test.jsx+++ b/client/src/components/cos/tabs/AgentCard.test.jsx@@ -14,6 +14,11 @@ vi.mock('../../ui/Toast', () => ({default: { success: vi.fn(), error: vi.fn() },}));+const copyToClipboard = vi.fn();+vi.mock('../../../lib/clipboard', () => ({+ copyToClipboard: (...args) => copyToClipboard(...args),+}));+import * as api from '../../../services/api';import AgentCard from './AgentCard';@@ -163,6 +168,25 @@ describe('AgentCard feedback', () => {});});+describe('AgentCard agent ID', () => {+ it.each([+ ['active', { ...agent, status: 'running', completedAt: null }],+ ['historical', agent],+ ])('copies the full ID from the %s card', async (_label, cardAgent) => {+ const user = userEvent.setup();++ render(+ <MemoryRouter>+ <AgentCard agent={cardAgent} completed={cardAgent.status === 'completed'} />+ </MemoryRouter>+ );++ await user.click(screen.getByRole('button', { name: 'Copy agent ID' }));++ expect(copyToClipboard).toHaveBeenCalledWith(cardAgent.id, 'Agent ID copied to clipboard');+ });+});+describe('AgentCard transcript truncation (#3498)', () => {it('says the transcript was clipped when the server returns a capped tail', async () => {const user = userEvent.setup();