Skip to content

Agent Zero AI framework

step-title shiny text

3clyp50f0e4e6d1fe19
diff --git a/webui/components/messages/process-group/process-group.css b/webui/components/messages/process-group/process-group.css
index ca8e27a1a..bb5e25e50 100644
--- a/webui/components/messages/process-group/process-group.css
+++ b/webui/components/messages/process-group/process-group.css
@@ -226,33 +226,6 @@
color: var(--step-accent);
}
-/* Animated spinner for active status (CSS-only, no Material Icons) */
-.status-badge.status-active::after {
- content: "";
- display: inline-block;
- width: 8px;
- height: 8px;
- border: 1.5px solid currentColor;
- border-top-color: transparent;
- border-radius: 50%;
- animation: spin 0.8s linear infinite;
- margin-left: 4px;
- flex-shrink: 0;
-}
-
-@keyframes spin {
- from { transform: rotate(0deg); }
- to { transform: rotate(360deg); }
-}
-
-/* Don't show spinner pseudo-element on END/ERR (they have their own indicators) */
-.status-badge.status-end::after,
-.status-badge.status-err::after {
- display: none;
-}
-
-/* END status with checkmark icon (icon added via JS, no ::before needed) */
-
/* Completed process group styling */
.process-group-completed {
opacity: 0.95;
@@ -388,16 +361,6 @@
min-height: 18px;
}
-/* Step icon removed - using status badges instead */
-.process-step-header .step-icon {
- display: none;
-}
-
-/* Step type label removed - using status badges instead */
-.process-step-header .step-type {
- display: none;
-}
-
/* Step title */
.process-step-header .step-title {
flex: 1;
@@ -787,9 +750,8 @@
50% { opacity: 0.8; }
}
-.process-step.loading .step-icon {
- animation: pulse-step 1.2s ease-in-out infinite;
-}
+.step-title.shiny-text { color: transparent !important; -webkit-background-clip: text; background-clip: text; animation: shine 1s linear infinite; }
+ @keyframes shine { to { background-position: -100% center; } }
/* Responsive adjustments */
@media (max-width: 768px) {
@@ -797,10 +759,6 @@
padding: var(--spacing-xs) var(--spacing-sm);
}
- .process-step-header .step-type {
- display: none;
- }
-
.process-step-header .step-title {
font-size: 0.7rem;
}
diff --git a/webui/js/messages.js b/webui/js/messages.js
index 37180663f..695e7942a 100644
--- a/webui/js/messages.js
+++ b/webui/js/messages.js
@@ -13,6 +13,27 @@ const chatHistory = document.getElementById("chat-history");
let messageGroup = null;
let currentProcessGroup = null; // Track current process group for collapsible UI
let currentDelegationSteps = {}; // Track delegation steps by agent number for nesting
+let activeProcessGroupId = null; // Only one process group should show "running" indicators at a time
+let activeProcessGroupEl = null;
+let activeStepTitleEl = null;
+
+/**
+ * Mark current process group as active and clear active badges.
+ */
+function setActiveProcessGroup(group) {
+ if (!group || !group.id) return;
+ if (activeProcessGroupId === group.id) return;
+
+ // Clear shiny effect from the previous active step title if we moved to a new group
+ if (activeStepTitleEl && activeProcessGroupEl && activeProcessGroupEl !== group && activeProcessGroupEl.contains(activeStepTitleEl)) {
+ activeStepTitleEl.classList.remove("shiny-text");
+ activeStepTitleEl = null;
+ }
+
+ activeProcessGroupId = group.id;
+ activeProcessGroupEl = group;
+
+}
/**
* Resolve tool name from kvps, existing attribute, or previous siblings
@@ -82,6 +103,7 @@ export function setMessage(id, type, heading, content, temp, kvps = null, timest
if (!currentProcessGroup || !document.getElementById(currentProcessGroup.id)) {
currentProcessGroup = createProcessGroup(id);
chatHistory.appendChild(currentProcessGroup);
+ setActiveProcessGroup(currentProcessGroup);
}
// Add step to current process group
@@ -102,6 +124,7 @@ export function setMessage(id, type, heading, content, temp, kvps = null, timest
if (!currentProcessGroup || !document.getElementById(currentProcessGroup.id)) {
currentProcessGroup = createProcessGroup(id);
chatHistory.appendChild(currentProcessGroup);
+ setActiveProcessGroup(currentProcessGroup);
}
// Add subordinate response as a response step (special type to show content)
@@ -1200,7 +1223,7 @@ function createProcessGroup(id) {
header.innerHTML = `
<span class="expand-icon"></span>
<span class="group-title">Processing...</span>
- <span class="status-badge status-gen status-active group-status">GEN</span>
+ <span class="status-badge status-gen group-status">GEN</span>
<span class="group-metrics">
<span class="metric-time" title="Start time"><span class="material-symbols-outlined">schedule</span><span class="metric-value">--:--</span></span>
<span class="metric-steps" title="Steps"><span class="material-symbols-outlined">footprint</span><span class="metric-value">0</span></span>
@@ -1260,6 +1283,9 @@ function getNestedContainer(parentStep) {
* Add a step to a process group
*/
function addProcessStep(group, id, type, heading, content, kvps, timestamp = null, durationMs = null, agentNumber = 0) {
+ // group with newest step becomes the active one
+ setActiveProcessGroup(group);
+
const groupId = group.getAttribute("data-group-id");
let stepsContainer = group.querySelector(".process-steps");
const isGroupCompleted = group.classList.contains("process-group-completed");
@@ -1339,10 +1365,9 @@ function addProcessStep(group, id, type, heading, content, kvps, timestamp = nul
// Add status color class to step for cascading --step-accent to internal icons
step.classList.add(statusColorClass);
- const activeClass = isGroupCompleted ? "" : " status-active";
stepHeader.innerHTML = `
<span class="step-expand-icon"></span>
- <span class="status-badge ${statusColorClass}${activeClass}">${statusCode}</span>
+ <span class="status-badge ${statusColorClass}">${statusCode}</span>
<span class="step-title">${escapeHTML(title)}</span>
`;
@@ -1407,14 +1432,25 @@ function addProcessStep(group, id, type, heading, content, kvps, timestamp = nul
}
}
- // Remove status-active from all previous steps (only the current step is active)
- const prevSteps = stepsContainer.querySelectorAll(".process-step .status-badge.status-active");
- prevSteps.forEach(badge => badge.classList.remove("status-active"));
+ // Remove shiny effect from the previously active step title (O(1))
+ if (activeStepTitleEl) {
+ activeStepTitleEl.classList.remove("shiny-text");
+ activeStepTitleEl = null;
+ }
appendTarget.appendChild(step);
// Update group header
updateProcessGroupHeader(group);
+
+ // Apply shiny effect to the active step title
+ if (!isGroupCompleted && group.id === activeProcessGroupId) {
+ const titleEl = step.querySelector(".process-step-header .step-title");
+ if (titleEl) {
+ titleEl.classList.add("shiny-text");
+ activeStepTitleEl = titleEl;
+ }
+ }
return step;
}
@@ -1810,10 +1846,8 @@ function updateProcessGroupHeader(group) {
const metricsEl = group.querySelector(".group-metrics");
const isCompleted = group.classList.contains("process-group-completed");
- // If completed, only remove active badges and exit early (don't update metrics)
+ // If completed, don't update metrics
if (isCompleted) {
- const activeBadges = group.querySelectorAll(".status-badge.status-active");
- activeBadges.forEach(badge => badge.classList.remove("status-active"));
return;
}
@@ -1881,14 +1915,14 @@ function updateProcessGroupHeader(group) {
const lastToolName = lastStep.getAttribute("data-tool-name");
const lastTitle = lastStep.querySelector(".step-title")?.textContent || "";
- // Update status badge (keep status-active during execution)
+ // Update status badge
if (statusEl) {
// Status code and color class from store (maps backend types)
const statusCode = processGroupStore.getStepCode(lastType, lastToolName);
const statusColorClass = processGroupStore.getStatusColorClass(lastType, lastToolName);
statusEl.textContent = statusCode;
- statusEl.className = `status-badge ${statusColorClass} status-active group-status`;
+ statusEl.className = `status-badge ${statusColorClass} group-status`;
}
// Update title
@@ -1929,17 +1963,13 @@ function truncateText(text, maxLength) {
function markProcessGroupComplete(group, responseTitle) {
if (!group) return;
- // Update status badge to END (remove status-active)
+ // Update status badge to END
const statusEl = group.querySelector(".group-status");
if (statusEl) {
statusEl.innerHTML = '<span class="badge-icon material-symbols-outlined">check</span>END';
- statusEl.className = "status-badge status-end group-status"; // No status-active
+ statusEl.className = "status-badge status-end group-status";
}
- // Remove status-active from all step badges (stop spinners)
- const stepBadges = group.querySelectorAll(".process-step .status-badge.status-active");
- stepBadges.forEach(badge => badge.classList.remove("status-active"));
-
// Update title if response title is available
const titleEl = group.querySelector(".group-title");
if (titleEl && responseTitle) {
@@ -1975,6 +2005,12 @@ export function resetProcessGroups() {
currentProcessGroup = null;
currentDelegationSteps = {};
messageGroup = null;
+ activeProcessGroupId = null;
+ activeProcessGroupEl = null;
+ if (activeStepTitleEl) {
+ activeStepTitleEl.classList.remove("shiny-text");
+ }
+ activeStepTitleEl = null;
}
/**