Only first 30 files per PR show in the "Pull Requests" view on vscode.dev#3683
Only first 30 files per PR show in the "Pull Requests" view on vscode.dev#3683
Conversation
| return ret; | ||
| } | ||
|
|
||
| export async function restPaginate<R extends OctokitTypes.RequestInterface, T>(request: R, variables: Parameters<R>[0]): Promise<T[]> { |
There was a problem hiding this comment.
Would it be possible to stream in the list of PRs instead of waiting until all PRs are fetched?
There was a problem hiding this comment.
This is the list of files (we actually do stream the list of PRs) and we can indeed stream it, but the user will need to click a "load more files" tree item for each next fetch. Unlike PRs though, I am guessing that if a user expands a PR then they will want to see all the files almost 100% of the time. The trade off is slower listing of files (even for a 900 file change it's not too bad) vs. having to click an annoying button repeatedly.
There was a problem hiding this comment.
This is also just a quick fix for a bug. I also want to investigate the perf of expanding a PR tree node and I can see how much improvement we get from streaming as part of that: #3684
There was a problem hiding this comment.
but the user will need to click a "load more files" tree item for each next fetch
I mean streaming without clicking, but more a loading animation at the end of the list which gets longer with every fetched page.
Then, if there are 1000s of files, it wouldn't block the list to show.
There was a problem hiding this comment.
The extension API for the tree view doesn't have support for that built in, but it might be doable nonetheless. When I do the perf investigation I'll see what's possible.
Fixes #3682