Skip to content

Conversation

exigow
Copy link
Collaborator

@exigow exigow commented Aug 21, 2025

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 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 tomasz-stefaniak and Patrick-Erichsen 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
Copy link

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


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

Copy link

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
Copy link
Collaborator Author

exigow commented Aug 25, 2025

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
Copy link
Collaborator Author

exigow commented Aug 25, 2025

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

@exigow
Copy link
Collaborator Author

exigow commented Aug 25, 2025

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
Copy link

⚠️ 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.
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Aug 26, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 26, 2025
@Patrick-Erichsen
Copy link
Collaborator

@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
Copy link
Collaborator Author

exigow commented Aug 26, 2025

@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
Copy link
Collaborator Author

exigow commented Aug 26, 2025

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
Copy link
Collaborator Author

exigow commented Aug 27, 2025

🟢

(fix: 2b085c1)

@Patrick-Erichsen Patrick-Erichsen merged commit 62f468a into main Aug 27, 2025
109 of 113 checks passed
@Patrick-Erichsen Patrick-Erichsen deleted the exigow/fix-jcef branch August 27, 2025 16:37
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Aug 27, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2025
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 size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants