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): agent snapshots of preview tabs no longer stall while the window is hidden
#34935
Send to my agent
Closed
juliusmarminge
wants to merge 3 commits into
main
from
refs/pull/34935/head
·
opened
3 weeks ago
View on GitHub
Conversation
6
Commits
3
Files changed
2
Impact
Showing
2 changed files
with
33 additions
and
4 deletions
.
x
0 of 2 viewed, 2 left
Files
Hide whitespace
Unified
Split
8 additions and 0 deletions
+8
-0
apps/desktop/src/preview/Manager.test.ts
Modified
Diff
Before/After
Viewed
apps/desktop/src/preview/Manager.test.ts
View file
Expand up
Show all 2,111 lines
@@ -2112,6 +2112,12 @@
2112
2112
yield
* manager.
createTab
(
"tab_1"
, { serverTab });
2113
2113
yield
* manager.
registerWebview
(
"tab_1"
,
42
);
2114
2114
yield
*
Deferred
.
await
(attached);
2115
+
const
setBackgroundThrottling = vi.
fn
();
2116
+
yield
* manager.
setMainWindow
({
2117
+
isDestroyed
: () =>
false
,
2118
+
once
: vi.
fn
(),
2119
+
webContents
: { setBackgroundThrottling },
2120
+
}
as
never
);
2115
2121
// Navigating rebuilds the tab's state, which must keep the server tab it answers for.
2116
2122
yield
* manager.
navigate
(
"tab_1"
,
"https://example.com/next"
);
2117
2123
yield
*
Queue
.
clear
(capturing);
Show all 12 lines
@@ -2130,6 +2136,8 @@
2130
2136
expect
(
yield
*
Queue
.
take
(capturing)).
toBe
(
true
);
2131
2137
screenshot.
resolve
({
data
:
""
});
2132
2138
expect
(
yield
*
Queue
.
take
(capturing)).
toBe
(
false
);
2139
+
// A hidden, minimized or covered main window commits no frames while throttled.
2140
+
expect
(setBackgroundThrottling.
mock
.
calls
).
toEqual
([[
false
], [
true
]]);
2133
2141
}).
pipe
(
Effect
.
provide
(
managerLayer
())),
2134
2142
);
2135
2143
Expand down
Show all lines
25 additions and 4 deletions
+25
-4
apps/desktop/src/preview/Manager.ts
Modified
Diff
Before/After
Viewed
apps/desktop/src/preview/Manager.ts
View file
Expand up
Show all 602 lines
@@ -603,6 +603,8 @@
603
603
let
pendingRecording:
PendingRecording
|
null
=
null
;
604
604
const
displayMediaHandlerSessions =
new
WeakSet
<
Session
>();
Home
Search
Explore
Menu