Skip to content

Conversation

@QianKuang8
Copy link
Contributor

@QianKuang8 QianKuang8 commented Nov 13, 2025

Description

Discussion in #8085

Add a reload button and an action

With manual test, it works well in normal case. Not 100% sure whether it would work when UI freezes.

video.mp4

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

image image

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Adds a Reload button for the Continue tool window that rebuilds the JCEF browser and client to recover from freezes or crashes.

  • New Features

    • Added ReloadBrowserAction and toolbar button to dispose the current JCEF browser and re-create it, then refresh tool window content.
    • ContinueBrowserService now provides reload() and load() to manage lifecycle and re-initialization.
  • Bug Fixes

    • Use a dedicated JBCefClient with JS_QUERY_POOL_SIZE=200 set correctly and disposed on teardown.

Written for commit a097b35. Summary will update automatically on new commits.

@QianKuang8 QianKuang8 requested a review from a team as a code owner November 13, 2025 06:27
@QianKuang8 QianKuang8 requested review from Patrick-Erichsen and removed request for a team November 13, 2025 06:27
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 13, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Nov 18, 2025
@QianKuang8 QianKuang8 changed the title Feat: add JCEF reload action feat: add JCEF reload action Nov 18, 2025
Comment on lines +24 to +27
private val myJBCefClient: JBCefClient = JBCefApp.getInstance().createClient().apply {
setProperty(JBCefClient.Properties.JS_QUERY_POOL_SIZE, 200)
}
private val browser: JBCefBrowser = JBCefBrowser.createBuilder().setOffScreenRendering(true).setClient(myJBCefClient).build()
Copy link
Collaborator

Choose a reason for hiding this comment

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

how come were changing this logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Commit e998ae8 was added to address the issue mentioned in #8085 (comment)

[5473397] WARN - #c.i.u.j.JBCefJSQuery - Set the property JBCefClient.Properties.JS_QUERY_POOL_SIZE to use JBCefJSQuery after the browser has been created

If you have concerns about the fix, I can revert that commit so we can focus on the reload action in this PR.

Copy link
Collaborator

@Patrick-Erichsen Patrick-Erichsen left a comment

Choose a reason for hiding this comment

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

Can you explain the changes here? I'm weary to modify the core browser logic and potentially making things worse than they already are.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants