Skip to content

Combine conversion task creation and execution into one Convert step - #46

Open
Shreyansh Gupta (code-scannner) wants to merge 4 commits into
mainfrom
guptashreyan/combine-create-execute
Open

Shreyansh Gupta (code-scannner) wants to merge 4 commits into
mainfrom
guptashreyan/combine-create-execute

Conversation

@code-scannner

Copy link
Copy Markdown
Collaborator

The Home page had separate "Create Conversion Tasks" and "Execute Conversion Tasks" steps, and the Conversion view needed "Plan Conversion" before "Execute All". Convert now creates the task plan and executes the required tasks in the same agent session.

The Home page had separate "Create Conversion Tasks" and "Execute
Conversion Tasks" steps, and the Conversion view needed "Plan Conversion"
before "Execute All". Convert now creates the task plan and executes the
required tasks in the same agent session.

- Home page shows one Convert step ("Creating tasks" / "Executing tasks"
  while running); flows that already have tasks resume execution.
- generateConversionForFlow accepts { executeAfterPlan } and sends a
  combined prompt; migration_conversion_storeTaskPlan then starts Execute
  All and tells the agent to continue without waiting for the user.
- The Conversion view's first action is Convert; Regenerate Tasks stays
  plan-only and Execute All remains available for resuming.
- Clear the stale executing state when Execute All has nothing to run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 06:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Conversion starts tasks by order without checking dependsOn, allowing a workflow task to execute before its required schema task.

1 open issue
What changed in this PR

This PR combines conversion task creation and execution into one Convert action, allowing the migration agent to complete both phases in the same chat session.

Changes:

  • Updates Home and Conversion views to launch the combined workflow and support resuming existing tasks.
  • Adds execute-after-plan state, agent instructions, and cleanup handling.
  • Updates user messages, documentation, and unit tests.
File Description
src/​views/​discovery/​SourceFlowVisualizer.ts Combines Create and Execute into Convert, with resume handling.
src/​views/​conversion/​ConversionWebviewPanel.ts Launches combined conversion and updates button labels.
src/​test/​unit/​conversion.test.ts Tests automatic execution, cancellation, and prompts.
src/​stages/​conversion/​ConversionService.ts Tracks execute-after-plan requests and starts required tasks.
src/​services/​AgentFileProvisioner.ts Bumps the converter agent version.
src/​copilot/​MigrationLMTools.ts Starts execution after storing a plan and returns continuation instructions.
src/​constants/​UserMessages.ts Aligns notifications and guidance with Convert.
src/​constants/​ChatPrompts.ts Adds end-to-end conversion instructions.
src/​commands/​CommandRegistry.ts Handles combined conversion options and state cleanup.
resources/​agents/​migration-converter.md Documents when to continue directly into execution.
README.md Describes the single Convert step.

Review effort: Balanced

Shreyansh Gupta and others added 3 commits November 23, 2026 12:15
Rework the previous change to match the intended flow. The Home flow card
now has a single conversion step instead of separate Create and Execute
steps:

- Create: the agent creates the conversion tasks; the task list then opens
  so each task (or Execute All) is executed from there.
- Execute: once tasks exist, the same step opens the task list.
- Converted: shown when all required tasks are done.

The agent no longer runs every task on its own right after creating them,
so the executeAfterPlan prompt, service flag, storeTaskPlan handoff and the
related doc and version changes are reverted. The step is rendered by a
small helper with unit tests, and the unused Execute message handler and
UserPrompts.failedToExecute are removed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The combined Home step still read "Create" before tasks existed. It is now
named Execute in every state, like Analyse -> Analysed and Plan -> Planned:

- Execute: generates the conversion tasks (or opens them once they exist)
  so they are executed from the task list.
- Executing...: while tasks are generated or executed.
- Executed: when all required tasks are done.

A unit test checks every state combination so the step never shows
"Create" in its label or tooltip.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open in VS Code (and the Home step's Executed state) only enabled after
migration_conversion_finalize, which nothing calls when tasks are executed
one at a time from the task list, so the button stayed disabled until VS
Code was reloaded.

migration_conversion_storeTaskOutput now finalizes the flow once every
required task is completed or skipped: it marks the flow converted,
refreshes Home and stamps the workflow MigrationMetadata, reusing the
finalize tool's logic. Optional tasks may still be pending, and calling
migration_conversion_finalize afterwards changes nothing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The conversion flow still stops at planning, fails to persist completion status, and blocks or disrupts progress navigation.

5 open issues

Review effort: Max

Comment thread src/copilot/MigrationLMTools.ts Resolved
Comment thread src/copilot/MigrationLMTools.ts Resolved
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.

2 participants