Skip to content

ci(mcp-diff): build UI artifacts available to baseline checkout#2523

Merged
SamMorrowDrums merged 1 commit into
mainfrom
sammorrowdrums/mcp-diff-build-ui-baseline
May 21, 2026
Merged

ci(mcp-diff): build UI artifacts available to baseline checkout#2523
SamMorrowDrums merged 1 commit into
mainfrom
sammorrowdrums/mcp-diff-build-ui-baseline

Conversation

@SamMorrowDrums
Copy link
Copy Markdown
Collaborator

Why

The mcp-diff workflow has been reporting false-positive diffs that "add" _meta.ui metadata to MCP Apps tools (get_me, issue_write, create_pull_request) on PRs that don't touch the UI at all.

Root cause

SamMorrowDrums/mcp-server-diff checks the baseline ref out into a separate working directory and runs install_command there. The workflow's ./.github/actions/build-ui step only populates pkg/github/ui_dist/ in the PR checkout, so on the baseline side:

  • pkg/github/ui_dist/ is effectively empty (just .gitkeep / .placeholder.html)
  • UIAssetsAvailable() in pkg/github/ui_embed.go returns false
  • _meta.ui is never registered on tools
  • → diff falsely shows the PR "adding" UI metadata

Fix

Option D from the investigation: hand the prebuilt artifacts to the baseline checkout via $RUNNER_TEMP.

  1. After the workflow's Build UI step, copy pkg/github/ui_dist/*.html to $RUNNER_TEMP/ui_dist/.
  2. In install_command, copy them back into pkg/github/ui_dist/ so both PR and baseline checkouts end up with identical UI assets.

Applied to both the mcp-diff (stdio) and mcp-diff-http jobs.

No double UI build, no Node setup needed in the baseline phase, no upstream action change required.

The mcp-server-diff action checks the baseline ref out into a separate
working directory and runs install_command there. Without prebuilt UI
artifacts, pkg/github/ui_dist/ is empty on the baseline side and
UIAssetsAvailable() returns false, producing a false-positive diff that
"adds" _meta.ui to MCP Apps tools on every PR.

Stash the artifacts to RUNNER_TEMP after the workflow's build-ui step,
then restore them from install_command so both the baseline and PR
checkouts register identical MCP Apps UI metadata.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SamMorrowDrums SamMorrowDrums requested a review from a team as a code owner May 21, 2026 21:15
Copilot AI review requested due to automatic review settings May 21, 2026 21:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes false-positive diffs in the mcp-diff workflow where _meta.ui appears to be “added” on unrelated PRs, by ensuring the baseline checkout sees the same prebuilt UI HTML artifacts as the PR checkout.

Changes:

  • Stash pkg/github/ui_dist/*.html into ${RUNNER_TEMP}/ui_dist after the UI build step.
  • Extend mcp-server-diff’s install_command to restore those artifacts into pkg/github/ui_dist in the baseline checkout.
  • Apply the same approach to both mcp-diff (stdio) and mcp-diff-http jobs.
Show a summary per file
File Description
.github/workflows/mcp-diff.yml Stashes/restores UI HTML artifacts via RUNNER_TEMP so baseline and PR checkouts have identical embedded UI assets, eliminating UI-related false-positive diffs.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@SamMorrowDrums SamMorrowDrums merged commit 0b644d7 into main May 21, 2026
22 checks passed
@SamMorrowDrums SamMorrowDrums deleted the sammorrowdrums/mcp-diff-build-ui-baseline branch May 21, 2026 21:18
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