Skip to content

fix: serve the UI packaged in the wheel; bump 0.1.13 - #44

Merged
echarles merged 1 commit into
mainfrom
fix/packaged-ui
Sep 25, 2026
Merged

echarles merged 1 commit into
mainfrom
fix/packaged-ui

Conversation

@echarles

Copy link
Copy Markdown
Member

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 in Path.cwd() / "ui" / "dist". It never checked mcp_compose/ui/dist, where the wheel installs the UI. As a result:

  • mcp-compose serve, started from a normal config directory, served no /ui but still printed a Web UI: URL that returned 404.
  • The Docker image copied the UI to /app/ui/dist, but its wheel was built without Node.js and carried only the placeholder dist.

Fix

  • find_ui_dist_path() in mcp_compose/api/app.py checks ./ui/dist (the old behavior, so existing setups keep working), then the packaged mcp_compose/ui/dist, then the source checkout. A directory counts only if it contains index.html, so the placeholder that Node-less builds ship is skipped. The app and serve's Web UI: line both use it.
  • The Dockerfile bakes the built UI into the wheel and no longer copies it to /app/ui/dist.
  • .github/scripts/smoke_installed_ui.py imports 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.
  • Bumps the version to 0.1.13, ready to tag 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 /ui from a config directory. ruff and mypy are clean.
  • A wheel built from a clean export and installed in a fresh venv: the smoke script resolves site-packages/mcp_compose/ui/dist and /ui returns the app.
  • A local docker build and docker run: the container runs mcp 2.2.0, logs Serving UI from /usr/local/lib/python3.10/site-packages/mcp_compose/ui/dist, and GET /ui/ returns 200 with the app.

🤖 Generated with Claude Code

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.
Copilot AI lite review requested due to automatic review settings September 25, 2026 04:17

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.

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.

@echarles
echarles merged commit 692ccb6 into main Sep 25, 2026
13 checks passed
@echarles
echarles deleted the fix/packaged-ui branch September 25, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants