Add Modernization Workflow canvas 🤖🤖🤖 - #2758
Open
marconsilva wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🔒 PR Risk Scan ResultsScanned 10 changed file(s).
✅ No matching risk patterns were detected in changed files. Skipped non-text or missing files
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an installable Modernization Workflow canvas for guiding Modernize CLI assessment, planning, and execution.
Changes:
- Adds the canvas UI, state persistence, command generation, and artifact detection.
- Registers the extension as a marketplace plugin.
- Adds supporting documentation, branding, and licensing.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
plugins/modernization-workflow/README.md |
Documents plugin installation. |
plugins/modernization-workflow/plugin.json |
Defines plugin metadata and extension mapping. |
extensions/modernization-workflow/README.md |
Documents canvas behavior and actions. |
extensions/modernization-workflow/LICENSE |
Adds the MIT license. |
extensions/modernization-workflow/assets/preview.png |
Provides marketplace artwork. |
extensions/modernization-workflow/lib/state.mjs |
Manages commands, artifacts, and persisted state. |
extensions/modernization-workflow/lib/server.mjs |
Implements the local canvas server. |
extensions/modernization-workflow/lib/renderer.mjs |
Renders the interactive workflow interface. |
extensions/modernization-workflow/extension.mjs |
Registers the canvas and agent actions. |
extensions/modernization-workflow/copilot-extension.json |
Defines extension identity and version. |
docs/README.plugins.md |
Adds the plugin to documentation. |
.github/plugin/marketplace.json |
Publishes the marketplace entry. |
Suppressed comments (2)
extensions/modernization-workflow/lib/server.mjs:51
- The SSE endpoint does not validate the capability token, so any local client that finds the port can subscribe to broadcasts containing the workspace path, configuration, commands, and artifact filenames. Pass the token in the EventSource URL and reject unauthenticated subscriptions, as done by the existing Java modernization canvas.
if (req.method === "GET" && url.pathname === "/events") {
extensions/modernization-workflow/lib/renderer.mjs:174
executionis a subset ofplan, so execution summary files are appended twice and shown as duplicate artifact rows. Deduplicate the combined list before rendering.
const artifacts=[...state.artifacts.assessment,...state.artifacts.plan,...state.artifacts.execution];
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+98
to
+99
| const assessmentOutputs = assessmentFiles.filter((path) => | ||
| !/config|canvas-/i.test(path) && /\.(json|md|html)$/i.test(path)); |
| .filter((path) => /\.(json|md|html)$/i.test(path)); | ||
| const assessmentOutputs = assessmentFiles.filter((path) => | ||
| !/config|canvas-/i.test(path) && /\.(json|md|html)$/i.test(path)); | ||
| const summaryFiles = planFiles.filter((path) => /summary|progress|result/i.test(path)); |
Comment on lines
+113
to
+116
| function quote(value) { | ||
| const text = String(value).trim(); | ||
| if (/^[A-Za-z0-9_./:\\-]+$/.test(text)) return text; | ||
| return `"${text.replaceAll('"', '\\"')}"`; |
Comment on lines
+38
to
+39
| if (req.method === "GET" && url.pathname === "/") { | ||
| const state = await getWorkflowState(options.workspace, options.stateId); |
Comment on lines
+99
to
+100
| if (Object.keys(options.initialConfig).some((key) => | ||
| ["language", "source", "goal", "planName"].includes(key))) { |
Comment on lines
+169
to
+170
| const form=document.querySelector("#config"); | ||
| for(const name of ["language","delegate","source","goal","upgradeTarget","planName"]) form.elements[name].value=state[name]; |
| </div> | ||
| </main> | ||
| </div> | ||
| <div class="toast" id="toast"></div> |
Comment on lines
+223
to
+226
| const refreshed = await getWorkflowState(workspace, stateId); | ||
| current.steps = refreshed.steps; | ||
| await saveState(workspace, stateId, current); | ||
| return getWorkflowState(workspace, stateId); |
Comment on lines
+134
to
+135
| const assessment = artifacts.assessment.find((path) => /assessment.*\.json$/i.test(path)) | ||
| ?? artifacts.assessment.find((path) => /\.json$/i.test(path)); |
| async function scanArtifacts(workspace, planName) { | ||
| const modernizeRoot = join(workspace, ".github", "modernize"); | ||
| const assessmentRoot = join(modernizeRoot, "assessment"); | ||
| const planRoot = join(modernizeRoot, planName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Modernization Workflow canvas, an interactive companion for the GitHub Copilot Modernize CLI Assess, Plan, and Execute lifecycle across .NET, Java, and C++ repositories.
The canvas detects repository technology signals, generates Modernize CLI commands, tracks workflow state, and refreshes progress from artifacts under
.github/modernize/.Usage notes
Install it from the Awesome Copilot marketplace with:
The canvas displays and copies commands but does not execute them without the user.
Validation
npm run plugin:validatenpm startnode --test C:\code\gbb\modernization-canvas\test\state.test.mjs