Skip to content

fix(chat): render avatar progress badge that was invisible#32747

Merged
dvargasfuertes merged 1 commit into
mainfrom
fix-progress-badge-not-rendering
May 31, 2026
Merged

fix(chat): render avatar progress badge that was invisible#32747
dvargasfuertes merged 1 commit into
mainfrom
fix-progress-badge-not-rendering

Conversation

@dvargasfuertes
Copy link
Copy Markdown
Contributor

@dvargasfuertes dvargasfuertes commented May 31, 2026

Fixes the avatar progress badge reporting visible: true via the debug API while never painting on screen, by passing isProcessing to the empty-state avatar and making the badge dot lay out at its real size. This restores the only visual signal that the assistant is processing once the useProgressBadge flag is on.

Root cause analysis

(a) How did the code get into this state? The progress-badge feature (#32680) wired isProcessing into the transcript ChatAvatar but not the empty-state one, so the empty-state badge was never created. Separately, it reused BusyIndicator for the badge dot. BusyIndicator is a bare <span>, which defaults to display: inline — and width/height do not apply to non-replaced inline elements. Its only prior caller wrapped it in a flex parent, where flex items are blockified, so the inline default never mattered. Inside the new non-flex ProgressBadge wrapper the dot stayed inline and collapsed to 0×0, so even when the badge mounted it painted nothing.

(b) What mistakes or decisions led to it? Two parallel render paths (empty-state vs transcript) were kept in sync by hand, so one was missed. And a primitive whose sizing silently depended on its parent's layout context was reused in a new context without that dependency.

(c) Were there warning signs we missed? The debug API deliberately reports the same isProcessing && isProgressBadgeEnabled() gate the component uses, so it reported visible: true — which masked the fact that the DOM node had no size. There was no test asserting the dot actually has dimensions.

(d) What can we do to prevent recurrence? A self-contained visual primitive shouldn't depend on its parent's display to size itself. BusyIndicator is now inline-block so it lays out at its declared size anywhere, and a regression test asserts that.

(e) AGENTS.md change? Not warranted. This is a narrow CSS-layout gotcha, not a project-wide rule; encoding "inline spans ignore width/height" as a durable rule would add noise that goes stale. The regression test is the right guard.

Test plan

  • bunx tsc --noEmit and bun run lint pass.
  • New busy-indicator.test.tsx asserts the dot is block-level and sized; existing three-dot-indicator and tool-call-chip suites still pass (the chip already wraps the dot in a flex parent, so its rendering is unchanged).
  • Reproduced locally via Playwright/CDP against the empty-state avatar with the useProgressBadge flag on: before, the badge span was absent / its dot measured 0×0 (display: inline); after, the dot measures ~6×6 (display: inline-block) and the pulsing badge is visible in the avatar's bottom-right.

Link to Devin session: https://app.devin.ai/sessions/4ecf21400f764b59ad1eecabd1535956
Requested by: @dvargas92495

The progress badge reported visible:true via the debug API but never
painted. Two issues compounded:

1. The empty-state ChatAvatar was never passed isProcessing, so its
   badge was never created (the transcript avatar passed it correctly).
2. BusyIndicator is a bare <span> (display:inline), so its inline
   width/height were ignored. Its only prior use was inside a flex
   parent (tool-call chip) which blockified it; reused inside the
   non-flex ProgressBadge wrapper it collapsed to 0x0 and never painted.

Pass isProcessing to the empty-state avatar and make BusyIndicator
inline-block so it lays out at its declared size regardless of parent.

Co-Authored-By: vargas@vellum.ai <vargas@vellum.ai>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@dvargasfuertes dvargasfuertes merged commit f14fc37 into main May 31, 2026
7 checks passed
@dvargasfuertes dvargasfuertes deleted the fix-progress-badge-not-rendering branch May 31, 2026 19:47
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.

1 participant