Skip to content

fix: show trigger action after markdown finishes typing#1474

Merged
4pmtong merged 2 commits intoeigent-ai:mainfrom
kiannidev:fix-trigger-card-timing
Mar 16, 2026
Merged

fix: show trigger action after markdown finishes typing#1474
4pmtong merged 2 commits intoeigent-ai:mainfrom
kiannidev:fix-trigger-card-timing

Conversation

@kiannidev
Copy link
Copy Markdown
Contributor

Fixes #1405.

Summary

  • Ensure the “Add trigger action” card (TaskCompletionCard) only appears after the assistant’s final END message has fully finished streaming/typing.
  • Add a per-query isCompletionReady flag in UserQueryGroup that is set only when the END AgentMessageCard’s typewriter completes.
  • Gate TaskCompletionCard rendering on both task.status === 'finished' and isCompletionReady, so the UI no longer shows trigger actions while the markdown answer is still typing.

Implementation details

  • Updated src/components/ChatBox/UserQueryGroup.tsx:
    • Track isCompletionReady with local state and reset when the active task or query group changes.
    • Pass onTyping to the END AgentMessageCard to set isCompletionReady when its MarkDown typewriter finishes.
    • Render TaskCompletionCard only when task.status === 'finished' && isCompletionReady.

Testing

  • Started a new project and submitted a task that produces a multi-line, streaming markdown answer.
  • Verified that:
    • During streaming, the “Add trigger action” card does not appear.
    • As soon as the END message finishes typing, the “Add trigger action” card appears below the final answer.
  • Replayed an existing project and confirmed the same behavior holds for replayed conversations.

@4pmtong 4pmtong requested review from 4pmtong and a7m-1st March 16, 2026 07:56
Copy link
Copy Markdown
Collaborator

@4pmtong 4pmtong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @kiannidev for contribution

@4pmtong 4pmtong merged commit 4f3b263 into eigent-ai:main Mar 16, 2026
7 checks passed
bitloi pushed a commit to bitloi/eigent that referenced this pull request Mar 18, 2026
Co-authored-by: root <root@dragon.second>
Co-authored-by: Tong Chen <web_chentong@163.com>
@fengju0213 fengju0213 added this to the Sprint 19 milestone Mar 19, 2026
Copy link
Copy Markdown
Collaborator

@a7m-1st a7m-1st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kiannidev & @4pmtong !

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.

[Feature Request] ![](https://files.slack.com/files-pri/T06R8AF1H46-F0AHY7AR3FY/screenshot_2026-03-02_at_14.55.44.png)

4 participants