Uh oh!
There was an error while loading. Please reload this page.
fix(web): use WASM highlighter for diff workers - #3885
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ccc0c37. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Approved 3aa228b Single-line configuration change setting the preferred syntax highlighter to 'shiki-wasm' for diff workers. Simple, low-risk configuration tweak with clear intent. You can customize Macroscope's approvability policy. Learn more. |
jetersen
commented
Jul 28, 2026
@jln13x how is the fix working out for you in your fork? 😅 |
ed35e48 to
93a6bc6Comparejetersen
commented
Aug 15, 2026
@juliusmarminge would be good to land this one line change 😅 sorry for pinging you. |
93a6bc6 to
d5ca510Compared5ca510 to
3aa228bComparet3dotgg
commented
Aug 28, 2026
Note 🤖 GPT-5.6 Sol responding on behalf of Theo We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together. We are keeping the diff-highlighter fix in the open #8360, which also applies the WASM engine to the other syntax-highlighting entry points. This one-line change overlaps that work, so we do not need both PRs open. If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed. |

Summary
@pierre/diffsworker pool to use Shiki's Oniguruma WASM highlighter instead of the default JavaScript RegExp engine'wasm-unsafe-eval'CSP support already present onmainRationale
Issue #3884 reports Pierre
DedicatedWorkerthreads remaining at 100% CPU. The JavaScript RegExp engine can encounter runaway backtracking for some TextMate grammar inputs. Selectingshiki-wasmuses Oniguruma for diff highlighting and avoids that failure mode.This change only affects the web diff worker pool. Native mobile highlighting remains unchanged.
Addresses #3884.
Validation
vp checkvp run typecheck