Refactor EventBroker and enhance tests#343
Merged
taldekar merged 1 commit intotaldekar/ViewRouterfrom Feb 4, 2025
Merged
Conversation
nborges-aws
approved these changes
Feb 3, 2025
breedloj
approved these changes
Feb 3, 2025
taldekar
added a commit
that referenced
this pull request
Feb 4, 2025
* improved handling of lsp failure state * add static mock to lsp connection test case * Integrate Event Broker in LspStatusManager * Add ViewRouter POC * Fix code formatting bug * Add method to retrieve observables * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add functionality for hot event streams that track latest event (#340) * Add functionality for hot subscribers that track latest event * Add test to ensure event stream isolation * Fix missing subscription disposal in test * Use autoConnect to implicitly manage stream connection * Remove active view update request listener * Add ViewRouter tests * Remove public constructor * Remove public constructor and unused event in tests * Add comments * Add documentation for EventBroker * Remove ViewRouter initialization * Remove LspInitializingView from ID enum * Add documentation for ViewRouter * Refactor and enhance EventBroker tests * Refactor ViewRouter tests for clarity * Remove PluginState class into separate file * Add documentation to subscription management logic * Add support for notifying multiple late-subscribers over time of latest state (#342) * Remove CODE_REFERENCE_VIEW * Rename newActiveViewId to newActiveView * Rename ViewId class to AmazonQViewType * Revert "Integrate Event Broker in LspStatusManager" This reverts commit 374e549. * Revert "improved handling of lsp failure state" This reverts commit 13c55ac. * Refactor EventBroker and enhance tests (#343) --------- Co-authored-by: Nicolas Borges <nickdb@amazon.com>
taldekar
added a commit
that referenced
this pull request
Feb 25, 2025
* improved handling of lsp failure state * add static mock to lsp connection test case * Integrate Event Broker in LspStatusManager * Add ViewRouter POC * Fix code formatting bug * Add method to retrieve observables * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add functionality for hot event streams that track latest event (#340) * Add functionality for hot subscribers that track latest event * Add test to ensure event stream isolation * Fix missing subscription disposal in test * Use autoConnect to implicitly manage stream connection * Remove active view update request listener * Add ViewRouter tests * Remove public constructor * Remove public constructor and unused event in tests * Add comments * Add documentation for EventBroker * Remove ViewRouter initialization * Remove LspInitializingView from ID enum * Add documentation for ViewRouter * Refactor and enhance EventBroker tests * Refactor ViewRouter tests for clarity * Remove PluginState class into separate file * Add documentation to subscription management logic * Add support for notifying multiple late-subscribers over time of latest state (#342) * Remove CODE_REFERENCE_VIEW * Rename newActiveViewId to newActiveView * Rename ViewId class to AmazonQViewType * Revert "Integrate Event Broker in LspStatusManager" This reverts commit 374e549. * Revert "improved handling of lsp failure state" This reverts commit 13c55ac. * Refactor EventBroker and enhance tests (#343) --------- Co-authored-by: Nicolas Borges <nickdb@amazon.com>
taldekar
added a commit
that referenced
this pull request
Mar 7, 2025
* improved handling of lsp failure state * add static mock to lsp connection test case * Integrate Event Broker in LspStatusManager * Add ViewRouter POC * Fix code formatting bug * Add method to retrieve observables * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add functionality for hot event streams that track latest event (#340) * Add functionality for hot subscribers that track latest event * Add test to ensure event stream isolation * Fix missing subscription disposal in test * Use autoConnect to implicitly manage stream connection * Remove active view update request listener * Add ViewRouter tests * Remove public constructor * Remove public constructor and unused event in tests * Add comments * Add documentation for EventBroker * Remove ViewRouter initialization * Remove LspInitializingView from ID enum * Add documentation for ViewRouter * Refactor and enhance EventBroker tests * Refactor ViewRouter tests for clarity * Remove PluginState class into separate file * Add documentation to subscription management logic * Add support for notifying multiple late-subscribers over time of latest state (#342) * Remove CODE_REFERENCE_VIEW * Rename newActiveViewId to newActiveView * Rename ViewId class to AmazonQViewType * Revert "Integrate Event Broker in LspStatusManager" This reverts commit 374e549. * Revert "improved handling of lsp failure state" This reverts commit 13c55ac. * Refactor EventBroker and enhance tests (#343) --------- Co-authored-by: Nicolas Borges <nickdb@amazon.com>
taldekar
added a commit
that referenced
this pull request
Mar 12, 2025
…382) * improved handling of lsp failure state (#309) * Introduce ViewRouter Component (#337) * improved handling of lsp failure state * add static mock to lsp connection test case * Integrate Event Broker in LspStatusManager * Add ViewRouter POC * Fix code formatting bug * Add method to retrieve observables * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add functionality for hot event streams that track latest event (#340) * Add functionality for hot subscribers that track latest event * Add test to ensure event stream isolation * Fix missing subscription disposal in test * Use autoConnect to implicitly manage stream connection * Remove active view update request listener * Add ViewRouter tests * Remove public constructor * Remove public constructor and unused event in tests * Add comments * Add documentation for EventBroker * Remove ViewRouter initialization * Remove LspInitializingView from ID enum * Add documentation for ViewRouter * Refactor and enhance EventBroker tests * Refactor ViewRouter tests for clarity * Remove PluginState class into separate file * Add documentation to subscription management logic * Add support for notifying multiple late-subscribers over time of latest state (#342) * Remove CODE_REFERENCE_VIEW * Rename newActiveViewId to newActiveView * Rename ViewId class to AmazonQViewType * Revert "Integrate Event Broker in LspStatusManager" This reverts commit 374e549. * Revert "improved handling of lsp failure state" This reverts commit 13c55ac. * Refactor EventBroker and enhance tests (#343) --------- Co-authored-by: Nicolas Borges <nickdb@amazon.com> * Introduce View Container and base view components (#338) * Add Browser Provider component (#357) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Add webview dependency missing logic to ViewRouter * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Add Webview Asset Providers (#358) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Add webview dependency missing logic to ViewRouter * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' * Rebase changes from Browser Provider PR * Fix ViewRouter --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Integrate browser based views in ViewContainer (#359) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' * Rebase changes from Browser Provider PR * Fix ViewRouter * Integrate browser based views in ViewContainer * Fix checkstyle issues * Fix AmazonQBrowserProvider tests * Fix bug due to display sync exec call * Add semaphore locking to container to prevent race conditions * Add browser focus handling * Add state checking methods to LspState * Clean up code * Remove unnecessary parent assignment from chat webview * Refactor ViewVisibilityManager to default to one view * Add accidentally removed telemetry emissions * Update plugin descriptor (#360) * Move semaphore locking/unlocking to try/finally block --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Separate Chat and Toolkit Login web view asset state event stream (#361) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' * Rebase changes from Browser Provider PR * Fix ViewRouter * Integrate browser based views in ViewContainer * Fix checkstyle issues * Fix AmazonQBrowserProvider tests * Fix bug due to display sync exec call * Add semaphore locking to container to prevent race conditions * Add browser focus handling * Separate Chat and Toolkit Login webview asset event stream * Separate Chat and Toolkit Login webview asset event stream * Add state checking methods to LspState * Clean up code * Remove unnecessary parent assignment from chat webview * Refactor ViewVisibilityManager to default to one view * Add accidentally removed telemetry emissions * Fix issue in a comment due to stash * Update AssetProviders to publish state everytime content is fetched * Update plugin descriptor (#360) * Remove business logic from asset provider constructors * Remove redundant methods to check state --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Refactor view actions and move setup code to base view (#370) * Refactor actions and move to base view * Improve disposal logic * Fix minor bugs * Fix minor bugs * Remove unnecessary BaseView class (#371) * Remove LspStatusManager (#365) * Remove LspStatusManager * Refactor browser provider (#366) * Move publishing browser status to Activator * Fix potential memory visibility bug (#367) * Fix thread visibility bug * Fix thread visibility bug * Remove chat asset provider (#368) * Fix thread visibility bug * Remove ChatAssetProvider * Fix bugs in ViewRefactor feature branch (#362) * Remove redundant state check method * Fix bugs in view refactor branch * Fix checkstyle issues * Make webview asset provider disposal more selective * Reset content on dispose * Redirect old views to point to the ViewContainer (#380) * Redirect old view IDs to point to ViewContainer * Redirect old view IDs to point to ViewContainer * Auto detection of proxy settings * Make keystore custom cert injection additive * Introduce ViewRouter Component (#337) * improved handling of lsp failure state * add static mock to lsp connection test case * Integrate Event Broker in LspStatusManager * Add ViewRouter POC * Fix code formatting bug * Add method to retrieve observables * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add functionality for hot event streams that track latest event (#340) * Add functionality for hot subscribers that track latest event * Add test to ensure event stream isolation * Fix missing subscription disposal in test * Use autoConnect to implicitly manage stream connection * Remove active view update request listener * Add ViewRouter tests * Remove public constructor * Remove public constructor and unused event in tests * Add comments * Add documentation for EventBroker * Remove ViewRouter initialization * Remove LspInitializingView from ID enum * Add documentation for ViewRouter * Refactor and enhance EventBroker tests * Refactor ViewRouter tests for clarity * Remove PluginState class into separate file * Add documentation to subscription management logic * Add support for notifying multiple late-subscribers over time of latest state (#342) * Remove CODE_REFERENCE_VIEW * Rename newActiveViewId to newActiveView * Rename ViewId class to AmazonQViewType * Revert "Integrate Event Broker in LspStatusManager" This reverts commit 374e549. * Revert "improved handling of lsp failure state" This reverts commit 13c55ac. * Refactor EventBroker and enhance tests (#343) --------- Co-authored-by: Nicolas Borges <nickdb@amazon.com> * Add Browser Provider component (#357) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Add webview dependency missing logic to ViewRouter * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Add Webview Asset Providers (#358) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Add webview dependency missing logic to ViewRouter * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' * Rebase changes from Browser Provider PR * Fix ViewRouter --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Integrate browser based views in ViewContainer (#359) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' * Rebase changes from Browser Provider PR * Fix ViewRouter * Integrate browser based views in ViewContainer * Fix checkstyle issues * Fix AmazonQBrowserProvider tests * Fix bug due to display sync exec call * Add semaphore locking to container to prevent race conditions * Add browser focus handling * Add state checking methods to LspState * Clean up code * Remove unnecessary parent assignment from chat webview * Refactor ViewVisibilityManager to default to one view * Add accidentally removed telemetry emissions * Update plugin descriptor (#360) * Move semaphore locking/unlocking to try/finally block --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Merge main into feature/viewRefactor * Refactor asset providers (#383) * Refactor asset provider to handle JS asset setup * Move progress listener for flicker bug out of asset providers * Pre-fetch assets to publish asset state on event broker * Consolidate events into their own package (#385) * Refactor asset provider to handle JS asset setup * Move events to their own package * Move progress listener for flicker bug out of asset providers * Clean up code * Refactor asset provider interface (#386) * Refactor asset provider interface * Update initialize method to only fire once * Trigger LSP configuration pull on preference update (#388) * Open Flare version constraint (#389) * Bump version to 1.0.4-SNAPSHOT * Add dropdown menu on top level Q toolbar icon * Add item for opening Q Chat * Introduce ViewRouter Component (#337) * improved handling of lsp failure state * add static mock to lsp connection test case * Integrate Event Broker in LspStatusManager * Add ViewRouter POC * Fix code formatting bug * Add method to retrieve observables * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add listeners for combined state streams and view update request * Add functionality for hot event streams that track latest event (#340) * Add functionality for hot subscribers that track latest event * Add test to ensure event stream isolation * Fix missing subscription disposal in test * Use autoConnect to implicitly manage stream connection * Remove active view update request listener * Add ViewRouter tests * Remove public constructor * Remove public constructor and unused event in tests * Add comments * Add documentation for EventBroker * Remove ViewRouter initialization * Remove LspInitializingView from ID enum * Add documentation for ViewRouter * Refactor and enhance EventBroker tests * Refactor ViewRouter tests for clarity * Remove PluginState class into separate file * Add documentation to subscription management logic * Add support for notifying multiple late-subscribers over time of latest state (#342) * Remove CODE_REFERENCE_VIEW * Rename newActiveViewId to newActiveView * Rename ViewId class to AmazonQViewType * Revert "Integrate Event Broker in LspStatusManager" This reverts commit 374e549. * Revert "improved handling of lsp failure state" This reverts commit 13c55ac. * Refactor EventBroker and enhance tests (#343) --------- Co-authored-by: Nicolas Borges <nickdb@amazon.com> * Add Browser Provider component (#357) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Add webview dependency missing logic to ViewRouter * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Add Webview Asset Providers (#358) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Add webview dependency missing logic to ViewRouter * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' * Rebase changes from Browser Provider PR * Fix ViewRouter --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Integrate browser based views in ViewContainer (#359) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' * Rebase changes from Browser Provider PR * Fix ViewRouter * Integrate browser based views in ViewContainer * Fix checkstyle issues * Fix AmazonQBrowserProvider tests * Fix bug due to display sync exec call * Add semaphore locking to container to prevent race conditions * Add browser focus handling * Add state checking methods to LspState * Clean up code * Remove unnecessary parent assignment from chat webview * Refactor ViewVisibilityManager to default to one view * Add accidentally removed telemetry emissions * Update plugin descriptor (#360) * Move semaphore locking/unlocking to try/finally block --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Refactor view actions and move setup code to base view (#370) * Refactor actions and move to base view * Improve disposal logic * Fix minor bugs * Fix minor bugs * Auto detection of proxy settings * Integrate browser based views in ViewContainer (#359) * Pass populated AWS_CA_BUNDLE env var to Flare (#341) * Add UI notification to alert user of deprecated manifest version (#312) * Revert commit 'Add UI notification to alert user of deprecated manifest version' * Revert 'Pass populated AWS_CA_BUNDLE env var to Flare' * Rebase changes from Browser Provider PR * Fix ViewRouter * Integrate browser based views in ViewContainer * Fix checkstyle issues * Fix AmazonQBrowserProvider tests * Fix bug due to display sync exec call * Add semaphore locking to container to prevent race conditions * Add browser focus handling * Add state checking methods to LspState * Clean up code * Remove unnecessary parent assignment from chat webview * Refactor ViewVisibilityManager to default to one view * Add accidentally removed telemetry emissions * Update plugin descriptor (#360) * Move semaphore locking/unlocking to try/finally block --------- Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Nicolas <nborges.aws@gmail.com> * Refactor asset providers (#383) * Refactor asset provider to handle JS asset setup * Move progress listener for flicker bug out of asset providers * Pre-fetch assets to publish asset state on event broker * Integrate AmazonQCommonActions change * Integrate AmazonQCommonActions change * Remove duplicate events * Fix global drop-down visibility bug * Fix UdateUtil bug * Fix UdateUtil bug * Fix missing imports * Improve timing of early startup activity (#393) (#394) * Improve timing of early startup activity * Fix unit test Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: Ishan Taldekar <taldekar@amazon.com> * Remove unused imports * Fix Event Broker subscription disposal bug (#392) (#395) * Fix Event Broker subscription disposal bug * Add null check Co-authored-by: Ishan Taldekar <taldekar@amazon.com> * Remove dispose method * Remove redundant classes --------- Co-authored-by: Nicolas <nborges.aws@gmail.com> Co-authored-by: Nicolas Borges <nickdb@amazon.com> Co-authored-by: Jonathan Breedlove <breedloj@amazon.com> Co-authored-by: aws-toolkit-automation <43144436+aws-toolkit-automation@users.noreply.github.com>
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.
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.