[eric] workflows: route Schedule click + right-click Edit to new SchedulingView/EditAgentView (not legacy facet editor)

This commit is contained in:
ciregenz
2026-05-22 16:43:41 -07:00
parent cb7b3bc977
commit ff5892804d
3 changed files with 8 additions and 3 deletions
@@ -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