Merged
Conversation
77c20cf to
f56f017
Compare
Base automatically changed from
elenatanasoiu/download-variant-analysis-results
to
main
October 5, 2022 10:43
To be able to send messages to the open view for a variant analysis, we need to have a reference to the view. This is done by keeping track of all open views in a dictionary indexed by their variant analysis ID. We currently only allow one view per variant analysis, but do allow multiple variant analysis views to be open at a time. In the future, we may want to allow multiple views per variant analysis (such that e.g. "Split right" works), but this is not supported yet. The reason for the indirection through the interfaces is to prevent circular dependencies between the variant analysis view and the manager.
This will ensure that when we return a new variant analysis summary from the API, the variant analysis object will be updated.
All fields in the variant analysis skipped repositories are optional, but this was not properly defined in the API types. This will correct the types and the functions processing the data such that they handle non-existing fields.
This will store the variant analysis in the React state and replace it when the `setVariantAnalysis` message is received.
3a96162 to
6941584
Compare
elenatanasoiu
approved these changes
Oct 5, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's probably easiest to review this PR commit-by-commit.
This implements the
setVariantAnalysismessage, both in the extension host and in the webview. This will only send this message when the monitor retrieves a new variant analysis summary, but this should be extended in the future once we have a central place for managing variant analyses. Then, the view could receive the variant analysis message when the view is loaded (i.e. https://github.com/github/vscode-codeql/pull/1550/files#diff-29b0e9f4687addd3c5aaa5c980a9d079de9f0e1e804cd79aacf81f3239fcd2d1R50-R53).I was able to test that this (merged in with
mainto open the view automatically) will open the view, show the incorrect data until the first poll returns data. When the polling has properly started, it will show the correct data.Checklist
ready-for-doc-reviewlabel there.