Open Wajeed-msft opened 2 years ago
Hi Wajeed-msft! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.
Best regards, Teams Platform
@thomasylee - We will look into it and get back to you.
@thomasylee -Could you please elaborate more on curl command? Also We have sample here ,We are tried this one to repro the scenario but it's working fine as expected, Could you please check it once? Sample Link-https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-type-ahead-search-adaptive-cards/csharp
The curl command sends an Adaptive Card to a conversation in Microsoft Teams. The card shows a filtered Input.ChoiceSet with Typeahead search with a count
of 100. When the user types into the filtered Input.ChoiceSet, the search "invoke" request that's sent to the bot contains a top
of 15 instead of the expected 100.
I checked both the C# and NodeJS examples for bot-type-ahead-search-adaptive-cards, but neither provides the optional count
field in the Input.ChoiceSet (here for C# and here for NodeJS). They also both ignore the skip
and top
fields provided in the search "invoke" request that's triggered by the Input.ChoiceSets.
The count
I'm referring to is in the Data.Query definition documented here, and the top
is in the "invoke" request documented here.
Could you please try with the Input.ChoiceSet
with a property autoComplete
that describes how to query the bot to dynamically retrieve values for the choice-set.-
https://github.com/siduppal/general/blob/master/AutoComplete-Proposal.md
I've tried adding the autoComplete
parameter a few different ways, but it does not seem to result in any request getting sent to the bot... the attribute appears to be ignored by Microsoft Teams.
That's probably expected since that link is for a new feature proposal that has not been marked as released yet, and its corresponding GitHub issue has been open for 2 years.
The documentation for the Data.Query definition states that count
is a Number that "Populates for the invoke request to the bot to specify the number of elements that must be returned. The bot ignores it, if the users want to send a different amount."
That sounds exactly like the attribute that should be specifying the search request's top
attribute (the number of results to search for) in the invoke request, no?
Hello @thomasylee - Please let us know if you need any further help here or shall we close this issue?
Please let us know if you need any further help here or shall we close this issue?
@ChetanSharma-msft The bug still exists, so this issue needs to remain open. Please read the issue description and my other comments.
In summary: The documentation clearly states that the count
attribute in Data.Query should influence the number of results sent to the invoke request (the top
) attribute, but Microsoft Teams is not setting top
to count
like it should be. Instead, it always uses the default value of 15, incorrectly.
Please refer to my curl command or try updating the example code you sent me with count
and top
attributes to easily reproduce the problem.
@thomasylee - Thanks for providing more details. We will investigate further and get back to you.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.
Hi Wajeed-msft! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.
Best regards, Teams Platform
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.
Any updates on this? Or are there any additional details you need from me?
Sorry for the delay, We are investigating the on this scenario, We will inform you once we get any update.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.
Could we remove the needs-author-feedback tag if no further details are needed from me at the moment?
Hi, any update on this issue? The count
attribute in Data.Query is still getting ignored, resulting in top
always being the default 15.
@thomasylee -We are also able to repro the scenario, Checking with engineering team, it's Bydefault behaviour or Bug? If it is Bug then we will raise it accordingly.
@sayali-MSFT I'm not sure if your question was to me or the engineering team, but to me it appears to be a bug since the behavior does not match the documentation. The documentation makes sense, since count
and top
would be very valuable if they worked as documented, so it seems that the implementation is just not handling those attributes the way it should.
@thomasylee - We have raised bug for the same and concerned team is looking into it. We will inform you once we get any update.
@thomasylee -Sorry for delay in response!! We are actively checking the status of bug with engineering team and let you know the updates, if we have any.
@thomasylee Hi, I am from the dev team.. are you still facing this issue? I fixed the bug December 2022, and I have no repro. If you still face issues, can you send repro steps plus attach your bot for reference? Thanks
@thomasylee -Did you get chance to check?
Hi I'm facing this issue too, in 2 different repo. Can't link the first one as it's for work but I also tried with the code sample provided in the doc and it doesn't work (this one).
bots/teamsBot.js - line 48
remove , size: 8
dynamicsearch
js
"type": "application/vnd.microsoft.search.searchResponse",
"value": {
"results": [
{
"title": "js",
"value": "js - A better `node -p`."
},
{
"title": "core-js",
"value": "core-js - Standard library"
},
{
"title": "styled-components",
"value": "styled-components - Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress"
},
{
"title": "uglify-js",
"value": "uglify-js - JavaScript parser, mangler/compressor and beautifier toolkit"
},
{
"title": "libphonenumber-js",
"value": "libphonenumber-js - A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript"
},
{
"title": "js-yaml",
"value": "js-yaml - YAML 1.2 parser and serializer"
},
{
"title": "postcss",
"value": "postcss - Tool for transforming styles with JS plugins"
},
{
"title": "crypto-js",
"value": "crypto-js - JavaScript library of crypto standards."
},
{
"title": "js-cookie",
"value": "js-cookie - A simple, lightweight JavaScript API for handling cookies"
},
{
"title": "get-intrinsic",
"value": "get-intrinsic - Get and robustly cache all JS language-level intrinsics at first require time"
},
{
"title": "xml-js",
"value": "xml-js - A convertor between XML text and Javascript object / JSON text."
},
{
"title": "ua-parser-js",
"value": "ua-parser-js - Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment"
},
{
"title": "eslint-config-airbnb-base",
"value": "eslint-config-airbnb-base - Airbnb's base JS ESLint config, following our styleguide"
},
{
"title": "is-callable",
"value": "is-callable - Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag."
},
{
"title": "graphql",
"value": "graphql - A Query Language and Runtime which can target any service."
},
{
"title": "karma",
"value": "karma - Spectacular Test Runner for JavaScript."
},
{
"title": "serialize-javascript",
"value": "serialize-javascript - Serialize JavaScript to a superset of JSON that includes regular expressions and functions."
},
{
"title": "js-tokens",
"value": "js-tokens - Tiny JavaScript tokenizer."
},
{
"title": "is-array-buffer",
"value": "is-array-buffer - Is this value a JS ArrayBuffer?"
},
{
"title": "md5",
"value": "md5 - js function for hashing messages with MD5"
}
]
}
}
As you can see, I have 20 results but only 15 are shown. The invoke request completely ignores the count property set in Data.Query:
"value": {
"queryText": "js",
"queryOptions": {
"skip": 0,
"top": 15
},
"dataset": "npmpackages"
},
@jvrasa did you happen to set the "count" property on here?
Yes I added "count": 50
in "choices.data". I forgot to include that step in the how-to above.
Also sorry I made a mistake, I had too many tabs opened when I wrote the reply yesterday. The invoke request doesn't ignore the count property, but the bot does.
@jvrasa -Thanks for providing information, We will inform the engineering team and let you know the update.
@jvrasa to confirm, the invoke is returning the expected response, but the bot dropdown isn't showing the right number of results? Also, may I know if your bot is in a group chat or if it's a channel within a team?
@deekshanya yes that's right. The invoke is correct but the bot doesn't show all the options. I'm not sure what you mean, it's neither of that. It's a personal, one-to-one conversation bot.
@deekshanya -Could you please help for the above ask?
@jvrasa we have a limit of how many options can be displayed by the dropdown. It's currently limited to 15 or lower. If we need that to be modified, let's track it another issue.
Since this issue is tracking if invoke is returning expected number of results, we should be good to close this issue. @sayali-MSFT
We are closing this issue for now, please feel free to reopen it, if required.
Hi Wajeed-msft! This issue is closed in our system. We would like your feedback on your experience with our support team and Platform.
Best regards, Teams Platform
Copied bug from: https://github.com/microsoft/AdaptiveCards/issues/7686
Details from original post:
Target Platforms
Microsoft Teams app as well as website, on both Windows and MacOS.
SDK Version
1.5
Application Name
Microsoft Teams
Problem Description
When an Adaptive Card's Input.ChoiceSet has Typeahead settings provided, the "count" field is expected to be set to the "top" of the invoke to the backend. However, the "top" in the invoke is always set to the 15 rather than the value specified by "count".
For example, in the provided sample curl command and card JSON, we would expect the "invoke" to the backend to request 100 choices, not 15.
Here is the "invoke" request sent to the backend after typing the letter "b" into the Input.ChoiceSet:
Screenshots
No response
Card JSON
Sample Code Language
Curl
Sample Code