diff --git a/ui/src/workflows/WorkflowCanvas.vue b/ui/src/workflows/WorkflowCanvas.vue
index 89600a604..c96b9733f 100644
--- a/ui/src/workflows/WorkflowCanvas.vue
+++ b/ui/src/workflows/WorkflowCanvas.vue
@@ -36,6 +36,7 @@ const props = defineProps<{
}>();
const emit = defineEmits<{
edit: [StepPath];
+ settings: [];
insert: [after: number, type: string];
duplicate: [StepPath];
move: [StepPath, -1 | 1];
@@ -93,8 +94,10 @@ function place(store?: VueFlowStore): void {
if (!flow) return;
const width = container.value?.clientWidth ?? 800;
const height = container.value?.clientHeight ?? 560;
+ // Scroll only when the furthest step reached would be out of view.
const reached = graph.value.nodes.filter((node) => node.data.run).at(-1);
- const y = reached ? Math.min(24, height / 3 - reached.position.y * ZOOM) : 24;
+ const below = reached && 24 + (reached.position.y + 180) * ZOOM > height;
+ const y = below ? height / 3 - reached.position.y * ZOOM : 24;
void flow.setViewport({ x: width / 2 - NODE_WIDTH / 2, y, zoom: ZOOM }, { duration: animate ? 300 : 0 });
}
@@ -114,6 +117,7 @@ function onNodeMenu({ event, node }: NodeMouseEvent): void {
openMenu(event as MouseEvent, node.data as StepNodeData);
}
function onNodeClick({ node }: NodeMouseEvent): void {
+ if ((node.data as StepNodeData).kind === "start" && editable.value) return emit("settings");
const path = (node.data as StepNodeData).path;
if (editable.value && path) emit("edit", path);
}
@@ -122,7 +126,7 @@ const topIndex = computed(() => (menuPath.value?.length === 2 ? Number(menuPath.
-
+
();
const id = ref("");
const yaml = ref("");
const selectedStep = ref(null);
+// The slide-in panel shows one thing: a step's editor, or the workflow's settings.
+const settingsOpen = ref(false);
+watch(selectedStep, (path) => {
+ if (path) settingsOpen.value = false;
+});
const localError = ref("");
-const { runs, watched, stages, pick } = useWorkflowRuns(selected);
+const { runs, watched, watchedRun, stages, pick, follow, refresh } = useWorkflowRuns(selected);
const triggers = useWorkflowTriggers(selected);
// Canvas edits are edits to the YAML; a newly placed step opens for editing.
@@ -159,18 +167,18 @@ function syncScroll(event: Event): void {