Repository navigation
fix: a slow client's web extension, and a new default editor - #142
Conversation
A web worker extension host was given 30 seconds to be claimed from the moment the backend wanted it. In split mode the client that runs it is a second IDE process: on a loaded machine it can still be starting then, and the host was failed before it was ever offered one. Activation of the extension fails for good, so a web extension is dead for the session. Count those seconds from the first client listening for hosts instead. The client now listens even without the browser that runs them, so the one case the deadline is for -- no JCEF -- still reaches it, and says so. Refs #140
Set Default sent the association to the backend and left the client's own copy of the setup alone until the backend's changed setup arrived. The client decides from that copy which editor a file opens in, so a file opened in between -- 2.1 seconds on a slow runner -- opened in the editor the user had just stopped choosing. Hold the association as soon as the backend has taken it. The setup that arrives afterwards says the same. Refs #141
|
Correction, after this was merged: the It reproduced again on The change is still worth having: it moves the client's knowledge from the |
What this changes
Two flakes found while going through the 20 CI runs of #135's patch (
ci-flake/escape-01..10on2546db3andcc073d0, plus the PR's own runs). Each failed once there, each is a real bug auser can hit, and neither is the Escape flake those runs were launched for.
fix(exthost), #140.HostedWorkerHosts.Host.opengave a web worker extension host 30seconds to be claimed, counted from the moment the backend wanted it. The client that runs the
host is a second IDE process; when it is still starting, the backend fails the host before the
client has been offered it, and the extension's activation fails for good. In
run 42520379312
the backend gave up at 21:00:59 while the client registered its custom editors at 21:01:00 — one
second later — and the client's log holds no
CodeBridgeWorkerHostsActivityline at all.The seconds are now counted from the first client listening for hosts. So that the one case the
deadline exists for still reaches it,
CodeBridgeWorkerHostsActivitylistens even whenJBCefApp.isSupported()is false, rather than returning; it just runs nothing, and says why once.fix(webview), #141. The client keeps its own copy of the custom-editor setup and decidesfrom it which editor a file opens in. Set Default sent the association to the backend and left
that copy alone until the backend's setup came back. In
run 42520388173
the file was reopened 641 ms before the backend re-typed it and 2.1 s before the client heard the
new association, so it went back into the custom editor and stayed there. The client now holds the
association as soon as the backend has taken it; the setup that arrives afterwards says the same.
734184d already did the matching thing on the backend for #133. This is the client's half.
What this does not change
The notebook Escape flake (#113) is untouched. #135's tracing ruled out all three of its
hypotheses and the drag added in
cc073d0: across all five failures the client logs nopressed ESCAPEinIdeKeyEventDispatcher, noDragging cell, noEscape in cell, andpopup active=false; the backend logs no Escape either, and the thread dump taken during thestall has the EDT parked in
getNextEvent. The keystroke reaches neither process. Findings are on#113; it needs a different experiment, not a fix here.
SplitModeActionsTest > rename formatting and quick fixes…also failed twice in those runs. It is#136, fixed on master by 3f721a1 and e908d3e, which both batches predate.
How it was tested
:backend:compileKotlin,:webview.frontend:compileKotlinand:backend:compileTestKotlinallpass.
HostedWorkerHostsTestpasses, all four tests including the new one, run through the JUnitplatform launcher against the module's test classpath.
:backend:testcould not be run on this machine: the IntelliJ platform plugin probesthe downloaded JBR, which NixOS cannot execute (
exit value 127). The tests needingCodeInsightTestFixturewere not run for the same reason. Neither fix has a UI test; both arecovered by the existing
SplitModeWebExtensionTestandSplitModeCustomEditorTestscenariosthat found them, so CI exercises them.
Checklist
A new feature has a UI test.Two bug fixes, both under existing UI test scenarios.No change todocs/is updated where behaviour changed,docs/status.mdespecially.what is supported; both are timing fixes.
NOTICE.md. None added.