Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client-runtime): opening a thread no longer freezes with thousands of threads #35848

Openjuliusmarmingewants to merge 6 commits intomain fromrefs/pull/35848/headopened View on GitHub

Showing 2 changed files with 70 additions and 7 deletions.

x
0 of 2 viewed, 2 left
47 additions and 2 deletionspackages/client-runtime/src/state/threadShell.test.tsModified
View file
@@ -22,7 +22,10 @@
const remoteEnvironmentId = EnvironmentId.make("remote-environment-v2");
const otherProjectId = ProjectId.make("other-project");
​
-function makeHarness(environmentIds: ReadonlyArray<EnvironmentId> = [environmentId]) {
+function makeHarness(
+ environmentIds: ReadonlyArray<EnvironmentId> = [environmentId],
+ hiddenTags: ReadonlyArray<string> | null = null,
+) {
const snapshotAtom = Atom.family((_environmentId: EnvironmentId) =>
Atom.make<OrchestrationV2ShellSnapshot | null>(v2ShellSnapshot),
);
@@ -51,7 +54,7 @@
threads: createEnvironmentThreadShellAtoms({
catalogValueAtom,
snapshotAtom,
- hiddenThreadTagsAtom: () => Atom.make(null),
+ hiddenThreadTagsAtom: () => Atom.make(hiddenTags),
}),
};
@@ -678,4 +681,46 @@
harness.registry.dispose();
});
+​
+ it("delivers one quiet shell list per snapshot update that changes several threads", () => {
+ const harness = makeHarness([environmentId], ["private"]);