microsoft / microsoft/BotFramework-WebChat

Citations in bot responses are incorrectly reused after first message in Web Chat UI

Open
#5,562 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bot Services bug customer-reported
Dominant language
HTML
Stars
1.8k
Forks
1.6k
Avg merge
22h 58m
Merged PRs (30d)
2

Description

Is it an issue related to Adaptive Cards?

No

Is this an accessibility issue?

No

What version of Web Chat are you using?

Latest production

Which distribution are you using Web Chat from?

NPM

Which hosting environment does this issue primarily affect?

Web apps

Which browsers and platforms do the issue happened?

Browser: Chrome (latest), Platform: Windows

Which area does this issue affect?

Chat history

Which theme pack does this issue affect?

Fluent UI

What is the public URL for the website?

No response

Please describe the bug

When interacting with the bot through the web chat UI (injected via NPM on the front-end), the first response from the bot contains citations that correctly match the references at the bottom. However, subsequent responses from the bot contain citations that are incorrectly picked up from the first response. This issue does not occur on the Copilot Studio console UI, but does occur when using the web chat framework to connect to the same bot instance via Direct Line API. This severely impacts user experience and compliance.

Do you see any errors in console log?

How to reproduce the issue?
  1. Use the web chat UI (NPM-injected, Direct Line API) to connect to the bot.
  2. Send a message; observe that citations are correct in the first response.
  3. Send a second message; observe that the citations are incorrectly repeated from the first response.
What do you expect?

Each bot response should display citations that match the references for that specific response, not reuse citations from previous responses.

What actually happened?

Citations for all responses after the first are incorrectly copied from the first response, rather than reflecting the correct references for each response.

Do you have any screenshots or recordings to repro the issue?

No response

Adaptive Card JSON

Additional context

This issue is only reproducible in the web chat UI with Direct Line API, not in Copilot Studio console UI. The bot instance and backend are the same in both environments.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in the NPM-injected Web Chat UI using the Direct Line API, sending two messages and comparing citation references in each bot response. Trace how citations from the first response are retained in later responses. Done means each response displays only the citations matching its own references, without reusing citations from earlier messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.