Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/webui-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: WebUI CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: webui-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
webui:
name: WebUI (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Set isolated WebUI output directories
shell: bash
run: |
echo "MCODE_WEBUI_VERIFY_DIR=$RUNNER_TEMP/webui-package-checks" >> "$GITHUB_ENV"
echo "WEBUI_BROWSER_OUTPUT_DIR=$RUNNER_TEMP/webui-browser-results" >> "$GITHUB_ENV"
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
version: 9.12.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Check WebUI types
run: pnpm typecheck:webui
- name: Check WebUI dependency boundaries
run: pnpm check:webui-dependency
- name: Check WebUI presentation rules
run: pnpm check:webui-presentation
- name: Check WebUI motion rules
run: pnpm check:webui-motion
- name: Check WebUI overlays
run: pnpm check:webui-overlays
- name: Check WebUI feedback
run: pnpm check:webui-feedback
- name: Build WebUI
run: pnpm build:webui
- name: Check WebUI build boundaries
run: pnpm check:webui-boundary
- name: Install Chromium
run: pnpm install:webui-browsers
- name: Install Chromium system dependencies
if: runner.os == 'Linux'
run: pnpm exec playwright install-deps chromium
- name: Test WebUI units and integrations
run: pnpm test:webui
- name: Test WebUI browser interactions
run: pnpm test:webui-browser
- name: Verify WebUI package installation
run: pnpm test:webui-package
- name: Upload WebUI browser diagnostics
if: ${{ failure() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: webui-browser-${{ matrix.os }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/webui-browser-results/
retention-days: 7
if-no-files-found: ignore
45 changes: 45 additions & 0 deletions docs/webui-ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# WebUI-only GitHub CI

The public `mcode-webui/minimax-code` repository uses
`.github/workflows/webui-ci.yml` for pull requests, pushes to `main`, and manual
runs. It executes existing WebUI commands directly. It does not invoke the
repository-wide `pnpm verify` pipeline or publish packages.

| Coverage | Linux / Node 24 | macOS / Node 24 | Windows / Node 24 |
| --- | --- | --- | --- |
| WebUI server, client and test types | Yes | Yes | Yes |
| Dependency, presentation, motion, overlay and feedback rules | Yes | Yes | Yes |
| WebUI build and bundle boundaries | Yes | Yes | Yes |
| WebUI unit and integration tests | Yes | Yes | Yes |
| Playwright browser scenarios | Yes | Yes | Yes |
| npm package build, installation and launcher verification | Yes | Yes | Yes |

Package verification uses an isolated installation and does not publish to npm.
Browser failure diagnostics are retained as Actions artifacts for seven days.
Only installation of Linux system dependencies is platform-gated. CI does not
skip the browser or package suites on macOS or Windows. This coverage declaration
does not establish a passing run; platform and visual-baseline failures remain
visible and require diagnosis rather than relaxed assertions.

## Repository settings

The following inherited workflows are disabled in the public repository's Actions
settings: Source verification, CLI release, Node compatibility, Performance,
Release audit, Source candidate, Label issue product, Sync GitHub issues to
Feishu, and WebUI npm preview. Their files remain in Git for recovery and for
the existing local workflow-contract tests. In particular, npm publishing is
disabled, including manual runs of the preview workflow.

GitHub workflow disablement is repository configuration, not a YAML change.
Copying the repository to another GitHub repository does not copy that setting;
configure the active workflows there before pushing or publishing tags.
Dependabot can still create dependency-update PRs; those PRs run WebUI CI.

The local `pnpm verify`, its profiles, all existing gate scripts and package
commands are unchanged. Run them locally when broader runtime, CLI, release or
security validation is needed. A green WebUI CI run does not establish those
broader checks. The previously reported repository-history scan findings are
outside this CI scope and have not been remediated by disabling Release audit.

Automatic CI does not impose merge protection. Required checks and branch rules
remain a separate repository setting.
2 changes: 2 additions & 0 deletions release/public-source.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions test/source-sync.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,36 @@ import { extensionIdFromPublicKey, parseExtensionIdList, readStoreExtensionIds }
import { validateExceptionLedger, sourceFingerprint } from '../scripts/lib/webui-dependency-rules.mjs';
import { acceptanceRecordFiles, restoreAcceptanceRecords } from '../scripts/lib/acceptance-records.mjs';

test('public WebUI CI runs only WebUI checks and cannot publish packages', () => {
const workflow = parseYaml(readFileSync(new URL('../.github/workflows/webui-ci.yml', import.meta.url), 'utf8'));
assert.deepEqual(workflow.on.push.branches, ['main']);
assert.ok(Object.hasOwn(workflow.on, 'pull_request'));
assert.ok(Object.hasOwn(workflow.on, 'workflow_dispatch'));
assert.deepEqual(workflow.permissions, { contents: 'read' });
assert.deepEqual(Object.keys(workflow.jobs), ['webui']);
const manifest = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
const job = workflow.jobs.webui;
assert.equal(job.env, undefined);
assert.deepEqual(job.strategy.matrix.os, ['ubuntu-latest', 'macos-latest', 'windows-latest']);
const directories = job.steps.find(step => step.name === 'Set isolated WebUI output directories');
assert.equal(directories.shell, 'bash');
assert.match(directories.run, /MCODE_WEBUI_VERIFY_DIR=\$RUNNER_TEMP\//);
assert.match(directories.run, /WEBUI_BROWSER_OUTPUT_DIR=\$RUNNER_TEMP\//);
const commands = job.steps.filter(step => step.run && step !== directories).map(step => step.run);
for (const command of commands) {
if (command === 'pnpm install --frozen-lockfile' || command === 'pnpm exec playwright install-deps chromium') continue;
assert.match(command, /^pnpm (?:typecheck|check|build|install|test):webui(?:-[a-z]+)?$/);
assert.ok(Object.hasOwn(manifest.scripts, command.slice('pnpm '.length)), command);
}
for (const command of ['pnpm typecheck:webui', 'pnpm build:webui', 'pnpm test:webui', 'pnpm test:webui-browser', 'pnpm test:webui-package']) {
assert.ok(commands.includes(command), `Missing ${command}`);
}
assert.ok(commands.indexOf('pnpm build:webui') < commands.indexOf('pnpm test:webui-browser'));
for (const command of ['pnpm test:webui', 'pnpm test:webui-browser', 'pnpm test:webui-package']) {
assert.equal(job.steps.find(step => step.run === command).if, undefined, `${command} must run on every platform`);
}
});

test('coverage review distinguishes declared browser scenarios from executed evidence', () => {
const output = execFileSync(process.execPath, ['scripts/coverage-review.mjs', '--check'], { encoding: 'utf8' });
const evidence = JSON.parse(readFileSync(new URL('../scripts/lib/webui-browser-coverage-evidence.json', import.meta.url), 'utf8'));
Expand Down
Loading