microsoft / microsoft/BotFramework-WebChat

Allow rendering Bot Framework WebChat without DirectLine connection

Open
#3,971 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Feature Request.

Is your feature request related to a problem? Please describe.

I am using the ReactWebChat component in a 'transcript viewer' scenario, where no interactivity is allowed. Unfortunately it is required to pass directLine, passing an empty object ({}) will work but throw an javascript error.

<ReactWebChat 
             directLine={{}}
TypeError: Cannot read property 'subscribe' of undefined
    at subscribeToPromiseQueue (<anonymous>:75216:33)
    at connectionStatusToNotification$ (<anonymous>:75235:35)
    at tryCatch (<anonymous>:223445:17)
    at Generator.invoke [as _invoke] (<anonymous>:223662:22)
    at Generator.next (<anonymous>:223498:21)
    at next (<anonymous>:4057:29)
    at proc (<anonymous>:4008:3)
    at <anonymous>:3487:17
    at immediately (<anonymous>:2970:12)
    at runForkEffect (<anonymous>:3486:3)

Describe the suggestion or request in detail

A way to use the ReactWebChat component in an offline / no interactivity scenario.

Describe alternatives you have considered

Passing a mock DirectLine client / RXJS Observable. However, it seems that I did need to use RXJS for this, which add a lot of overhead to my project.
If there is a way to add a simple mock object to disable the connection, that would be feasible for me as well.

Additional context

See https://github.com/iMicknl/powerbi-botframework-chat-transcripts/issues/9.

Similar request: https://github.com/microsoft/BotFramework-WebChat/issues/3032

Similar customer request: https://github.com/microsoft/BotFramework-WebChat/issues/4037

[feature-request]

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 at the ReactWebChat component and trace where the required directLine connection causes the reported empty-object failure. Define and verify an offline, transcript-only rendering path without a DirectLine connection; done means the component renders without interactivity while the existing connected path remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
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.