Split diffs Shiki language pack#87162
Conversation
Dependency Changes DetectedThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
|
Codex review: needs changes before merge. Reviewed May 27, 2026, 1:08 PM ET / 17:08 UTC. Summary PR surface: Source +577, Tests +227, Docs +42, Config +58, Other +156. Total +1060 across 44 files. Reproducibility: not applicable. this is a feature and packaging split rather than a bug report. The relevant check is upgrade/package compatibility, not reproducing a current-main failure. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge Security Review findings
Review detailsBest possible solution: Land only after the language-pack release metadata matches the first host release containing the manifest/runtime support, CI and dependency review are clean, and maintainers accept the intentional plain-text fallback for non-default languages. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature and packaging split rather than a bug report. The relevant check is upgrade/package compatibility, not reproducing a current-main failure. Is this the best way to solve the issue? No, not as-is: the runtime split is a reasonable direction, but the package release floor currently advertises compatibility before the host-side support exists. The narrower fix is to align the external plugin metadata and prove fresh-install plus upgrade behavior before merge. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 11dfef201f81. Label changesLabel justifications:
Evidence reviewedPR surface: Source +577, Tests +227, Docs +42, Config +58, Other +156. Total +1060 across 44 files. View PR surface stats
Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg 🔥 Warming up: real-behavior proof passed; findings, security review, or rank-up moves are still in progress. Hatch commandComment Hatchability rules:
What is this egg doing here?
|
4765b05 to
4e75900
Compare
4e75900 to
e704531
Compare
e704531 to
1c2c9c7
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
0f5aaa8 to
2ae30bf
Compare
This comment has been minimized.
This comment has been minimized.
|
Landed in d638611. Thanks @RomneyDa. Verification before merge:
CI on ca00152:
|
Summary
diffs-language-packplugin for extended languages.diffs-language-packis installed but its requireddiffsplugin is not discoverable.Default languages
The default diffs viewer highlights:
javascript,typescript,tsx,jsx,json,markdown,yaml,css,html,sh,python,go,rust,java,c,cpp,csharp,php,sql,docker,ruby,swift,kotlin,r,dart,lua,powershell,xml, andtoml.Common aliases such as
js,ts,bash,md,yml,c++,dockerfile,rb,kt, andps1normalize to those default languages. Other languages usediffs-language-packwhen installed; otherwise they stay readable as plain text.Bundle size metrics
Measured with
nodeusing raw byte length,zlib.gzipSync(..., { level: 9 }), andzlib.brotliCompressSync(..., { BROTLI_PARAM_QUALITY: 11 })after rebuilding both viewer runtimes. The full language-pack runtime is generated ad hoc byextensions/diffs-language-pack/scripts/build-viewer.mjs; it is intentionally not committed.Overall default viewer runtime
This compares the default shipped diffs viewer runtime on
origin/mainagainst the new default shipped runtime in this PR.extensions/diffs/assets/viewer-runtime.jsextensions/diffs/assets/viewer-runtime.jsShiki language runtime split
This compares the generated full language-pack runtime against the curated default runtime that remains bundled with the diffs plugin.
extensions/diffs-language-pack/scripts/build-viewer.mjsextensions/diffs/assets/viewer-runtime.js)Verification
pnpm --dir extensions/diffs build:viewerpnpm --dir extensions/diffs-language-pack build:viewernode scripts/run-vitest.mjs src/plugins/official-external-plugin-catalog.test.ts src/cli/plugin-install-plan.test.ts src/cli/plugins-cli.install.test.ts extensions/diffs/src/language-hints.test.ts extensions/diffs/src/render.test.ts extensions/diffs/src/config.test.ts extensions/diffs/src/store.test.ts extensions/diffs/src/browser.test.ts test/scripts/oxlint-config.test.ts(199 tests passed)node scripts/run-vitest.mjs test/scripts/bundled-plugin-assets.test.ts test/plugin-npm-release.test.ts test/plugin-npm-package-manifest.test.ts test/scripts/runtime-postbuild.test.ts(61 tests passed)node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/diffs/api.ts extensions/diffs/index.ts extensions/diffs/runtime-api.ts extensions/diffs/src extensions/diffs/scripts extensions/diffs-language-pack/api.ts extensions/diffs-language-pack/index.ts extensions/diffs-language-pack/src extensions/diffs-language-pack/scripts src/plugins/official-external-plugin-catalog.test.ts test/scripts/runtime-postbuild.test.tsnode scripts/generate-plugin-inventory-doc.mjs --checkgit diff --checknode scripts/build-all.mjs ciArtifactsnode scripts/run-tsgo.mjs -p tsconfig.core.json --incremental falsenode scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental falsenode scripts/run-vitest.mjs run --config test/vitest/vitest.contracts-plugin.config.ts src/plugins/contracts/extension-runtime-dependencies.contract.test.ts(374 tests passed)node scripts/run-vitest.mjs run --config test/vitest/vitest.runtime-config.config.ts src/config/config.plugin-validation.test.ts src/config/io.best-effort.test.ts src/config/io.compat.test.ts(50 tests passed)node scripts/run-vitest.mjs run --config test/vitest/vitest.wizard.config.ts src/wizard/setup.official-plugins.test.ts(6 tests passed)node scripts/generate-npm-shrinkwrap.mjs --package-dir extensions/diffs --checkandnode scripts/generate-npm-shrinkwrap.mjs --package-dir extensions/diffs-language-pack --checkpnpm install --lockfile-only --frozen-lockfilepnpm dlx knip --config config/knip.config.ts --production --no-progress --reporter compact --files --dependencies(no unused dependency findings remain; existing unrelated unused-file findings still reported)node scripts/run-vitest.mjs run src/plugins/discovery.test.ts(70 tests passed)node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental falsepnpm format:docs:check docs/plugins/manifest.mdgit diff --checknode scripts/build-diffs-viewer-runtime.mjs curatednode scripts/build-diffs-viewer-runtime.mjs full(generated full runtime measured, not committed)node scripts/run-vitest.mjs run extensions/diffs/src/language-hints.test.ts extensions/diffs/src/render.test.ts extensions/diffs/src/config.test.ts(55 tests passed)node scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental falsepnpm format:docs:check docs/tools/diffs.md docs/plugins/manifest.mdgit diff --checkClawSweeper follow-up
diffs-language-packtoscripts/lib/official-external-plugin-catalog.jsonsoopenclaw plugins install diffs-language-packresolves to@openclaw/diffs-language-packfor released installs.src/plugins/official-external-plugin-catalog.test.ts.Real behavior proof
Behavior addressed: default diffs viewer no longer ships the full Shiki language runtime; languages outside the default list use the optional
diffs-language-packruntime when that plugin and generated runtime asset are available.Real environment tested: local Codex worktree on macOS with Node repo wrappers; CI follow-up fixes are pending a fresh GitHub run after the next push.
Exact steps or command run after this patch: see Verification.
Evidence after fix: targeted diffs language/render/asset tests, official catalog install-resolution tests, and plugin package/static asset contract tests passed; both viewer runtimes rebuilt and measured.
Observed result after fix: common source, config, and documentation languages stay in the default runtime, other language hints fall back to text without the generated language-pack runtime, the language-pack viewer asset is selected only when available, and the documented bare install command has official catalog coverage.
What was not tested: full release/package publishing was not run locally.
test/tsconfig/tsconfig.extensions.test.jsonstill has an unrelated existing type failure inextensions/memory-core/src/dreaming.test.ts.