[BUG] Desktop Code tab rebuilds an unchanged mod Svg on every AbovePrompt re-render (blank frame, SMIL restarts)

Status Open
Reported on v2.1.294
Maintainer reply None cached
Activity 1 comment · opened Oct 9, 2026

What's Wrong?

I run two function-hook mods in the AbovePrompt site of the desktop Code tab. Mod A draws an animated breathing meter as an Svg with isInteractive, so its SMIL animation runs in the sandboxed frame. Mod B draws a status row and re-renders whenever its $.state value changes.

Each time mod B re-renders, mod A's Svg gets torn down and rebuilt. Its key and source are identical between renders. The meter shows one blank frame, then its SMIL clock starts over from zero, so an 11 s breath cycle never finishes.

I measured it frame by frame from a screen recording: 6 restarts in 24 s, one blank frame each, every ~4.5 s. That matches mod B's 4 s poll plus its own work. When mod B stops writing state, the meter animates without a break.

What Should Happen?

An Svg whose key and source didn't change keeps its frame and keeps animating when a sibling in the same site re-renders.

Steps to Reproduce

  1. Mod A, on ui.render for AbovePrompt, returns <Box><Svg key="meter" isInteractive source={svg} />{await next(e)}</Box>. The svg carries an <animate dur="11s" repeatCount="indefinite"/>.
  2. Mod B, after A in CLAUDE_CODE_PLUGIN_DIRS, renders a Text that reads a $.state value and bumps that value every 4 s with $.clock.after.
  3. Open the desktop Code tab with both mods loaded and start a turn.
  4. Watch the meter. It blinks and restarts on every bump.

This is a reduction of our real pair of mods. I haven't run the reduced version on its own yet.

Error Messages/Logs

None. Nothing shows in the debug log for the rebuild.

Is this a regression?

I don't know.

Claude Code Version

2.1.294 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Claude desktop app, Code tab

Additional Information

Our workaround starts each render's animation at the current phase with a negative begin, so a rebuilt meter resumes mid-cycle, but the blank frame still shows. We also stopped mod B from rewriting state that didn't change, which makes the blinks rarer.

Labels I'd pick: bug, platform:macos. I can't set them on this repo.

— printed by Claude Code, signed by me.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗