mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-29 21:14:49 +02:00
[eric] browser: tag agent-spawned + pasted browser cards with their home dashboard (were untagged, bled onto all dashboards)
This commit is contained in:
@@ -2008,6 +2008,7 @@ async def p_create_browser_card(dashboard_id: str, url: str, parent_session_id:
|
||||
width=1280,
|
||||
height=800,
|
||||
spawned_by=parent_session_id,
|
||||
dashboard_id=dashboard_id,
|
||||
)
|
||||
dashboard.layout.browser_cards[browser_id] = card
|
||||
dashboard.updated_at = datetime.now()
|
||||
|
||||
@@ -734,6 +734,8 @@ const dashboardLayoutSlice = createSlice({
|
||||
width: w,
|
||||
height: h,
|
||||
zOrder: card.zOrder || state.nextZOrder++,
|
||||
// An agent-spawned card must carry its home dashboard or it renders on EVERY dashboard; trust the backend's tag, fall back to the current dashboard so an old/untagged payload can't bleed.
|
||||
dashboard_id: card.dashboard_id ?? getLastDashboardId() ?? undefined,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -1027,6 +1029,8 @@ const dashboardLayoutSlice = createSlice({
|
||||
width: width || DEFAULT_BROWSER_CARD_W,
|
||||
height: height || DEFAULT_BROWSER_CARD_H,
|
||||
zOrder: state.nextZOrder++,
|
||||
// Pasted onto the dashboard the user is looking at, else it bleeds onto every dashboard.
|
||||
dashboard_id: getLastDashboardId() ?? undefined,
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user