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

feat: restore chat webview on reload #1918

Merged
merged 4 commits into from
Nov 28, 2023
Merged

feat: restore chat webview on reload #1918

merged 4 commits into from
Nov 28, 2023

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Nov 28, 2023

CLOSE #1814

This PR added support for reviving the last opened chat panel (if any) on reload.

Test plan

  • Build Cody from this branch
  • Open a chat and ask Cody a question
  • Reload your editor
  • You should see the last opened chat opened in your editor before the reload
  • Works with SimpleContext

Update 1

Last panel that was not closed gets disposed before it gets recreated.

Screen.Recording.2023-11-27.at.7.41.42.PM.mov

Update 2

Loom: https://www.loom.com/share/1b7acfa69fff4b708bde8c9f3282bdb3?sid=f89aecb4-4caf-4525-bc56-63b34e5c9369

Last panel that was not closed gets revived properly.

DEMO.-.pull_1918.revive.chat.panel.on.reload.mp4

@abeatrix abeatrix requested review from toolmantim and a team November 28, 2023 03:50
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 this worked well for me. It does a strange tab size & focus jiggle before it finally loads, but looks like that's just a VS Code quirk?

@abeatrix
Copy link
Contributor Author

abeatrix commented Nov 28, 2023

Tested this worked well for me. It does a strange tab size & focus jiggle before it finally loads, but looks like that's just a VS Code quirk?

i was doing it the hacky way, but i just implemented the revive function so the webview is no longer getting disposed and then recreated 😄

Loom: https://www.loom.com/share/1b7acfa69fff4b708bde8c9f3282bdb3?sid=f89aecb4-4caf-4525-bc56-63b34e5c9369

DEMO.-.pull_1918.revive.chat.panel.on.reload.mp4

@abeatrix abeatrix merged commit 4bc6c47 into main Nov 28, 2023
15 checks passed
@abeatrix abeatrix deleted the bee/chatview-on-reload branch November 28, 2023 21:47
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: reloading page with new chat UI shows empty tabs
2 participants