fix(coding-agent): resolve CI regressions

This commit is contained in:
Mathews-Tom
2026-07-15 20:07:53 +05:30
parent 46a3c0b711
commit 7cd07bf681
5 changed files with 16 additions and 6 deletions
@@ -196,7 +196,7 @@ export const SPINNER_GLYPH_ADVANCE_MS = 80;
/** Phase-locked spinner glyph index shared by every live tool block so parallel
* spinners advance in lockstep instead of each tracking its own start time. */
export function sharedSpinnerFrame(frameCount: number, now: number = performance.now()): number {
export function sharedSpinnerFrame(frameCount: number, now: number = Date.now()): number {
return frameCount > 0 ? Math.floor(now / SPINNER_GLYPH_ADVANCE_MS) % frameCount : 0;
}
@@ -620,10 +620,10 @@ export class ToolExecutionComponent extends Container implements NativeScrollbac
// If a detached task interval from an older render path is still live,
// stop it the instant the block leaves the repaintable region.
if (this.#maybeFreezeBackgroundTask()) return;
const now = performance.now();
const frameCount = theme.spinnerFrames.length;
this.#spinnerFrame = sharedSpinnerFrame(frameCount, now);
this.#spinnerFrame = frameCount > 0 ? ((this.#spinnerFrame ?? 0) + 1) % frameCount : 0;
this.#renderState.spinnerFrame = this.#spinnerFrame;
this.#updateDisplay();
// Component-scoped: a spinner tick only changes this tool block, so
// the TUI reuses every other root subtree instead of walking the
// whole tree (issue #4377).