Skip to content
Source
Docs
Explore
Skills
MCP servers
For agents
Search or jump to…
Sign in
Sign up
pingdotgg
/
t3code
Pull requests
pingdotgg
t3code
Public
Synced with GitHub
Popular #1
Fork
0
0
0
0
1
2
3
4
5
6
7
8
9
Code
Architecture
Issues
Pull requests
Community
Assets
CI
Agents
Settings
fix(server): a timed-out preview request no longer evicts the shared server browser
#34970
Send to my agent
Closed
juliusmarminge
wants to merge 3 commits into
main
from
refs/pull/34970/head
·
opened
3 weeks ago
View on GitHub
Conversation
6
Commits
3
Files changed
2
Impact
Showing
2 changed files
with
67 additions
and
1 deletion
.
x
0 of 2 viewed, 2 left
Files
Hide whitespace
Unified
Split
62 additions and 0 deletions
+62
-0
apps/server/src/mcp/PreviewAutomationBroker.test.ts
Modified
Diff
Before/After
Viewed
apps/server/src/mcp/PreviewAutomationBroker.test.ts
View file
Show all 19 lines
@@ -20,6 +20,7 @@
20
20
import
*
as
Fiber
from
"effect/Fiber"
;
21
21
import
*
as
Result
from
"effect/Result"
;
22
22
import
*
as
Stream
from
"effect/Stream"
;
23
+
import
*
as
TestClock
from
"effect/testing/TestClock"
;
23
24
24
25
import
{
PreviewBrowserRootError
}
from
"../preview/PreviewBrowserHost.ts"
;
25
26
import
*
as
PreviewAutomationBroker
from
"./PreviewAutomationBroker.ts"
;
Expand up
Expand down
Show all 332 lines
@@ -358,6 +359,67 @@
358
359
}),
359
360
);
360
361
362
+
it.
effect
(
"keeps the server browser host for other threads when one request times out"
, () =>
363
+
Effect
.
scoped
(
364
+
Effect
.
gen
(
function
* () {
365
+
const
broker =
yield
* makeBroker;
366
+
const
clientId =
SERVER_BROWSER_AUTOMATION_CLIENT_ID
;
367
+
const
otherScope = {
368
+
...scope,
369
+
requestNamespace
:
"provider-session-2"
,
370
+
thread
: {
371
+
threadId
:
ThreadId
.
make
(
"thread-2"
),
372
+
providerSessionId
:
"provider-session-2"
,
373
+
providerInstanceId
:
ProviderInstanceId
.
make
(
"codex"
),
374
+
},
375
+
};
376
+
const
openDelivered =
yield
*
Deferred
.
make
<
RoutedRequest
>();
377
+
const
requests =
requestsFrom
(
378
+
yield
* broker.
connect
(
makeHost
({ clientId }), {
preferred
:
true
}),
Home
Search
Explore
Menu