Skip to content

Comments

Enable remote debugging and DSS mapping generation#1491

Merged
ChinthakaJ98 merged 3 commits intowso2:mainfrom
ChinthakaJ98:ui-changes
Feb 20, 2026
Merged

Enable remote debugging and DSS mapping generation#1491
ChinthakaJ98 merged 3 commits intowso2:mainfrom
ChinthakaJ98:ui-changes

Conversation

@ChinthakaJ98
Copy link
Contributor

@ChinthakaJ98 ChinthakaJ98 commented Feb 19, 2026

This PR will fix the issue wso2/mi-vscode#1390

Summary by CodeRabbit

  • New Features

    • Added remote server launch and debug configuration to the VS Code MI extension, enabling connection to remote servers with configurable ports and authentication credentials.
  • Bug Fixes

    • Re-enabled the Generate Mappings button in data service input and output mapping panels.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

📝 Walkthrough

Walkthrough

This pull request reinstates the Generate Mappings buttons in the input and output mapping components by removing conditional wrapping and commented code, and adds a new remote MI launch configuration to the VS Code extension package with server connection fields.

Changes

Cohort / File(s) Summary
Generate Mappings Buttons
workspaces/mi/mi-diagram/src/components/sidePanel/dataServices/input-mapping.tsx, workspaces/mi/mi-diagram/src/components/sidePanel/dataServices/output-mapping.tsx
Reactivates the Generate Mappings button in both input and output mapping components by removing commented conditional logic and directly enabling rendering.
Remote MI Launch Configuration
workspaces/mi/mi-extension/package.json
Adds a new remote MI launch configuration with server connection properties including ports, host, credentials, and connection timeout settings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Buttons spring to life with a click and a hop,
The Generate Mappings now ready to pop,
Remote server connections take their place,
With ports aligned in perfect space!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal and incomplete, providing only a link to the related issue without addressing required template sections like Purpose, Goals, Approach, or testing details. Expand the description to follow the template structure, including Purpose, Goals, Approach, test environment details, and other applicable sections to provide comprehensive context for the changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the two main changes in the PR: enabling remote debugging support and enabling the Generate Mappings button for DSS mapping functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
workspaces/mi/mi-extension/package.json (1)

111-129: Switch remote debug configuration to use request: "attach" instead of "launch".

The debug adapter already supports attachRequest and handles it identically to launchRequest (see debugAdapter.ts). The semantic distinction between launch and attach is determined by properties.type, not the request field. VS Code convention is to use request: "attach" when connecting to an already-running process, making this change more semantically correct without requiring any adapter modifications.

Add individual IntelliSense descriptions for nested properties like commandPort, eventPort, serverHost, etc.

Currently, the nested properties object in configurationAttributes.launch is defined only with additionalProperties: { type: ["string", "number"] }, providing no per-field descriptions or validation in the IDE. Explicitly defining each property under configurationAttributes.launch.properties.properties would enable proper IntelliSense hints for users editing launch.json.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workspaces/mi/mi-extension/package.json` around lines 111 - 129, Change the
debug configuration's request value from "launch" to "attach" for the "MI:
Remote Server Run and Debug" configuration (the adapter already treats attach
and launch the same based on properties.type), and add explicit per-field
entries under the package.json configuration schema (under
configurationAttributes.launch.properties.properties) for each nested property:
commandPort, eventPort, serverHost, serverPort, serverReadinessPort,
managementPort, managementUsername, managementPassword,
connectionTimeoutInSecs—provide appropriate "type" (number or string) and a
short "description" for each so VS Code shows IntelliSense and proper validation
when editing launch.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@workspaces/mi/mi-extension/package.json`:
- Around line 125-126: The launch.json template currently hardcodes
managementUsername and managementPassword (managementPassword: "admin") inside
initialConfigurations which will be written verbatim to .vscode/launch.json;
replace the literal default password with a non-sensitive placeholder (e.g.,
"<management-password>") and/or remove the password entry so users must supply
credentials at setup, updating the initialConfigurations block that references
managementUsername and managementPassword accordingly.

---

Nitpick comments:
In `@workspaces/mi/mi-extension/package.json`:
- Around line 111-129: Change the debug configuration's request value from
"launch" to "attach" for the "MI: Remote Server Run and Debug" configuration
(the adapter already treats attach and launch the same based on
properties.type), and add explicit per-field entries under the package.json
configuration schema (under
configurationAttributes.launch.properties.properties) for each nested property:
commandPort, eventPort, serverHost, serverPort, serverReadinessPort,
managementPort, managementUsername, managementPassword,
connectionTimeoutInSecs—provide appropriate "type" (number or string) and a
short "description" for each so VS Code shows IntelliSense and proper validation
when editing launch.json.

Comment on lines +125 to +126
"managementUsername": "admin",
"managementPassword": "admin",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Default plaintext admin/admin credentials will be written to launch.json.

initialConfigurations are written verbatim to .vscode/launch.json when users first create a debug configuration. Hardcoding managementPassword: "admin" means the credential will appear in a file that is frequently committed to version control. Even though WSO2 MI ships with this default, embedding it in a checked-in template increases the risk of credential exposure.

Consider replacing the default value with a placeholder string (e.g., "<management-password>") to force users to fill in the real value before use.

🔧 Proposed change
-             "managementUsername": "admin",
-             "managementPassword": "admin",
+             "managementUsername": "<management-username>",
+             "managementPassword": "<management-password>",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"managementUsername": "admin",
"managementPassword": "admin",
"managementUsername": "<management-username>",
"managementPassword": "<management-password>",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workspaces/mi/mi-extension/package.json` around lines 125 - 126, The
launch.json template currently hardcodes managementUsername and
managementPassword (managementPassword: "admin") inside initialConfigurations
which will be written verbatim to .vscode/launch.json; replace the literal
default password with a non-sensitive placeholder (e.g.,
"<management-password>") and/or remove the password entry so users must supply
credentials at setup, updating the initialConfigurations block that references
managementUsername and managementPassword accordingly.

@ChinthakaJ98 ChinthakaJ98 merged commit 8784745 into wso2:main Feb 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants