Skip to content

fix: fix JCEF browser issues - #7291

Merged
Patrick-Erichsen merged 4 commits into
mainfrom
exigow/fix-jcef
Aug 27, 2025
Merged

Patrick-Erichsen merged 4 commits into
mainfrom
exigow/fix-jcef

Conversation

@exigow

@exigow exigow commented Aug 21, 2025 •

Copy link
Copy Markdown
Contributor

Solves CON-2469
Solves CON-2979
Solves #5504

Changes

Off-screen rendering is the new default

Off-screen rendering is now enabled by default. This is motivated by the fact that most users will benefit from it,
but the minority with issues can disable it in the Continue settings. I believe this is the correct strategy,
because disabling it causes a flickering window for the majority.

Note: I tried to mask it by preloading the HTML with a background color and by changing the background color of the
browser component. That worked, but only reduced the flashing time and didn't completely eliminate the problem.
Enabling Off-screen rendering seems to be the only robust solution.

Fix JS_QUERY_POOL_SIZE errors

After decoupling the browser from the toolbar and moving it to a dedicated service, there is now full control over
when and what is initialized. The setting is now applied correctly.

Rework actions

I've noticed that most of the actions require a working, active Continue toolbar.
I've created the ContinueToolbarAction abstraction to remove duplicated logic. I've also removed actions.utils.

Minor changes

  • Fix bug in CoreMessenger.handleMessage (some pass-through messages had message type used as message ID)
  • Add browser package and moved browser-related classes there, including CustomHandlerFactory (package factories is now removed). CustomHandlerFactory implementation is untouched.
  • Add project.getBrowser() extension method (this is mostly for readability).
  • Some loggers now use a shorter identifier (simple class name) without the full package, because our package name is
    unusually long, and it was hard to read the logs.
  • Remove commented-out TerminalActivityTrackingService.
  • Create JcefErrorPanel and put jcef_error.html there.

@exigow exigow changed the title Fix JCEF issues fix: fix JCEF browser issues Aug 22, 2025
@exigow exigow mentioned this pull request Aug 25, 2025
2 of 3 tasks
@exigow
exigow marked this pull request as ready for review August 25, 2025 13:32
@exigow
exigow requested a review from a team as a code owner August 25, 2025 13:32
@exigow
exigow requested review from Patrick-Erichsen and tomasz-stefaniak and removed request for a team and tomasz-stefaniak August 25, 2025 13:32
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Aug 25, 2025
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ AI review completed but no review output was generated. Check the action logs for details.


💡 To request a new review, comment @continue-general-review

@github-actions

Copy link
Copy Markdown
Contributor

AI Code Review

AI review completed but failed to parse output

No specific line comments generated.


💡 To request a new detailed review, comment @continue-detailed-review

@exigow

exigow commented Aug 25, 2025

Copy link
Copy Markdown
Contributor Author

I tested all the features (actions, focusing, chat functionalities) and it seems to be OK, except for one action that doesn’t recognize the command focusContinueInputWithoutClear, however, this issue existed before. I squashed all the "wip" commits into a single one with all the details.

@exigow

exigow commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor Author

I'm switching it back to draft because we need to discuss OSR (let's wait with merge).

@exigow
exigow marked this pull request as draft August 25, 2025 15:47
@exigow

exigow commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor Author

✅ TODO: Remove OSR from settings (it should be enabled by default with no option to change).

I've enabled OSR by default and removed the option. I also made sure there are no outdated comments in the readme/contribute docs.

@exigow
exigow marked this pull request as ready for review August 26, 2025 13:06
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ AI review completed but no review output was generated. Check the action logs for details.


💡 To request a new review, comment @continue-general-review

exigow added 2 commits August 26, 2025 16:32
Solves CON-2469
Solves CON-2979

Off-screen rendering is now enabled by default. This is motivated by the fact that most users will benefit from it,
but the minority with issues can disable it in the Continue settings. I believe this is the correct strategy,
because disabling it causes a flickering window for the majority.

Note: I tried to mask it by preloading the HTML with a background color and by changing the background color of the
browser component. That worked, but only reduced the flashing time and didn't completely eliminate the problem.
Enabling Off-screen rendering seems to be the only robust solution.

After decoupling the browser from the toolbar and moving it to a dedicated service, there is now full control over
when and what is initialized. The setting is now applied correctly.

I've noticed that most of the actions require a working, active Continue toolbar.
I've created the `ContinueToolbarAction` abstraction to remove duplicated logic. I've also removed `actions.utils`.

* Fix bug in `CoreMessenger.handleMessage` (some pass-through messages had message type used as message ID)
* Add `browser` package and moved browser-related classes there, including `CustomHandlerFactory` (package `factories` is now removed). `CustomHandlerFactory` implementation is untouched.
* Add `project.getBrowser()` extension method (this is mostly for readability).
* Some loggers now use a shorter identifier (simple class name) without the full package, because our package name is
  unusually long, and it was hard to read the logs.
* Remove commented-out `TerminalActivityTrackingService`.
* Create `JcefErrorPanel` and put `jcef_error.html` there.
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 26, 2025
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

@exigow I think the test failure here is no longer flake. Might be a test that we can just remove though, lmk your thoughts.

@exigow

exigow commented Aug 26, 2025

Copy link
Copy Markdown
Contributor Author

@Patrick-Erichsen, you're right, it was failing test (compilation error caused by changes in our browser code). 😅

I think it's better to remove it. The test was fine, but almost everything was mocked there and the test was heavily dependent on the handler's code (+ everything around). It made some sense, but ideally there should be as few mocks as possible and it should be tested in a more black-box manner.

If you think we should keep it, let me know - I'll try to fix it.

@exigow

exigow commented Aug 26, 2025 •

Copy link
Copy Markdown
Contributor Author

Interesting error on CI (it's from e2e test I suppose):

[0826/175633.869512:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/runner/.gradle/caches/8.14.3/transforms/83a0ed050b837f55f39183dd9bb4af55/transformed/ideaIC-2024.1/jbr/lib/chrome-sandbox is owned by root and has mode 4755.

Test is passing locally. 😮‍💨 I'm investigating this right now.

@exigow
exigow force-pushed the exigow/fix-jcef branch 14 times, most recently from 48ee225 to 2b085c1 Compare August 27, 2025 14:43
@exigow

exigow commented Aug 27, 2025

Copy link
Copy Markdown
Contributor Author

🟢

(fix: 2b085c1)

@Patrick-Erichsen
Patrick-Erichsen merged commit 62f468a into main Aug 27, 2025
@Patrick-Erichsen
Patrick-Erichsen deleted the exigow/fix-jcef branch August 27, 2025 16:37
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 27, 2025
@sestinj

sestinj commented Sep 1, 2025

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj

sestinj commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer released size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants