[eric] frontend: parked cards must not arm the Windows webview crash marker, a phantom strike locked Windows into iframes

This commit is contained in:
ciregenz
2026-06-09 17:43:09 -07:00
parent 1815ab18ae
commit ad081f1a93
@@ -190,12 +190,6 @@ const BrowserCard: React.FC<Props> = ({
isSelected = false, isHighlighted = false, multiDragDelta, onCardSelect, onDragStart, onDragMove, onDragEnd,
cardZOrder = 0, onDoubleClick, onBringToFront,
}) => {
// Arm the Windows webview crash-safety marker synchronously, before React commits
// the <webview> below. Cleared on dom-ready; a leftover marker next launch tells
// windowsWebviewEnabled() the mount crashed, so it falls back to the iframe.
// Idempotent, no-op on Mac and on the iframe path. See the gate block above.
if (isElectron && isWindows) armWindowsWebviewPending();
const c = useClaudeTokens();
const dispatch = useAppDispatch();
const scrollOverlayRef = useOverlayScrollPassthrough(isSelected);
@@ -222,6 +216,13 @@ const BrowserCard: React.FC<Props> = ({
const suspendedSnap = useAppSelector((state) => state.dashboardLayout.suspendedBrowserCards[browserId]);
// Arm the Windows webview crash-safety marker synchronously, before React commits
// the <webview> below. Cleared on dom-ready; a leftover marker next launch tells
// windowsWebviewEnabled() the mount crashed, so it falls back to the iframe.
// MUST skip parked cards: they render no webview, so dom-ready never fires and a
// stale marker reads as a phantom crash that locks Windows out of webviews.
if (isElectron && isWindows && !suspendedSnap) armWindowsWebviewPending();
const activity = useBrowserActivity(browserId);
const agentRunning = browserAgentSession?.status === 'running';
const agentActive = activity.active || agentRunning;