Skip to content

feat(fiori-mcp): add skill to convert preview and test setup to virtual endpoints#4823

Open
heimwege wants to merge 1 commit into
mainfrom
feat/fiori-mcp/skill-for-convert-preview
Open

feat(fiori-mcp): add skill to convert preview and test setup to virtual endpoints#4823
heimwege wants to merge 1 commit into
mainfrom
feat/fiori-mcp/skill-for-convert-preview

Conversation

@heimwege

@heimwege heimwege commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

feat(fiori-mcp): Add Skill to Convert Preview and Test Setup to Virtual Endpoints

New Feature

✨ Introduces a new MCP skill sap-fiori-convert-preview-config for the @sap-ux/fiori-mcp-server package. This skill automates the migration of SAP Fiori app preview configurations from local HTML files to virtual endpoints using npx @sap-ux/create@latest convert preview-config.

Changes

  • .changeset/shaggy-plums-watch.md: Adds a minor changeset entry for the new skill in @sap-ux/fiori-mcp-server.
  • packages/fiori-mcp-server/skills/sap-fiori-convert-preview-config/SKILL.md: Defines the full skill specification, including:
    • Prerequisite validation: Detects hard-error conditions (e.g., outdated @ui5/cli, missing mockserver middleware) and halts with clear user guidance.
    • Interactive options: Prompts the user for simulate mode (--simulate) and test runner conversion (--tests).
    • Command execution: Runs the conversion command and captures full output.
    • HTML sandbox custom init migration: Scans renamed *_old.html files for custom <script> logic and extracts it into a flpSandboxInit.js/.ts file, then registers it in ui5.yaml under flp.init.
    • Karma config migration: Updates ui5.configPath and ui5.testpage to point to the new virtual endpoint paths when a Karma warning is detected.
    • WebdriverIO QUnit Service migration: Updates test page paths in wdio.conf.js/ts to use virtual endpoint format when a WebdriverIO warning is detected.
    • Result summary: Reports all tool-applied and manually-completed changes, and suggests next steps.
  • 🔄 Regenerate and Update Summary
PR Bot Information

Version: 1.22.5

  • Summary Prompt: Default Prompt
  • Correlation ID: 925693de-2b94-4b06-b02f-aea89cb5c145
  • Event Trigger: pull_request.opened
  • Output Template: Default Template
  • LLM: anthropic--claude-4.6-sonnet
  • File Content Strategy: Full file content

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1cf55b0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sap-ux/fiori-mcp-server Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@heimwege heimwege marked this pull request as ready for review June 11, 2026 07:44
@heimwege heimwege requested a review from a team as a code owner June 11, 2026 07:44
@hyperspace-insights

Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


feat(fiori-mcp): Add Skill to Convert Preview and Test Setup to Virtual Endpoints

New Feature

✨ Introduces a new MCP skill sap-fiori-convert-preview-config for the @sap-ux/fiori-mcp-server package. This skill automates the migration of SAP Fiori app preview configurations from local HTML files to virtual endpoints, and handles manual migration steps that the underlying CLI tool cannot perform automatically.

Changes

  • .changeset/shaggy-plums-watch.md: Adds a minor version changeset entry for the new skill in @sap-ux/fiori-mcp-server.
  • packages/fiori-mcp-server/skills/sap-fiori-convert-preview-config/SKILL.md: Defines the new skill with full step-by-step instructions for the AI agent, including:
    • Running npx --yes @sap-ux/create@latest convert preview-config with configurable --simulate and --tests flags.
    • Detecting and reporting prerequisite errors (e.g., missing @ui5/cli v3+, unsupported mock server setup).
    • Automatically handling post-conversion manual migration steps:
      • HTML sandbox custom init: Extracts custom <script> logic from renamed *_old.html files and creates a flpSandboxInit.js/.ts file, then registers it in ui5.yaml.
      • Karma config migration: Updates ui5.testpage and ui5.configPath to point to the new virtual endpoints.
      • WebdriverIO QUnit Service migration: Updates test page paths from local HTML files to virtual middleware endpoints.
    • Summarizing all changes and suggesting next steps after conversion.

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.22.5

  • Summary Prompt: Default Prompt
  • Correlation ID: d158bdf1-bbb6-427a-9e77-5d19a6b5c7cf
  • Output Template: Default Template
  • LLM: anthropic--claude-4.6-sonnet
  • File Content Strategy: Full file content
  • Event Trigger: pull_request.ready_for_review

@hyperspace-insights hyperspace-insights Bot 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.

The PR adds a well-structured skill document for converting Fiori preview configurations to virtual endpoints. There are a few logic issues to address: the simulation guard is missing from all three manual migration sub-steps (6a, 6b, 6c), which would cause the agent to attempt file writes or read non-existent *_old.html files during dry runs, and the "show before writing" confirmation in step 6a is ordered after the write step rather than before it. One typo ("Aks" → "Ask") was also flagged.

PR Bot Information

Version: 1.22.5

  • Correlation ID: d158bdf1-bbb6-427a-9e77-5d19a6b5c7cf
  • Agent Instructions:
  • LLM: anthropic--claude-4.6-sonnet
  • File Content Strategy: Full file content
  • Event Trigger: pull_request.ready_for_review

Read the current `ui5.yaml`, add or update the `flp.init` property, and write it back.
5. Show the user what was extracted and what files were created/modified before writing.

**If no custom modifications are found:** inform the user that the HTML files had no custom code and migration is complete. Aks the user to delete the *_old.html files

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.

Typo: "Aks" should be "Ask"

Misspelling in user-facing instruction text.

Suggested change
**If no custom modifications are found:** inform the user that the HTML files had no custom code and migration is complete. Aks the user to delete the *_old.html files
**If no custom modifications are found:** inform the user that the HTML files had no custom code and migration is complete. Ask the user to delete the *_old.html files

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

Comment on lines +111 to +112
Read the current `ui5.yaml`, add or update the `flp.init` property, and write it back.
5. Show the user what was extracted and what files were created/modified before writing.

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.

Logic Error: Step 6a instructs to show the user what was extracted "before writing" (step 5), but step 5 comes after step 4 (which already writes ui5.yaml). The instruction to show/confirm before writing is out of order — the agent would have already written ui5.yaml before showing the user.

Consider reordering: show the proposed changes to the user first (step 4 preview), await confirmation, then create the file and update ui5.yaml.

Suggested change
Read the current `ui5.yaml`, add or update the `flp.init` property, and write it back.
5. Show the user what was extracted and what files were created/modified before writing.
5. Show the user what was extracted and what files will be created/modified, and ask for confirmation before writing.
4. Once confirmed, register the init script in `ui5.yaml` under the `fiori-tools-preview` or `preview-middleware` configuration:
```yaml
configuration:
flp:
init: /test/flpSandboxInit # no file extension - UI5 module path
```
Read the current `ui5.yaml`, add or update the `flp.init` property, and write it back.

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful


**If no custom modifications are found:** inform the user that the HTML files had no custom code and migration is complete. Aks the user to delete the *_old.html files

#### 6b. Karma migration (only if Karma warning was detected)

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.

Logic Error: Step 6b only triggers when the Karma warning is detected in the output, but that warning only appears when --tests=true is passed. However, the --simulate=true dry run does not write files — so if the user ran a simulation first, the Karma config would be updated during simulation but no actual files would have changed. The skill should guard against performing Karma/WebdriverIO config writes when --simulate=true was used.

Suggested change
#### 6b. Karma migration (only if Karma warning was detected)
#### 6b. Karma migration (only if Karma warning was detected AND `--simulate=false` was used)

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

7. Show the diff to the user before writing
8. Write the updated Karma config

#### 6c. WebdriverIO QUnit Service migration (only if WebdriverIO warning was detected)

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.

Logic Error: Same simulation guard issue as 6b — WebdriverIO config writes should not happen when --simulate=true was used.

Suggested change
#### 6c. WebdriverIO QUnit Service migration (only if WebdriverIO warning was detected)
#### 6c. WebdriverIO QUnit Service migration (only if WebdriverIO warning was detected AND `--simulate=false` was used)

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful


### 6. Handle manual migration steps automatically

#### 6a. HTML sandbox custom init migration (always check, regardless of --tests flag)

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.

Logic Error: The --simulate=true path for step 6a (HTML sandbox custom init migration) has the same problem — renaming to *_old.html is done by the tool only during a real run (--simulate=false). During a dry run, no *_old.html files will be created, so the agent checking for them will find nothing to process. The skill should skip step 6a when --simulate=true was used, or document that the HTML file check is only relevant after a real run.

Suggested change
#### 6a. HTML sandbox custom init migration (always check, regardless of --tests flag)
#### 6a. HTML sandbox custom init migration (always check after a real run (`--simulate=false`), regardless of --tests flag)

Double-check suggestion before committing. Edit this comment for amendments.


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fiori-mcp @sap-ux/fiori-mcp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant