[eric] dashboard: optimistic browser tether so the attach arrow is instant on spawn

This commit is contained in:
ciregenz
2026-06-27 17:21:16 -07:00
parent 8a331fa762
commit 4da3f76ac7
2 changed files with 22 additions and 6 deletions
@@ -1553,6 +1553,10 @@ const dashboardLayoutSlice = createSlice({
delete state.cards[draftId];
state.cards[session.id] = { ...card, session_id: session.id, zOrder: state.nextZOrder++ };
}
// Carry an optimistic browser tether from the draft id to the real session id, in place (no flicker, no stale draft endpoint).
for (const entry of Object.values(state.glowingBrowserCards)) {
if (entry.sourceId === draftId) entry.sourceId = session.id;
}
});
},
});