Repository navigation
fix: serve the UI packaged in the wheel; bump 0.1.13 - #44
Merged
Merged
Conversation
create_app() only looked for ./ui/dist in the working directory, so an installed mcp-compose never served the UI it ships as mcp_compose/ui/dist, while serve still advertised a Web UI URL. The Docker image had the same gap: its wheel carried only the placeholder dist. - find_ui_dist_path(): ./ui/dist, then the packaged mcp_compose/ui/dist, then the source checkout; a dist without index.html (placeholder) does not count. Used by the app and by serve's Web UI line. - Dockerfile bakes the built UI into the wheel instead of copying it to /app/ui/dist. - Build and Release workflows smoke-test /ui from the installed wheel, outside the checkout. - Bump to 0.1.13.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified, and all reviewed changes are covered by validation.
Review effort: Lite
Findings: None
What changed in this PR
Fixes serving the packaged UI from installed wheels and Docker images, and bumps the version to 0.1.13.
Changes:
- Adds packaged UI discovery with placeholder detection.
- Updates Docker packaging and CLI UI reporting.
- Adds installed-wheel smoke tests and CI/release verification.
- Adds UI resolution tests.
| File | Description |
|---|---|
tests/test_api_app.py |
Tests UI resolution and serving. |
mcp_compose/cli.py |
Reports the UI only when available. |
mcp_compose/api/app.py |
Resolves and serves packaged UI assets. |
mcp_compose/__version__.py |
Bumps version to 0.1.13. |
Dockerfile |
Packages UI assets inside the wheel. |
.github/workflows/release.yml |
Verifies UI serving before releases. |
.github/workflows/build.yml |
Runs the UI smoke test in builds. |
.github/scripts/smoke_installed_ui.py |
Verifies installed-wheel UI serving. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Follow-up to #43, addressing the review note on
release.yml: the release job checked that the wheel contains the UI, but an installed mcp-compose never served it.Problem
create_app()looked for the UI only inPath.cwd() / "ui" / "dist". It never checkedmcp_compose/ui/dist, where the wheel installs the UI. As a result:mcp-compose serve, started from a normal config directory, served no/uibut still printed aWeb UI:URL that returned 404./app/ui/dist, but its wheel was built without Node.js and carried only the placeholder dist.Fix
find_ui_dist_path()inmcp_compose/api/app.pychecks./ui/dist(the old behavior, so existing setups keep working), then the packagedmcp_compose/ui/dist, then the source checkout. A directory counts only if it containsindex.html, so the placeholder that Node-less builds ship is skipped. The app andserve'sWeb UI:line both use it.Dockerfilebakes the built UI into the wheel and no longer copies it to/app/ui/dist..github/scripts/smoke_installed_ui.pyimports the installed wheel from outside the checkout, asserts the UI resolves to the packaged directory, and fetches/ui,/ui/and/ui/servers. It runs in the Build workflow (every PR) and in the Release verify step.v0.1.13.Verification
pytest: 537 passed, 27 skipped, on both mcp 2.2.0 and mcp 1.30.0. The 4 new tests cover the packaged candidate, skipping the placeholder, the no-UI 404, and serving/uifrom a config directory.ruffandmypyare clean.site-packages/mcp_compose/ui/distand/uireturns the app.docker buildanddocker run: the container runs mcp 2.2.0, logsServing UI from /usr/local/lib/python3.10/site-packages/mcp_compose/ui/dist, andGET /ui/returns 200 with the app.🤖 Generated with Claude Code