Skip to content

Fix Browser View not found#307228

Closed
jruales wants to merge 1 commit intomainfrom
jruales/fix-browser-view-not-found
Closed

Fix Browser View not found#307228
jruales wants to merge 1 commit intomainfrom
jruales/fix-browser-view-not-found

Conversation

@jruales
Copy link
Copy Markdown
Contributor

@jruales jruales commented Apr 1, 2026

image

Copilot AI review requested due to automatic review settings April 1, 2026 19:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a “Browser View not found” failure mode by preventing BrowserViewModel.setVisible() from calling into IBrowserViewService after the model has already been disposed, avoiding service calls against a no-longer-valid view.

Changes:

  • Add a disposal guard in BrowserViewModel.setVisible() to early-return when the model’s disposable store is already disposed.

Comment on lines 441 to +444
this._visible = visible; // Set optimistically so model is in sync immediately
if (this._store.isDisposed) {
return;
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

setVisible updates the model state (this._visible = visible) before checking this._store.isDisposed. If setVisible is invoked after disposal, this still mutates the model even though the service call is skipped, which can leave observers with an inconsistent visible value. Consider returning early before changing _visible, or otherwise ensure disposed instances cannot be observed/used after disposal (e.g. clear listeners / avoid calling setVisible on disposed models).

Suggested change
this._visible = visible; // Set optimistically so model is in sync immediately
if (this._store.isDisposed) {
return;
}
if (this._store.isDisposed) {
return;
}
this._visible = visible; // Set optimistically so model is in sync immediately

Copilot uses AI. Check for mistakes.
@jruales
Copy link
Copy Markdown
Contributor Author

jruales commented Apr 3, 2026

@jruales jruales closed this Apr 3, 2026
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