mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-13 05:07:40 +02:00
[eric] browser: keep cross-dashboard cards on-screen (visibility-hidden) not off-screen, off-screen occlusion-culls the guest and reloads it on return = Discord logout
This commit is contained in:
@@ -742,13 +742,14 @@ const BrowserCard: React.FC<Props> = ({
|
||||
}}
|
||||
sx={{
|
||||
position: 'absolute',
|
||||
// Kept-alive card from another dashboard: parked far off-screen because a <webview> guest surface ignores CSS visibility/opacity; click-through, webContents stays live so its session survives, never unmounted.
|
||||
// Kept-alive card from another dashboard: hidden via visibility but LEFT AT ITS NORMAL POSITION on purpose. Moving it off-screen makes Chromium occlusion-cull the guest, which drops a logged-in session (Discord logs out); keeping it on-screen keeps the webContents composited + alive so the login survives. Click-through so it never eats input.
|
||||
visibility: keepAliveHidden ? 'hidden' : undefined,
|
||||
pointerEvents: keepAliveHidden ? 'none' : undefined,
|
||||
// contain: webview repaints don't shake neighbor cards.
|
||||
contain: 'layout style',
|
||||
// Own compositor layer so hover/paint invalidations stay contained to this card. See AgentCard for full rationale.
|
||||
willChange: 'transform',
|
||||
left: keepAliveHidden ? -100000 : displayX,
|
||||
left: displayX,
|
||||
top: displayY,
|
||||
width: displayW,
|
||||
height: displayH,
|
||||
|
||||
Reference in New Issue
Block a user