Skip to content

Doubao-powered voice input for Linux, Wayland and Omarchy

test(midscene): align native CI reports and prepare 1.8.1 (#86)

Leyang8e35fef8f057
diff --git a/.github/workflows/deploy-midscene-report.yml b/.github/workflows/deploy-midscene-report.yml
index e777d4f..5a61a4d 100644
--- a/.github/workflows/deploy-midscene-report.yml
+++ b/.github/workflows/deploy-midscene-report.yml
@@ -37,6 +37,11 @@ on:
default: success
type: string
+# Serialize history restoration through deployment across all platforms.
+concurrency:
+ group: pages-report-deploy
+ cancel-in-progress: false
+
jobs:
prepare:
name: Build report and Markdown summary
@@ -130,9 +135,6 @@ jobs:
needs: prepare
runs-on: ubuntu-latest
timeout-minutes: 10
- concurrency:
- group: pages-report-deploy
- cancel-in-progress: false
permissions:
actions: read
contents: read
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 271227a..24277bb 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -27,6 +27,8 @@ jobs:
run: bash macos/Tests/Settings/build-sidebar-focus.sh
- name: Build opt-in personal learning UI probe
run: bash macos/Tests/Settings/build-personal-ui.sh
+ - name: Build isolated Midscene fixture
+ run: bash macos/Tests/Midscene/build.sh
- name: Explain preview availability
run: |
echo 'PR builds publish test probes only. Installable previews are Developer ID signed and notarized by the protected-main preview job. Missing signing credentials fail that job instead of producing an ad-hoc application.' >> "$GITHUB_STEP_SUMMARY"
@@ -45,6 +47,12 @@ jobs:
# Signing credentials never reach pull-request code or a dispatch on another branch.
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
needs: build
+ strategy:
+ fail-fast: false
+ matrix:
+ arch: [arm64, x86_64]
+ env:
+ DOUBAO_MAC_ARCH: ${{ matrix.arch }}
runs-on: macos-latest
environment: macos-preview
timeout-minutes: 30
@@ -68,13 +76,13 @@ jobs:
run: bash macos/build.sh
- name: Notarize and package preview
run: |
- python3 macos/package-dmg.py --identity "$DOUBAO_CODESIGN_IDENTITY" \
+ python3 macos/package-dmg.py --arch "$DOUBAO_MAC_ARCH" --identity "$DOUBAO_CODESIGN_IDENTITY" \
--key "$DOUBAO_NOTARY_KEY_PATH" --key-id "$DOUBAO_NOTARY_KEY_ID" \
--issuer "$DOUBAO_NOTARY_ISSUER_ID"
python3 macos/Packaging/preview-manifest.py
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
- name: Doubao-Say-macos-signed-preview
+ name: Doubao-Say-macos-signed-preview-${{ matrix.arch }}
if-no-files-found: error
path: |
build/macos/*.dmg
diff --git a/.github/workflows/midscene-macos.yml b/.github/workflows/midscene-macos.yml
new file mode 100644
index 0000000..ca694f8
--- /dev/null
+++ b/.github/workflows/midscene-macos.yml
@@ -0,0 +1,143 @@
+name: macOS Midscene E2E
+on:
+ pull_request:
+ paths:
+ - 'macos/**'
+ - 'tests/e2e/**'
+ - '.github/workflows/midscene-macos.yml'
+ - '.github/workflows/deploy-midscene-report.yml'
+ - 'scripts/*report*.mjs'
+ - 'tests/contracts/test_pages_report_history.mjs'
+ workflow_dispatch:
+permissions:
+ contents: read
+concurrency:
+ group: midscene-macos-e2e
+ cancel-in-progress: false
+jobs:
+ macos-e2e:
+ outputs:
+ report-artifact-id: ${{ steps.report.outputs.artifact-id }}
+ if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
+ environment:
+ name: Model
+ deployment: false
+ runs-on: macos-latest
+ timeout-minutes: 40
+ env:
+ NODE_OPTIONS: "--dns-result-order=ipv4first --no-network-family-autoselection"
+ MIDSCENE_MODEL_RETRY_COUNT: "2"
+ MIDSCENE_MODEL_RETRY_INTERVAL: "65000"
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+ - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
+ with:
+ node-version: "24"
+ cache: npm
+ cache-dependency-path: tests/e2e/package-lock.json
+ - name: Install locked Midscene dependencies
+ working-directory: tests/e2e
+ run: |
+ npm ci --include=optional --ignore-scripts
+ npm rebuild node-mac-permissions
+ - name: Verify Midscene model compatibility
+ working-directory: tests/e2e
+ env:
+ MIDSCENE_MODEL_API_KEY: ${{ secrets.MIDSCENE_MODEL_API_KEY }}
+ MIDSCENE_MODEL_NAME: ${{ vars.MIDSCENE_MODEL_NAME || secrets.MIDSCENE_MODEL_NAME }}
+ MIDSCENE_MODEL_BASE_URL: ${{ vars.MIDSCENE_MODEL_BASE_URL || secrets.MIDSCENE_MODEL_BASE_URL }}
+ MIDSCENE_MODEL_FAMILY: ${{ vars.MIDSCENE_MODEL_FAMILY || secrets.MIDSCENE_MODEL_FAMILY }}
+ MIDSCENE_MODEL_REASONING_ENABLED: ${{ vars.MIDSCENE_MODEL_REASONING_ENABLED || secrets.MIDSCENE_MODEL_REASONING_ENABLED }}
+ run: npm run check:model
+ - name: Typecheck desktop suites
+ working-directory: tests/e2e
+ run: npm run typecheck
+ - name: Inspect cloud desktop
+ run: |
+ system_profiler SPDisplaysDataType
+ swift -e 'import AppKit; for screen in NSScreen.screens { print("NSScreen:", screen.frame) }'
+ mkdir -p tests/e2e/midscene_run/diagnostics
+ screencapture -x tests/e2e/midscene_run/diagnostics/desktop.png
+ - name: Build isolated native fixture
+ run: bash macos/Tests/Midscene/build.sh
+ - name: Run native visual interactions
+ id: midscene-test
+ working-directory: tests/e2e
+ env:
+ MIDSCENE_MODEL_API_KEY: ${{ secrets.MIDSCENE_MODEL_API_KEY }}
+ MIDSCENE_MODEL_NAME: ${{ vars.MIDSCENE_MODEL_NAME || secrets.MIDSCENE_MODEL_NAME }}
+ MIDSCENE_MODEL_BASE_URL: ${{ vars.MIDSCENE_MODEL_BASE_URL || secrets.MIDSCENE_MODEL_BASE_URL }}
+ MIDSCENE_MODEL_FAMILY: ${{ vars.MIDSCENE_MODEL_FAMILY || secrets.MIDSCENE_MODEL_FAMILY }}
+ MIDSCENE_MODEL_REASONING_ENABLED: ${{ vars.MIDSCENE_MODEL_REASONING_ENABLED || secrets.MIDSCENE_MODEL_REASONING_ENABLED }}
+ MIDSCENE_REPLANNING_CYCLE_LIMIT: "40"
+ # Load the native binding before Midscene's tsx config loader.
+ NODE_OPTIONS: --dns-result-order=ipv4first --no-network-family-autoselection --require=node-mac-permissions
+ run: npm run test:macos -- --project macos-settings
+ - name: Capture report evidence
+ id: capture-report
+ if: always() && !cancelled()
+ run: node tests/e2e/capture-report-preview.mjs --report-dir tests/e2e/midscene_run --projects macos-settings
+ - name: Record project results for report aggregation
+ if: always() && !cancelled()
+ env:
+ TEST_OUTCOME: ${{ steps.midscene-test.outcome }}
+ CAPTURE_OUTCOME: ${{ steps.capture-report.outcome }}
+ run: |
+ node scripts/write-ci-project-status.mjs \
+ --output tests/e2e/midscene_run/ci-project-status-macos-settings.json \
+ --project macos-settings \
+ --test-outcome "${TEST_OUTCOME:-skipped}" \
+ --capture-outcome "${CAPTURE_OUTCOME:-skipped}"
+ - name: Preserve visual reports (including failures)
+ id: report
+ if: always()
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
+ with:
+ name: macos-midscene-report
+ path: |
+ tests/e2e/midscene_run/
+ tests/e2e/.midscene/
+ include-hidden-files: true
+ if-no-files-found: warn
+ retention-days: 14
+ - name: Write test results to Summary
+ if: always()
+ run: |
+ {
+ found=false
+ for result in tests/e2e/.midscene/test-results/*/result.md; do
+ [ -f "$result" ] || continue
+ found=true
+ # The native report link is local to the downloaded artifact.
+ sed '/^\[Open the Midscene Test report ↗\](/d' "$result"
+ echo
+ done
+ if [ "$found" = false ]; then
+ echo "Midscene did not produce a test result. Check the preceding steps for setup or model verification failures."
+ echo
+ fi
+ echo "[Download test artifacts]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID#artifacts)"
+ } >> "$GITHUB_STEP_SUMMARY"
+
+ pages-report:
+ name: GitHub Pages report
+ needs: macos-e2e
+ if: >-
+ always() && !cancelled() &&
+ needs.macos-e2e.outputs.report-artifact-id != '' &&
+ (github.event_name != 'pull_request' ||
+ github.event.pull_request.head.repo.full_name == github.repository)
+ permissions:
+ actions: read
+ contents: read
+ pages: write
+ id-token: write
+ uses: ./.github/workflows/deploy-midscene-report.yml
+ with:
+ artifact-name: macos-midscene-report
+ report-label: macOS
+ summary-title: macOS
+ report-groups: '[{"role":"primary","label":"Doubao Say settings","projects":["macos-settings"]}]'
+ run-result: ${{ needs.macos-e2e.result }}
diff --git a/.github/workflows/midscene-omarchy-4.0.3.yml b/.github/workflows/midscene-omarchy-4.0.3.yml
index 660b4c8..72d6129 100644
--- a/.github/workflows/midscene-omarchy-4.0.3.yml
+++ b/.github/workflows/midscene-omarchy-4.0.3.yml
@@ -10,7 +10,7 @@ on:
- "scripts/build-pages-report.mjs"
- "scripts/report-cases.mjs"
- "scripts/render-ci-report-summary.mjs"
- - "scripts/write-ci-shard-status.mjs"
+ - "scripts/write-ci-project-status.mjs"
- "scripts/verify-pages-report.mjs"
- "scripts/verify-omarchy-evidence.mjs"
- "scripts/omarchy-shell-evidence.mjs"
@@ -45,10 +45,7 @@ on:
default: all
options:
- all
- - omarchy-shard-1
- - omarchy-shard-2
- - omarchy-shard-3
- - omarchy-shard-4
+ - omarchy-product
- omarchy-shell
- omarchy-providers
@@ -64,23 +61,15 @@ concurrency:
jobs:
omarchy-e2e:
- name: Midscene visual (${{ matrix.project }})
+ name: Midscene visual (omarchy)
+ outputs:
+ report-artifact-id: ${{ steps.report.outputs.artifact-id }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
- timeout-minutes: 60
- strategy:
- # Each shard restores an independent disposable VM. Sharing one Hyprland
- # session would make fixture resets, focus and screenshots race.
- # Run independent VMs concurrently. Each worker paces model requests to
- # one every 20s, keeping the aggregate below the Ark endpoint RPM.
- fail-fast: false
- max-parallel: 5
- matrix:
- project: >-
- ${{ fromJSON((inputs.project != '' && inputs.project != 'all') &&
- format('["{0}"]', inputs.project) ||
- '["omarchy-shard-1","omarchy-shard-2","omarchy-shard-3","omarchy-shard-4","omarchy-shell"]') }}
+ timeout-minutes: 240
env:
+ PROJECT: ${{ inputs.project || 'all' }}
+ PROJECTS: ${{ (inputs.project == '' || inputs.project == 'all') && 'omarchy-product,omarchy-shell' || inputs.project }}
MIDSCENE_MODEL_API_KEY: ${{ secrets.MIDSCENE_MODEL_API_KEY }}
MIDSCENE_MODEL_NAME: ${{ secrets.MIDSCENE_MODEL_NAME }}
MIDSCENE_MODEL_BASE_URL: ${{ secrets.MIDSCENE_MODEL_BASE_URL }}
@@ -156,100 +145,86 @@ jobs:
- name: Run real Omarchy Midscene project
id: midscene-test
- env:
- PROJECT: ${{ matrix.project }}
- run: tests/e2e/run-omarchy-midscene.sh "$PROJECT"
+ run: timeout --signal=TERM --kill-after=10s 220m tests/e2e/run-omarchy-midscene.sh "$PROJECT"
- name: Capture report evidence
id: capture-report
if: always() && !cancelled() && steps.test-dependencies.outcome == 'success'
- env:
- PROJECT: ${{ matrix.project }}
run: |
node tests/e2e/capture-report-preview.mjs \
--report-dir tests/e2e/midscene_run \
- --projects "$PROJECT"
+ --projects "$PROJECTS"
- - name: Record shard result for report aggregation
+ - name: Record project results for report aggregation
if: always() && !cancelled()
env:
- PROJECT: ${{ matrix.project }}
TEST_OUTCOME: ${{ steps.midscene-test.outcome }}
CAPTURE_OUTCOME: ${{ steps.capture-report.outcome }}
run: |
- node scripts/write-ci-shard-status.mjs \
- --output "tests/e2e/midscene_run/ci-shard-status-$PROJECT.json" \
- --project "$PROJECT" \
- --test-outcome "${TEST_OUTCOME:-skipped}" \
- --capture-outcome "${CAPTURE_OUTCOME:-skipped}"
+ IFS=',' read -r -a projects <<< "$PROJECTS"
+ for project in "${projects[@]}"; do
+ node scripts/write-ci-project-status.mjs \
+ --output "tests/e2e/midscene_run/ci-project-status-$project.json" \
+ --project "$project" \
+ --test-outcome "${TEST_OUTCOME:-skipped}" \
+ --capture-outcome "${CAPTURE_OUTCOME:-skipped}"
+ done
- name: Upload installer evidence
if: always() && !cancelled()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
- name: omarchy-vm-installer-evidence-${{ matrix.project }}
+ name: omarchy-vm-installer-evidence
path: .midscene-omarchy/omarchy-iso/test-runs/**/runs/**
if-no-files-found: warn
retention-days: 3
overwrite: true
- - name: Upload Omarchy Midscene shard report
+ - name: Upload Omarchy Midscene report
+ id: report
if: always() && !cancelled()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
- name: omarchy-midscene-${{ matrix.project }}
- path: tests/e2e/midscene_run/
+ name: omarchy-midscene-e2e-report
+ path: |
+ tests/e2e/midscene_run/
+ tests/e2e/.midscene/
+ include-hidden-files: true
if-no-files-found: error
retention-days: 7
overwrite: true
- name: Verify Omarchy shell visual evidence
- if: success() && matrix.project == 'omarchy-shell'
+ if: success() && (inputs.project == '' || inputs.project == 'all' || inputs.project == 'omarchy-shell')
run: node scripts/verify-omarchy-evidence.mjs tests/e2e/midscene_run
- report-bundle:
- name: Assemble Midscene report bundle
- needs: omarchy-e2e
- if: >-
- always() && !cancelled() &&
- (inputs.project == '' || inputs.project == 'all')
- runs-on: ubuntu-latest
- outputs:
- report-artifact-id: ${{ steps.report.outputs.artifact-id }}
- steps:
- - name: Create bundle even when every shard failed early
+ - name: Write test results to Summary
+ if: always()
run: |
- mkdir -p "$RUNNER_TEMP/midscene-report-shards"
- printf '%s\n' '{"bundle":"omarchy-4.0.3"}' > "$RUNNER_TEMP/midscene-report-shards/ci-bundle-status.json"
-
- # Keep shard directories separate. Native report filenames can share a
- # timestamp, while the Pages builder locates reports by project identity.
- - name: Download every shard report
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- with:
- # Exclude the previous attempt's combined omarchy-midscene-e2e-report
- # artifact when rerunning failed shards of the same workflow run.
- pattern: omarchy-midscene-omarchy-*
- path: ${{ runner.temp }}/midscene-report-shards
- merge-multiple: false
-
- - name: Upload combined report bundle
- id: report
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- with:
- name: omarchy-midscene-e2e-report
- path: ${{ runner.temp }}/midscene-report-shards/
- if-no-files-found: error
- retention-days: 7
- overwrite: true
+ {
+ found=false
+ for result in tests/e2e/.midscene/test-results/*/result.md; do
+ [ -f "$result" ] || continue
+ found=true
+ # The native report link is local to the downloaded artifact.
+ sed '/^\[Open the Midscene Test report ↗\](/d' "$result"
+ echo
+ done
+ if [ "$found" = false ]; then
+ echo "Midscene did not produce a test result. Check the preceding steps for setup or model verification failures."
+ echo
+ fi
+ echo "[Download test artifacts]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID#artifacts)"
+ } >> "$GITHUB_STEP_SUMMARY"
pages-report:
name: GitHub Pages report
- needs: [omarchy-e2e, report-bundle]
+ needs: omarchy-e2e
if: >-
always() &&
!cancelled() &&
- needs.report-bundle.outputs.report-artifact-id != '' &&
+ needs.omarchy-e2e.outputs.report-artifact-id != '' &&
+ (inputs.project == '' || inputs.project == 'all') &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
permissions:
@@ -263,5 +238,5 @@ jobs:
report-label: Omarchy 4.0.3
summary-title: Omarchy
report-groups: >-
- [{"role":"primary","label":"Doubao Say","projects":["omarchy-shard-1","omarchy-shard-2","omarchy-shard-3","omarchy-shard-4"]},{"role":"auxiliary","label":"Omarchy visual checks","projects":["omarchy-shell"]}]
+ [{"role":"primary","label":"Doubao Say","projects":["omarchy-product"]},{"role":"auxiliary","label":"Omarchy visual checks","projects":["omarchy-shell"]}]
run-result: ${{ needs.omarchy-e2e.result }}
diff --git a/.github/workflows/midscene-ubuntu-22.04.yml b/.github/workflows/midscene-ubuntu-22.04.yml
index 30167c4..407cdf4 100644
--- a/.github/workflows/midscene-ubuntu-22.04.yml
+++ b/.github/workflows/midscene-ubuntu-22.04.yml
@@ -16,10 +16,7 @@ on:
default: all
options:
- all
- - ubuntu-shard-1
- - ubuntu-shard-2
- - ubuntu-shard-3
- - ubuntu-shard-4
+ - ubuntu-product
- ubuntu-polishing
- ubuntu-providers
@@ -34,22 +31,15 @@ concurrency:
jobs:
ubuntu-e2e:
- name: Midscene visual (${{ matrix.project }})
+ name: Midscene visual (ubuntu)
+ outputs:
+ report-artifact-id: ${{ steps.report.outputs.artifact-id }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-22.04
- timeout-minutes: 45
- strategy:
- # Every matrix child owns its Xvfb display and fixture process. Keep
- # concurrency at the Actions layer because ComputerAgent sets DISPLAY
- # process-wide and cannot safely isolate concurrent projects in one job.
- fail-fast: false
- max-parallel: 5
- matrix:
- project: >-
- ${{ fromJSON((inputs.project != '' && inputs.project != 'all') &&
- format('["{0}"]', inputs.project) ||
- '["ubuntu-shard-1","ubuntu-shard-2","ubuntu-shard-3","ubuntu-shard-4","ubuntu-polishing"]') }}
+ timeout-minutes: 240
env:
+ PROJECT: ${{ inputs.project || 'all' }}
+ PROJECTS: ${{ (inputs.project == '' || inputs.project == 'all') && 'ubuntu-product,ubuntu-polishing' || inputs.project }}
MIDSCENE_MODEL_API_KEY: ${{ secrets.MIDSCENE_MODEL_API_KEY }}
MIDSCENE_MODEL_NAME: ${{ secrets.MIDSCENE_MODEL_NAME }}
MIDSCENE_MODEL_BASE_URL: ${{ secrets.MIDSCENE_MODEL_BASE_URL }}
@@ -134,88 +124,82 @@ jobs:
- name: Run Midscene project
id: midscene-test
+ timeout-minutes: 220
working-directory: tests/e2e
env:
- PROJECT: ${{ matrix.project }}
NODE_OPTIONS: --dns-result-order=ipv4first --no-network-family-autoselection --require=./node_modules/@computer-use/libnut/dist/import_libnut.js
- run: >-
- timeout --signal=TERM --kill-after=10s 35m
- npm test -- --project "$PROJECT"
+ run: |
+ IFS=',' read -r -a projects <<< "$PROJECTS"
+ result=0
+ for project in "${projects[@]}"; do
+ timeout --signal=TERM --kill-after=10s 180m npm test -- --project "$project" || result=1
+ done
+ exit "$result"
- name: Capture report evidence
id: capture-report
if: always() && !cancelled() && steps.test-dependencies.outcome == 'success'
- env:
- PROJECT: ${{ matrix.project }}
run: |
node tests/e2e/capture-report-preview.mjs \
--report-dir tests/e2e/midscene_run \
- --projects "$PROJECT"
+ --projects "$PROJECTS"
- - name: Record shard result for report aggregation
+ - name: Record project results for report aggregation
if: always() && !cancelled()
env:
- PROJECT: ${{ matrix.project }}
TEST_OUTCOME: ${{ steps.midscene-test.outcome }}
CAPTURE_OUTCOME: ${{ steps.capture-report.outcome }}
run: |
- node scripts/write-ci-shard-status.mjs \
- --output "tests/e2e/midscene_run/ci-shard-status-$PROJECT.json" \
- --project "$PROJECT" \
- --test-outcome "${TEST_OUTCOME:-skipped}" \
- --capture-outcome "${CAPTURE_OUTCOME:-skipped}"
+ IFS=',' read -r -a projects <<< "$PROJECTS"
+ for project in "${projects[@]}"; do
+ node scripts/write-ci-project-status.mjs \
+ --output "tests/e2e/midscene_run/ci-project-status-$project.json" \
+ --project "$project" \
+ --test-outcome "${TEST_OUTCOME:-skipped}" \
+ --capture-outcome "${CAPTURE_OUTCOME:-skipped}"
+ done
- - name: Upload Midscene shard report
+ - name: Upload Midscene report
+ id: report
if: always() && !cancelled()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
- name: midscene-ubuntu-22.04-${{ matrix.project }}
- path: tests/e2e/midscene_run/
+ name: midscene-ubuntu-22.04-e2e-report
+ path: |
+ tests/e2e/midscene_run/
+ tests/e2e/.midscene/
+ include-hidden-files: true
if-no-files-found: error
retention-days: 7
overwrite: true
- report-bundle:
- name: Assemble Midscene report bundle
- needs: ubuntu-e2e
- if: >-
- always() && !cancelled() &&
- (inputs.project == '' || inputs.project == 'all')
- runs-on: ubuntu-latest
- outputs:
- report-artifact-id: ${{ steps.report.outputs.artifact-id }}
- steps:
- - name: Create bundle even when every shard failed early
+ - name: Write test results to Summary
+ if: always()
run: |
- mkdir -p "$RUNNER_TEMP/midscene-report-shards"
- printf '%s\n' '{"bundle":"ubuntu-22.04"}' > "$RUNNER_TEMP/midscene-report-shards/ci-bundle-status.json"
-
- # Keep shard directories separate. Native report filenames can share a
- # timestamp, while the Pages builder locates reports by project identity.
- - name: Download every shard report
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- with:
- pattern: midscene-ubuntu-22.04-*
- path: ${{ runner.temp }}/midscene-report-shards
- merge-multiple: false
-
- - name: Upload combined report bundle
- id: report
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- with:
- name: midscene-ubuntu-22.04-e2e-report
- path: ${{ runner.temp }}/midscene-report-shards/
- if-no-files-found: error
- retention-days: 7
- overwrite: true
+ {
+ found=false
+ for result in tests/e2e/.midscene/test-results/*/result.md; do
+ [ -f "$result" ] || continue
+ found=true
+ # The native report link is local to the downloaded artifact.
+ sed '/^\[Open the Midscene Test report ↗\](/d' "$result"
+ echo
+ done
+ if [ "$found" = false ]; then
+ echo "Midscene did not produce a test result. Check the preceding steps for setup or model verification failures."
+ echo
+ fi
+ echo "[Download test artifacts]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID#artifacts)"
+ } >> "$GITHUB_STEP_SUMMARY"
pages-report:
name: GitHub Pages report
- needs: [ubuntu-e2e, report-bundle]
+ needs: ubuntu-e2e
if: >-
always() &&
!cancelled() &&
- needs.report-bundle.outputs.report-artifact-id != '' &&
+ needs.ubuntu-e2e.outputs.report-artifact-id != '' &&
+ (inputs.project == '' || inputs.project == 'all') &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
permissions:
@@ -229,5 +213,5 @@ jobs:
report-label: Ubuntu 22.04
summary-title: Ubuntu
report-groups: >-
- [{"role":"primary","label":"Doubao Say","projects":["ubuntu-shard-1","ubuntu-shard-2","ubuntu-shard-3","ubuntu-shard-4"]},{"role":"auxiliary","label":"Polishing overlay report","projects":["ubuntu-polishing"]}]
+ [{"role":"primary","label":"Doubao Say","projects":["ubuntu-product"]},{"role":"auxiliary","label":"Polishing overlay report","projects":["ubuntu-polishing"]}]
run-result: ${{ needs.ubuntu-e2e.result }}
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index ae3d1a8..ae4439f 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -91,6 +91,23 @@ jobs:
for language in en zh_CN; do
PERSONAL_UI_LANGUAGE="$language" timeout --signal=TERM --kill-after=5s 35s xvfb-run -a .venv/bin/python tests/manual/personal_ui.py
done
+ - name: Exercise polishing settings and capture their layout
+ env:
+ GTK_A11Y: none
+ PYTHONPATH: src:.
+ POLISH_UI_SCREENSHOTS: artifacts/verification/polish-settings
+ run: |
+ for language in en zh_CN; do
+ POLISH_UI_LANGUAGE="$language" timeout --signal=TERM --kill-after=5s 35s xvfb-run -a -s "-screen 0 1280x800x24" .venv/bin/python tests/manual/polish_settings_ui.py
+ done
+ - name: Upload synthetic polishing settings captures
+ if: always()
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
+ with:
+ name: polish-settings-captures
+ path: artifacts/verification/polish-settings
+ if-no-files-found: warn
+ retention-days: 14
- name: Upload synthetic GTK personal UI captures
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index e7ebd71..9da5b22 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,21 +1,15 @@
-# Doubao Say 1.8.0
+# Doubao Say 1.8.1
-## ChatGPT polishing
+## Dictation and setup
-Linux now supports ChatGPT as a polishing provider alongside the existing API-based providers. Recognition and polishing remain separate, and original recognition text stays available for review.
+On macOS, final polishing starts while recognition finishes. Revised recognition text invalidates stale polishing, and delivery still waits for the final recognition result. Returning users open General settings after completing onboarding; restarting or upgrading preserves that completion.
-## Mac input recovery
-
-Automatic input chooses direct accessibility insertion when the focused field supports it, otherwise clipboard paste. All applications follow the same capability-based rules. Explicit clipboard and direct-input choices remain available; existing preferences are retained. Failed delivery keeps text visible with a specific reason and supports retry. Shortcut release checks include Fn. If text was entered but Enter could not be sent, the message distinguishes those outcomes to avoid duplicate retries.
-
-## Settings and devices
-
-Opening the Mac app shows settings. Setup steps can be selected independently, successful checks show green ticks, and signed-in Doubao sessions hide the login action. Microphone lists refresh on device and default-input changes, with quick switching from the menu bar. Update availability appears beside the settings sidebar entry. Recent-text editing includes internal padding to keep the first line visible.
+On Linux, the polishing page keeps model and API settings beside the endpoint test and its feedback. Detailed model guidance is expandable. Disabling polishing collapses API and ChatGPT service controls without discarding their configuration. Arch and Omarchy source installation now includes the required JWT and cryptography packages.
## Downloads and verification
Developer ID signed, Apple-notarized DMGs are provided for Apple Silicon and Intel. Linux app and plugin archives support Python 3.11–3.14. SHA256SUMS and update.json cover the release packages.
-Automated checks cover input recovery, capability routing, shortcut-release timing, settings persistence, device-change handling and network protocol behavior. A real cmux 0.65.1 receiver accepted three synthetic text samples exactly once without changing the clipboard. That check did not establish physical-hotkey behavior, microphone/ASR accuracy, other applications or Intel hardware behavior.
+Native desktop regression suites cover settings, shortcuts, microphone-check gating, synthetic dictation delivery and cancellation. CI Summary tables include a screenshot and an exact report-step link for each case. Synthetic checks do not establish real microphone/ASR quality, physical-hotkey behavior, accessibility permission retention, clipboard behavior in every receiving application or Intel hardware acceptance.
-[Full changes](https://github.com/quanru/doubao-say/compare/v1.7.0...v1.8.0)
+[Full changes](https://github.com/quanru/doubao-say/compare/v1.8.0...v1.8.1)
diff --git a/debian/changelog b/debian/changelog
index 095454e..197fe4f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+doubao-say (1.8.1-1) noble; urgency=medium
+
+ * Fix Arch source dependencies and simplify polishing settings.
+ * Improve macOS dictation latency and restore completed onboarding.
+
+ -- quanru <[email protected]> Thu, 15 Oct 2026 19:00:00 +0800
+
doubao-say (1.8.0-1) noble; urgency=medium
* Add ChatGPT polishing and its JWT verification dependencies.
diff --git a/install.sh b/install.sh
index 19a1ae1..6c05e77 100755
--- a/install.sh
+++ b/install.sh
@@ -69,7 +69,7 @@ if [[ -z ${DISPLAY:-} || -n ${WAYLAND_DISPLAY:-} || ${XDG_SESSION_TYPE:-} == way
packages+=(gtk4-layer-shell wl-clipboard)
fi
if ! $BUNDLE; then
- packages+=(python-sounddevice python-websockets python-evdev)
+ packages+=(python-sounddevice python-websockets python-evdev python-pyjwt python-cryptography)
fi
missing=()
for package in "${packages[@]}"; do
diff --git a/macos/Package.swift b/macos/Package.swift
index eafa8f6..b0e74c8 100644
--- a/macos/Package.swift
+++ b/macos/Package.swift
@@ -2,5 +2,5 @@
import PackageDescription
let package = Package(name: "DoubaoSayCore", platforms: [.macOS(.v13)], targets: [
.target(name: "DoubaoSayCore", path: "Sources", exclude: ["ApplicationPresence.swift", "APIASRClient.swift", "ASRParamsStore.swift", "AppState.swift", "AudioCaptureManager.swift", "AudioDevices.swift", "DoubaoASRClient.swift", "DoubaoSayApp.swift", "HotkeyManager.swift", "OverlayPanel.swift", "OverlayView.swift", "ListeningWaveform.swift", "PasteHelper.swift", "InputTargetCapture.swift", "SecretStore.swift", "SettingsWindow.swift", "SettingsModel.swift", "ChatGPTSettings.swift", "DropdownControl.swift", "PolishingSettingsView.swift", "StartupService.swift", "TranscriptionManager.swift", "UpdateInstaller.swift", "VibekeyReceiver.swift", "WebViewManager.swift", "WindowCapture.swift", "PersonalViews.swift", "SpeechEvaluationView.swift", "SpeechEvaluationModel.swift"], sources: ["InputLatency.swift", "SpeechEvaluation.swift", "VoiceMotion.swift", "HotkeyGesture.swift", "ASRResponse.swift", "FinalResultGate.swift", "ShortcutGesture.swift", "MacSettings.swift", "Strings.swift", "PolishDefaults.swift", "PolishClient.swift", "ChatGPTVault.swift", "ChatGPTProtocol.swift", "ChatGPTOAuth.swift", "ChatGPTCallback.swift", "ChatGPTService.swift", "ChatGPTResponses.swift", "PolishCoordinator.swift", "SeedProtocol.swift", "VibekeyProtocol.swift", "UpdateRelease.swift", "UpdateChecker.swift", "PersonalData.swift", "PersonalCorrections.swift"]),
- .testTarget(name: "DoubaoSayCoreTests", dependencies: ["DoubaoSayCore"], path: "Tests", exclude: ["Transport", "Live", "Network", "Settings", "Input", "Packaging"])
+ .testTarget(name: "DoubaoSayCoreTests", dependencies: ["DoubaoSayCore"], path: "Tests", exclude: ["Transport", "Live", "Network", "Settings", "Input", "Midscene", "Packaging"])
])
diff --git a/macos/Packaging/preview-manifest.py b/macos/Packaging/preview-manifest.py
index 556d88a..9f3d0c6 100644
--- a/macos/Packaging/preview-manifest.py
+++ b/macos/Packaging/preview-manifest.py
@@ -1,19 +1,22 @@
"""Write public provenance for a successfully signed and notarized preview."""
import hashlib
import json
+import os
import platform
import plistlib
from pathlib import Path
import subprocess
-arch = platform.machine()
+arch = os.environ.get("DOUBAO_MAC_ARCH", platform.machine())
+if arch not in {"arm64", "x86_64"}:
+ raise SystemExit("Unsupported preview architecture")
app = Path(f"build/macos/{arch}/Doubao Say.app")
info = plistlib.loads((app / "Contents/Info.plist").read_bytes())
subprocess.run(["codesign", "--verify", "--strict", str(app)], check=True)
result = subprocess.run(["codesign", "-d", "-r-", str(app)], capture_output=True, text=True, check=True)
requirement = next(line.removeprefix("designated => ") for line in
(result.stdout + result.stderr).splitlines() if line.startswith("designated => "))
-artifacts = list(Path("build/macos").glob("*.dmg"))
+artifacts = list(Path("build/macos").glob(f"*-macos-{arch}-*.dmg"))
if len(artifacts) != 1:
raise SystemExit("Expected exactly one notarized preview DMG")
manifest = {
diff --git a/macos/Tests/Midscene/Fixture.swift b/macos/Tests/Midscene/Fixture.swift
new file mode 100644
index 0000000..f379865
--- /dev/null
+++ b/macos/Tests/Midscene/Fixture.swift
@@ -0,0 +1,61 @@
+// Test-only host for production SwiftUI settings. Never included in release builds.
+import AppKit
+import SwiftUI
+
+@main struct MidsceneFixture: App {
+ @NSApplicationDelegateAdaptor(FixtureDelegate.self) var delegate
+ var body: some Scene { Settings { EmptyView() } }
+}
+
+@MainActor final class FixtureDelegate: NSObject, NSApplicationDelegate {
+ private var settings: SettingsWindow?
+ private var backdrops: [NSWindow] = []
+ func applicationDidFinishLaunching(_ notification: Notification) {
+ guard let id = Bundle.main.bundleIdentifier,
+ id.hasPrefix("md.lifeos.doubao-say.midscene."),
+ ProcessInfo.processInfo.environment["DOUBAO_MIDSCENE_FIXTURE"] == "1" else { exit(2) }
+ // The bundle ID is generated at build time. Reset only its isolated profile.
+ UserDefaults.standard.removePersistentDomain(forName: id)
+ UserDefaults.standard.set("en", forKey: "language")
+ NSApp.appearance = NSAppearance(named: .aqua)
+ // Cover other applications before Midscene takes its first screenshot.
+ // Owned opaque windows are removed with this fixture process.
+ for screen in NSScreen.screens {
+ let backdrop = NSWindow(contentRect: screen.frame, styleMask: .borderless, backing: .buffered, defer: false)
+ backdrop.backgroundColor = NSColor(calibratedWhite: 0.92, alpha: 1)
+ backdrop.isOpaque = true
+ backdrop.level = .floating
+ backdrop.orderFrontRegardless()
+ backdrops.append(backdrop)
+ }
+ do {
+ try SettingsStore.shared.save(MacSettings())
+ let store = PersonalDataStore.shared
+ try store.clearHistory()
+ for correction in try store.corrections() { try store.forgetCorrection(correction.id) }
+ try store.setEnabled(true)
+ try store.saveWords("Midscene\nVibelet")
+ _ = try store.record(original: "Use Midjourney for UI tests.", output: "Use Midjourney for UI tests.", polished: false, status: "sent")
+ let state = AppState()
+ state.loginStatus = .loggedIn
+ state.lastTranscript = "First line must be fully visible.\nSynthetic recent dictation."
+ let window = SettingsWindow(state: state)
+ settings = window
+ window.model.apply = { settings, _, _ in try SettingsStore.shared.save(settings) }
+ window.model.clear = { state.lastTranscript = "" }
+ window.model.shortcutReady = { true }
+ // No AppDelegate, recognition service, update client or global shortcut is started.
+ window.show(refresh: false)
+ for native in NSApp.windows where native.title.hasPrefix("Doubao Say") {
+ native.level = NSWindow.Level(rawValue: NSWindow.Level.floating.rawValue + 1)
+ native.makeKeyAndOrderFront(nil)
+ }
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
+ print("READY: isolated macOS Midscene fixture"); fflush(stdout)
+ }
+ DispatchQueue.main.asyncAfter(deadline: .now() + 480) {
+ fputs("Fixture deadline exceeded\n", stderr); exit(124)
+ }
+ } catch { fputs("Fixture setup failed\n", stderr); exit(1) }
+ }
+}
diff --git a/macos/Tests/Midscene/README.md b/macos/Tests/Midscene/README.md
new file mode 100644
index 0000000..09ae052
--- /dev/null
+++ b/macos/Tests/Midscene/README.md
@@ -0,0 +1,100 @@
+# macOS Midscene settings E2E
+
+This opt-in suite drives the production SwiftUI `SettingsWindow` with
+`@midscene/test` and `@midscene/computer`. The test-only application has a random
+bundle ID, synthetic account/transcript/history data, and no production app
+controller. It does not start recognition, global shortcuts, an updater, or
+OAuth. Settings and SQLite data are isolated from the installed application.
+
+Five YAML cases cover:
+
+- Setup step navigation, signed-in presentation and the sidebar focus outline.
+- Shortcut settings autosave and preservation across page navigation.
+- Recent-text first-line padding, editing and clearing.
+- Vocabulary autosave across page navigation.
+- Correction preview, explicit confirmation and memory.
+
+This is native UI integration coverage, not live speech recognition, microphone
+hot-plug, input delivery into other applications, or installer acceptance.
+The setup account is simulated. Microphone/voice checks must not be clicked.
+English/light mode is covered; other languages/themes need separate coverage.
+
+## Local execution
+
+Use a logged-in Mac desktop with Xcode command-line tools and Node 22+.
+Grant the test terminal/runner Accessibility and Screen Recording permissions.
+The suite controls the real mouse/keyboard: keep the desktop available and
+avoid concurrent UI automation. The fixture covers other windows with owned
+opaque backdrops before capture. Still prefer a dedicated test account: the
+menu bar and system notifications can appear in desktop screenshots. It uses the primary
+display unless `MIDSCENE_MACOS_DISPLAY_ID` selects another display.
+
+From the repository root, build first, then release the heavy gate before
+acquiring the runtime gate:
+
+```sh
+~/.local/bin/dev-gate run -- bash macos/Tests/Midscene/build.sh
+cd tests/e2e
+~/.local/bin/dev-gate run -- npm ci --include=optional --ignore-scripts
+~/.local/bin/dev-gate run -- npm rebuild node-mac-permissions
+~/.local/bin/dev-gate run -- npm run typecheck
+# Securely export MIDSCENE_MODEL_API_KEY, MIDSCENE_MODEL_NAME,
+# MIDSCENE_MODEL_BASE_URL and MIDSCENE_MODEL_FAMILY before running.
+~/.local/bin/dev-gate run --kind runtime --max-runtime 1800 -- \
+ npm run test:macos -- --project macos-settings --result-dir /absolute/path/to/new-results
+```
+
+The explicit native-module rebuild is necessary after `--ignore-scripts`;
+otherwise permission checks cannot load their native binding. On machines
+without dev-gate, run the same commands with an equivalent process timeout.
+`DOUBAO_MIDSCENE_APP` may point to a separately built fixture `.app`. Do not
+rebuild it while running. Each test launches a fresh process and resets its
+isolated data. Project teardown stops only the owned process and removes its
+preferences and application-support directory. A `.running` directory beside
+the fixture prevents concurrent use of the same profile. After a hard process
+kill, verify that its fixture is no longer running before removing that lock.
+
+Cases run serially, without retries, with a six-minute step limit and an
+eight-minute fixture watchdog. Failures retain their native HTML reports under
+`tests/e2e/midscene_run/report/`; `--result-dir` selects a unique summary output
+directory. Preserve the report HTML with the summary before another run.
+Missing model configuration, native bindings or permissions fail preflight;
+this must not be reported as visual success.
+
+## CI
+
+The normal macOS preview workflow compiles the fixture. The separate
+`macOS Midscene E2E` workflow runs for relevant pull requests from this repository
+and supports manual dispatch after it reaches the default branch. It uses the
+`Model` environment, with repository secrets as the fallback. The API key is
+a secret; model name, base URL, family and reasoning settings prefer Actions
+variables over secrets. Only model verification and case execution receive
+these credentials. Fork pull requests are skipped. It runs the native
+`midscene-test model verify` compatibility check before building the fixture.
+
+The workflow uses Node 24 and locked Midscene 1.15.4 dependencies. Like Rome,
+it appends the native `.midscene/test-results/*/result.md` to the Actions
+Summary, removes the artifact-local report link, and adds an artifact download
+link. If setup fails before a result exists, the Summary says so explicitly.
+Both `midscene_run/` and `.midscene/` are uploaded on success and failure
+with hidden files included and a 14-day retention,
+and publish synthetic case evidence to Pages. The publication job adds a visible
+Summary table with each case’s status, screenshot, duration and a report link
+to its exact native report step. Diagnostic desktop captures are excluded from
+the restricted Pages payload. Its own concurrency group prevents Linux workflow events from cancelling a
+pending Mac run. Cases stay serial; model credentials may still share provider
+quota with Linux suites.
+
+The visual job requires a logged-in, capturable desktop with input permission;
+GitHub-hosted macOS runner permission availability must be verified before this
+workflow becomes a required PR check. It fails explicitly when unavailable and
+does not modify TCC databases or bypass permission checks.
+
+The CI preloads `node-mac-permissions` before the TypeScript config
+loader; this avoids a native-binding lookup failure caused by tsx namespaced
+module URLs. The runner also checks AppKit screen enumeration and native capture.
+When screenshot-desktop reports no displays despite the hosted virtual desktop,
+`MacComputerDevice` falls back to `/usr/sbin/screencapture` for the actual primary
+display. Explicit display selection retains the standard device path. Permission
+checks, pointer health checks and image assertions remain enabled; capture
+failures remain failures, and temporary PNG files are removed after each capture.
diff --git a/macos/Tests/Midscene/build.sh b/macos/Tests/Midscene/build.sh
new file mode 100755
index 0000000..6b3e86b
--- /dev/null
+++ b/macos/Tests/Midscene/build.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+set -euo pipefail
+cd "$(dirname "$0")/../../.."
+output="${1:-build/macos/midscene}"
+mkdir -p "$output"
+app="$output/Doubao Midscene Fixture.app"
+mkdir -p "$app/Contents/MacOS"
+sources=()
+for source in macos/Sources/*.swift; do
+ [[ "$source" == *DoubaoSayApp.swift ]] || sources+=("$source")
+done
+xcrun swiftc -swift-version 5 -target "$(uname -m)-apple-macos13.0" \
+ -module-cache-path "$output/module-cache" \
+ "${sources[@]}" macos/Tests/Midscene/Fixture.swift -o "$app/Contents/MacOS/Fixture"
+python3 - "$app" <<'PY'
+from pathlib import Path
+import plistlib
+import sys
+import uuid
+app = Path(sys.argv[1])
+(app / 'Contents/Info.plist').write_bytes(plistlib.dumps({
+ 'CFBundleIdentifier': 'md.lifeos.doubao-say.midscene.' + uuid.uuid4().hex,
+ 'CFBundleName': 'Doubao Midscene Fixture', 'CFBundleExecutable': 'Fixture',
+ 'CFBundlePackageType': 'APPL', 'LSMinimumSystemVersion': '13.0',
+ 'CFBundleShortVersionString': '0.0.0',
+}))
+PY
+codesign --force --sign - "$app"
+printf 'Fixture built: %s\n' "$app"
diff --git a/macos/Tests/Packaging/test_preview_signing.py b/macos/Tests/Packaging/test_preview_signing.py
index 6b32efd..64969df 100644
--- a/macos/Tests/Packaging/test_preview_signing.py
+++ b/macos/Tests/Packaging/test_preview_signing.py
@@ -101,6 +101,36 @@ if sys.argv[1] == 'find-identity': print(os.environ['IDENTITIES'])
self.assertFalse(list(directory.rglob('*.dmg')))
return calls
+ def test_preview_manifest_records_cross_compiled_artifact(self):
+ manifest_script = ROOT / 'Packaging/preview-manifest.py'
+ with tempfile.TemporaryDirectory() as folder:
+ directory = Path(folder)
+ for arch in ['arm64', 'x86_64']:
+ app = directory / f'build/macos/{arch}/Doubao Say.app/Contents'
+ app.mkdir(parents=True)
+ (app / 'Info.plist').write_bytes(plistlib.dumps({
+ 'CFBundleShortVersionString': '1.8.1',
+ 'CFBundleIdentifier': 'md.lifeos.doubao-say.macos',
+ }))
+ (directory / f'build/macos/Doubao-Say-1.8.1-macos-{arch}-abc123.dmg').write_bytes(arch.encode())
+ previous = Path.cwd()
+ try:
+ os.chdir(directory)
+ for arch in ['arm64', 'x86_64']:
+ with self.subTest(arch=arch), \
+ patch.dict(os.environ, {'DOUBAO_MAC_ARCH': arch}), \
+ patch('platform.machine', return_value='arm64'), \
+ patch('subprocess.run', return_value=subprocess.CompletedProcess(
+ [], 0, stdout='designated => synthetic requirement', stderr='')), \
+ patch('subprocess.check_output', return_value='abc123'):
+ runpy.run_path(str(manifest_script), run_name='__main__')
+ manifest = json.loads(Path('build/macos/preview-manifest.json').read_text())
+ self.assertEqual(manifest['architecture'], arch)
+ self.assertEqual(manifest['artifact'], f'Doubao-Say-1.8.1-macos-{arch}-abc123.dmg')
+ self.assertEqual(manifest['commit'], 'abc123')
+ finally:
+ os.chdir(previous)
+
def test_wrong_team_is_rejected_before_notarization(self):
calls = self.package_failure('OTHERTEAM1', 'Accepted')
self.assertFalse(any('notarytool' in call for call in calls))
diff --git a/macos/runtime-check.py b/macos/runtime-check.py
index df88002..c3dde35 100644
--- a/macos/runtime-check.py
+++ b/macos/runtime-check.py
@@ -51,7 +51,7 @@ for language in ['en', 'zh']:
env['DOUBAO_SMOKE_SIGNED_IN'] = '1' if label == 'doubao-signed-in' else '0'
if label.startswith('launch-'):
env.update(DOUBAO_SMOKE_LAUNCH_CHECK='1',
- DOUBAO_SMOKE_UPDATE_VERSION='1.8.0' if label.endswith('available') else '')
+ DOUBAO_SMOKE_UPDATE_VERSION='1.8.2' if label.endswith('available') else '')
command = [str(bundle / 'Contents/MacOS/DoubaoSay'), argument, '-language', language]
if label.startswith('setup-') and '--setup-completion' in sys.argv[3:]:
env.update(DOUBAO_SMOKE_SETUP_STEP='1',
diff --git a/manifest.json b/manifest.json
index 5a6b7a8..7908fd8 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,7 +2,7 @@
"schemaVersion": 1,
"id": "md.lifeos.doubao-say",
"name": "Doubao Say",
- "version": "1.8.0",
+ "version": "1.8.1",
"author": "quanru and contributors",
"description": "Doubao Say turns speech into polished text with live captions and configurable tap or hold triggers on Wayland.",
"kinds": [
diff --git a/packaging/INSTALL.md b/packaging/INSTALL.md
index af8d1d0..c00f9f7 100644
--- a/packaging/INSTALL.md
+++ b/packaging/INSTALL.md
@@ -1,4 +1,4 @@
-# Doubao Say 1.8.0
+# Doubao Say 1.8.1
[Website](https://doubao-say.lifeos.md/) · [简体中文安装指南](https://doubao-say.lifeos.md/zh/guide/install)
@@ -90,6 +90,9 @@ Complete any required logout/login and the application's four-step onboarding be
enabling the plugin. Do not create a virtual environment inside an installed plugin:
Omarchy rejects symlinks and watches its tree for changes. Git installs use OS packages;
offline bundles provide their own wheels/runtime. Their dependency versions can differ.
+Source installs also require `python-sounddevice`, `python-websockets`,
+`python-evdev`, `python-pyjwt` and `python-cryptography`; both `install.sh` and
+`setup-omarchy.sh` install these before checking the runtime.
For updates, stop recording and disable the plugin first. Review the changes offered by
`omarchy plugin update md.lifeos.doubao-say`, rerun setup if requirements
diff --git a/packaging/UPDATES.md b/packaging/UPDATES.md
index 8ea8c1f..4482128 100644
--- a/packaging/UPDATES.md
+++ b/packaging/UPDATES.md
@@ -128,7 +128,9 @@ a team mismatch or failed notarization fail the job; no unsigned fallback app is
uploaded. An always-run cleanup step removes the temporary keychain and credential
files. Only the DMG, checksum and public provenance manifest are uploaded.
-Download `Doubao-Say-macos-signed-preview` from the successful workflow run. The
+The preview job builds both CPU variants. Download
+`Doubao-Say-macos-signed-preview-arm64` or
+`Doubao-Say-macos-signed-preview-x86_64` from the successful workflow run. The
manifest records the exact source commit, architecture, bundle ID, signing
requirement and artifact hash. Replacing an older ad-hoc or Apple Development
build may require one final permission grant. Successive Developer ID previews
diff --git a/packaging/runtime-requirements.txt b/packaging/runtime-requirements.txt
index c679237..83ef9a9 100644
--- a/packaging/runtime-requirements.txt
+++ b/packaging/runtime-requirements.txt
@@ -1,4 +1,4 @@
-# Complete Python dependency set for the 1.8.0 release.
+# Complete Python dependency set for the 1.8.1 release.
PyJWT[crypto]==2.15.1
cryptography==50.0.2
websockets==17.1
diff --git a/pyproject.toml b/pyproject.toml
index 9669820..d8944a6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "doubao-say"
-version = "1.8.0"
+version = "1.8.1"
description = "Global push-to-hold voice input for Linux/Wayland, backed by Doubao ASR"
readme = "README.md"
requires-python = ">=3.11"
diff --git a/scripts/build-pages-report.mjs b/scripts/build-pages-report.mjs
index 8487718..ad87c6e 100644
--- a/scripts/build-pages-report.mjs
+++ b/scripts/build-pages-report.mjs
@@ -332,7 +332,7 @@ function buildFallbackEntry({ label, project, reportPrefix, role, status }) {
cases: [
{
caseId: `infrastructure-${slug}`,
- name: `${project} CI shard`,
+ name: `${project} CI project`,
status: 'failed',
selection: 'workflow-failure',
description,
@@ -348,23 +348,23 @@ function fallbackSvg(project, description) {
return `<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="675" viewBox="0 0 1200 675">
<rect width="1200" height="675" fill="#160d12"/>
<rect x="70" y="70" width="1060" height="535" rx="28" fill="#26151d" stroke="#ef4444" stroke-width="4"/>
- <text x="120" y="175" fill="#fca5a5" font-family="system-ui,sans-serif" font-size="34" font-weight="700">CI shard failed before report capture</text>
+ <text x="120" y="175" fill="#fca5a5" font-family="system-ui,sans-serif" font-size="34" font-weight="700">CI project failed before report capture</text>
<text x="120" y="255" fill="#ffffff" font-family="system-ui,sans-serif" font-size="30">${escapeHtml(project)}</text>
<foreignObject x="120" y="305" width="960" height="210"><div xmlns="http://www.w3.org/1999/xhtml" style="color:#d1d5db;font:26px/1.5 system-ui,sans-serif">${escapeHtml(description)}</div></foreignObject>
</svg>\n`;
}
function fallbackHtml(project, description, workflowUrl) {
- return `<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width"><title>${escapeHtml(project)} · CI failure</title></head><body style="font-family:system-ui,sans-serif;max-width:850px;margin:4rem auto;padding:0 1rem"><h1>CI shard failed before report capture</h1><h2>${escapeHtml(project)}</h2><p>${escapeHtml(description)}</p><p><a href="${escapeHtml(workflowUrl)}">Open the GitHub Actions run</a></p></body></html>\n`;
+ return `<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width"><title>${escapeHtml(project)} · CI failure</title></head><body style="font-family:system-ui,sans-serif;max-width:850px;margin:4rem auto;padding:0 1rem"><h1>CI project failed before report capture</h1><h2>${escapeHtml(project)}</h2><p>${escapeHtml(description)}</p><p><a href="${escapeHtml(workflowUrl)}">Open the GitHub Actions run</a></p></body></html>\n`;
}
-async function shardStatuses(directory) {
+async function projectStatuses(directory) {
const statuses = new Map();
async function visit(current) {
for (const entry of await readdir(current, { withFileTypes: true })) {
const item = path.join(current, entry.name);
if (entry.isDirectory()) await visit(item);
- else if (entry.isFile() && /^ci-shard-status-.+\.json$/.test(entry.name)) {
+ else if (entry.isFile() && /^ci-(?:project|shard)-status-.+\.json$/.test(entry.name)) {
const status = JSON.parse(await readFile(item, 'utf8'));
if (typeof status.project !== 'string') {
throw new Error(`${item} does not identify a project`);
@@ -808,7 +808,7 @@ export async function buildPagesReport(options) {
report.run.projects[0].name === projectName,
);
const reportPrefix = `reports/${runId}`;
- const statuses = await shardStatuses(reportDirectory);
+ const statuses = await projectStatuses(reportDirectory);
const generatedFallbacks = [];
let selectedReports;
let entries;
diff --git a/scripts/render-ci-report-summary.mjs b/scripts/render-ci-report-summary.mjs
index c4d47f0..dc9f818 100644
--- a/scripts/render-ci-report-summary.mjs
+++ b/scripts/render-ci-report-summary.mjs
@@ -94,7 +94,7 @@ function caseRow(pagesUrl, { entry, testCase }, detail) {
const screenshot = testCase.previewPath
? `<a href="${htmlAttribute(target)}"><img src="${htmlAttribute(reportUrl(pagesUrl, testCase.previewPath))}" alt="${htmlAttribute(testCase.name)}" width="160"></a>`
: '—';
- return `| ${inlineCell(caseProject(entry, testCase))} | [${inlineCell(testCase.name)}](${target}) | ${screenshot} | ${inlineCell(detail)} | ${formatDuration(testCase.durationMs) || '—'} |`;
+ return `| ${inlineCell(caseProject(entry, testCase))} | [${inlineCell(testCase.name)}](${target}) | ${screenshot} | ${inlineCell(detail)} | ${formatDuration(testCase.durationMs) || '—'} | [Open report](${target}) |`;
}
export function renderReportSummary({
@@ -169,13 +169,13 @@ export function renderReportSummary({
sections.push(
'### Needs attention',
'',
- '| Shard | Case | Screenshot | Status / reason | Duration |',
- '|:--|:--|:--|:--|--:|',
+ '| Project | Case | Screenshot | Status / reason | Duration | Report |',
+ '|:--|:--|:--|:--|--:|:--|',
...incompleteEntries.map((entry) =>
- `| ${inlineCell(entry.label)} | — | — | ❌ ${inlineCell(entry.status)}${runUrl ? ` · [Workflow run](${runUrl})` : ''} | — |`,
+ `| ${inlineCell(entry.label)} | — | — | ❌ ${inlineCell(entry.status)}${runUrl ? ` · [Workflow run](${runUrl})` : ''} | — | — |`,
),
...(unreportedFailure
- ? [`| Workflow | — | — | ❌ ${inlineCell(producerResult === 'success' ? 'incomplete report' : producerResult)}${runUrl ? ` · [Workflow run](${runUrl})` : ''} | — |`]
+ ? [`| Workflow | — | — | ❌ ${inlineCell(producerResult === 'success' ? 'incomplete report' : producerResult)}${runUrl ? ` · [Workflow run](${runUrl})` : ''} | — | — |`]
: []),
...failedCases
.sort((left, right) =>
@@ -198,16 +198,13 @@ export function renderReportSummary({
}
sections.push(
- '<details>',
- `<summary>Appendix: passed cases (${passedCases.length})</summary>`,
+ `### Passed cases (${passedCases.length})`,
'',
- '| Shard | Case | Screenshot | Status | Duration |',
- '|:--|:--|:--|:--|--:|',
+ '| Project | Case | Screenshot | Status | Duration | Report |',
+ '|:--|:--|:--|:--|--:|:--|',
...passedCases.map((item) => caseRow(pagesUrl, item, '✅ Passed')),
'',
- '</details>',
- '',
- 'Click a screenshot or case name to open its exact step in the native Midscene report. A CI failure card appears when a shard stops before Midscene can capture a report.',
+ 'Click a screenshot or case name to open its exact step in the native Midscene report. A CI failure card appears when a project stops before Midscene can capture a report.',
'',
);
diff --git a/scripts/write-ci-shard-status.mjs b/scripts/write-ci-project-status.mjs
similarity index 100%
rename from scripts/write-ci-shard-status.mjs
rename to scripts/write-ci-project-status.mjs
diff --git a/setup-omarchy.sh b/setup-omarchy.sh
index 67cc83c..47f52db 100755
--- a/setup-omarchy.sh
+++ b/setup-omarchy.sh
@@ -16,7 +16,7 @@ fi
omarchy pkg add \
python python-gobject python-cairo \
- python-sounddevice python-websockets python-evdev \
+ python-sounddevice python-websockets python-evdev python-pyjwt python-cryptography \
gtk4 gtk4-layer-shell webkitgtk-6.0 pipewire wl-clipboard portaudio
"$PROJECT_DIR/start.sh" --check
diff --git a/src/doubao_input/product.py b/src/doubao_input/product.py
index 883a4e1..c5cabac 100644
--- a/src/doubao_input/product.py
+++ b/src/doubao_input/product.py
@@ -1,6 +1,6 @@
"""Single runtime source for Doubao Say release identity."""
-VERSION = "1.8.0"
+VERSION = "1.8.1"
REPOSITORY_URL = "https://github.com/quanru/doubao-say"
LATEST_RELEASE_API = "https://api.github.com/repos/quanru/doubao-say/releases/latest"
LATEST_RELEASE_FEED = REPOSITORY_URL + "/releases/latest/download/update.json"
diff --git a/src/doubao_input/ui/polish_settings.py b/src/doubao_input/ui/polish_settings.py
index fc3db8c..2e521db 100644
--- a/src/doubao_input/ui/polish_settings.py
+++ b/src/doubao_input/ui/polish_settings.py
@@ -30,18 +30,20 @@ class PolishSettings(Gtk.Box):
self.status = Gtk.Label(xalign=0, wrap=True)
self.append(self.status)
+ self.details = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=10)
+ self.append(self.details)
+
self.provider = Gtk.ComboBoxText()
self.provider.append("api", tr("API key", "API Key"))
self.provider.append("chatgpt", tr("ChatGPT plan", "ChatGPT 套餐"))
self.provider.set_active_id(settings.polish_provider)
- self.append(self._row(tr("Polishing service", "润色服务"), self.provider))
+ self.details.append(self._row(tr("Polishing service", "润色服务"), self.provider))
self.chatgpt = ChatGPTSettings(settings.polish_chatgpt_model, self._queue_save)
self.chatgpt.set_visible(settings.polish_provider == "chatgpt")
- self.append(self.chatgpt)
+ self.details.append(self.chatgpt)
- self.details = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=10)
- self.append(self.details)
- self.details.append(Gtk.Label(xalign=0, wrap=True, label=tr(
+ help_content = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=10)
+ help_content.append(Gtk.Label(xalign=0, wrap=True, label=tr(
"Turn rough speech into cleaner sentences without changing your meaning. Pauses show a preview; finishing your recording pastes the final text once. If polishing takes longer than 5 seconds, the original text is used.",
"把口语整理成更清晰的文字,不改变原意。停顿时只预览,结束录音后一次上屏;超过五秒则自动使用原文。")))
@@ -60,17 +62,17 @@ class PolishSettings(Gtk.Box):
"Choose a small, fast model and turn thinking off, even for Flash/Lite models. Try DeepSeek Flash (deepseek-flash) or Gemini 2.5 Flash-Lite (gemini-2.5-flash-lite) on their official endpoints; thinking-off is requested automatically. Large reasoning models may exceed the 5-second limit and fall back to your original text.",
"优先选择小型、低延迟模型,并关闭思考,Flash/Lite 模型也不例外。建议使用 DeepSeek Flash(deepseek-flash)或 Gemini 2.5 Flash-Lite(gemini-2.5-flash-lite)的官方接口,应用会自动请求关闭思考。大型推理模型可能超过五秒上限,导致回退原文。"))
self.latency_guidance.add_css_class("dim-label")
- self.details.append(self.latency_guidance)
+ help_content.append(self.latency_guidance)
self.reasoning_notice = Gtk.Label(xalign=0, wrap=True)
self.reasoning_notice.add_css_class("dim-label")
- self.details.append(self.reasoning_notice)
+ help_content.append(self.reasoning_notice)
self.base_url.connect("changed", self._update_reasoning_notice)
self.model.connect("changed", self._update_reasoning_notice)
self._update_reasoning_notice()
key_row = self._row("API Key", self.api_key)
self.api_rows.append(key_row)
self.details.append(key_row)
- self.details.append(Gtk.Label(xalign=0, wrap=True, label=tr(
+ help_content.append(Gtk.Label(xalign=0, wrap=True, label=tr(
"The API key is stored separately with owner-only permissions and excluded from diagnostics.",
"API Key 使用仅限当前用户读取的独立文件保存,不会出现在诊断信息中。")))
@@ -104,6 +106,9 @@ class PolishSettings(Gtk.Box):
self.test_status.add_css_class("accent")
self.test_status.set_visible(False)
self.details.append(self.test_status)
+ help_expander = Gtk.Expander(label=tr("How polishing works and model tips", "润色说明与模型建议"))
+ help_expander.set_child(help_content)
+ self.details.append(help_expander)
restore = Gtk.Button(label=tr("Restore default prompts", "恢复默认提示词"))
restore.connect("clicked", self._restore_prompts)
restore.get_child().set_wrap(True)
diff --git a/tests/README.md b/tests/README.md
index 07ac105..60263c3 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -3,7 +3,7 @@
- [`unit/`](unit/) contains fast Python behavior and component tests.
- [`contracts/`](contracts/) verifies packaging, releases, version alignment,
Marketplace rules, and the Pages report builder.
-- [`e2e/`](e2e/) exercises complete desktop flows on Ubuntu and Omarchy with
+- [`e2e/`](e2e/) exercises desktop flows on Ubuntu, Omarchy and macOS with
Midscene and publishes HTML reports from GitHub Actions.
- [`manual/`](manual/) contains opt-in checks that require a real desktop,
devices, credentials, or human observation.
@@ -25,6 +25,9 @@ The maintained Midscene suite lives in [`e2e/`](e2e/README.md), using
`e2e/cases/`; `e2e/midscene.config.ts` owns desktop setup and teardown.
`make test` and `make check` do not execute this separate Node-based suite.
+- **macOS:** uses the real SwiftUI settings with synthetic data in an isolated
+ bundle. Covers setup navigation, autosave, recent text and correction memory.
+ See [native setup and coverage](../macos/Tests/Midscene/README.md).
- **Ubuntu:** runs the real GTK onboarding UI with a synthetic fixture on an
isolated Xvfb desktop. Sign-in and endpoint responses are simulated. The
separate `ubuntu-polishing` project covers the native polishing overlay.
diff --git a/tests/contracts/test_pages_report_history.mjs b/tests/contracts/test_pages_report_history.mjs
index 238e4a1..2da2b2e 100644
--- a/tests/contracts/test_pages_report_history.mjs
+++ b/tests/contracts/test_pages_report_history.mjs
@@ -16,6 +16,7 @@ import { verifyPublishedReport } from '../../scripts/verify-pages-report.mjs';
test('publishes the Markdown evidence table for same-repository pull requests', async () => {
for (const workflow of [
+ 'midscene-macos.yml',
'midscene-ubuntu-22.04.yml',
'midscene-omarchy-4.0.3.yml',
]) {
@@ -37,38 +38,21 @@ test('publishes the Markdown evidence table for same-repository pull requests',
}
});
-test('records every shard and renders the Summary before Pages deployment', async () => {
+test('runs each platform serially and uploads reports without shard aggregation', async () => {
for (const workflow of [
'midscene-ubuntu-22.04.yml',
'midscene-omarchy-4.0.3.yml',
]) {
const source = await readFile(
- new URL(`../../.github/workflows/${workflow}`, import.meta.url),
- 'utf8',
- );
- assert.match(source, /Record shard result for report aggregation/);
- assert.match(
- source,
- /if: always\(\) && !cancelled\(\)/,
- `${workflow} must preserve failure evidence without extending manually cancelled runs`,
- );
- assert.match(
- source,
- /^\s*max-parallel: 5$/m,
- `${workflow} must run its independent VM shards in parallel`,
+ new URL(`../../.github/workflows/${workflow}`, import.meta.url), 'utf8',
);
+ assert.doesNotMatch(source, /matrix:|max-parallel:|report-bundle:|shard-[1-4]/);
+ assert.match(source, /Record project results for report aggregation/);
+ assert.match(source, /if: always\(\) && !cancelled\(\)/);
assert.match(source, /if-no-files-found: error/);
- assert.match(source, /Create bundle even when every shard failed early/);
- assert.match(
- source,
- /Upload .*shard report[\s\S]*?overwrite: true/,
- `${workflow} must replace a rerun shard artifact instead of keeping duplicate names`,
- );
- assert.match(
- source,
- /Upload combined report bundle[\s\S]*?overwrite: true/,
- `${workflow} must replace the previous attempt's combined bundle`,
- );
+ assert.match(source, /id: report[\s\S]*?overwrite: true/);
+ assert.match(source, /include-hidden-files: true/);
+ assert.match(source, /Write test results to Summary/);
}
const deploy = await readFile(
@@ -99,47 +83,19 @@ test('records every shard and renders the Summary before Pages deployment', asyn
);
});
-test('rerun aggregation excludes the previous combined report artifact', async () => {
- const source = await readFile(
- new URL('../../.github/workflows/midscene-omarchy-4.0.3.yml', import.meta.url),
- 'utf8',
- );
- assert.match(source, /pattern: omarchy-midscene-omarchy-\*/);
- assert.doesNotMatch(source, /pattern: omarchy-midscene-\*\s*$/m);
-});
-
-test('assigns every product case to exactly one balanced shard', async () => {
- const shardCounts = new Map();
+test('retains all product cases without shard tags or project filters', async () => {
let caseCount = 0;
- for (const file of [
- 'onboarding.yaml',
- 'onboarding-regressions.yaml',
- 'runtime.yaml',
- ]) {
- const source = await readFile(
- new URL(`../e2e/cases/${file}`, import.meta.url),
- 'utf8',
- );
- const cases = source
- .split(/(?=^ - name:)/m)
- .filter((section) => section.startsWith(' - name:'));
- for (const testCase of cases) {
- const tags = [...testCase.matchAll(/^ tags: \[([^\]]+)\]$/gm)];
- assert.equal(tags.length, 1, testCase.split('\n')[0]);
- const shards = tags[0][1].split(',').map((tag) => tag.trim())
- .filter((tag) => /^shard-[1-4]$/.test(tag));
- assert.equal(shards.length, 1, testCase.split('\n')[0]);
- shardCounts.set(shards[0], (shardCounts.get(shards[0]) ?? 0) + 1);
- caseCount += 1;
- }
+ for (const file of ['onboarding.yaml', 'onboarding-regressions.yaml', 'runtime.yaml']) {
+ const source = await readFile(new URL(`../e2e/cases/${file}`, import.meta.url), 'utf8');
+ assert.doesNotMatch(source, /shard-[1-4]/);
+ caseCount += [...source.matchAll(/^ - name:/gm)].length;
}
assert.equal(caseCount, 14);
- assert.deepEqual(Object.fromEntries(shardCounts), {
- 'shard-1': 2,
- 'shard-2': 3,
- 'shard-3': 5,
- 'shard-4': 4,
- });
+ const config = await readFile(new URL('../e2e/midscene.config.ts', import.meta.url), 'utf8');
+ const product = config.slice(config.indexOf('const productProject'), config.indexOf('export default'));
+ assert.match(product, /files: \{ include: productCaseFiles \}/);
+ assert.doesNotMatch(product, /tags:/);
+ assert.match(config, /maxConcurrency: 1/);
});
test('keeps visual E2E interactions at task level with proven tap exceptions', async () => {
@@ -166,10 +122,7 @@ test('keeps visual E2E interactions at task level with proven tap exceptions', a
'- aiTap: The blue Simulate successful sign-in button in the CI-only modal, around 50% width and 43% screen height',
'- aiTap: Check microphone · 3 seconds button on the Microphone step',
'- aiTap: Right-arrow Next button in the fixed top navigation',
- '- aiScroll:',
- '- aiScroll:',
'- aiTap: Test endpoint button in the Voice polishing section',
- '- aiScroll:',
'- aiTap: Right-arrow Next button in the fixed top navigation',
'- aiTap: Start voice test button',
'- aiTap: Finish & check result button',
@@ -189,20 +142,12 @@ test('keeps visual E2E interactions at task level with proven tap exceptions', a
'- computer.selectTriggerPreset: { preset: F8 }',
'- aiTap: Right-arrow Next button in the fixed top navigation',
'- aiTap: Left-arrow Previous button in the fixed top navigation',
- '- aiScroll:',
'- aiTap: The blue enabled switch to the right of the Voice polishing heading',
'- aiTap: The gray disabled switch to the right of the Voice polishing heading',
- '- aiScroll:',
- '- aiScroll:',
'- computer.inputText: { target: The editable text field to the right of Model containing synthetic-model, value: ci-fail-model }',
- '- aiScroll:',
'- aiTap: Test endpoint button in the Voice polishing section',
- '- aiScroll:',
- '- aiScroll:',
'- computer.inputText: { target: The editable text field to the right of Model containing ci-fail-model, value: ci-ok-model }',
- '- aiScroll:',
'- aiTap: Test failed — try again button in the Voice polishing section',
- '- aiScroll:',
'- aiTap: Right-arrow Next button in the fixed top navigation',
'- aiTap: Right-arrow Next button in the fixed top navigation',
'- aiScroll:',
@@ -771,7 +716,7 @@ test('keeps a complete Markdown table when a shard produces no native report', a
summaryTitle: 'Ubuntu',
});
assert.match(summary, /ubuntu-shard-1 visual case/);
- assert.match(summary, /ubuntu-shard-2 CI shard/);
+ assert.match(summary, /ubuntu-shard-2 CI project/);
assert.match(summary, /CI failure before node capture/);
assert.match(summary, /workflow setup before test execution/);
assert.doesNotMatch(summary, /runner-step=.*infrastructure-ubuntu-shard-2/);
@@ -781,7 +726,7 @@ test('uses a failure row when node evidence extraction fails', async (context) =
const root = await mkdtemp(path.join(os.tmpdir(), 'pages-capture-failed-'));
const reportDirectory = await fixtureDirectory(root);
await writeFile(
- path.join(reportDirectory, 'ci-shard-status-ubuntu.json'),
+ path.join(reportDirectory, 'ci-project-status-ubuntu.json'),
JSON.stringify({
project: 'ubuntu',
result: 'failure',
@@ -1512,14 +1457,16 @@ test('renders Rome-style passed-case appendix with linked screenshots', () => {
summary,
/index\.html#runner-step=case-ubuntu%3Asteps%3A8/,
);
- assert.match(summary, /\| Shard \| Case \| Screenshot \| Status \| Duration \|/);
+ assert.match(summary, /\| Project \| Case \| Screenshot \| Status \| Duration \| Report \|/);
assert.match(summary, /\| ubuntu \| \[Launch and finish onboarding\].*\| ✅ Passed \| 1m13s \|/);
assert.match(summary, /\| ubuntu-polishing \| \[Polish selected text\].*\| ✅ Passed \| 52s \|/);
assert.match(
summary,
/<img src="[^"]*case-preview-ubuntu-case-ubuntu\.jpg"[^>]*width="160">/,
);
- assert.match(summary, /<summary>Appendix: passed cases \(2\)<\/summary>/);
+ assert.match(summary, /### Passed cases \(2\)/);
+ assert.doesNotMatch(summary, /<details>/);
+ assert.equal((summary.match(/\[Open report\]\(/g) ?? []).length, 2);
assert.match(summary, /Open the published HTML report/);
});
@@ -1568,7 +1515,7 @@ test('renders singular failure copy for one available report', () => {
assert.match(summary, /Ubuntu × Midscene · failure captured/);
assert.match(summary, /\*\*1 need attention · 0 passed\*\*/);
assert.match(summary, /### Needs attention/);
- assert.match(summary, /\| Shard \| Case \| Screenshot \| Status \/ reason \| Duration \|/);
+ assert.match(summary, /\| Project \| Case \| Screenshot \| Status \/ reason \| Duration \| Report \|/);
assert.match(summary, /\| ubuntu \| \[Broken flow\]/);
assert.match(summary, /<img src="[^"]*case-preview-ubuntu-case-fail\.jpg"[^>]*width="160">/);
assert.match(
@@ -1580,7 +1527,7 @@ test('renders singular failure copy for one available report', () => {
/index\.html#runner-step=case-fail%3Asteps%3A2/,
);
assert.match(summary, /case-preview-ubuntu-case-fail\.jpg/);
- assert.match(summary, /<summary>Appendix: passed cases \(0\)<\/summary>/);
+ assert.match(summary, /### Passed cases \(0\)/);
});
test('selects the last screenshot for success and first failed screenshot for failure', async () => {
@@ -1842,7 +1789,7 @@ test('publishes all case metadata when one report has no node screenshot', async
assert.match(summary, /1 need attention · 0 passed/);
assert.match(summary, /### Needs attention/);
assert.match(summary, /\| ubuntu \| \[ubuntu damaged-agent case\].*\| — \| ❌ Failed:/);
- assert.match(summary, /Appendix: passed cases \(0\)/);
+ assert.match(summary, /Passed cases \(0\)/);
assert.match(summary, /ubuntu damaged-agent case/);
});
diff --git a/tests/contracts/test_release.py b/tests/contracts/test_release.py
index eae1e38..dab45a4 100644
--- a/tests/contracts/test_release.py
+++ b/tests/contracts/test_release.py
@@ -1,6 +1,7 @@
import hashlib
import importlib.util
import json
+import os
from pathlib import Path
import tempfile
import unittest
@@ -49,7 +50,7 @@ class ReleaseTest(unittest.TestCase):
notes = (ROOT / "RELEASE_NOTES.md").read_text()
self.assertIn("--notes-file RELEASE_NOTES.md", workflow)
self.assertNotIn("--generate-notes", workflow)
- for expected in ("Doubao Say 1.8.0", "ChatGPT", "accessibility", "clipboard", "microphone"):
+ for expected in ("Doubao Say 1.8.1", "ChatGPT", "accessibility", "clipboard", "microphone"):
self.assertIn(expected, " ".join(notes.split()))
def test_both_archives_exclude_ignored_source_files(self):
@@ -143,3 +144,49 @@ class ReleaseTest(unittest.TestCase):
text=True, capture_output=True)
self.assertIn("--check", result.stdout)
self.assertIn("--enable", result.stdout)
+
+
+class ArchSourceInstallerTest(unittest.TestCase):
+ @unittest.skipIf(os.geteuid() == 0, "Installers require a normal desktop user")
+ def test_source_installers_install_auth_dependencies_before_preflight(self):
+ for script in ("install.sh", "setup-omarchy.sh"):
+ with self.subTest(script=script), tempfile.TemporaryDirectory() as folder:
+ root = Path(folder)
+ commands = root / "bin"
+ commands.mkdir()
+ target = root / script
+ target.write_text((ROOT / script).read_text())
+ stubs = {
+ "uname": "echo Linux",
+ "pacman": 'case "$2" in python-pyjwt|python-cryptography) exit 1;; esac',
+ "omarchy": 'printf "%s\\n" "$@" > "$INSTALL_TEST_LOG"',
+ "python3": "exit 0",
+ "id": "echo input",
+ }
+ for name, body in stubs.items():
+ command = commands / name
+ command.write_text("#!/bin/bash\n" + body + "\n")
+ command.chmod(0o755)
+ preflight = root / "start.sh"
+ preflight.write_text(
+ '#!/bin/bash\nset -eu\n'
+ 'grep -qx python-pyjwt "$INSTALL_TEST_LOG"\n'
+ 'grep -qx python-cryptography "$INSTALL_TEST_LOG"\n'
+ )
+ preflight.chmod(0o755)
+ log = root / "installed.txt"
+ env = {**os.environ, "PATH": f"{commands}:{os.environ['PATH']}",
+ "INSTALL_TEST_LOG": str(log)}
+ if script == "install.sh":
+ check = subprocess.run(["bash", str(target), "--check"], env=env,
+ capture_output=True, text=True)
+ self.assertEqual(check.returncode, 1)
+ self.assertIn("python-pyjwt python-cryptography", check.stdout)
+ self.assertFalse(log.exists(), "--check must not install packages")
+ result = subprocess.run(
+ ["bash", str(target)] + (["--yes"] if script == "install.sh" else []),
+ env=env, capture_output=True, text=True,
+ )
+ self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
+ self.assertIn("python-pyjwt", log.read_text().splitlines())
+ self.assertIn("python-cryptography", log.read_text().splitlines())
diff --git a/tests/contracts/test_version_check.py b/tests/contracts/test_version_check.py
index 27bdd72..b9051ce 100644
--- a/tests/contracts/test_version_check.py
+++ b/tests/contracts/test_version_check.py
@@ -11,13 +11,13 @@ SPEC.loader.exec_module(VERSION_CHECK)
class VersionCheckTests(unittest.TestCase):
def test_sources_are_aligned_at_current_release(self):
- self.assertEqual(VERSION_CHECK.validate(root=ROOT), "1.8.0")
+ self.assertEqual(VERSION_CHECK.validate(root=ROOT), "1.8.1")
def test_exact_release_tag_is_accepted(self):
- self.assertEqual(VERSION_CHECK.validate("v1.8.0", ROOT), "1.8.0")
+ self.assertEqual(VERSION_CHECK.validate("v1.8.1", ROOT), "1.8.1")
def test_wrong_release_tag_is_rejected(self):
- with self.assertRaisesRegex(ValueError, "must be 'v1.8.0'"):
+ with self.assertRaisesRegex(ValueError, "must be 'v1.8.1'"):
VERSION_CHECK.validate("v1.1.0", ROOT)
diff --git a/tests/e2e/README.md b/tests/e2e/README.md
index 0afdebf..058c3f8 100644
--- a/tests/e2e/README.md
+++ b/tests/e2e/README.md
@@ -1,22 +1,15 @@
-# Midscene E2E by Linux distribution
+# Midscene desktop E2E
-GitHub Actions exposes two distribution-named suites: `Ubuntu 22.04` and
+The native macOS suite is documented in [macOS Midscene settings E2E](../../macos/Tests/Midscene/README.md). Run it with `npm run test:macos -- --project macos-settings`; it uses a separate config and isolated native fixture, not the Linux desktop setup.
+
+GitHub Actions exposes two Linux distribution-named suites: `Ubuntu 22.04` and
`Omarchy 4.0.3`. The Omarchy suite also checks the real desktop shell visually.
-> **Scheduling (2026-09).** The Volcengine Ark endpoint behind
-> `MIDSCENE_MODEL_*` has been rate-limited to roughly 25–35 RPM. Running both
-> five-job visual workflows at once previously exhausted that quota:
->
-> - the Ubuntu 22.04 workflow runs only via **Actions → Run workflow**
-> (`workflow_dispatch`); its push/pull-request triggers were removed from the
-> `on:` block but everything else (matrix, polishing, Pages) is unchanged;
-> - the Omarchy workflow runs five independent VM jobs in parallel again, as
-> requested on 2026-09-25. Its model-call retries remain enabled, but 429
-> errors may recur until the endpoint quota is raised.
->
-> To restore Ubuntu automatic runs as well, reinstate its previous
-> `push`/`pull_request` trigger block from git history. Running both workflows
-> in parallel needs an endpoint quota of at least ~150 RPM / ~1M TPM.
+Each platform runs in one Actions job. Product cases and the platform's auxiliary
+project run serially, without matrix shards. Ubuntu remains manual-only;
+Omarchy runs on relevant pushes and same-repository pull requests. The shared
+Linux concurrency group queues workflows that use the same model quota.
+The job budget is 240 minutes, with 220 minutes reserved for visual execution.
The image-builder CI proves that a GitHub-hosted runner can install the exact
official Omarchy ISO in a headless QEMU/KVM VM. It reuses Omarchy's own ISO
@@ -68,23 +61,22 @@ The Ubuntu workflow runs the deterministic GTK fixture through
and `@midscene/computer`. Pull requests from forks are skipped because GitHub
does not expose the required model secret to untrusted workflow code.
-Both distributions execute the same 13 declarative product cases from
+Both distributions execute the same 14 declarative product cases from
`cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, and
`cases/runtime.yaml`, including synthetic microphone, voice, regression, and
post-setup dictation checks. `midscene.config.ts` passes each case
-identity to a fresh fixture. Four duration-balanced shards run in isolated
-Actions jobs, each with its own Xvfb desktop or Omarchy VM, while cases inside
-one shard remain serial so window focus cannot leak between tests. The shards
-run in parallel (`max-parallel: 5`). The config prepares the GTK fixture or
+identity to a fresh fixture. `ubuntu-product` and `omarchy-product` each include
+all product case files without tag filtering. Projects and cases run serially
+so window focus cannot leak between tests. The config prepares the GTK fixture or
Omarchy VNC viewer, and resets that state for every retry. Custom `shell.*`
Nodes prepare the real Omarchy menu and bar; `cases/omarchy-shell.yaml` keeps
the three pixel-level assertions explicit. Run `npm run nodes` in this
directory to regenerate the Node reference, or
-`npm test -- --project ubuntu-shard-1` on a prepared Linux desktop.
+`npm test -- --project ubuntu-product` on a prepared Linux desktop.
Projects use Midscene Test's case-level `retry` setting, so a failed model
attempt is rerun with a fresh fixture while successful cases are kept. Every
attempt remains visible in the generated report.
-Each shard writes a Midscene Test HTML report under `midscene_run/report/`.
+Each project writes a Midscene Test HTML report under `midscene_run/report/`.
CI keeps the native reports separate, then aggregates their cases into one
evidence table. Every row links to its exact native report node. A failed
project captures its first failing screenshot, so the summary shows the
@@ -158,10 +150,12 @@ synthetic callbacks. They do not establish live ASR, recording, durable
credential persistence, system-wide shortcut capture, clipboard paste, or
delivery into an unrelated application.
-Run `npm test -- --project ubuntu-shard-1` with the system dependencies and
-model configuration from the Ubuntu workflow. Replace the final number with
-`2`, `3`, or `4` to run another duration-balanced shard. Omarchy uses the
-matching `omarchy-shard-*` projects and a separate shell project.
+Run `npm test -- --project ubuntu-product` with the system dependencies and
+model configuration from the Ubuntu workflow. The complete Ubuntu job also
+runs `ubuntu-polishing`. Omarchy runs `omarchy-product` and `omarchy-shell`
+sequentially inside one VM session. Each invocation keeps its own native report;
+a failed product invocation does not suppress the auxiliary project.
+Focused manual runs can still select a product, auxiliary, or provider project.
## Polishing overlay regression
diff --git a/tests/e2e/cases/macos-settings.yaml b/tests/e2e/cases/macos-settings.yaml
new file mode 100644
index 0000000..4dbd91e
--- /dev/null
+++ b/tests/e2e/cases/macos-settings.yaml
@@ -0,0 +1,44 @@
+cases:
+ - name: macOS setup navigation and signed-in account
+ steps:
+ - aiAssert: The native Doubao Say settings window is visible. Setup is selected, Step 1 / 4 is displayed, and Signed in to Doubao has a green checkmark. There is no Sign in to Doubao button.
+ - aiAct: Click Shortcut in the horizontal setup steps at the top of the content area, without enabling or changing any shortcut.
+ - aiAssert: The content shows Step 3 / 4 and Shortcut ready. The left sidebar remains on Setup.
+ - aiAct: Click Recognition in the horizontal setup steps to return to the first step.
+ - aiAssert: Step 1 / 4 and Signed in to Doubao are visible again. The Setup sidebar row has no rectangular keyboard focus outline.
+
+ - name: macOS shortcut settings autosave across navigation
+ steps:
+ - aiAct: Open Shortcuts from the left sidebar. Toggle Double-tap sends Enter when idle once.
+ - aiWaitFor:
+ prompt: Automatically saved is visible in the footer.
+ options: { timeoutMs: 10000 }
+ - aiAssert: There is no Save settings button. The footer says Automatically saved.
+ - aiAct: Open Recent text in the left sidebar, then return to Shortcuts.
+ - aiAssert: The Double-tap sends Enter when idle checkbox is unchecked.
+
+ - name: macOS recent text padding and editing
+ steps:
+ - aiAct: Open Recent text from the left sidebar.
+ - aiAssert: The text editor shows First line must be fully visible. as its first line, completely readable with space above it and no clipping. Synthetic recent dictation. is on the second line.
+ - aiAct: Replace the contents of the recent text editor with Midscene native Mac test. Do not click Copy or Retry.
+ - aiAssert: The text editor displays Midscene native Mac test.
+ - aiAct: Click Clear below the recent text editor.
+ - aiAssert: The recent text editor is empty.
+
+ - name: macOS vocabulary autosave across navigation
+ steps:
+ - aiAct: Open Personal vocabulary from the left sidebar. Replace the vocabulary editor contents with Midscene and NativeTestWord on separate lines.
+ - aiWaitFor:
+ prompt: Vocabulary saved automatically. is visible.
+ options: { timeoutMs: 10000 }
+ - aiAct: Open Input history, then return to Personal vocabulary.
+ - aiAssert: The vocabulary editor still contains Midscene and NativeTestWord on separate lines.
+ - name: macOS explicit correction preview and memory
+ steps:
+ - aiAct: Open Input history and click Correct & remember on the synthetic Use Midjourney for UI tests. entry. Fill Misrecognized word or phrase with Midjourney and Correct spelling with Midscene. Do not confirm yet.
+ - aiAssert: The correction dialog previews Use Midscene for UI tests. and has Confirm & remember and Cancel buttons.
+ - aiAct: Click Confirm & remember in the correction dialog.
+ - aiAssert: The main Doubao Say settings window remains open on Input history. The modal sheet titled Confirm & remember a correction is no longer present. The history entry shows Use Midscene for UI tests. and Correction confirmed by you.
+ - aiAct: Open Personal vocabulary and scroll down to Confirmed corrections if needed.
+ - aiAssert: A remembered correction from Midjourney to Midscene is visible.
diff --git a/tests/e2e/cases/onboarding-regressions.yaml b/tests/e2e/cases/onboarding-regressions.yaml
index 955783b..87cf6b9 100644
--- a/tests/e2e/cases/onboarding-regressions.yaml
+++ b/tests/e2e/cases/onboarding-regressions.yaml
@@ -1,6 +1,5 @@
cases:
- name: Cancel sign-in and retry
- tags: [shard-1]
steps:
- aiAssert: The current step is Sign in, the page says Not signed in, and the large blue Open Doubao sign-in button is visible.
- aiTap: The large blue full-width Open Doubao sign-in button near the bottom of the central Sign in panel, around 50% width and 73% screen height
@@ -23,7 +22,6 @@ cases:
- aiAssert: The visible Doubao Say page is the Microphone step with Synthetic microphone one selected.
- name: Preserve signed-in account across backward navigation
- tags: [shard-4]
steps:
- aiAssert: The visible Doubao Say window starts on the Sign in step and says the user is not signed in.
- aiTap: The large blue full-width Open Doubao sign-in button near the bottom of the central Sign in panel, around 50% width and 73% screen height
@@ -43,7 +41,6 @@ cases:
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- name: Require an enabled trigger and retain the replacement
- tags: [shard-4]
steps:
- fixture.prepare: { mode: trigger-settings }
- aiAssert: The Trigger key step shows Choose how to start speaking and Voice polishing is enabled.
@@ -66,62 +63,40 @@ cases:
- aiAssert: The Trigger key step still shows Active trigger F8 and F8 is selected in the trigger dropdown.
- name: Toggle polishing without losing configuration
- tags: [shard-3]
steps:
- fixture.prepare: { mode: trigger-settings }
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 500 }
- - aiWaitFor:
- prompt: The Trigger key step and the Voice polishing switch are visible.
- options: { timeoutMs: 30000, checkIntervalMs: 1000 }
+ - aiAct: Scroll within the Trigger key panel until the Voice polishing heading and its switch are fully visible. Do not change any settings.
- aiTap: The blue enabled switch to the right of the Voice polishing heading
- aiWaitFor:
prompt: The Voice polishing switch is gray and off, and the text Voice polishing disabled. appears below it; the Base URL and Model inputs are not shown.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- aiAssert: Voice polishing disabled. is visible and the polishing settings are collapsed.
- aiTap: The gray disabled switch to the right of the Voice polishing heading
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 500 }
- - aiWaitFor:
- prompt: Voice polishing is enabled and its Model input is visible.
- options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- - aiAssert: The blue Voice polishing switch is on, and the Model text field visibly reads synthetic-model.
+ - aiAssert: The Voice polishing switch is blue and on.
+ - aiAct: Scroll within the Trigger key panel only if necessary to bring the Model text field fully into view. Do not change any settings.
+ - aiAssert: The Model text field visibly reads synthetic-model.
- name: Recover from an endpoint failure
- tags: [shard-2]
steps:
- fixture.prepare: { mode: trigger-settings }
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 500 }
+ - aiAct: Scroll within the Trigger key panel until the Model text field in Voice polishing is fully visible. Do not change any settings.
- computer.inputText: { target: The editable text field to the right of Model containing synthetic-model, value: ci-fail-model }
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 300 }
- - aiWaitFor:
- prompt: The entire Test endpoint button in Voice polishing is visible inside the scrolling panel, above the fixed Vocabulary & history button. The small model recommendation text is not the target.
- options: { timeoutMs: 30000, checkIntervalMs: 1000 }
+ - aiAct: Scroll within the Trigger key panel only if necessary to bring the entire Test endpoint button into view above the fixed Vocabulary & history button.
- aiTap: Test endpoint button in the Voice polishing section
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 300 }
+ - aiAct: Scroll within the Trigger key panel only if necessary to reveal the endpoint result immediately below the test button.
- aiWaitFor:
prompt: The endpoint feedback contains Synthetic endpoint unavailable and the retry button says Test failed — try again.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- - aiScroll:
- options: { direction: up, scrollType: singleAction, distance: 300 }
+ - aiAct: Scroll within the Trigger key panel only if necessary to bring the Model text field fully into view.
- computer.inputText: { target: The editable text field to the right of Model containing ci-fail-model, value: ci-ok-model }
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 300 }
- - aiWaitFor:
- prompt: The entire Test failed — try again button is visible in Voice polishing, above the fixed Vocabulary & history button.
- options: { timeoutMs: 30000, checkIntervalMs: 1000 }
+ - aiAct: Scroll within the Trigger key panel only if necessary to bring the entire Test failed — try again button into view above the fixed Vocabulary & history button.
- aiTap: Test failed — try again button in the Voice polishing section
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 300 }
+ - aiAct: Scroll within the Trigger key panel only if necessary to reveal the endpoint result immediately below the test button.
- aiWaitFor:
prompt: The endpoint result contains Synthetic endpoint response and the button says Endpoint works.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- name: Microphone check gates setup completion
- tags: [shard-4]
steps:
- fixture.prepare: { mode: microphone-gate }
- aiAssert: The visible Doubao Say window starts on the Microphone step, shows Synthetic microphone one, and offers Check microphone · 3 seconds.
@@ -162,7 +137,6 @@ cases:
- aiAssert: The Finish setup button is visibly enabled.
- name: Complete and cancel a voice test safely
- tags: [shard-3]
steps:
- fixture.prepare: { mode: voice-test }
- aiWaitFor:
@@ -194,7 +168,6 @@ cases:
- aiAssert: Start voice test is available again, and the enabled setup control says Voice test passed and nothing pasted or sent.
- name: Switch to Volcengine and validate credentials
- tags: [shard-3]
steps:
- fixture.prepare: { mode: volcengine }
- aiTap: The Recognition service dropdown currently showing Doubao account
@@ -218,7 +191,7 @@ cases:
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- name: Switch to Deepgram English recognition
- tags: [shard-3, provider]
+ tags: [provider]
steps:
- fixture.prepare: { mode: deepgram }
- aiAct: Switch the Recognition service from Doubao account to Deepgram Nova-3 (English).
@@ -247,7 +220,6 @@ cases:
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- name: Changing microphone requires another check
- tags: [shard-2]
steps:
- fixture.prepare: { mode: microphone-change }
- aiTap: The microphone dropdown currently showing Synthetic microphone one
@@ -292,7 +264,6 @@ cases:
- aiAssert: The Finish setup button is visibly enabled.
- name: Capture and retain a custom trigger shortcut
- tags: [shard-2]
steps:
- fixture.prepare: { mode: shortcut-capture }
- aiTap: The trigger selection dropdown currently showing fn
diff --git a/tests/e2e/cases/onboarding.yaml b/tests/e2e/cases/onboarding.yaml
index 222df24..53c4511 100644
--- a/tests/e2e/cases/onboarding.yaml
+++ b/tests/e2e/cases/onboarding.yaml
@@ -1,6 +1,5 @@
cases:
- name: Complete Doubao Say onboarding on a real desktop
- tags: [shard-1]
steps:
- aiAssert: The visible Doubao Say window is on Sign in and says the user is not signed in.
- aiTap: The large blue full-width Open Doubao sign-in button near the bottom of the central Sign in panel, around 50% width and 73% screen height
@@ -18,22 +17,16 @@ cases:
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- aiAssert: The visible microphone result says Microphone is working.
- aiTap: Right-arrow Next button in the fixed top navigation
- - aiScroll:
- options:
- direction: down
- scrollType: singleAction
- distance: 500
+ - aiAct: Scroll within the Trigger key panel to How polishing works and model tips, then expand it and reveal the model recommendations.
- aiWaitFor:
prompt: The Trigger key page visibly recommends a small, fast Voice polishing model with thinking off, names DeepSeek Flash and Gemini 2.5 Flash-Lite, and warns that large reasoning models may exceed five seconds and fall back to the original text.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 300 }
+ - aiAct: Collapse How polishing works and model tips, then scroll within the Trigger key panel until the entire Test endpoint button is visible above Vocabulary & history.
- aiWaitFor:
prompt: The entire Test endpoint button in Voice polishing is visible inside the scrolling panel, above the fixed Vocabulary & history button. The small model recommendation text is not the target.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- aiTap: Test endpoint button in the Voice polishing section
- - aiScroll:
- options: { direction: down, scrollType: singleAction, distance: 300 }
+ - aiAct: Scroll within the Trigger key panel only if necessary to reveal the endpoint result immediately below the test button.
- aiWaitFor:
prompt: The Voice polishing result says Endpoint works and includes Synthetic endpoint response.
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
diff --git a/tests/e2e/cases/runtime.yaml b/tests/e2e/cases/runtime.yaml
index 266f3ca..8fcc9e7 100644
--- a/tests/e2e/cases/runtime.yaml
+++ b/tests/e2e/cases/runtime.yaml
@@ -1,6 +1,5 @@
cases:
- name: Deliver one synthetic dictation to the focused target
- tags: [shard-3]
steps:
- fixture.prepare: { mode: runtime-delivery }
- aiAssert: A Synthetic dictation target window is focused, its text field is empty, and the status says Idle with 0 deliveries.
@@ -15,7 +14,6 @@ cases:
options: { timeoutMs: 30000, checkIntervalMs: 1000 }
- aiAssert: The target field contains exactly Synthetic dictation delivered exactly once, and the status says Delivered once with 1 delivery.
- name: Cancel synthetic dictation without delivering text
- tags: [shard-4]
steps:
- fixture.prepare: { mode: runtime-cancel }
- aiAssert: A Synthetic dictation target window is focused, its text field is empty, and the status says Idle with 0 deliveries.
diff --git a/tests/e2e/macos-device.ts b/tests/e2e/macos-device.ts
new file mode 100644
index 0000000..3f79b02
--- /dev/null
+++ b/tests/e2e/macos-device.ts
@@ -0,0 +1,30 @@
+import { execFile } from 'node:child_process';
+import { mkdtemp, readFile, rm } from 'node:fs/promises';
+import { tmpdir } from 'node:os';
+import { join } from 'node:path';
+import { promisify } from 'node:util';
+import { ComputerDevice } from '@midscene/computer';
+
+const run = promisify(execFile);
+
+// screenshot-desktop can miss the hosted virtual display in system_profiler.
+// Capture the real primary display with the system tool in that specific case.
+export class MacComputerDevice extends ComputerDevice {
+ override async screenshotBase64(): Promise<string> {
+ try { return await super.screenshotBase64(); }
+ catch (error) {
+ if (process.platform !== 'darwin' || process.env.MIDSCENE_MACOS_DISPLAY_ID ||
+ !(error instanceof Error) || !error.message.includes('No displays detected')) throw error;
+ const directory = await mkdtemp(join(tmpdir(), 'doubao-midscene-screen-'));
+ try {
+ const path = join(directory, 'primary.png');
+ await run('/usr/sbin/screencapture', ['-x', '-D', '1', '-t', 'png', path], { timeout: 10_000 });
+ const data = await readFile(path);
+ if (!data.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]))) {
+ throw new Error('Native display capture did not produce a PNG');
+ }
+ return `data:image/png;base64,${data.toString('base64')}`;
+ } finally { await rm(directory, { recursive: true, force: true }); }
+ }
+ }
+}
diff --git a/tests/e2e/midscene-node-reference.md b/tests/e2e/midscene-node-reference.md
index ffa536c..5048811 100644
--- a/tests/e2e/midscene-node-reference.md
+++ b/tests/e2e/midscene-node-reference.md
@@ -36,21 +36,9 @@ Projects created by `midscene-test create` select `cases/**/*.{yaml,yml}` by def
**Case files:** `cases/polishing.yaml` (Execution Project: ubuntu-polishing)
-**Case files:** `cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, `cases/runtime.yaml` (Execution Project: ubuntu-shard-1)
+**Case files:** `cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, `cases/runtime.yaml` (Execution Project: ubuntu-product)
-**Case files:** `cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, `cases/runtime.yaml` (Execution Project: ubuntu-shard-2)
-
-**Case files:** `cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, `cases/runtime.yaml` (Execution Project: ubuntu-shard-3)
-
-**Case files:** `cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, `cases/runtime.yaml` (Execution Project: ubuntu-shard-4)
-
-**Case files:** `cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, `cases/runtime.yaml` (Execution Project: omarchy-shard-1)
-
-**Case files:** `cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, `cases/runtime.yaml` (Execution Project: omarchy-shard-2)
-
-**Case files:** `cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, `cases/runtime.yaml` (Execution Project: omarchy-shard-3)
-
-**Case files:** `cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, `cases/runtime.yaml` (Execution Project: omarchy-shard-4)
+**Case files:** `cases/onboarding.yaml`, `cases/onboarding-regressions.yaml`, `cases/runtime.yaml` (Execution Project: omarchy-product)
**Case files:** `cases/omarchy-shell.yaml` (Execution Project: omarchy-shell)
diff --git a/tests/e2e/midscene.config.ts b/tests/e2e/midscene.config.ts
index 6d3f540..864d2fa 100644
--- a/tests/e2e/midscene.config.ts
+++ b/tests/e2e/midscene.config.ts
@@ -321,14 +321,12 @@ const productCaseFiles = [
'cases/runtime.yaml',
] as const;
-const productShardProjects = (environment: 'ubuntu' | 'omarchy') =>
- [1, 2, 3, 4].map((shard) => ({
- name: `${environment}-shard-${shard}`,
- retry: 2,
- setup,
- files: { include: productCaseFiles },
- tags: { include: [`shard-${shard}`] },
- }));
+const productProject = (environment: 'ubuntu' | 'omarchy') => ({
+ name: `${environment}-product`,
+ retry: 2,
+ setup,
+ files: { include: productCaseFiles },
+});
export default defineTestProject<DesktopContext>({
test: { maxConcurrency: 1, testTimeout: 8 * 60_000 },
@@ -341,8 +339,8 @@ export default defineTestProject<DesktopContext>({
setup,
files: { include: ['cases/polishing.yaml'] },
},
- ...productShardProjects('ubuntu'),
- ...productShardProjects('omarchy'),
+ productProject('ubuntu'),
+ productProject('omarchy'),
{
name: 'ubuntu-providers',
retry: 2,
diff --git a/tests/e2e/midscene.macos.config.ts b/tests/e2e/midscene.macos.config.ts
new file mode 100644
index 0000000..aba3b63
--- /dev/null
+++ b/tests/e2e/midscene.macos.config.ts
@@ -0,0 +1,132 @@
+import { spawn, execFileSync, type ChildProcess } from 'node:child_process';
+import { mkdir, rm } from 'node:fs/promises';
+import { homedir } from 'node:os';
+import { resolve } from 'node:path';
+import { ComputerAgent, checkAccessibilityPermission, checkScreenRecordingPermission } from '@midscene/computer';
+import { defineProjectSetup, defineTestProject } from '@midscene/test/config';
+import { createMidsceneNodes } from '@midscene/test/midscene';
+import { MacComputerDevice } from './macos-device';
+
+interface MacContext {
+ start: () => Promise<ComputerAgent>;
+ stop: () => Promise<void>;
+}
+
+async function stopProcess(child?: ChildProcess): Promise<void> {
+ if (!child?.pid || child.exitCode !== null || child.signalCode !== null) return;
+ await new Promise<void>((done) => {
+ const timer = setTimeout(() => child.kill('SIGKILL'), 3000);
+ child.once('exit', () => { clearTimeout(timer); done(); });
+ child.kill('SIGTERM');
+ });
+}
+
+const setup = defineProjectSetup<MacContext>({
+ name: 'isolated-macos-settings',
+ async setup({ onTeardown }) {
+ if (process.platform !== 'darwin') throw new Error('macos-settings requires a logged-in macOS desktop');
+ for (const name of ['MIDSCENE_MODEL_API_KEY', 'MIDSCENE_MODEL_NAME', 'MIDSCENE_MODEL_BASE_URL', 'MIDSCENE_MODEL_FAMILY']) {
+ if (!process.env[name]) throw new Error(`Missing ${name}; visual tests were not run`);
+ }
+ for (const [name, check] of [
+ ['Accessibility', checkAccessibilityPermission(false)],
+ ['Screen Recording', checkScreenRecordingPermission(false)],
+ ] as const) {
+ if (!check.hasPermission) throw new Error(`${name} preflight failed: ${check.error ?? 'grant permission to the test terminal/runner'}`);
+ }
+ const app = resolve(process.env.DOUBAO_MIDSCENE_APP ?? '../../build/macos/midscene/Doubao Midscene Fixture.app');
+ const id = execFileSync('/usr/libexec/PlistBuddy', ['-c', 'Print :CFBundleIdentifier', `${app}/Contents/Info.plist`], { encoding: 'utf8' }).trim();
+ if (!/^md\.lifeos\.doubao-say\.midscene\.[a-f0-9]{32}$/.test(id)) throw new Error('Refusing a non-isolated application bundle');
+ const lock = `${app}.running`;
+ await mkdir(lock); // Refuse concurrent desktop cases using the same profile.
+ let fixture: ChildProcess | undefined;
+ let agent: ComputerAgent | undefined;
+ const stop = async () => {
+ try { await agent?.destroy(); }
+ finally { agent = undefined; await stopProcess(fixture); fixture = undefined; }
+ };
+ onTeardown(async () => {
+ try { await stop(); }
+ finally {
+ // These paths are owned by the randomly generated fixture bundle, never the installed app.
+ try { execFileSync('/usr/bin/defaults', ['delete', id], { stdio: 'ignore' }); }
+ catch { /* A setup failure may leave no preferences domain. */ }
+ await rm(resolve(homedir(), 'Library/Application Support', id), { recursive: true, force: true });
+ await rm(lock, { recursive: true, force: true });
+ }
+ });
+ return {
+ stop,
+ async start() {
+ await stop();
+ fixture = spawn(`${app}/Contents/MacOS/Fixture`, [], {
+ env: { ...process.env, DOUBAO_MIDSCENE_FIXTURE: '1' },
+ stdio: ['ignore', 'pipe', 'pipe'],
+ });
+ const child = fixture;
+ await new Promise<void>((done, fail) => {
+ let output = '';
+ const timer = setTimeout(() => finish(new Error('macOS fixture readiness timed out')), 15_000);
+ const capture = (chunk: Buffer) => {
+ output += chunk.toString();
+ if (output.includes('READY: isolated macOS Midscene fixture')) finish();
+ };
+ const failed = () => finish(new Error('macOS fixture exited before readiness'));
+ function finish(error?: Error) {
+ clearTimeout(timer);
+ child.stdout?.off('data', capture); child.stderr?.off('data', capture);
+ child.off('error', failed); child.off('exit', failed);
+ if (error) fail(error); else done();
+ }
+ child.stdout?.on('data', capture); child.stderr?.on('data', capture);
+ child.once('error', failed); child.once('exit', failed);
+ });
+ const options = {
+ headless: false,
+ displayId: process.env.MIDSCENE_MACOS_DISPLAY_ID,
+ aiContexts: {
+ aiAct: 'Interact only with the foreground Doubao Say settings fixture. Never open other apps, sign in, record audio, test services, copy text, or change system settings. All account and transcript data is synthetic.',
+ aiAssert: 'Judge the visible native Doubao Say settings window only. Do not infer UI success from fixture setup.',
+ },
+ };
+ const device = new MacComputerDevice(options);
+ try {
+ await device.connect();
+ agent = new ComputerAgent(device, options);
+ return agent;
+ } catch (error) {
+ await device.destroy();
+ throw error;
+ }
+ },
+ };
+ },
+});
+
+export default defineTestProject<MacContext>({
+ test: { maxConcurrency: 1, testTimeout: 6 * 60_000 },
+ projects: [{ name: 'macos-settings', retry: 0, setup, files: { include: ['cases/macos-settings.yaml'] } }],
+ nodes: createMidsceneNodes<MacContext>({
+ agentClass: ComputerAgent,
+ agentProvider: (() => {
+ const active = new Map<string, { agent: ComputerAgent; context: MacContext }>();
+ return {
+ async getAgent(runId: string, { context }) {
+ const existing = active.get(runId);
+ if (existing) return existing.agent;
+ const agent = await context.start();
+ active.set(runId, { agent, context });
+ return agent;
+ },
+ async releaseAgent(runId: string) {
+ const entry = active.get(runId);
+ if (!entry) return; // Acquisition failures still run project cleanup.
+ active.delete(runId);
+ await entry.context.stop();
+ if (!entry.agent.reportFile) throw new Error('Missing native visual report');
+ return { reportPath: entry.agent.reportFile };
+ },
+ };
+ })(),
+ }),
+});
diff --git a/tests/e2e/model-rate-gate.mjs b/tests/e2e/model-rate-gate.mjs
index 27ab36b..d82dbe4 100644
--- a/tests/e2e/model-rate-gate.mjs
+++ b/tests/e2e/model-rate-gate.mjs
@@ -1,8 +1,8 @@
import http from 'node:http';
import https from 'node:https';
-// Each GitHub matrix job has one independent VM and one Midscene worker. Pace
-// requests per worker so five concurrent jobs stay below the Ark endpoint RPM.
+// One VM runs the Omarchy projects serially. Keep request pacing conservative
+// because the model quota can also be shared with other workflows.
const upstream = new URL(process.env.MIDSCENE_RATE_GATE_UPSTREAM);
const intervalMs = Number(process.env.MIDSCENE_RATE_GATE_INTERVAL_MS ?? 20000);
const port = Number(process.env.MIDSCENE_RATE_GATE_PORT ?? 18783);
diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json
index 880d4cc..23c2859 100644
--- a/tests/e2e/package-lock.json
+++ b/tests/e2e/package-lock.json
@@ -8,8 +8,8 @@
"name": "doubao-say-midscene-e2e",
"version": "1.0.0",
"devDependencies": {
- "@midscene/computer": "1.15.3",
- "@midscene/test": "1.15.3",
+ "@midscene/computer": "1.15.4",
+ "@midscene/test": "1.15.4",
"@types/node": "^22.0.0",
"puppeteer-core": "^25.11.0",
"typescript": "^5.8.3"
@@ -2240,15 +2240,15 @@
}
},
"node_modules/@midscene/computer": {
- "version": "1.15.3",
- "resolved": "https://registry.npmjs.org/@midscene/computer/-/computer-1.15.3.tgz",
- "integrity": "sha512-kojZ/20VaFQORhESQkWNfI2UEwekfqRNhxQSNsZSw5SoALiM40urTbmmOl81JMqPPQWa3iKNZTSfL8a6iTRgGQ==",
+ "version": "1.15.4",
+ "resolved": "https://registry.npmjs.org/@midscene/computer/-/computer-1.15.4.tgz",
+ "integrity": "sha512-BLdjFLI1IXdJcdqJgVo1wWK7JpKDcHO4svqg0gEQfgsNARhTf34+5fnQRCPFPVRmoT9vZYmPvVF+Yxv7/iwkDg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@computer-use/libnut": "^4.2.0",
- "@midscene/core": "1.15.3",
- "@midscene/shared": "1.15.3",
+ "@midscene/core": "1.15.4",
+ "@midscene/shared": "1.15.4",
"clipboardy": "^4.0.0",
"screenshot-desktop": "^1.15.3"
},
@@ -2260,13 +2260,13 @@
}
},
"node_modules/@midscene/core": {
- "version": "1.15.3",
- "resolved": "https://registry.npmjs.org/@midscene/core/-/core-1.15.3.tgz",
- "integrity": "sha512-rXjwE6QNaVp+QorYqzmkyFC2n9mLfb6JFiUAzcyDHwnAfC3q71cP5mRP3bGXG/h5sAqmUNakncodcZ2j3ZB/aQ==",
+ "version": "1.15.4",
+ "resolved": "https://registry.npmjs.org/@midscene/core/-/core-1.15.4.tgz",
+ "integrity": "sha512-qyVvUW2L7DJV87QD9MiH7XxPb3HWGOizPKfXoOa+Zng1XWEJzGVvhoE2+QhE9LT4b3gVSmhhxSBmitbU7CpGwg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@midscene/shared": "1.15.3",
+ "@midscene/shared": "1.15.4",
"@ui-tars/action-parser": "1.2.3",
"dayjs": "^1.11.11",
"dotenv": "^16.4.5",
@@ -2285,9 +2285,9 @@
}
},
"node_modules/@midscene/shared": {
- "version": "1.15.3",
- "resolved": "https://registry.npmjs.org/@midscene/shared/-/shared-1.15.3.tgz",
- "integrity": "sha512-Ml6GKP4hY10tbETpwwycSxPZnjf0zRVvyxjHYG6Uglv2FKy6+yT4cxOEdEzIweQz/4oU844VowwWbDHcSXVdhA==",
+ "version": "1.15.4",
+ "resolved": "https://registry.npmjs.org/@midscene/shared/-/shared-1.15.4.tgz",
+ "integrity": "sha512-C5xN7rv5HYnKpnLR7XhtODFhmF3mQgGTL23ZEnB2G5bZVSGnWXR11qKlBUGhu35axoTOogPR4fx1HaZJJQgujA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2301,15 +2301,15 @@
}
},
"node_modules/@midscene/test": {
- "version": "1.15.3",
- "resolved": "https://registry.npmjs.org/@midscene/test/-/test-1.15.3.tgz",
- "integrity": "sha512-vJM64Vbcis3Zo6m8IWC5pVGGfnTF3ju6pX0uKjp3nOBrokQaXBDZqMskV76EG9Ram7HyWP8MjcoNXJMW4UCb/Q==",
+ "version": "1.15.4",
+ "resolved": "https://registry.npmjs.org/@midscene/test/-/test-1.15.4.tgz",
+ "integrity": "sha512-Q5j3zKQXhEEi0rzXvwvTpiwe6bqGLJoNREPyazfnFZyNuSSZUQolY8Lu7Vk9NpjeAghHmXJSwfSUQ9CVC/Bh1Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"@inquirer/prompts": "^7.8.6",
- "@midscene/core": "1.15.3",
- "@midscene/shared": "1.15.3",
+ "@midscene/core": "1.15.4",
+ "@midscene/shared": "1.15.4",
"chalk": "4.1.2",
"dotenv": "^16.4.5",
"execa": "9.3.0",
@@ -2329,11 +2329,11 @@
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
},
"peerDependencies": {
- "@midscene/android": "1.15.3",
- "@midscene/computer": "1.15.3",
- "@midscene/harmony": "1.15.3",
- "@midscene/ios": "1.15.3",
- "@midscene/web": "1.15.3",
+ "@midscene/android": "1.15.4",
+ "@midscene/computer": "1.15.4",
+ "@midscene/harmony": "1.15.4",
+ "@midscene/ios": "1.15.4",
+ "@midscene/web": "1.15.4",
"playwright": "^1.45.0",
"puppeteer": "24.6.0"
},
@@ -3508,9 +3508,9 @@
}
},
"node_modules/fetch-socks/node_modules/undici": {
- "version": "8.11.2",
- "resolved": "https://registry.npmjs.org/undici/-/undici-8.11.2.tgz",
- "integrity": "sha512-u4UB2/IrKdU6lFxumHmmo1a3fCQO5tzQllRorfoRS63txhrB7xTpSn1PftwC4qEHkOaqP95fCWW4lJzwErwzhQ==",
+ "version": "8.12.1",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.1.tgz",
+ "integrity": "sha512-usz3OVQBeh1LxNn0DzU0voLXMgn5CU/WUdpBsY6Ti5afNao+vTkmn4H/NxoXolc10cOqe2+YIG0Hspq2rsl64w==",
"dev": true,
"license": "MIT",
"engines": {
diff --git a/tests/e2e/package.json b/tests/e2e/package.json
index 3d302e0..da70273 100644
--- a/tests/e2e/package.json
+++ b/tests/e2e/package.json
@@ -6,15 +6,17 @@
"scripts": {
"test": "midscene-test",
"nodes": "midscene-test nodes",
- "typecheck": "tsc --noEmit"
+ "typecheck": "tsc --noEmit",
+ "test:macos": "midscene-test --config midscene.macos.config.ts",
+ "check:model": "midscene-test model verify"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-x64": "1.2.4",
"@img/sharp-linux-x64": "0.34.5"
},
"devDependencies": {
- "@midscene/computer": "1.15.3",
- "@midscene/test": "1.15.3",
+ "@midscene/computer": "1.15.4",
+ "@midscene/test": "1.15.4",
"@types/node": "^22.0.0",
"puppeteer-core": "^25.11.0",
"typescript": "^5.8.3"
diff --git a/tests/e2e/run-omarchy-midscene.sh b/tests/e2e/run-omarchy-midscene.sh
index 329e4b5..8962514 100755
--- a/tests/e2e/run-omarchy-midscene.sh
+++ b/tests/e2e/run-omarchy-midscene.sh
@@ -4,7 +4,7 @@ set -euo pipefail
readonly ROOT_DIR="$PWD"
readonly MIDSCENE_PROJECT="${1:?Usage: run-omarchy-midscene.sh PROJECT}"
case "$MIDSCENE_PROJECT" in
- omarchy-shard-[1-4]|omarchy-shell|omarchy-providers) ;;
+ all|omarchy-product|omarchy-shell|omarchy-providers) ;;
*)
echo "Unsupported Omarchy Midscene project: $MIDSCENE_PROJECT" >&2
exit 2
@@ -226,4 +226,11 @@ for _gate_attempt in {1..100}; do
sleep 0.2
done
-npm --prefix tests/e2e test -- --project "$MIDSCENE_PROJECT"
+if [[ $MIDSCENE_PROJECT == all ]]; then
+ result=0
+ npm --prefix tests/e2e test -- --project omarchy-product || result=1
+ npm --prefix tests/e2e test -- --project omarchy-shell || result=1
+ exit "$result"
+else
+ npm --prefix tests/e2e test -- --project "$MIDSCENE_PROJECT"
+fi
diff --git a/tests/e2e/tsconfig.json b/tests/e2e/tsconfig.json
index fb75ab7..b96997a 100644
--- a/tests/e2e/tsconfig.json
+++ b/tests/e2e/tsconfig.json
@@ -8,5 +8,5 @@
"skipLibCheck": true,
"types": ["node"]
},
- "include": ["midscene.config.ts"]
+ "include": ["midscene.config.ts", "midscene.macos.config.ts"]
}
diff --git a/tests/manual/chatgpt_ui.py b/tests/manual/chatgpt_ui.py
index 7d3f0fd..d4942e1 100644
--- a/tests/manual/chatgpt_ui.py
+++ b/tests/manual/chatgpt_ui.py
@@ -91,6 +91,7 @@ def main():
window.set_child(scroll)
window.present()
pump()
+ box.enabled.set_active(True)
box.provider.set_active_id("chatgpt")
pump()
capture("disconnected")
diff --git a/tests/manual/polish_settings_ui.py b/tests/manual/polish_settings_ui.py
new file mode 100644
index 0000000..2b58cfa
--- /dev/null
+++ b/tests/manual/polish_settings_ui.py
@@ -0,0 +1,82 @@
+"""Exercise synthetic polishing settings in a real GTK window and save captures."""
+import os
+from pathlib import Path
+import time
+
+import gi
+
+gi.require_version("Gtk", "4.0")
+from gi.repository import GLib, Gtk
+from PIL import ImageGrab
+
+from doubao_input.i18n import set_language, tr
+from doubao_input.ui.polish_settings import PolishSettings
+from tests.e2e.gtk_onboarding_fixture import build_onboarding_fixture
+
+
+def drain(seconds=0.3):
+ deadline = time.monotonic() + seconds
+ while time.monotonic() < deadline:
+ for _ in range(100):
+ if not GLib.MainContext.default().pending():
+ break
+ GLib.MainContext.default().iteration(False)
+ time.sleep(0.005)
+
+
+def widgets(root):
+ yield root
+ child = root.get_first_child()
+ while child:
+ yield from widgets(child)
+ child = child.get_next_sibling()
+
+
+Gtk.init()
+set_language(os.environ.get("POLISH_UI_LANGUAGE", "en"))
+cleanup = build_onboarding_fixture("trigger-settings")
+try:
+ window = next(window for window in Gtk.Window.get_toplevels()
+ if window.get_title() == tr("Doubao Say", "豆包说"))
+ window.set_default_size(1000, 740)
+ drain()
+ polish = next(widget for widget in widgets(window) if isinstance(widget, PolishSettings))
+ scroll = next(widget for widget in widgets(window)
+ if isinstance(widget, Gtk.ScrolledWindow) and polish.is_ancestor(widget))
+ adjustment = scroll.get_vadjustment()
+ destination = Path(os.environ["POLISH_UI_SCREENSHOTS"]) / os.environ.get("POLISH_UI_LANGUAGE", "en")
+ destination.mkdir(parents=True, exist_ok=True)
+
+ def capture(name):
+ drain()
+ ImageGrab.grab(xdisplay=os.environ["DISPLAY"]).save(destination / f"{name}.png")
+
+ adjustment.set_value(500)
+ capture("enabled-scroll-500")
+ polish.enabled.set_active(False)
+ drain()
+ assert not polish.details.get_visible()
+ assert polish.model.get_text() == "synthetic-model"
+ capture("disabled")
+ polish.enabled.set_active(True)
+ drain()
+ adjustment.set_value(adjustment.get_value() + 500)
+ assert polish.details.get_visible()
+ assert polish.model.get_text() == "synthetic-model"
+ capture("reenabled-scroll-500")
+ polish.model.set_text("ci-fail-model")
+ drain(0.8)
+ adjustment.set_value(adjustment.get_upper() - adjustment.get_page_size())
+ polish.test_button.emit("clicked")
+ drain(1)
+ assert "Synthetic endpoint unavailable" in polish.test_status.get_text()
+ capture("endpoint-failure")
+ polish.model.set_text("ci-ok-model")
+ drain(0.8)
+ polish.test_button.emit("clicked")
+ drain(1)
+ assert "Synthetic endpoint response" in polish.test_status.get_text()
+ capture("endpoint-success")
+ print("PASS: polishing toggle preserves model; endpoint failure and recovery render feedback")
+finally:
+ cleanup()
diff --git a/tests/unit/test_product.py b/tests/unit/test_product.py
index 6ad09e9..656676f 100644
--- a/tests/unit/test_product.py
+++ b/tests/unit/test_product.py
@@ -51,7 +51,7 @@ class ProductTest(TestCase):
self.assertNotIn("private-device-identifier", data)
self.assertNotIn("cookies", data)
self.assertNotIn("transcript", data)
- self.assertEqual(json.loads(data)["product_version"], "1.8.0")
+ self.assertEqual(json.loads(data)["product_version"], "1.8.1")
self.assertEqual(json.loads(data)["recognition_provider"], "volcengine")
self.assertEqual(json.loads(data)["recent_stages"], [
{"stage": "first_result", "after_ms": 125}])