Skip to content

Bring resumable workflow plans into Desktop - #38

Merged
DevMando merged 5 commits into
mainfrom
feat/maf-workflow-planner-host
Aug 30, 2026
Merged

Bring resumable workflow plans into Desktop#38
DevMando merged 5 commits into
mainfrom
feat/maf-workflow-planner-host

Conversation

@DevMando

Copy link
Copy Markdown
Owner

What changed

This brings the workflow planner's review and recovery experience into the Desktop app.

  • Shows proposed and revised plans as visible cards with clear next actions.
  • Lets users edit a step with its current instruction already loaded, then refreshes dependent steps before execution.
  • Adds native Resume and Discard actions when an unfinished plan is restored.
  • Preserves the execution cursor so completed work is not repeated after a restart.
  • Supports retry, replan, skip, and cancel decisions when a step fails.
  • Reports partial completion when work was skipped or failed instead of presenting the run as fully successful.
  • Keeps plan action cards current as the workflow moves from review to execution and completion.

Why

The engine now treats plans as durable workflows. Desktop needs to expose that state clearly so users can understand what ran, change what comes next, and recover after closing the app without relying on hidden slash commands.

Dependency and merge order

This PR depends on MandoCode CLI PR #79 and currently pins its head commit, e058399, for review. Merge the CLI PR first, then update this submodule pin to the CLI PR's merge commit before merging Desktop.

Validation

  • 239 Desktop tests passed
  • Release build completed with zero warnings and zero errors
  • Manually exercised explicit planning, step editing, dependent-step refresh, retry, replan, skip, cancel, resume, and discard through Desktop

No installer, tag, or release is published by this PR.

DevMando and others added 5 commits August 27, 2026 11:45
Companion to the engine change that stops executing plans inside the propose_plan
tool call. propose_plan now only queues a plan; whoever hosts the chat turn is
responsible for running it once the turn has drained. Without this call a plan
proposed in the Desktop app would be silently accepted and then never executed —
it still compiles, which is exactly what makes the omission dangerous.

Adds AppendAssistantNote to IAiService so a completed plan's manifest can be
recorded in history without giving the model an open turn to redo the work in.

Bumps the MandoCode submodule to the engine's feature branch, since the host code
depends on PlanHandoff.RunPendingPlanAsync and AIService.AppendAssistantNote.
Re-point this at the merge commit once the engine PR lands.

Known gap, deliberately not addressed here: when a user rejects a plan the CLI
starts a follow-up turn so the model answers directly, and Desktop does not yet.
Rejecting in Desktop currently ends the turn quietly. That needs UI work, which
is out of scope for this change.

Tests: 225 green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…n the title

Two related fixes, both about being able to tell what you are actually running.

Desktop constructed TaskPlannerService directly, so `/config set planner workflow`
had no effect here at all — the app silently stayed on the legacy engine no matter
what the key said. It now goes through PlanRunnerSelector, the same as the CLI, so
both engines can be A/B'd in the app rather than only from the terminal.
TaskPlannerService is still injected for RequiresPlanning, which is a
planning-trigger heuristic rather than part of IPlanRunner.

The window title read UiUpdateCheckService.CurrentVersion, which is numeric-only
and drops any prerelease tag, so a test build was indistinguishable from the
release it was cut from. Adds DisplayVersion for that, sharing the engine's
VersionLabel; CurrentVersion stays numeric because it feeds version comparison.

Stamps this branch 0.15.0-plan-test. Only truthful now that Desktop can actually
run the new planner — before this change the tag would have advertised a capability
the binary did not have. Drop the suffix before release.

Tests: 225 green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Found by a live run:

    Request cancelled.
    Unexpected error: A task was canceled.

ProcessDirectRequestAsync had a try/finally with no catch. The streamer handles
cancellation itself and reports "Request cancelled.", after which the plan-drain
call added for deferred execution threw OperationCanceledException, escaped to
ChatTabView's catch-all, and reported the same cancellation a second time as an
unexpected error.

Cancellation is now caught where it happens, and the pending proposal is cleared
both at the start of every turn and when a turn ends cancelled — otherwise a plan
abandoned by a cancelled turn would run at the end of a later one.

Tests: 225 green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Back to a plain 0.15.0 in the window title. DisplayVersion stays — it renders any
prerelease tag the version actually carries, which the numeric CurrentVersion cannot.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@DevMando
DevMando merged commit ea806e2 into main Aug 30, 2026
1 check passed
@DevMando
DevMando deleted the feat/maf-workflow-planner-host branch August 30, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant