diff --git a/cptr/frontend/src/lib/components/Sidebar.svelte b/cptr/frontend/src/lib/components/Sidebar.svelte index 315263b..346f21e 100644 --- a/cptr/frontend/src/lib/components/Sidebar.svelte +++ b/cptr/frontend/src/lib/components/Sidebar.svelte @@ -146,6 +146,10 @@ if (!data.done && !data.title && !isNew) return; + // Invalidate cache for ALL workspaces so re-expanding shows fresh data + wsChatsCache = new Map(); + + // Re-fetch immediately for any currently expanded workspaces for (const path of expandedWorkspaces) { fetchWorkspaceChats(path); } diff --git a/cptr/frontend/src/routes/+layout.svelte b/cptr/frontend/src/routes/+layout.svelte index 22acf13..108ef2b 100644 --- a/cptr/frontend/src/routes/+layout.svelte +++ b/cptr/frontend/src/routes/+layout.svelte @@ -289,8 +289,10 @@ diff --git a/cptr/utils/automations.py b/cptr/utils/automations.py index aec13c9..7f18661 100644 --- a/cptr/utils/automations.py +++ b/cptr/utils/automations.py @@ -190,15 +190,12 @@ async def execute_automation(automation, webhook_payload: str | None = None) -> model=bare_model, ) - # Notify frontend + # Notify frontend (standard chat event so sidebar updates) await emit_to_user( automation.user_id, { - "type": "automation:result", - "automation_id": automation.id, - "name": automation.name, "chat_id": chat.id, - "status": "success", + "title": automation.name, }, )