Fix #1433: Add MI.terminate-server to editor/title/run toolbar menu#1443
Fix #1433: Add MI.terminate-server to editor/title/run toolbar menu#1443SasinduDilshara wants to merge 1 commit intowso2:mainfrom
Conversation
The MI.terminate-server command was registered but had no menu contribution in editor/title/run. As a result, after "Build and Run" set MI.isRunning='true' (hiding the play button), no stop button ever appeared, leaving users with no UI way to stop the running MI server. Changes: - Add MI.terminate-server entry to contributes.menus["editor/title/run"] with icon $(debug-stop), group navigation@1, and the complementary when clause (MI.isRunning == 'true') to the play button's (MI.isRunning !== 'true') - Add icon: $(debug-stop) to the MI.terminate-server command definition so it renders correctly as a toolbar button Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Issue Analysis — [Issue #1433]: Start/Stop buttons disappear from activity bar after running the projectClassification
Reproducibility
Root Cause AnalysisThe root cause is a missing menu registration in What exists:
The flow:
Fix: Add {
"command": "MI.terminate-server",
"icon": "$(debug-stop)",
"group": "navigation@1",
"when": "MI.status == 'projectLoaded' && (isVisualizerActive || resourceLangId == SynapseXml) && MI.isRunning == 'true' && !editorTextFocus"
}Test Coverage Assessment
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR adds the VS Code extension manifest for the WSO2 Integrator: MI extension, declaring activation events, language support for SynapseXml, custom task types, a debugger with launch configurations, configuration settings, UI contributions including commands and views, and npm dependencies. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Warning |
Fix Plan — Issue #1433Dev Test Result
Changes Made
Known IssuesNone. The fix correctly addresses the root cause: |
Fix Verification ReportIssue: #1433 Reproduction Steps ExecutedStatic VerificationInspected the installed extension at: Confirmed {
"command": "MI.terminate-server",
"icon": "$(debug-stop)",
"group": "navigation@1",
"when": "MI.status == 'projectLoaded' && (isVisualizerActive || resourceLangId == SynapseXml) && MI.isRunning == 'true' && !editorTextFocus"
}And the Runtime Verification (Playwright)
Result
Stop button appeared after triggering Build and Run: ✅ CONFIRMED Before the fix, the EvidenceStatic (package.json diff)Before fix (VSIX After fix (installed extension Runtime Screenshots
Runtime test output (key lines) |
Purpose
Fixes #1433 — After clicking Build and Run, the play button (▷) disappears but no stop button ever appears, leaving users unable to stop the running MI server from the VS Code UI.
Goals
Add the missing
MI.terminate-serverentry to theeditor/title/runmenu contribution so that a stop button (■) appears in the editor title toolbar wheneverMI.isRunning == 'true'.Approach
Root Cause
The
MI.terminate-servercommand was registered incontributes.commandsbut had no entry in any menu. The play button correctly hides whenMI.isRunning === 'true'(itswhenclause becomes false), but no stop button was ever registered to appear in its place.Fix (in
extension/package.json)1. Added
MI.terminate-servertocontributes.menus["editor/title/run"]:{ "command": "MI.terminate-server", "icon": "$(debug-stop)", "group": "navigation@1", "when": "MI.status == 'projectLoaded' && (isVisualizerActive || resourceLangId == SynapseXml) && MI.isRunning == 'true' && !editorTextFocus" }This
whenclause is the exact complement of the play button'sMI.isRunning !== 'true', ensuring the buttons swap correctly as the server starts/stops.2. Added
icon: $(debug-stop)to theMI.terminate-servercommand definition so it renders correctly as an icon-only toolbar button.Before / After
User stories
Release note
Fixed an issue where the Stop MI Server button was not appearing in the editor title toolbar after Build and Run was triggered (issue #1433).
Automation tests
package.jsonanalysis confirming botheditor/title/runentries are present with complementarywhenclauses.codicon-debug-stop) appears within 5 seconds after clicking Build and Run.Security checks
Test environment
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes