Skip to content

e2e: Windows host confirm() dialog dismissal missing — UC-J02 FAIL cascades to J05/J06 BLOCKED #851

Backlog

Description

@rebuildup

概要

results-final-205730/journeys:

  • UC-J02 FAIL: host confirm dialog dismissed (cancel): native dialog dismissal is macOS-only — preset delete の ExtendScript confirm() を Windows で解除する経路が未実装
  • UC-J05/J06 BLOCKED: session.attach failed: the selected After Effects did not answer the readiness probe — it is busy, blocked by a dialog — J02 が残した modal confirm が AE をブロックし、後続 case の ae-session attach を全て道連れにした

原因

host-dialog.ts の dismissHostConfirmDialog は macOS (System Events) のみ実装。Windows では dismissed:false を返すだけで、confirm dialog が開いたまま → AE modal ブロック → suite 全体の連鎖 BLOCKED。

修正

Windows 経路を追加: PowerShell + UI Automation で AfterFX プロセスの top-level window を走査し、#32770 dialog(fallback: main window 以外の window)の Button を名前一致で Invoke/DoDefaultAction。main window handle は除外して palette 誤爆を防ぐ。

Activity

  1. rebuildup commented on Nov 30, 2026

    @rebuildup
    ContributorAuthor

    Windows devnode (UUU) で原因を特定し修正しました(PR #861, commit 59abc08)。

    根本原因(2点、両方ともハーネス側)

    1. ダイアログの Win32 上の位置関係の誤認: ExtendScript confirm() の "Script Alert"(class #32770)は AE メインウィンドウの子ではなく、AfterFX プロセスが owner となる top-level ウィンドウでした。実機の window dump(EnumWindows + EnumChildWindows 再帰)で確認済み: hwnd=9703030 cls=#32770 txt=[Script Alert] vis=True pid=9900 AfterFX、子に Button [Yes] / Button [No]。EnumChildWindows(MainWindowHandle) では決して到達しないため、旧実装は常に "no matching dialog button found" でした。
    2. PowerShell の構文エラー: $names = ${namesJson} | ConvertFrom-Json が ["No","Cancel",...] という裸の配列リテラルを生成しており、PowerShell では [...] は型リテラルなので parse error でスクリプト全体が死んでいました(@(...) か文字列経由の ConvertFrom-Json が必要)。

    修正

    • EnumWindows で top-level を列挙し AfterFX pid でフィルタ → #32770 かつ visible を収集(title が /script/i に合うものを優先)。parented の場合に備え EnumChildWindows(MainWindowHandle) 経路もフォールバックとして残置。
    • ボタン名 JSON は '...' でクォートして ConvertFrom-Json へ渡す形に修正。
    • Button クラス子要素の text(& アクセラレータ除去後)が対象名に一致したら BM_CLICK (0x00F5) を SendMessage。

    実機検証

    devnode の live "Script Alert" に対して session-1 の scheduled task 経由で実行し、No クリック → キューに溜まっていた連続 confirm を 3 件連続で解除 → evalScript が got:2 で応答回復。さらに e2e runner 経由で UC-J02 が PASS (53.5s) することを確認済みです。

    なお SSH (session 0) からは interactive desktop の window が一切見えないため、Windows での UI 自動化は必ず Interactive logon の scheduled task 経由で実行する必要があります(今回の検証でもその制約を踏みました)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions