Skip to content

docs: fix searchbox spinning forever after Docusaurus upgrade - #25064

Merged
antobinary merged 1 commit into
bigbluebutton:developfrom
antobinary:docs-search
May 12, 2026
Merged

antobinary merged 1 commit into
bigbluebutton:developfrom
antobinary:docs-search

Conversation

@antobinary

Copy link
Copy Markdown
Member

What does this PR do?

tl;dr: The searchbox of docs.bigbluebutton.org was not producing results.

The baycloud cookie-consent script (cl.js) monkey-patches window.Worker and calls .includes() / .replace() on the URL argument assuming it is always a string. @easyops-cn/docusaurus-search-local 0.52 instantiates its worker with new Worker(new URL("./worker.js", import.meta.url)), passing a URL object — which makes baycloud throw "TypeError: t.includes is not a function" and leaves the search dropdown spinning forever.

Move the baycloud tag from scripts[] into headTags[] so we control ordering, then add an inline Proxy on window.Worker right after it that coerces non-string URL args via .toString() before delegating to baycloud's wrapper. The consent script still loads sitewide as before; only the URL/string incompatibility is neutralized, so search works without downgrading the plugin.

Closes Issue(s)

Closes #25009

@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • v4.0.x-release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f8c1dd8b-665a-41dd-972f-0aca419d4efd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

The baycloud cookie-consent script (cl.js) monkey-patches window.Worker
and calls .includes() / .replace() on the URL argument assuming it is
always a string. @easyops-cn/docusaurus-search-local 0.52 instantiates
its worker with `new Worker(new URL("./worker.js", import.meta.url))`,
passing a URL object — which makes baycloud throw "TypeError: t.includes
is not a function" and leaves the search dropdown spinning forever.

Move the baycloud tag from scripts[] into headTags[] so we control
ordering, then add an inline Proxy on window.Worker right after it that
coerces non-string URL args via .toString() before delegating to
baycloud's wrapper. The consent script still loads sitewide as before;
only the URL/string incompatibility is neutralized, so search works
without downgrading the plugin.

Fixes bigbluebutton#25009.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@antobinary
antobinary merged commit 604e76a into bigbluebutton:develop May 12, 2026
6 checks passed
@antobinary
antobinary deleted the docs-search branch May 12, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant