2026-04-27 14:36:14 +00:00
|
|
|
|
<!-- ========================================================================== -->
|
|
|
|
|
|
<!-- AgentCard — per spec Section 7.3 -->
|
|
|
|
|
|
<!-- Integrates: Status Badge · Task Progress Bar · Quick‑Jump Button -->
|
|
|
|
|
|
<!-- Left‑border accent matches status color. role="article" + aria‑labels. -->
|
2026-04-28 08:18:27 -04:00
|
|
|
|
<!-- Enhanced: data-status attribute, elapsed time, design tokens. -->
|
2026-04-27 14:36:14 +00:00
|
|
|
|
<!-- ========================================================================== -->
|
|
|
|
|
|
<article
|
|
|
|
|
|
class="agent-card"
|
|
|
|
|
|
role="article"
|
2026-04-28 08:18:27 -04:00
|
|
|
|
[attr.data-status]="status"
|
|
|
|
|
|
[attr.aria-label]="(displayName || agentId) + ' — ' + statusLabel()"
|
2026-04-27 14:36:14 +00:00
|
|
|
|
[style.border-left-color]="statusBorderColor()"
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ── Header: status badge + agent info ── -->
|
|
|
|
|
|
<div class="agent-card__header">
|
|
|
|
|
|
<div class="agent-card__badge" [attr.aria-label]="'Status: ' + statusLabel()">
|
|
|
|
|
|
<span
|
|
|
|
|
|
class="status-dot"
|
|
|
|
|
|
[ngClass]="[statusDotClass()]"
|
|
|
|
|
|
></span>
|
|
|
|
|
|
<span class="agent-card__status-label">{{ statusLabel() }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="agent-card__identity">
|
|
|
|
|
|
<span class="agent-card__name">{{ displayName || agentId }}</span>
|
|
|
|
|
|
<span class="agent-card__role">{{ role }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ── Body: current task ── -->
|
2026-04-28 08:18:27 -04:00
|
|
|
|
<div class="agent-card__body" *ngIf="task || isError()">
|
2026-04-27 14:36:14 +00:00
|
|
|
|
<p
|
|
|
|
|
|
class="agent-card__task"
|
2026-04-28 08:18:27 -04:00
|
|
|
|
[class.agent-card__task--error]="isError()"
|
|
|
|
|
|
[attr.aria-label]="'Current task: ' + (isError() ? errorMessage || task : task)"
|
2026-04-27 14:36:14 +00:00
|
|
|
|
>
|
2026-04-28 08:18:27 -04:00
|
|
|
|
{{ isError() ? errorMessage || task : task }}
|
2026-04-27 14:36:14 +00:00
|
|
|
|
</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ── Task Progress Bar ── -->
|
|
|
|
|
|
<div
|
|
|
|
|
|
class="agent-card__progress"
|
2026-04-28 08:18:27 -04:00
|
|
|
|
*ngIf="showProgress()"
|
2026-04-27 14:36:14 +00:00
|
|
|
|
[attr.aria-label]="'Task progress: ' + progress + '%'"
|
|
|
|
|
|
>
|
|
|
|
|
|
<mat-progress-bar
|
|
|
|
|
|
mode="determinate"
|
|
|
|
|
|
[value]="progress"
|
|
|
|
|
|
[aria-label]="'Progress ' + progress + '% complete'"
|
|
|
|
|
|
></mat-progress-bar>
|
|
|
|
|
|
<span class="agent-card__progress-label text-mono">{{ progress }}%</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-04-28 08:18:27 -04:00
|
|
|
|
<!-- ── Elapsed Time ── -->
|
|
|
|
|
|
<div
|
|
|
|
|
|
class="agent-card__elapsed"
|
|
|
|
|
|
*ngIf="taskElapsed && isActiveLike()"
|
|
|
|
|
|
[attr.aria-label]="'Elapsed: ' + taskElapsed"
|
|
|
|
|
|
>
|
|
|
|
|
|
<mat-icon aria-hidden="true" class="agent-card__elapsed-icon">schedule</mat-icon>
|
|
|
|
|
|
<span class="text-mono">{{ taskElapsed }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-04-27 14:36:14 +00:00
|
|
|
|
<!-- ── Footer: channel + last activity + quick‑jump ── -->
|
|
|
|
|
|
<div class="agent-card__footer">
|
|
|
|
|
|
<div class="agent-card__meta">
|
|
|
|
|
|
<span
|
|
|
|
|
|
class="agent-card__channel text-mono"
|
|
|
|
|
|
[attr.aria-label]="'Channel: ' + channel"
|
|
|
|
|
|
>
|
|
|
|
|
|
<mat-icon aria-hidden="true">{{ channelIcon() }}</mat-icon>
|
|
|
|
|
|
{{ channel }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span
|
|
|
|
|
|
class="agent-card__last-activity text-mono"
|
|
|
|
|
|
[attr.aria-label]="'Last activity: ' + lastActivityLabel()"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ lastActivityLabel() }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Quick‑Jump Button -->
|
|
|
|
|
|
<a
|
|
|
|
|
|
class="agent-card__jump"
|
|
|
|
|
|
mat-button
|
|
|
|
|
|
[routerLink]="jumpRoute()"
|
|
|
|
|
|
[attr.aria-label]="'Jump to session for ' + (displayName || agentId)"
|
|
|
|
|
|
matTooltip="Jump to session"
|
|
|
|
|
|
>
|
|
|
|
|
|
<mat-icon aria-hidden="true">arrow_forward</mat-icon>
|
|
|
|
|
|
</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</article>
|