Skip to content

Add Modernization Workflow canvas 🤖🤖🤖 - #2758

Open
marconsilva wants to merge 1 commit into
github:mainfrom
marconsilva:modernization-canvas
Open

Add Modernization Workflow canvas 🤖🤖🤖#2758
marconsilva wants to merge 1 commit into
github:mainfrom
marconsilva:modernization-canvas

Conversation

@marconsilva

Copy link
Copy Markdown

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:

copilot plugin install modernization-workflow@awesome-copilot

The canvas displays and copies commands but does not execute them without the user.

Validation

  • npm run plugin:validate
  • npm start
  • node --test C:\code\gbb\modernization-canvas\test\state.test.mjs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 21, 2026 17:35
@github-actions github-actions Bot added canvas-extension PR touches canvas extensions new-submission PR adds at least one new contribution plugin PR touches plugins labels Aug 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 10 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

Skipped non-text or missing files
  • extensions/modernization-workflow/assets/preview.png

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

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.

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

  • execution is a subset of plan, 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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

canvas-extension PR touches canvas extensions new-submission PR adds at least one new contribution plugin PR touches plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants