From 5b3ae6abde3e71f7862815c842e359659f1aa81c Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Fri, 13 Nov 2026 14:40:01 +1100 Subject: [PATCH] refactor(ui): fold one-consumer workflow files into their consumers; move shared ones out (#1958) --- ui/src/channels/ChannelsPage.vue | 2 +- .../OptionSelect.vue | 0 ui/src/dashboard/QuickTask.vue | 2 +- ui/src/settings/ExtensionSettingField.vue | 2 +- ui/src/tasks/NewTaskForm.vue | 2 +- ui/src/{workflows => tasks}/work-request.ts | 2 +- ui/src/workflows/AddNode.vue | 16 --- ui/src/workflows/AgentTranscript.vue | 120 +++++++++++++++++- ui/src/workflows/BindEvent.vue | 2 +- ui/src/workflows/LaneNode.vue | 22 ---- ui/src/workflows/ScheduleTrigger.vue | 2 +- ui/src/workflows/SpecList.vue | 2 +- ui/src/workflows/StepEditor.vue | 4 +- ui/src/workflows/TranscriptTool.vue | 120 ------------------ ui/src/workflows/WorkflowCanvas.vue | 33 +++-- ui/src/workflows/WorkflowEditor.vue | 5 +- ui/src/workflows/WorkflowSettings.vue | 2 +- ui/src/workflows/transcript.ts | 26 ---- ui/src/workflows/workflow-history.ts | 34 ----- ui/src/workflows/workflow-revisions.ts | 33 ++++- ui/test/work-request.test.ts | 2 +- 21 files changed, 187 insertions(+), 246 deletions(-) rename ui/src/{workflows => components}/OptionSelect.vue (100%) rename ui/src/{workflows => tasks}/work-request.ts (97%) delete mode 100644 ui/src/workflows/AddNode.vue delete mode 100644 ui/src/workflows/LaneNode.vue delete mode 100644 ui/src/workflows/TranscriptTool.vue delete mode 100644 ui/src/workflows/transcript.ts delete mode 100644 ui/src/workflows/workflow-history.ts diff --git a/ui/src/channels/ChannelsPage.vue b/ui/src/channels/ChannelsPage.vue index 988f39926..256e79f3e 100644 --- a/ui/src/channels/ChannelsPage.vue +++ b/ui/src/channels/ChannelsPage.vue @@ -20,7 +20,7 @@ import { } from "@/components/ui/tags-input"; import { errors } from "@/copy/errors"; import { api, describeError } from "@/lib/api"; -import OptionSelect from "@/workflows/OptionSelect.vue"; +import OptionSelect from "@/components/OptionSelect.vue"; import { useOrgStore, type Identity } from "@/stores/org"; import { Section } from "@/components/ui/section"; import { resourcesForPage, useSettingsStore } from "@/stores/settings"; diff --git a/ui/src/workflows/OptionSelect.vue b/ui/src/components/OptionSelect.vue similarity index 100% rename from ui/src/workflows/OptionSelect.vue rename to ui/src/components/OptionSelect.vue diff --git a/ui/src/dashboard/QuickTask.vue b/ui/src/dashboard/QuickTask.vue index 553c9414c..ccfb7b43a 100644 --- a/ui/src/dashboard/QuickTask.vue +++ b/ui/src/dashboard/QuickTask.vue @@ -13,7 +13,7 @@ import { useOrgStore } from "@/stores/org"; import NewTaskDialog from "@/tasks/NewTaskDialog.vue"; import { firstLine } from "@/tasks/first-line"; import type { WorkflowDefinition } from "@/workflows/workflow-rows"; -import { declaredInputs } from "@/workflows/work-request"; +import { declaredInputs } from "@/tasks/work-request"; /** * Start a task from a prompt. A workflow that needs more than the prompt (a diff --git a/ui/src/settings/ExtensionSettingField.vue b/ui/src/settings/ExtensionSettingField.vue index a6175bf55..f15a6062a 100644 --- a/ui/src/settings/ExtensionSettingField.vue +++ b/ui/src/settings/ExtensionSettingField.vue @@ -7,7 +7,7 @@ import { NumberField, NumberFieldContent, NumberFieldDecrement, NumberFieldIncre import { Switch } from "@/components/ui/switch"; import { TagsInput, TagsInputInput, TagsInputItem, TagsInputItemDelete, TagsInputItemText } from "@/components/ui/tags-input"; import type { ExtensionSettingSpec } from "@/stores/extensions"; -import OptionSelect from "@/workflows/OptionSelect.vue"; +import OptionSelect from "@/components/OptionSelect.vue"; import SecretRefField from "./SecretRefField.vue"; // One typed setting. Every type reads and writes the string the server stores. diff --git a/ui/src/tasks/NewTaskForm.vue b/ui/src/tasks/NewTaskForm.vue index b56e277db..59f38dc91 100644 --- a/ui/src/tasks/NewTaskForm.vue +++ b/ui/src/tasks/NewTaskForm.vue @@ -19,7 +19,7 @@ import { declaredInputs, inputValues, missingRequiredInputs, -} from "@/workflows/work-request"; +} from "@/tasks/work-request"; /** Starting work enters Archie's normal admitted task queue, not a side door. */ const props = defineProps<{ diff --git a/ui/src/workflows/work-request.ts b/ui/src/tasks/work-request.ts similarity index 97% rename from ui/src/workflows/work-request.ts rename to ui/src/tasks/work-request.ts index adf81c82a..4acf33095 100644 --- a/ui/src/workflows/work-request.ts +++ b/ui/src/tasks/work-request.ts @@ -9,7 +9,7 @@ * change here. */ -import type { WorkflowDefinition } from "./workflow-rows"; +import type { WorkflowDefinition } from "../workflows/workflow-rows.ts"; /** One input a workflow declares, as the form renders it. */ export interface DeclaredInput { diff --git a/ui/src/workflows/AddNode.vue b/ui/src/workflows/AddNode.vue deleted file mode 100644 index eb53dc664..000000000 --- a/ui/src/workflows/AddNode.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/ui/src/workflows/AgentTranscript.vue b/ui/src/workflows/AgentTranscript.vue index 0f3620ff4..6eecfc970 100644 --- a/ui/src/workflows/AgentTranscript.vue +++ b/ui/src/workflows/AgentTranscript.vue @@ -1,5 +1,5 @@