progress/steps shiny-text helper

3clyp50 committed Jan 20, 2026 at 11:38 UTC c9c5efda408802ef17fe05d5de772ebbbbde898b
2 files changed +23 -5
webui/index.js
+12 -5
@@ -458,11 +458,7 @@ function updateProgress(progress, active) {
458 if (!progressBarEl) return;
459 if (!progress) progress = "";
460
461 - if (!active) {
462 - removeClassFromElement(progressBarEl, "shiny-text");
463 - } else {
464 - addClassToElement(progressBarEl, "shiny-text");
465 - }
461 + setProgressBarShine(progressBarEl, active);
462
463 progress = msgs.convertIcons(progress);
464
@@ -471,6 +467,17 @@ function updateProgress(progress, active) {
467 }
468 }
469
470 +function setProgressBarShine(progressBarEl, active) {
471 + if (!progressBarEl) return;
472 + if (!active) {
473 + removeClassFromElement(progressBarEl, "shiny-text");
474 + // clear any lingering shines in process steps
475 + msgs.clearActiveStepShine();
476 + } else {
477 + addClassToElement(progressBarEl, "shiny-text");
478 + }
479 +}
480 +
481 globalThis.pauseAgent = async function (paused) {
482 await inputStore.pauseAgent(paused);
483 };
webui/js/messages.js
+11
@@ -35,6 +35,17 @@ function setActiveProcessGroup(group) {
35
36 }
37
38 +export function clearActiveStepShine() {
39 + if (activeStepTitleEl) {
40 + activeStepTitleEl.classList.remove("shiny-text");
41 + activeStepTitleEl = null;
42 + }
43 + // clear any lingering shine in process steps
44 + document.querySelectorAll(".process-step .step-title.shiny-text").forEach((el) => {
45 + el.classList.remove("shiny-text");
46 + });
47 +}
48 +
49 /**
50 * Resolve tool name from kvps, existing attribute, or previous siblings
51 * For 'tool' type steps, inherits from preceding step if not directly available