mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-29 11:19:44 +02:00
[eric] workflows: route Schedule click + right-click Edit to new SchedulingView/EditAgentView (not legacy facet editor)
This commit is contained in:
@@ -50,7 +50,9 @@ export default function ScheduleCalendar({ view, density, onSelectWorkflow, refD
|
||||
const onEdit = () => {
|
||||
if (!ctxMenu) return;
|
||||
dispatch(addWorkflowCard({ workflowId: ctxMenu.workflow.id }));
|
||||
dispatch(openWorkflowCard({ workflowId: ctxMenu.workflow.id, view: 'edit', editFacet: 'Schedule' }));
|
||||
// Right-click "Edit" on a calendar entry opens the new Edit Agent
|
||||
// chat view, matching the post-revamp design (Image #38).
|
||||
dispatch(openWorkflowCard({ workflowId: ctxMenu.workflow.id, view: 'edit_agent' }));
|
||||
closeMenu();
|
||||
};
|
||||
const onDelete = () => {
|
||||
|
||||
@@ -153,7 +153,10 @@ export function PreviewView({ workflowId, steps, sourceSessionId, initialDraft,
|
||||
const wf = (result as unknown as { payload: Workflow }).payload;
|
||||
if (wf?.id) {
|
||||
onSaved(wf);
|
||||
dispatch(updateWorkflowCard({ workflowId: wf.id, patch: { view: 'edit', editFacet: 'Schedule' } }));
|
||||
// Route to the new SchedulingView (Image #49), not the legacy
|
||||
// facet editor. The old `view: 'edit', editFacet: 'Schedule'`
|
||||
// path opens a different design entirely.
|
||||
dispatch(updateWorkflowCard({ workflowId: wf.id, patch: { view: 'scheduling' } }));
|
||||
}
|
||||
} finally {
|
||||
setBusy(false);
|
||||
|
||||
@@ -480,7 +480,7 @@ const WorkflowsHubCard: React.FC<Props> = ({
|
||||
<MenuItem onClick={() => {
|
||||
if (!sidebarCtxMenu) return;
|
||||
dispatch(addWorkflowCard({ workflowId: sidebarCtxMenu.workflow.id }));
|
||||
dispatch(openWorkflowCard({ workflowId: sidebarCtxMenu.workflow.id, view: 'edit', editFacet: 'Schedule' }));
|
||||
dispatch(openWorkflowCard({ workflowId: sidebarCtxMenu.workflow.id, view: 'edit_agent' }));
|
||||
closeSidebarCtxMenu();
|
||||
}}>Edit…</MenuItem>
|
||||
<MenuItem
|
||||
|
||||
Reference in New Issue
Block a user