Botframework-webchat: What Activity Types does Web Chat officially support? Currently, "No renderer for this activity" is shown when ActivityType endOfConversation is received

Created on 14 Mar 2019  路  5Comments  路  Source: microsoft/BotFramework-WebChat

When the ActivityType.EndOfConversation is received, the error "No renderer for this activity" is displayed in the user's WebChat window. We have made no changes to the C# Bot code or the WebChat code. I should note this is not in the emulator but on our site. I saw some references to the same error but related to the emulator

image

Docs P2 front-burner

Most helpful comment

(special thanks to @EricDahlvang for walking me through this)
Okay! This conversation has been really enlightening and I hope to share information in a way that's beneficial both to the team and our customers.

@johnataylor's chart above has to do with the Bot Framework REST API Protocol. This is a good basis for Web Chat as a client to decide which Activity Types we want to support, ignore, and/or render a "No renderer" message for. To summarize the chart, Direct Line API supports the following Activity Types:

  • Message
  • ConversationUpdate
  • Event
  • Event.TokenResponse (Activity of type Event with name of "tokens/response")
  • EndOfConversation
  • Typing
  • InstallationUpdate

Of the list above, the bolded items are the ones that Web Chat currently renders. All of the others by default currently show the red "No renderer for this activity" error box.

EndOfConversation is an activity that the Direct Line protocol forwards to the client, but takes no action on. I believe there is an argument for having Web Chat somehow 'rendering' EndOfConversation. Currently, it is only shows the "No renderer" message. I will circle back to this later.

InstallationUpdate, Event.TokenResponse, and ConversationUpdate are all activities that will be sent between bot and server, meaning that Web Chat as a client should not receive these activity types. For discussion I will call these "server to bot activities" that are expected in Direct Line.

Server to bot activities will not be received by Web Chat 'naturally'. They will only be received if the bot implementer uses these Activities in ways not intended by the Bot Framework SDK protocol. Because of this, I think a "No renderer for this activity" message for these activities in Web Chat is a valid response to the unusual case where Web Chat DOES receive InstallationUpdate, Event.TokenResponse, or ConversationUpdate.

  • Any other activity that may be sent to Web Chat is either a custom activity or related to other channels.

    • In the case of a custom activity, we want bot developers to know that Web Chat does receive the activity, but if a rendering for that activity is desired, the developer will need to use ActivityMiddleware to implement their own component.

    • For activities coming from other channels, I think it is reasonable for Web Chat to display the "No renderer for this activity" box so that the developer may decide to create their own rendering component if they so wish. This applies to the Emulator for Trace, which will show an error message until the Emulator implements it's own component.

If we follow the sentiments outlined above, these are the following action items that are created:

  • ~(non-action item) Web Chat will continue to show the "No renderer" message for all non-supported activity types. Web Chat will NOT ignore any activity.~
  • [x] EndOfConversation may want to be rendered by Web Chat. Do we want Web Chat to render EndOfConversation?

    • If yes, this means we will need to discuss with design on how to display the EndOfConversation activity, whether it be through an activity in the transcript or changing the UX to disabled (or something else).

  • [x] Emulator will need to implement it's own rendering of Activities that are not expected by Direct Line, including ActivityType trace
  • [ ] Discuss with design: Improve the appearance/information provided by the component "No renderer for this activity"
  • [ ] We should create the "client to server" version of John's chart displaying how different activities are handled by both Emulator and Web Chat. I don't mind starting this action item if others think it will be valuable.
    Team, please discuss! Thanks for reading.

All 5 comments

Hi @baldrin,
This issue is related to https://github.com/Microsoft/BotFramework-Emulator/issues/1358 on the Emulator repo.

Currently Web Chat has a state of flux around this topic -- we need to confirm with the SDK team what Activity Types we support across all channels, and then determine how/if we render those supported Activity Types and block all other types.

As a current workaround, you are welcome to use activityMiddleware to render your own end of conversation activity. Please take a look at incoming activities and creating custom components sample.

====
For team discussion: @johnataylor I heard you were compiling a list of channel-wide supported activity types, do you have input?

  • [x] Determine all supported activity types, non-supported types
  • [x] [Design] Create mock ups for how these activity types should be rendered, and how non-supported ones should be displayed @mewa1024 and @DesignPolice - I will be adding you to the conversation eventually :)
  • [x] Determine T-Shirt size and timeline
  • [x] Implement these new components

I will start an offline discussion with mentioned parties.

Document created by @johnataylor is here: https://github.com/Microsoft/BotBuilder/issues/5294

I will expand on the link shortly.

(special thanks to @EricDahlvang for walking me through this)
Okay! This conversation has been really enlightening and I hope to share information in a way that's beneficial both to the team and our customers.

@johnataylor's chart above has to do with the Bot Framework REST API Protocol. This is a good basis for Web Chat as a client to decide which Activity Types we want to support, ignore, and/or render a "No renderer" message for. To summarize the chart, Direct Line API supports the following Activity Types:

  • Message
  • ConversationUpdate
  • Event
  • Event.TokenResponse (Activity of type Event with name of "tokens/response")
  • EndOfConversation
  • Typing
  • InstallationUpdate

Of the list above, the bolded items are the ones that Web Chat currently renders. All of the others by default currently show the red "No renderer for this activity" error box.

EndOfConversation is an activity that the Direct Line protocol forwards to the client, but takes no action on. I believe there is an argument for having Web Chat somehow 'rendering' EndOfConversation. Currently, it is only shows the "No renderer" message. I will circle back to this later.

InstallationUpdate, Event.TokenResponse, and ConversationUpdate are all activities that will be sent between bot and server, meaning that Web Chat as a client should not receive these activity types. For discussion I will call these "server to bot activities" that are expected in Direct Line.

Server to bot activities will not be received by Web Chat 'naturally'. They will only be received if the bot implementer uses these Activities in ways not intended by the Bot Framework SDK protocol. Because of this, I think a "No renderer for this activity" message for these activities in Web Chat is a valid response to the unusual case where Web Chat DOES receive InstallationUpdate, Event.TokenResponse, or ConversationUpdate.

  • Any other activity that may be sent to Web Chat is either a custom activity or related to other channels.

    • In the case of a custom activity, we want bot developers to know that Web Chat does receive the activity, but if a rendering for that activity is desired, the developer will need to use ActivityMiddleware to implement their own component.

    • For activities coming from other channels, I think it is reasonable for Web Chat to display the "No renderer for this activity" box so that the developer may decide to create their own rendering component if they so wish. This applies to the Emulator for Trace, which will show an error message until the Emulator implements it's own component.

If we follow the sentiments outlined above, these are the following action items that are created:

  • ~(non-action item) Web Chat will continue to show the "No renderer" message for all non-supported activity types. Web Chat will NOT ignore any activity.~
  • [x] EndOfConversation may want to be rendered by Web Chat. Do we want Web Chat to render EndOfConversation?

    • If yes, this means we will need to discuss with design on how to display the EndOfConversation activity, whether it be through an activity in the transcript or changing the UX to disabled (or something else).

  • [x] Emulator will need to implement it's own rendering of Activities that are not expected by Direct Line, including ActivityType trace
  • [ ] Discuss with design: Improve the appearance/information provided by the component "No renderer for this activity"
  • [ ] We should create the "client to server" version of John's chart displaying how different activities are handled by both Emulator and Web Chat. I don't mind starting this action item if others think it will be valuable.
    Team, please discuss! Thanks for reading.

https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-end-conversation?view=azure-bot-service-4.0
I wanted to add some points. Although the doc above says Direct Line channels may handle endOfConversation however desired, I think it's still important for us to have a clear understanding of the functionality of this activity in Cortana before making our decisions for Web Chat.

I spoke with John in person and he also pointed out that the web, traditionally, ignores whatever it doesn't know. Example: I could make up a new HTML tag, but that doesn't mean the browser will do anything with it. So there's also an argument for removing the "No renderer for this activity" and allowing the user to detect the unknown activity and render it themselves. In this instance, it would mean removing the "No renderer for this activity" entirely.

Team made a decision today that Web Chat will REMOVE the "No renderer for this activity" error message. https://github.com/Microsoft/BotFramework-WebChat/issues/1827
Other action items

I am leaving this issue open for the last action item.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Stardox picture Stardox  路  3Comments

adriantan08 picture adriantan08  路  3Comments

GewoonMaarten picture GewoonMaarten  路  3Comments

marcasmar94 picture marcasmar94  路  3Comments

Kellym-Kainos picture Kellym-Kainos  路  4Comments