Add 'none' workflow option as the default (no-op on goal set)

- Workflow() no longer defaults to 'conductor' when empty
- runWorkflow() returns immediately for '' or 'none'
- 'none' listed first in the workflows file output
- QML dropdowns default to 'none' instead of 'conductor'
- C++ fallback uses 'none' when server unreachable
This commit is contained in:
Levi Neely 2026-08-19 18:09:09 +02:00
parent 9f1aec1384
commit a7b8c4c2ce
4 changed files with 12 additions and 9 deletions

View File

@ -63,7 +63,11 @@ func startAsync(ctx context.Context, fn func()) bool {
// runWorkflow executes a workflow script in the background.
// If variant is non-empty and not "default", the matching conf sidecar is
// sourced as environment variables before the script runs.
// If workflow is empty or "none", nothing happens.
func runWorkflow(s *session.Session, workflow, variant string) {
if workflow == "" || workflow == "none" {
return
}
startAsync(s.Ctx, func() {
workflowDir := util.CfgDir() + "/workflows/"
scriptPath := workflowDir + workflow
@ -205,6 +209,8 @@ func buildTreeSpec(cfg *Config) virtfs.FsNodeDecl {
}
}
var sb strings.Builder
// "none" is always the first entry — it means no workflow runs.
sb.WriteString("none\tdefault\n")
names := make([]string, 0, len(workflows))
for wf := range workflows {
names = append(names, wf)

View File

@ -257,14 +257,11 @@ func (s *Session) GoalSignal() <-chan struct{} {
return ch
}
// Workflow returns the workflow profile name (default: "conductor").
// Workflow returns the workflow profile name (default: "none").
func (s *Session) Workflow() string {
s.mu.RLock()
w := s.workflow
s.mu.RUnlock()
if w == "" {
return "conductor"
}
return w
}

View File

@ -135,7 +135,7 @@ Dialog {
enabled: ollie.workflowsLoaded
model: ollie.availableWorkflows
currentIndex: {
var idx = ollie.availableWorkflows.indexOf("conductor")
var idx = ollie.availableWorkflows.indexOf("none")
return idx >= 0 ? idx : 0
}
onCurrentTextChanged: {
@ -242,7 +242,7 @@ Dialog {
cwdField.text = cfg.cwd || ""
remoteField.text = cfg.remote || ""
var wfIdx = ollie.availableWorkflows.indexOf(cfg.workflow || "conductor")
var wfIdx = ollie.availableWorkflows.indexOf(cfg.workflow || "none")
workflowCombo.currentIndex = wfIdx >= 0 ? wfIdx : 0
// Populate variant after workflow is set.
@ -261,7 +261,7 @@ Dialog {
cwdField.text = ""
remoteField.text = ""
yoloCheckBox.checked = false
var idx = ollie.availableWorkflows.indexOf("conductor")
var idx = ollie.availableWorkflows.indexOf("none")
workflowCombo.currentIndex = idx >= 0 ? idx : 0
variantCombo.currentIndex = 0
}

View File

@ -602,8 +602,8 @@ void Ollie9pClient::loadWorkflows()
}
}
} else {
m_availableWorkflows = QStringList() << QStringLiteral("conductor");
m_workflowVariants[QStringLiteral("conductor")] = QStringList() << QStringLiteral("default");
m_availableWorkflows = QStringList() << QStringLiteral("none");
m_workflowVariants[QStringLiteral("none")] = QStringList() << QStringLiteral("default");
}
m_workflowsLoaded = true;
emit availableWorkflowsChanged();