Skip to content

[OP-20422] Update CKEditor build (esbuild) - #25889

Draft
myabc wants to merge 1 commit into
devfrom
code-maintenance/op-20422-ckeditor-esbuild-build
Draft

myabc wants to merge 1 commit into
devfrom
code-maintenance/op-20422-ckeditor-esbuild-build

Conversation

@myabc

@myabc myabc commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Ticket

https://community.openproject.org/wp/OP-20422

What are you trying to accomplish?

Updates the vendored CKEditor build to the one produced by opf/commonmark-ckeditor-build#139, which bundles the editor with esbuild instead of webpack. The editor sources are unchanged; only ckeditor.js and its source map differ. The stylesheet and the translations are byte-identical.

This PR exists to run the full suite against the new bundle before the way the editor is delivered changes. It is the last time build output is copied into this repository for OP-20422: a follow-up replaces frontend/src/vendor/ckeditor/ with a pinned npm dependency.

What approach did you choose and why?

The bundle is now an ES module instead of UMD. It still assigns window.OPClassicEditor, window.OPConstrainedEditor and window.OPEditorWatchdog, which is all the editor setup service reads, so nothing else changes here. It is 3.5% larger before compression (1,455,370 bytes against 1,405,787).

Changing the bundler and changing the delivery in one step would leave two possible causes for any failure. Testing the bundle alone first keeps them apart.

AI involvement

Merge checklist

Takes the build that esbuild produces instead of webpack. The editor
sources are unchanged, as are the stylesheet and the translations.
Runs the suite against the new bundle before the editor moves from
this vendored copy to an npm dependency.

https://community.openproject.org/wp/OP-20422
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./modules/bim/spec/features/bim_filter_spec.rb[1:1:1]
  • rspec ./modules/bim/spec/features/bim_navigation_spec.rb[1:2:1:1:1]
  • rspec ./spec/features/notifications/navigation_spec.rb[1:1:1]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #25889, linked for reference only):

- `rspec ./modules/bim/spec/features/bim_filter_spec.rb[1:1:1]`
- `rspec ./modules/bim/spec/features/bim_navigation_spec.rb[1:2:1:1:1]`
- `rspec ./spec/features/notifications/navigation_spec.rb[1:1:1]`

Treat this as a standalone task, unrelated to PR #25889. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #25889 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @myabc to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @myabc, and request a review from @myabc.
On every commit, set @myabc as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant