Skip to content

Conversation

allancascante
Copy link
Contributor

@allancascante allancascante commented Sep 10, 2025

Description

objectExplorerService methods that rely on nodes to be loaded were being called before the service state was initialized, this led to the errors, added logic to initialize the class state from main controller to avoid calling objectExplorerService methods on invalid state. Now it will load the root connections and nodes even if the Object Explorer from the UI hasn't been loaded.

Code Changes Checklist

  • New or updated unit tests added
  • All existing tests pass (npm run test)
  • Code follows contributing guidelines
  • Telemetry/logging updated if relevant
  • No regressions or UX breakage

Reviewers: Please read our reviewer guidelines

Copy link

github-actions bot commented Sep 10, 2025

PR Changes

Category Target Branch PR Branch Difference
Code Coverage 56.07% 56.07% ⚪ 0.00%
VSIX Size 4816 KB 4814 KB ⚪ -2 KB ( 0% )
Webview Bundle Size 3948 KB 3940 KB ⚪ -8 KB ( 0% )

}
}

public async initialize(): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be getting called in the constructor? Take a look at how connectionConfig.ts handles this:

public initialized: Deferred<void> = new Deferred<void>();


constructor() {
...
void initialize();
}

private async initialize(): Promise<void> {
//... perform async init tasks, then:
this.initialized.resolve();
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this be getting called in the constructor? Take a look at how connectionConfig.ts handles this:

public initialized: Deferred<void> = new Deferred<void>();


constructor() {
...
void initialize();
}

private async initialize(): Promise<void> {
//... perform async init tasks, then:
this.initialized.resolve();
}

that is a possibility, but wouldn't that affect plugin load time if the user has too many 'root nodes'?

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.

[Bug]: OE Pollutes console with connection group error when OE is not initialized
2 participants