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

fix: race condition when opening chat panel #1836

Merged
merged 17 commits into from
Nov 21, 2023
Merged

fix: race condition when opening chat panel #1836

merged 17 commits into from
Nov 21, 2023

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Nov 21, 2023

Follow up from #1835

Edit

Updated to use debounce instead of auto-reload as it was causing most of the tests to fail.

Screen.Recording.2023-11-21.at.2.59.17.PM.mov

Old Summary

Instead of checking if the current chat panel is active or not, this PR updates the webview to reload automatically when it failed to load after 2000ms so users can have multiple chat panels opened, where some of them might be stuck at the loading stuck when it was first opened, but they will reload automatically.

  • Add delays before sending webview ready events to prevent premature sending.

Test plan

See 0.01 in video below:

Screen.Recording.2023-11-20.at.7.34.54.PM.mov

Works fine when starting multiple commands:

Screen.Recording.2023-11-20.at.7.43.17.PM.mov

Copy link
Contributor

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

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

Neat solution! 🙌🏼

vscode/webviews/App.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

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

Tested again 👍🏼

@abeatrix abeatrix changed the title fix: auto reload chat panel fix: race condition when opening chat panel Nov 21, 2023
@abeatrix abeatrix merged commit 30180c8 into main Nov 21, 2023
16 checks passed
@abeatrix abeatrix deleted the bee/fix-auto-load branch November 21, 2023 23:01
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