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(desktop): a hidden agent browser keeps painting while the agent drives it
#35160
Send to my agent
Open
juliusmarminge
wants to merge 1 commit into
main
from
refs/pull/35160/head
·
opened
3 weeks ago
View on GitHub
Conversation
6
Commits
1
Files changed
2
Impact
Showing
2 changed files
with
41 additions
and
4 deletions
.
x
0 of 2 viewed, 2 left
Files
Hide whitespace
Unified
Split
34 additions and 0 deletions
+34
-0
apps/desktop/src/preview/DesktopBrowserHost.test.ts
Modified
Diff
Before/After
Viewed
apps/desktop/src/preview/DesktopBrowserHost.test.ts
View file
Expand up
Show all 963 lines
@@ -964,6 +964,40 @@
964
964
}).
pipe
(
Effect
.
scoped
),
965
965
);
966
966
967
+
it.
effect
(
"paints a hidden guest the agent drives until its turn ends"
, () =>
968
+
Effect
.
gen
(
function
* () {
969
+
const
host =
yield
*
DesktopBrowserHost
.
make
;
970
+
const
debuggee =
makeDebuggee
();
971
+
host.
attach
(key, debuggee.
tab
);
972
+
const
painting =
yield
*
watchPainting
(host);
973
+
const
turn = (active:
boolean
) =>
974
+
host.
handleCommandLine
(
encodeJson
({
type
:
"turn"
,
threadId
: key.
threadId
, active }));
975
+
976
+
yield
*
turn
(
true
);
977
+
// Playwright's actionability check awaits the page's next frame.
978
+
yield
*
command
(host,
1
,
"Runtime.callFunctionOn"
);
979
+
yield
* settle;
980
+
expect
(painting).
toEqual
([
true
]);
981
+
982
+
debuggee.
release
();
983
+
yield
* settle;
984
+
yield
*
TestClock
.
adjust
(
"1 minute"
);
985
+
expect
(painting).
toEqual
([
true
]);
986
+
987
+
yield
*
turn
(
false
);
988
+
expect
(painting).
toEqual
([
true
,
false
]);
989
+
990
+
// Outside a turn it paints until the agent goes idle.
991
+
yield
*
command
(host,
2
,
"Input.dispatchMouseEvent"
);
992
+
yield
* settle;
Home
Search
Explore
Menu