Skip to content

fix(vscode): keep background agent avatar pulse smooth - #14711

Merged
marius-kilocode merged 1 commit into
mainfrom
fix-identicon-animation-flicker
Oct 1, 2026
Merged

marius-kilocode merged 1 commit into
mainfrom
fix-identicon-animation-flicker

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The background agent identicons above the prompt input flickered while they pulsed. The same identicons stayed smooth in the transcript task cards and in the Agent Manager panel.

Why This Change Was Made

The dock places the agent stack on the actions row with a layout pass in SessionDock.tsx. To measure the other rows, that pass hid the stack with display: none and read the positions of the remaining children.

Reading positions forces a layout while the stack is hidden. Under display: none the browser cancels the CSS avatar animations, so the pulse restarted on every pass. The shared sync handler then pinned the animations back to the document timeline one frame later, which showed up as two opacity jumps per pass.

The pass runs on any change in the actions row, on a row resize, and each time the main agent's turn ends and the actions row returns. The transcript and Agent Manager surfaces have no such pass, so their identicons were unaffected.

The fix takes the stack out of the layout with position: absolute instead of display: none. The other children measure the same way, but the browser does not cancel the animations, and the stack is returned to the flow before paint.

User Impact

The background agent identicons pulse smoothly in the prompt input, with no flicker when the actions row changes, the sidebar resizes, or a turn ends.

Evidence

Verified in an isolated VS Code with two background agents running sleep, counting animation cancels and restarts and any opacity jump above 0.08 between frames:

Trigger Before After
A change in the actions row 6 cancels, 6 restarts, about 10 jumps per pass 0 / 0 / 0 (checked 3 passes)
Main agent's turn ends and the actions row returns 7 cancels, 7 restarts, 12 jumps 0 / 0 / 0
No changes, 20 s 0 jumps 0 jumps

The stack still lands on the correct row. bun run compile (typecheck, lint, bundle) passes, and tests/unit/session-dock.test.ts passes 15/15.

The actions-row layout pass hid the agent stack with display none to
measure the other rows. Forced layout under display none cancels the
avatar pulses, so each pass restarted them and they jumped out of
phase. Take the stack out of flow with position absolute instead, which
measures the same way without cancelling the animations.
@kilo-code-bot

kilo-code-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • .changeset/smooth-dock-avatar-pulse.md
  • packages/kilo-vscode/webview-ui/src/components/chat/SessionDock.tsx
Notes

The display: none → position: absolute swap in SessionDock.tsx:128 correctly keeps the stack in the render tree so its CSS animations are not cancelled during the forced layout, while still removing it from flex flow for the sibling measurement. prev captures the inline value (empty) and restores it on line 141, so the class-defined position: relative in session-actions.css:387 returns intact. No new timers, observers, or listeners were added, so there is no leak risk. The changeset is present and user-facing.


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 8163693 into main Oct 1, 2026
26 checks passed
@marius-kilocode
marius-kilocode deleted the fix-identicon-animation-flicker branch October 1, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants