Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull Request widget can indicate more PRs when they're aren't #70

Open
krschau opened this issue Dec 8, 2023 · 3 comments
Open

Pull Request widget can indicate more PRs when they're aren't #70

krschau opened this issue Dec 8, 2023 · 3 comments
Labels
Area-Widgets Related to in-package widgets Issue-Bug Something isn't working or needs investigation Priority-3

Comments

@krschau
Copy link
Collaborator

krschau commented Dec 8, 2023

Dev Home Azure Extension version

0.2

Steps to reproduce the bug

If the number of issues returned equals the max number shown, a message is shown saying there are more, but there aren't. Change >= to > in "$when": "${(count(items) >= maxItemsDisplayed)}"
https://github.com/microsoft/DevHomeAzureExtension/blob/main/src/AzureExtension/Widgets/Templates/AzurePullRequestsTemplate.json

Query list widget does not have this issue.

@krschau krschau added Issue-Bug Something isn't working or needs investigation Area-Widgets Related to in-package widgets Priority-3 labels Dec 8, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage New issue that the core contributors need to triage label Dec 8, 2023
@krschau krschau removed the Needs-Triage New issue that the core contributors need to triage label Dec 8, 2023
@dkbennett
Copy link
Member

This was intentional, because we don't actually know the full number of pull request items.

There's an API to tell us the total number of work items in a Query result, but there is no such API for pull request search. As the number of pull requests could be in the thousands or more for a large repository and a broad search, we limit the search to the top N items.

Since we don't know the count, we make an assumption that if we have N results its likely there's more than N, knowing that in the case where result count is actually N, we give the wrong result.

We could work around this by doing a second API call for N+1 items and if that count is N then we know we are in the exact N case to have precisely accurate indicator in the widget. IMO that isn't worth making a second relatively expensive GetPullRequestsAsync call for an unlikely scenario. I would prefer to change the messaging in the widget to indicate "N or more" instead of "more than N".

@krschau
Copy link
Collaborator Author

krschau commented Dec 11, 2023

Thanks for the explanation -- agreed that it's not worth the second API call, but sneaking in a wording change could be good.

@lauren-ciha
Copy link
Member

lauren-ciha commented Jul 11, 2024

At the bottom of the Pull Requests widget, there is now a message saying "Other items not shown". Should we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Widgets Related to in-package widgets Issue-Bug Something isn't working or needs investigation Priority-3
Projects
None yet
Development

No branches or pull requests

3 participants