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

✨ Integrate results view with diff view & add Kai fix webview panel #90

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

ibolton336
Copy link
Member

@ibolton336 ibolton336 commented Nov 5, 2024

  • Add webview messaging for solution request and confirmation for communication between all 3 webviews. New handlers created.

  • When a solution is requested (getSolution command), the solution is immediately applied.

    • This triggers the opening of a kai fix viewer (webview panel) that displays the violation and other incidents based on lightbulb click context.
    • Sets up the plumbing to allow the creation of a new webview that supports opening a panel. Augmented the current webview provider to allow this.
    • This new panel is initialized on solution request. Resolution panel outer webview is created on startup just like the analysis webview - Was able to setup a new var for view type and pass that down when webview is initialized so that our react app can conditionally render / route to different components based on this var. So we have 2 entirely seperate webviews that can be messaged and handle requests .. we just have to grab it from the new map in extension state and make a request to it. They both are fed the same react app, we just conditionally show what is there based on the viewtype var.
  • Logic to handle queue for resolution panel since it is created & messaged at same time during solution request.

    • Opening a webview panel vs a webview has its own lifecycle that made creating the panel & then sending a message to it very interesting.
      The panel needs to exist and have the listener set up before it can receive messages, so needed to implement a queue system. Messages are pushed to the queue if the webview panel isnt ready and then looped through and sent once the panel exists.
  • Refactor the analysis view card to use PF6 card header & expansion techniques. Allows us the ability to use the dropdown as a part of the card actions. This is where the fix all button currently sits which requests solutions for all incidents within the parent violation umbrella.

  • Adds a lightbulb icon at the incident level for triggering single incident solution requests.

TODO:

webview-ui/src/App.tsx Outdated Show resolved Hide resolved
vscode/src/webviewMessageHandler.ts Outdated Show resolved Hide resolved
vscode/src/diffView/register.ts Outdated Show resolved Hide resolved
webview-ui/src/App.tsx Outdated Show resolved Hide resolved
@rszwajko
Copy link
Contributor

rszwajko commented Nov 7, 2024

@ibolton336
check newest changes in #79 - I was finally able to integrate with VsCodeExtension and real(loaded) solutions.

@ibolton336 ibolton336 force-pushed the konveyor-view-ian branch 2 times, most recently from 1de4589 to 8b8bfc4 Compare November 9, 2024 01:49
@ibolton336 ibolton336 changed the base branch from main to acceptChange November 9, 2024 01:52
@ibolton336 ibolton336 changed the base branch from acceptChange to main November 12, 2024 18:27
@ibolton336 ibolton336 force-pushed the konveyor-view-ian branch 4 times, most recently from 7e968be to 3cfdf90 Compare November 13, 2024 02:16
vscode/package.json Outdated Show resolved Hide resolved
vscode/package.json Outdated Show resolved Hide resolved
vscode/src/KonveyorGUIWebviewViewProvider.ts Show resolved Hide resolved
vscode/src/commands.ts Show resolved Hide resolved
vscode/src/diffView/fileSystemProvider.ts Outdated Show resolved Hide resolved
vscode/src/diffView/mock.ts Outdated Show resolved Hide resolved
vscode/src/diffView/solutionCommands.ts Outdated Show resolved Hide resolved
webview-ui/src/components/AnalysisPage.tsx Show resolved Hide resolved
webview-ui/src/components/AnalysisPage.tsx Show resolved Hide resolved
@ibolton336 ibolton336 force-pushed the konveyor-view-ian branch 2 times, most recently from b83b9ce to dc7170c Compare November 14, 2024 21:19
@ibolton336 ibolton336 marked this pull request as ready for review November 14, 2024 21:20
@ibolton336 ibolton336 requested a review from a team as a code owner November 14, 2024 21:20
@ibolton336 ibolton336 requested a review from djzager November 14, 2024 21:20
@ibolton336 ibolton336 changed the title ✨ Adds webview button changes and integrate results view with diff view ✨ Integrate results view with diff view & add Kai fix webview panel Nov 14, 2024
@ibolton336 ibolton336 force-pushed the konveyor-view-ian branch 8 times, most recently from 0c3de01 to 54b8a07 Compare November 19, 2024 21:22
rszwajko
rszwajko previously approved these changes Nov 19, 2024
Copy link
Contributor

@rszwajko rszwajko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK! We can discuss the points in comments later on and if needed fix in follow-up. It would be nice to attach a screencast or screenshots of the the full flow.

vscode/src/webviewMessageHandler.ts Show resolved Hide resolved
vscode/src/webviewMessageHandler.ts Show resolved Hide resolved
vscode/src/webviewMessageHandler.ts Show resolved Hide resolved
vscode/src/webviewMessageHandler.ts Show resolved Hide resolved
Display the resolutionsView panel on solution retrieval

Get show resolution panel code working

Add new webview routing logic

Populate resolutions view from solutions

Add more detailed resolution view

Add hook for message handler in webview

Add hooks and utils for vscode messaging from webview

Check if solution uri matches

return control to sidebar if resolution page closes

Apply file changes from webview and track solution state

Signed-off-by: Ian Bolton <[email protected]>
Signed-off-by: Ian Bolton <[email protected]>
@ibolton336 ibolton336 merged commit cb2c2a9 into konveyor:main Nov 19, 2024
11 checks passed
@ibolton336 ibolton336 deleted the konveyor-view-ian branch November 19, 2024 22:30
@ibolton336
Copy link
Member Author

Screen.Recording.2024-11-19.at.4.15.51.PM.mov
Screen.Recording.2024-11-19.at.4.38.30.PM.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants