Skip to content

[Bug] Reflection Widget delayed typing indicator can appear after fast startup #6550

@moksha-hub

Description

@moksha-hub

Summary

The Reflection Widget schedules its initial "Reading code" typing indicator with a delayed setTimeout(), but that timeout is not cancelled if the export/API request finishes before the delay expires.

Steps to reproduce

  1. Open the Reflection Widget in Music Blocks.
  2. Use a fast backend response or a small/simple project so startup completes in under 1 second.
  3. Wait briefly after the first assistant response appears.

Actual behavior

A delayed typing indicator can appear after the response is already rendered, and it may remain visible until another request clears it.

Expected behavior

If startup finishes before the delayed indicator appears, the pending timeout should be cancelled so no stale typing indicator is shown.

Likely root cause

startChatSession() schedules showTypingIndicator("Reading code") with setTimeout(...), but hideTypingIndicator() only removes an already-rendered indicator and does not clear the pending timeout.

Affected file

  • js/widgets/reflection.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions