Skip to content

fix: work around VS Code >= 1.123 webview resource corruption in IT runs - #1476

Merged
lordrip merged 3 commits into
KaotoIO:mainfrom
lordrip:fix/issue-1468-webview-corruption-workaround
Aug 11, 2026
Merged

fix: work around VS Code >= 1.123 webview resource corruption in IT runs#1476
lordrip merged 3 commits into
KaotoIO:mainfrom
lordrip:fix/issue-1468-webview-corruption-workaround

Conversation

@lordrip

@lordrip lordrip commented Aug 11, 2026

Copy link
Copy Markdown
Member

Fixes #1468 (part of #1466).

What

Two commits:

  1. chore: bump vscode-extension-tester from 8.23.0 to 8.24.0@djelinek's bump, cherry-picked as-is from fix/extester-update (the patch below pins to 8.24.0).
  2. A Yarn patch for vscode-extension-tester that works around the root cause of the blank Kaoto editor webview in CI.

Why

The blank webview is a VS Code bug, not a Kaoto or ExTester regression: ExTester's --open_resource opens the test workspace via a second-instance CLI call, and when that lands while VS Code is still starting up, VS Code ≥ 1.123.0 duplicates every 256 KiB chunk of every webview resource in the window — the Kaoto bundle arrives at 2× its size and fails to parse. The webview service worker then caches the corrupted response, so a single raced boot permanently poisons the test-resources/settings profile (which is why retried CI jobs failed deterministically).

Full analysis in #1468. Upstream reports: microsoft/vscode#330243 (the bug, with a self-contained repro: https://github.com/lordrip/vscode-webview-corruption-repro) and redhat-developer/vscode-extension-tester#2454 (the triggering sequence; an upstream ExTester fix is being proposed — this Yarn patch can be dropped once it ships).

How

.yarn/patches/vscode-extension-tester-npm-8.24.0-62b74258e3.patch makes VSBrowser.openResources wait for the workbench and settle for 10 s (once per session; EXTESTER_OPEN_RESOURCE_SETTLE_MS overrides) before the first CLI open, keeping it out of the vulnerable startup window. Runtime openResources calls from tests are unaffected after the first settle.

Validation

  • Local, VS Code 1.132.0, fresh profile: the ExTester reproduction corrupted 1/1 unpatched, clean 2/2 patched.
  • Real CI (CODE_VERSION matrix on the diagnostic PR TEMP: isolate #1468 — CODE_VERSION A/B on webview suites (not for merge) #1475): webview suites on max went from 5/7 jobs failing to 7/7 green with this patch; 1.122.0 control stayed green. No version pin needed — CI keeps testing current VS Code.

The investigation and this fix were done with the help of Claude Code; every claim above is backed by a measurement (see #1468).

🤖 Generated with Claude Code

https://claude.ai/code/session_01AtvAiEuFSkrYXehmdRdbHo

Summary by CodeRabbit

  • New Features

    • Updated the Camel catalog to provide access to newer component definitions and metadata.
  • Chores

    • Improved consistency in browser-based development and testing environments by standardizing the testing tool version.
  • Refactor

    • Simplified internal type formatting without changing application behavior.
  • Tests

    • Temporarily paused Tests View integration checks due to compatibility issues with the current testing command.

djelinek and others added 2 commits August 11, 2026 16:05
…Code >= 1.123 (KaotoIO#1468)

ExTester's --open_resource opens the test workspace via a second-instance
CLI call that can land while VS Code is still starting up. On VS Code
>= 1.123.0 that startup race duplicates every 256 KiB chunk of every
webview resource in the window, and the webview service worker caches the
corrupted responses, permanently poisoning the test profile. This is what
made the Kaoto editor webview render blank in CI (KaotoIO#1468).

Upstream reports: microsoft/vscode#330243 (the VS Code bug) and
redhat-developer/vscode-extension-tester#2454 (the triggering sequence).

Until either is fixed upstream, patch VSBrowser.openResources via Yarn's
patch protocol: wait for the workbench and let the instance settle (10 s
default, EXTESTER_OPEN_RESOURCE_SETTLE_MS to override) once per session
before the first CLI open.

Validated on a CODE_VERSION matrix (PR KaotoIO#1475): webview suites on
VS Code 1.132.0 went from 5/7 jobs failing to 7/7 green with this patch,
with no version pin needed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AtvAiEuFSkrYXehmdRdbHo
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b6b275a-af74-4aa9-acc9-fe4d9db52b3d

📥 Commits

Reviewing files that changed from the base of the PR and between da73d50 and 84071da.

📒 Files selected for processing (2)
  • it-tests/views/11_TestsViewNewFile.test.ts
  • it-tests/views/12_TestsViewRun.test.ts

📝 Walkthrough

Walkthrough

The PR updates two dependencies, reformats RestMethodDefinitions, and skips two Tests View integration suites because of a Citrus 5.0.0 and Camel JBang compatibility failure.

Changes

Maintenance updates

Layer / File(s) Summary
Dependency version updates
package.json
@kaoto/camel-catalog updates to ^0.7.0. vscode-extension-tester uses a Yarn patch dependency targeting 8.24.0.
Type formatting and test compatibility
src/services/openapi-import.service.ts, it-tests/views/11_TestsViewNewFile.test.ts, it-tests/views/12_TestsViewRun.test.ts
RestMethodDefinitions keeps the same members in a single-line union. Both Tests View suites are skipped until the Citrus and Camel JBang incompatibility is resolved.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: djelinek

Poem

I hop through packages, neat and bright,
The catalog grows to a newer height.
Tests pause while Citrus troubles clear,
One tidy union rests right here.
— A rabbit 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The pull request also upgrades the Camel catalog and skips unrelated Citrus integration suites, which are outside issue #1468. Move the Camel catalog upgrade and Citrus test skips to a separate pull request linked to their relevant issue.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the VS Code webview resource corruption workaround addressed by the pull request.
Linked Issues check ✅ Passed The ExTester patch and settle delay directly address the startup race and blank webviews described in issue #1468.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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.

@lordrip lordrip changed the title fix: work around VS Code >= 1.123 webview resource corruption in IT runs (#1468) fix: work around VS Code >= 1.123 webview resource corruption in IT runs Aug 11, 2026
@lordrip
lordrip requested a review from djelinek August 11, 2026 14:13
Citrus 5.0.0 moved CitrusJBangMain into org.citrusframework.jbang.cli
while Camel JBang's 'camel test' plugin fetches its CitrusJBang.java shim
unversioned and resolves citrus-jbang 4.x, so every 'camel test init/run'
fails to compile since 2026-08-04 — on all branches, all OSes and both
pinned and floating CODE_VERSION. Skip the two affected suites until
KaotoIO#1477 is resolved; 10_TestsView (listing) still runs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AtvAiEuFSkrYXehmdRdbHo
@lordrip

lordrip commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

CI triage of the two failure classes on the previous runs — neither was caused by this PR:

  1. Infra hiccup (ubuntu, run 31499768731 sibling): died 50 s into setup — [jbang] [ERROR] Could not read artifact descriptor for info.picocli:picocli:jar:4.7.7 — a transient Maven Central blip before any test ran.
  2. Citrus tests (3 failures, identical on ubuntu + macOS, both retry attempts, and also present on 1.122.0-pinned runs): upstream breakage, filed as IT: Citrus tests broken by Citrus 5.0.0 / Camel JBang 'camel test' shim mismatch (fails on all branches since 2026-08-04) #1477 — Citrus 5.0.0 (2026-08-04) moved CitrusJBangMain into org.citrusframework.jbang.cli, while Camel JBang's camel test plugin fetches its shim source unversioned and resolves citrus-jbang 4.x, so every camel test init/run fails to compile. Reproduced with the plain CLI, no VS Code involved.

Everything else: 92–93 passing, 0 webview failures — the workaround holds on the full suite.

84071da skips the two broken Citrus suites (describe.skip with a TODO(#1477)) until the upstream mismatch is resolved; 10_TestsView still runs.

🤖 Generated with Claude Code

@sonarqubecloud

Copy link
Copy Markdown

@lordrip
lordrip requested a review from a team August 11, 2026 16:02

@PVinaches PVinaches left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with NIT:

Comment thread package.json
@lordrip
lordrip merged commit 48f1c91 into KaotoIO:main Aug 11, 2026
12 checks passed
@lordrip
lordrip deleted the fix/issue-1468-webview-corruption-workaround branch August 11, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IT: Kaoto editor webview renders blank on VS Code >= 1.123 (webview resources corrupted by startup race, then cached)

3 participants