Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix: defer lexical composer sync during composition

Steven Enamakel68f5e4601cdc
diff --git a/app/patches/@[email protected] b/app/patches/@[email protected]
index 53e92d8567..b06c242ef2 100644
--- a/app/patches/@[email protected]
+++ b/app/patches/@[email protected]
@@ -1,13 +1,16 @@
diff --git a/dist/plugins/SyncPlugin.js b/dist/plugins/SyncPlugin.js
-index 579658dba..ee276a8e9 100644
+index 579658dba449d109e71c8645063ab3d8252e40b8..ee4724e1bb8216b6c291e2a59849c894bf85f3a2 100644
--- a/dist/plugins/SyncPlugin.js
+++ b/dist/plugins/SyncPlugin.js
-@@ -371,7 +371,7 @@ function SyncPlugin({ formatter: propFormatter } = {}) {
- if (isSyncingFromLexicalRef.current) return;
- const runtimeText = composerRuntime.getState().text;
- if (runtimeText === lastSyncedTextRef.current) return;
-- applyRuntimeText(runtimeText, void 0);
-+ applyRuntimeText(runtimeText, lastAppliedParserRef.current);
- });
- }, [
- editor,
+@@ -326,7 +326,10 @@ function SyncPlugin({ formatter: propFormatter } = {}) {
+ if (fullText !== lastSyncedTextRef.current) {
+ textDirtySinceSyncRef.current = true;
+ lastSyncedTextRef.current = fullText;
+- composer.setText(fullText);
++ queueMicrotask(() => {
++ if (editor.isComposing()) return;
++ composer.setText(fullText);
++ });
+ }
+ } finally {
+ isSyncingFromLexicalRef.current = false;
\ No newline at end of file
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e20ab768ad..616fbf2010 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -9,7 +9,7 @@ overrides:
patchedDependencies:
'@assistant-ui/[email protected]':
- hash: d57b1feffe8c1dbf9359c98eaa00a72f6fd7f92cc4686f1517e1e7b5b03f0054
+ hash: 006331c5bcacf7a003ec83e5083d53a38094c3474842bb7812a025819bcaab8f
path: app/patches/@[email protected]
hash: 9710fb84b470cf502f9292ed2b12e64dbe6d3570126481308ca3d32fced73a3f
@@ -46,7 +46,7 @@ importers:
'@assistant-ui/react-lexical':
specifier: ^0.2.10
'@assistant-ui/react-markdown':
specifier: ^0.14.12
@@ -7164,7 +7164,7 @@ snapshots:
- ioredis
- redis
dependencies:
diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjs
index d9520376ea..ca6df7e8d7 100644
--- a/scripts/__tests__/self-hosted-lanes.test.mjs
+++ b/scripts/__tests__/self-hosted-lanes.test.mjs
@@ -55,29 +55,39 @@ test("EX63 installs script dependencies only after changed areas are detected",
const install = ciLanes.indexOf(
"- name: Install jq for release-script tests",
);
+ const python = ciLanes.indexOf("- name: Setup Python for lanes");
+ const start = ciLanes.indexOf("- name: Start lanes");
assert.ok(
- detect >= 0 && install > detect,
- "filter outputs must exist before they gate jq installation",
+ detect >= 0 && install > detect && python > detect && start > python,
+ "area detection and Python setup must precede lane startup",
);
const nextStep = ciLanes.indexOf("\n - name:", install + 1);
const installBlock = ciLanes.slice(
install,
nextStep < 0 ? undefined : nextStep,
);
- assert.match(
+ assert.doesNotMatch(
installBlock,
- /import tomllib/,
- "Python 3.11+ already provides TOML parsing",
+ /\bsudo\b|apt-get/,
+ "the pinned jq download does not require package installation",
);
- assert.match(
- installBlock,
- /command -v sudo/,
- "non-root runners may not have sudo",
+ assert.match(installBlock, /JQ_SHA256/);
+ assert.match(installBlock, /sha256sum -c/);
+
+ const pythonBlock = ciLanes.slice(
+ python,
+ ciLanes.indexOf("\n - name:", python + 1),
+ );
+ assert.match(pythonBlock, /python-version: "3\.12"/);
+ assert.match(pythonBlock, /update-environment: false/);
+ const startBlock = ciLanes.slice(
+ start,
+ ciLanes.indexOf("\n - name:", start + 1),
);
assert.match(
- installBlock,
- /cannot install packages/,
- "the EX63 image may not grant package installation",
+ startBlock,
+ /OPENHUMAN_CI_PYTHON: \$\{\{ steps\.python\.outputs\.python-path \}\}/,
+ "the pinned Python interpreter is passed to the lanes without exporting its PATH",
);
});
diff --git a/scripts/__tests__/test-module-installation.test.mjs b/scripts/__tests__/test-module-installation.test.mjs
index 6fa60d81e9..4f09c9c401 100644
--- a/scripts/__tests__/test-module-installation.test.mjs
+++ b/scripts/__tests__/test-module-installation.test.mjs
@@ -329,6 +329,7 @@ for (const runner of ["test-rust-with-mock.sh", "test-rust-e2e.sh"]) {
invocation = [
"integration_test_targets() { echo mcp_registry_e2e; }",
"run_build_only_reaper_test() { :; }",
+ "run_tinychannels_linked_fixture_tests() { :; }",
source.slice(start, end + 3),
"run_full_suite",
"set -- --test mcp_registry_e2e -- --nocapture",