Skip to content

Doubao-powered voice input for Linux, Wayland and Omarchy

fix(workflow): align Ubuntu and Omarchy report summaries (#35)

Leyang3e5fb11749fa
diff --git a/.github/workflows/deploy-midscene-report.yml b/.github/workflows/deploy-midscene-report.yml
index 9f92965..07a24d8 100644
--- a/.github/workflows/deploy-midscene-report.yml
+++ b/.github/workflows/deploy-midscene-report.yml
@@ -11,6 +11,18 @@ on:
description: Distribution label shown in report history
required: true
type: string
+ summary-title:
+ description: Product name shown before Midscene in the run summary
+ required: true
+ type: string
+ primary-project:
+ description: Midscene Test project used for the main report and preview
+ required: true
+ type: string
+ auxiliary-report-label:
+ description: Label for the optional second project report
+ required: true
+ type: string
run-result:
description: Result of the job that produced the report artifact
required: false
@@ -53,6 +65,7 @@ jobs:
REPORT_RETENTION: ${{ vars.REPORT_RETENTION || '10' }}
PAGES_BASE_URL: ${{ steps.pages.outputs.base_url }}
REPORT_LABEL: ${{ inputs.report-label }}
+ PRIMARY_PROJECT: ${{ inputs.primary-project }}
run: |
node scripts/build-pages-report.mjs \
--report-dir "$RUNNER_TEMP/midscene-report" \
@@ -62,7 +75,8 @@ jobs:
--generated-at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--retention "$REPORT_RETENTION" \
--pages-url "$PAGES_BASE_URL" \
- --label "$REPORT_LABEL"
+ --label "$REPORT_LABEL" \
+ --primary-project "$PRIMARY_PROJECT"
- name: Upload the restricted Pages payload
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
@@ -104,43 +118,53 @@ jobs:
env:
HISTORY_URL: ${{ steps.pages.outputs.base_url }}/
REPORT_URL: ${{ steps.pages.outputs.base_url }}/reports/${{ github.run_id }}/index.html
- ONBOARDING_URL: ${{ steps.pages.outputs.base_url }}/reports/${{ github.run_id }}/onboarding-report.html
+ AUXILIARY_URL: ${{ steps.pages.outputs.base_url }}/reports/${{ github.run_id }}/auxiliary-report.html
REPORT_PREVIEW_URL: ${{ steps.pages.outputs.base_url }}/reports/${{ github.run_id }}/report-preview.png
+ AUXILIARY_PREVIEW_URL: ${{ steps.pages.outputs.base_url }}/reports/${{ github.run_id }}/auxiliary-report-preview.png
PRODUCER_RESULT: ${{ inputs.run-result }}
+ REPORT_LABEL: ${{ inputs.report-label }}
+ SUMMARY_TITLE: ${{ inputs.summary-title }}
+ AUXILIARY_REPORT_LABEL: ${{ inputs.auxiliary-report-label }}
run: |
- if [[ "${{ inputs.report-label }}" == Omarchy* ]]; then
- SUCCESS_RATE=$(jq -r '.reports[0].successRate' "$RUNNER_TEMP/pages-site/reports/manifest.json")
- HAS_SHELL_REPORT=false
- if [[ -f "$RUNNER_TEMP/pages-site/reports/$GITHUB_RUN_ID/onboarding-report.html" ]]; then
- HAS_SHELL_REPORT=true
- fi
+ SUCCESS_RATE=$(jq -r '.reports[0].successRate' "$RUNNER_TEMP/pages-site/reports/manifest.json")
+ TEST_COUNT=$(jq -r '.reports[0].testCount' "$RUNNER_TEMP/pages-site/reports/manifest.json")
+ if [[ "$PRODUCER_RESULT" == "success" && "$SUCCESS_RATE" == "100" ]]; then
+ TITLE="$SUMMARY_TITLE × Midscene · passed"
+ RESULT_LINE="**All ${TEST_COUNT} published scenarios passed.**"
+ else
+ TITLE="$SUMMARY_TITLE × Midscene · failure captured"
+ RESULT_LINE="**The producing job finished as ${PRODUCER_RESULT}; the latest completed cases are ${SUCCESS_RATE}% passing.**"
+ fi
- if [[ "$PRODUCER_RESULT" == "success" && "$SUCCESS_RATE" == "100" && "$HAS_SHELL_REPORT" == "true" ]]; then
- TITLE="Omarchy × Midscene · passed"
- RESULT_LINE="**3/3 shell visual checks and all published scenarios passed.**"
- else
- TITLE="Omarchy × Midscene · failure captured"
- RESULT_LINE="**The producing job finished as ${PRODUCER_RESULT}; the latest completed cases are ${SUCCESS_RATE}% passing.**"
- fi
+ HAS_AUXILIARY_REPORT=false
+ if [[ -f "$RUNNER_TEMP/pages-site/reports/$GITHUB_RUN_ID/auxiliary-report.html" ]]; then
+ HAS_AUXILIARY_REPORT=true
+ fi
- if [[ "$HAS_SHELL_REPORT" == "true" ]]; then
- REPORT_LINKS="[Omarchy shell report: system menu and bar]($REPORT_URL) · [Onboarding report: install flow]($ONBOARDING_URL) · [Report history]($HISTORY_URL)"
- else
- REPORT_LINKS="[Open the failed Midscene Test report]($REPORT_URL) · [Report history]($HISTORY_URL)"
+ if [[ "${{ inputs.report-label }}" == Omarchy* ]]; then
+ if [[ "$PRODUCER_RESULT" == "success" && "$SUCCESS_RATE" == "100" && "$HAS_AUXILIARY_REPORT" == "true" ]]; then
+ RESULT_LINE="**3/3 shell visual checks and all ${TEST_COUNT} published scenarios passed.**"
fi
+ fi
- cat >> "$GITHUB_STEP_SUMMARY" <<EOF
+ if [[ "$HAS_AUXILIARY_REPORT" == "true" ]]; then
+ REPORT_LINKS="[Open the Doubao Say report]($REPORT_URL) · [$AUXILIARY_REPORT_LABEL]($AUXILIARY_URL) · [Report history]($HISTORY_URL)"
+ REPORT_PREVIEWS="| Doubao Say | $AUXILIARY_REPORT_LABEL |
+ |:--|:--|
+ | [![Final Doubao Say report node with its pass or error status]($REPORT_PREVIEW_URL)]($REPORT_URL) | [![Final $AUXILIARY_REPORT_LABEL node with its pass or error status]($AUXILIARY_PREVIEW_URL)]($AUXILIARY_URL) |"
+ else
+ REPORT_LINKS="[Open the Doubao Say report]($REPORT_URL) · [Report history]($HISTORY_URL)"
+ REPORT_PREVIEWS="[![Final Doubao Say report node with its pass or error status]($REPORT_PREVIEW_URL)]($REPORT_URL)"
+ fi
+
+ cat >> "$GITHUB_STEP_SUMMARY" <<EOF
## $TITLE
$RESULT_LINE
$REPORT_LINKS
- [![Final Midscene report node with its pass or error status]($REPORT_PREVIEW_URL)]($REPORT_URL)
+ $REPORT_PREVIEWS
- Click the final-node preview to inspect the complete Omarchy shell report, screenshots, and Agent replay.
+ Click either final-node preview to inspect that complete Midscene Test report, screenshots, and Agent replay.
EOF
- else
- echo "- [Open this run's report]($REPORT_URL)" >> "$GITHUB_STEP_SUMMARY"
- echo "- [Browse report history]($HISTORY_URL)" >> "$GITHUB_STEP_SUMMARY"
- fi
diff --git a/.github/workflows/midscene-omarchy-4.0.3.yml b/.github/workflows/midscene-omarchy-4.0.3.yml
index 6b2bd4b..fe93321 100644
--- a/.github/workflows/midscene-omarchy-4.0.3.yml
+++ b/.github/workflows/midscene-omarchy-4.0.3.yml
@@ -146,7 +146,15 @@ jobs:
- name: Capture the final report node for the CI summary
if: always()
- run: node tests/e2e/capture-report-preview.mjs
+ run: >-
+ node tests/e2e/capture-report-preview.mjs
+ tests/e2e/midscene_run
+ tests/e2e/midscene_run/report-preview.png
+ omarchy-onboarding
+ && node tests/e2e/capture-report-preview.mjs
+ tests/e2e/midscene_run
+ tests/e2e/midscene_run/auxiliary-report-preview.png
+ omarchy-shell
- name: Upload installer evidence
if: always()
@@ -188,4 +196,7 @@ jobs:
with:
artifact-name: omarchy-midscene-e2e-report
report-label: Omarchy 4.0.3
+ summary-title: Omarchy
+ primary-project: omarchy-onboarding
+ auxiliary-report-label: Omarchy visual checks
run-result: ${{ needs.omarchy-vm.result }}
diff --git a/.github/workflows/midscene-ubuntu-22.04.yml b/.github/workflows/midscene-ubuntu-22.04.yml
index 78ce80a..5d05f51 100644
--- a/.github/workflows/midscene-ubuntu-22.04.yml
+++ b/.github/workflows/midscene-ubuntu-22.04.yml
@@ -13,6 +13,7 @@ on:
- "tests/e2e/package-lock.json"
- "tests/e2e/gtk_fixture.py"
- "tests/e2e/is-transient-midscene-failure.sh"
+ - "tests/e2e/capture-report-preview.mjs"
- "tests/e2e/polish_fixture.py"
- "tests/e2e/cases/**"
- "tests/e2e/midscene.config.ts"
@@ -28,6 +29,7 @@ on:
- "tests/e2e/package-lock.json"
- "tests/e2e/gtk_fixture.py"
- "tests/e2e/is-transient-midscene-failure.sh"
+ - "tests/e2e/capture-report-preview.mjs"
- "tests/e2e/polish_fixture.py"
- "tests/e2e/cases/**"
- "tests/e2e/midscene.config.ts"
@@ -60,6 +62,8 @@ jobs:
# GitHub's Ubuntu 22.04 runner intermittently times out while Node races
# IPv4 and IPv6 addresses. The model endpoint is reachable over IPv4.
NODE_OPTIONS: "--dns-result-order=ipv4first --no-network-family-autoselection"
+ outputs:
+ report-artifact-id: ${{ steps.report.outputs.artifact-id }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
@@ -188,7 +192,20 @@ jobs:
exit 1
fi
+ - name: Capture the final report node for the CI summary
+ if: always()
+ run: >-
+ node tests/e2e/capture-report-preview.mjs
+ tests/e2e/midscene_run
+ tests/e2e/midscene_run/report-preview.png
+ ubuntu
+ && node tests/e2e/capture-report-preview.mjs
+ tests/e2e/midscene_run
+ tests/e2e/midscene_run/auxiliary-report-preview.png
+ ubuntu-polishing
+
- name: Upload Midscene report
+ id: report
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
@@ -201,7 +218,8 @@ jobs:
name: GitHub Pages report
needs: ubuntu-gtk
if: >-
- needs.ubuntu-gtk.result == 'success' &&
+ always() &&
+ needs.ubuntu-gtk.outputs.report-artifact-id != '' &&
github.event_name != 'pull_request' &&
github.ref_name == vars.PAGES_REPORT_BRANCH
permissions:
@@ -213,3 +231,7 @@ jobs:
with:
artifact-name: midscene-ubuntu-22.04-e2e-report
report-label: Ubuntu 22.04
+ summary-title: Ubuntu
+ primary-project: ubuntu
+ auxiliary-report-label: Polishing overlay report
+ run-result: ${{ needs.ubuntu-gtk.result }}
diff --git a/scripts/build-pages-report.mjs b/scripts/build-pages-report.mjs
index 5d75ed6..a3d3e15 100644
--- a/scripts/build-pages-report.mjs
+++ b/scripts/build-pages-report.mjs
@@ -265,6 +265,7 @@ export async function buildPagesReport(options) {
const retention = validateRetention(required(options, 'retention'));
const baseUrl = normalizeBaseUrl(required(options, 'pages-url'));
const label = options.label || 'Midscene E2E';
+ const primaryProject = required(options, 'primary-project');
const existingItems = await readdir(siteDirectory).catch((error) => {
if (error.code === 'ENOENT') return null;
@@ -300,6 +301,13 @@ export async function buildPagesReport(options) {
`Expected reports for one or two projects, found ${htmlReports.length}`,
);
}
+ const primaryReport = htmlReports.find((report) =>
+ report.run?.projects?.some((project) => project.name === primaryProject),
+ );
+ if (!primaryReport) {
+ throw new Error(`No Midscene Test report found for project ${primaryProject}`);
+ }
+ const auxiliaryReport = htmlReports.find((report) => report !== primaryReport);
const shellReport = htmlReports.find((report) =>
report.html.includes('The Omarchy system menu is open'),
);
@@ -316,13 +324,17 @@ export async function buildPagesReport(options) {
}),
{ passed: 0, tests: 0 },
);
- const isOmarchy = label.startsWith('Omarchy');
const reportPrefix = `reports/${runId}`;
- const files = shellReport && htmlReports.length === 2
- ? ['index.html', 'onboarding-report.html', 'report-preview.png'].map((name) => `${reportPrefix}/${name}`)
+ const files = auxiliaryReport
+ ? [
+ 'index.html',
+ 'auxiliary-report.html',
+ 'report-preview.png',
+ 'auxiliary-report-preview.png',
+ ].map((name) => `${reportPrefix}/${name}`)
: [
`${reportPrefix}/index.html`,
- ...(isOmarchy ? [`${reportPrefix}/report-preview.png`] : []),
+ `${reportPrefix}/report-preview.png`,
];
const current = {
runId,
@@ -354,19 +366,20 @@ export async function buildPagesReport(options) {
const currentDirectory = path.join(siteDirectory, reportPrefix);
await mkdir(currentDirectory, { recursive: true });
- if (shellReport && htmlReports.length === 2) {
- const onboardingReport = htmlReports.find((report) => report !== shellReport);
- await copyFile(shellReport.file, path.join(currentDirectory, 'index.html'));
- await copyFile(onboardingReport.file, path.join(currentDirectory, 'onboarding-report.html'));
+ if (auxiliaryReport) {
+ await copyFile(primaryReport.file, path.join(currentDirectory, 'index.html'));
+ await copyFile(auxiliaryReport.file, path.join(currentDirectory, 'auxiliary-report.html'));
await copyFile(path.join(reportDirectory, 'report-preview.png'), path.join(currentDirectory, 'report-preview.png'));
+ await copyFile(
+ path.join(reportDirectory, 'auxiliary-report-preview.png'),
+ path.join(currentDirectory, 'auxiliary-report-preview.png'),
+ );
} else {
- await copyFile(htmlReports.at(-1).file, path.join(currentDirectory, 'index.html'));
- if (isOmarchy) {
- await copyFile(
- path.join(reportDirectory, 'report-preview.png'),
- path.join(currentDirectory, 'report-preview.png'),
- );
- }
+ await copyFile(primaryReport.file, path.join(currentDirectory, 'index.html'));
+ await copyFile(
+ path.join(reportDirectory, 'report-preview.png'),
+ path.join(currentDirectory, 'report-preview.png'),
+ );
}
const reports = [current, ...history];
diff --git a/scripts/omarchy-shell-evidence.mjs b/scripts/omarchy-shell-evidence.mjs
index b5641b7..cee7243 100644
--- a/scripts/omarchy-shell-evidence.mjs
+++ b/scripts/omarchy-shell-evidence.mjs
@@ -83,7 +83,7 @@ export function testRunDump(html) {
: null;
}
-export async function findLatestTestReport(directory) {
+export async function findLatestTestReport(directory, { projectName } = {}) {
const reports = await Promise.all(
(await findHtmlFiles(directory)).map(async (file) => {
const html = await readFile(file, 'utf8');
@@ -96,8 +96,21 @@ export async function findLatestTestReport(directory) {
};
}),
);
- const latest = reports.sort((left, right) => left.startedAt - right.startedAt).at(-1);
- if (!latest) throw new Error('No Midscene Test HTML report found');
+ const matchingReports = projectName
+ ? reports.filter((report) =>
+ report.run?.projects?.some((project) => project.name === projectName),
+ )
+ : reports;
+ const latest = matchingReports
+ .sort((left, right) => left.startedAt - right.startedAt)
+ .at(-1);
+ if (!latest) {
+ throw new Error(
+ projectName
+ ? `No Midscene Test HTML report found for project ${projectName}`
+ : 'No Midscene Test HTML report found',
+ );
+ }
return latest;
}
diff --git a/tests/contracts/test_pages_report_history.mjs b/tests/contracts/test_pages_report_history.mjs
index 7208856..a7e68ec 100644
--- a/tests/contracts/test_pages_report_history.mjs
+++ b/tests/contracts/test_pages_report_history.mjs
@@ -24,7 +24,7 @@ const fixtureHtml = `<!doctype html><html><body>report
<script type="midscene_web_dump">{"usage":{"_midscene_call_id":"call-1","time_cost":2500,"total_tokens":120}}</script>
<script type="midscene_web_dump">{"message":"raw
control character","usage":{"_midscene_call_id":"call-2","time_cost":3500,"total_tokens":180}}</script>
-${runnerScript({ project: 'ubuntu-onboarding', startedAt: '2026-09-15T12:00:00Z' })}
+${runnerScript({ project: 'ubuntu', startedAt: '2026-09-15T12:00:00Z' })}
</body></html>`;
const shellPrompts = [
@@ -59,6 +59,7 @@ async function fixtureDirectory(root) {
await mkdir(reportDirectory, { recursive: true });
await writeFile(path.join(reportDirectory, 'test-run-ubuntu.html'), fixtureHtml);
await writeFile(path.join(reportDirectory, 'agent-detail.html'), '<html>intermediate Agent report</html>');
+ await writeFile(path.join(path.dirname(reportDirectory), 'report-preview.png'), 'preview');
return path.dirname(reportDirectory);
}
@@ -82,6 +83,7 @@ function options(reportDirectory, siteDirectory, pagesUrl, runId = '200') {
retention: '10',
'pages-url': pagesUrl,
label: 'Ubuntu 22.04',
+ 'primary-project': 'ubuntu',
};
}
@@ -119,9 +121,20 @@ test('simulates a first deployment when Pages returns 404', async (context) => {
),
fixtureHtml,
);
+ assert.deepEqual(manifest.reports[0].files, [
+ 'reports/200/index.html',
+ 'reports/200/report-preview.png',
+ ]);
+ assert.equal(
+ await readFile(
+ path.join(siteDirectory, 'reports', '200', 'report-preview.png'),
+ 'utf8',
+ ),
+ 'preview',
+ );
});
-test('publishes the shell test-run report directly with a CI entrance image', async (context) => {
+test('publishes the Doubao Say report as the primary CI entrance', async (context) => {
const root = await mkdtemp(path.join(os.tmpdir(), 'pages-omarchy-'));
const reportDirectory = await fixtureDirectory(root);
await writeFile(
@@ -129,6 +142,10 @@ test('publishes the shell test-run report directly with a CI entrance image', as
shellFixtureHtml,
);
await writeFile(path.join(reportDirectory, 'report-preview.png'), 'preview');
+ await writeFile(
+ path.join(reportDirectory, 'auxiliary-report-preview.png'),
+ 'auxiliary preview',
+ );
const siteDirectory = path.join(root, 'site');
const server = await startServer((_request, response) =>
response.writeHead(404).end(),
@@ -141,18 +158,23 @@ test('publishes the shell test-run report directly with a CI entrance image', as
assert.equal(manifest.reports[0].testCount, 2);
assert.equal(manifest.reports[0].successRate, 100);
- assert.equal(manifest.reports[0].files.length, 3);
+ assert.deepEqual(manifest.reports[0].files, [
+ 'reports/200/index.html',
+ 'reports/200/auxiliary-report.html',
+ 'reports/200/report-preview.png',
+ 'reports/200/auxiliary-report-preview.png',
+ ]);
const publishedReport = await readFile(
path.join(siteDirectory, 'reports', '200', 'index.html'),
'utf8',
);
- assert.equal(publishedReport, shellFixtureHtml);
+ assert.equal(publishedReport, fixtureHtml);
assert.equal(
await readFile(
- path.join(siteDirectory, 'reports', '200', 'onboarding-report.html'),
+ path.join(siteDirectory, 'reports', '200', 'auxiliary-report.html'),
'utf8',
),
- fixtureHtml,
+ shellFixtureHtml,
);
assert.equal(
await readFile(
@@ -161,6 +183,18 @@ test('publishes the shell test-run report directly with a CI entrance image', as
),
'preview',
);
+ assert.equal(
+ await readFile(
+ path.join(
+ siteDirectory,
+ 'reports',
+ '200',
+ 'auxiliary-report-preview.png',
+ ),
+ 'utf8',
+ ),
+ 'auxiliary preview',
+ );
});
test('publishes a failed shell report with its result in history', async (context) => {
@@ -176,6 +210,10 @@ test('publishes a failed shell report with its result in history', async (contex
),
);
await writeFile(path.join(reportDirectory, 'report-preview.png'), 'failed');
+ await writeFile(
+ path.join(reportDirectory, 'auxiliary-report-preview.png'),
+ 'auxiliary failed',
+ );
const siteDirectory = path.join(root, 'site');
const server = await startServer((_request, response) =>
response.writeHead(404).end(),
@@ -215,6 +253,7 @@ test('keeps only the latest failed retry for an Omarchy project', async (context
const manifest = await buildPagesReport({
...options(reportDirectory, siteDirectory, server.url),
label: 'Omarchy 4.0.3',
+ 'primary-project': 'omarchy-onboarding',
});
assert.equal(manifest.reports[0].successRate, 0);
diff --git a/tests/e2e/capture-report-preview.mjs b/tests/e2e/capture-report-preview.mjs
index f7808ce..918ec4c 100644
--- a/tests/e2e/capture-report-preview.mjs
+++ b/tests/e2e/capture-report-preview.mjs
@@ -14,6 +14,7 @@ const reportDirectory = path.resolve(
const outputFile = path.resolve(
process.argv[3] || path.join(reportDirectory, 'report-preview.png'),
);
+const projectName = process.argv[4];
const candidates = [
process.env.CHROME_BIN,
@@ -35,7 +36,7 @@ if (!executablePath) {
throw new Error('Chrome executable was not found');
}
-const report = await findLatestTestReport(reportDirectory);
+const report = await findLatestTestReport(reportDirectory, { projectName });
const runnerDump = report.run;
if (!runnerDump) throw new Error('Midscene Test runner dump was not found');
const previewUrl = new URL(pathToFileURL(report.file));