{
  "kind": "original-bounded-choice-workflow",
  "version": 1,
  "scope": "Use Jev to inspect where focus goes after a dialog closes. Compare an available opener, a task-relevant replacement and missing focus evidence.",
  "question": "Inspect one dialog close path. Need focus evidence: target role, trigger lifetime or behavior is missing/conflicting. Trigger restored: focus returns to the available opener. Alternate destination: a shown route change or task-relevant replacement receives focus. Focus gap shown: the complete path supplies no meaningful available focus target. Use supplied implementation or observations only; do not infer library defaults, execute the UI or certify accessibility.",
  "choices": [
    "Trigger restored",
    "Alternate destination",
    "Focus gap shown",
    "Need focus evidence"
  ],
  "actions": {
    "Trigger restored": {
      "action": "preview_jev_dialog_close_focus_destination",
      "payload": {
        "decision": "Trigger restored"
      },
      "pending": true
    },
    "Alternate destination": {
      "action": "preview_jev_dialog_close_focus_destination",
      "payload": {
        "decision": "Alternate destination"
      },
      "pending": true
    },
    "Focus gap shown": {
      "action": "preview_jev_dialog_close_focus_destination",
      "payload": {
        "decision": "Focus gap shown"
      },
      "pending": true
    },
    "Need focus evidence": {
      "action": "preview_jev_dialog_close_focus_destination",
      "payload": {
        "decision": "Need focus evidence"
      },
      "pending": true
    }
  },
  "samples": [
    {
      "id": "case-1",
      "label": "Dismiss returns to opener",
      "expected": "Trigger restored",
      "request": {
        "context": "{\n  \"task\": \"Use Jev to inspect where focus goes after a dialog closes. Compare an available opener, a task-relevant replacement and missing focus evidence.\",\n  \"evidence\": {\n    \"event\": \"Dismiss edit-address dialog\",\n    \"opener\": \"Edit address button remains enabled\",\n    \"path\": \"onClose focuses openerRef.current; the supplied ref points to that button\"\n  }\n}",
        "question": "Inspect one dialog close path. Need focus evidence: target role, trigger lifetime or behavior is missing/conflicting. Trigger restored: focus returns to the available opener. Alternate destination: a shown route change or task-relevant replacement receives focus. Focus gap shown: the complete path supplies no meaningful available focus target. Use supplied implementation or observations only; do not infer library defaults, execute the UI or certify accessibility.",
        "choices": [
          "Trigger restored",
          "Alternate destination",
          "Focus gap shown",
          "Need focus evidence"
        ]
      }
    },
    {
      "id": "case-2",
      "label": "Deleted row has a replacement",
      "expected": "Alternate destination",
      "request": {
        "context": "{\n  \"task\": \"Use Jev to inspect where focus goes after a dialog closes. Compare an available opener, a task-relevant replacement and missing focus evidence.\",\n  \"evidence\": {\n    \"event\": \"Confirm deletion of row R14\",\n    \"opener\": \"The row's Delete button is removed with the row\",\n    \"path\": \"After the dialog unmounts, focus goes to the next remaining row's Details button\",\n    \"taskContext\": \"The task continues in the same row list\"\n  }\n}",
        "question": "Inspect one dialog close path. Need focus evidence: target role, trigger lifetime or behavior is missing/conflicting. Trigger restored: focus returns to the available opener. Alternate destination: a shown route change or task-relevant replacement receives focus. Focus gap shown: the complete path supplies no meaningful available focus target. Use supplied implementation or observations only; do not infer library defaults, execute the UI or certify accessibility.",
        "choices": [
          "Trigger restored",
          "Alternate destination",
          "Focus gap shown",
          "Need focus evidence"
        ]
      }
    },
    {
      "id": "case-3",
      "label": "Navigation has its own destination",
      "expected": "Alternate destination",
      "request": {
        "context": "{\n  \"task\": \"Use Jev to inspect where focus goes after a dialog closes. Compare an available opener, a task-relevant replacement and missing focus evidence.\",\n  \"evidence\": {\n    \"event\": \"Submit a create-project dialog\",\n    \"path\": \"The supplied route transition focuses the new project's heading with tabindex=-1\",\n    \"opener\": \"No longer present on the new route\"\n  }\n}",
        "question": "Inspect one dialog close path. Need focus evidence: target role, trigger lifetime or behavior is missing/conflicting. Trigger restored: focus returns to the available opener. Alternate destination: a shown route change or task-relevant replacement receives focus. Focus gap shown: the complete path supplies no meaningful available focus target. Use supplied implementation or observations only; do not infer library defaults, execute the UI or certify accessibility.",
        "choices": [
          "Trigger restored",
          "Alternate destination",
          "Focus gap shown",
          "Need focus evidence"
        ]
      }
    },
    {
      "id": "case-4",
      "label": "Closed element loses focus",
      "expected": "Focus gap shown",
      "request": {
        "context": "{\n  \"task\": \"Use Jev to inspect where focus goes after a dialog closes. Compare an available opener, a task-relevant replacement and missing focus evidence.\",\n  \"evidence\": {\n    \"event\": \"Escape closes a settings sheet\",\n    \"completeRelevantPath\": true,\n    \"path\": \"The focused close button unmounts; the trace shows document.activeElement is body after the transition; no close handler or primitive restores focus\",\n    \"opener\": \"The Open settings button remains enabled on the unchanged page after closing.\"\n  }\n}",
        "question": "Inspect one dialog close path. Need focus evidence: target role, trigger lifetime or behavior is missing/conflicting. Trigger restored: focus returns to the available opener. Alternate destination: a shown route change or task-relevant replacement receives focus. Focus gap shown: the complete path supplies no meaningful available focus target. Use supplied implementation or observations only; do not infer library defaults, execute the UI or certify accessibility.",
        "choices": [
          "Trigger restored",
          "Alternate destination",
          "Focus gap shown",
          "Need focus evidence"
        ]
      }
    },
    {
      "id": "case-5",
      "label": "Unknown primitive behavior",
      "expected": "Need focus evidence",
      "request": {
        "context": "{\n  \"task\": \"Use Jev to inspect where focus goes after a dialog closes. Compare an available opener, a task-relevant replacement and missing focus evidence.\",\n  \"evidence\": {\n    \"event\": \"Close SettingsDialog\",\n    \"snippet\": \"<SettingsDialog open={open} onOpenChange={setOpen} />\",\n    \"primitiveImplementation\": null\n  }\n}",
        "question": "Inspect one dialog close path. Need focus evidence: target role, trigger lifetime or behavior is missing/conflicting. Trigger restored: focus returns to the available opener. Alternate destination: a shown route change or task-relevant replacement receives focus. Focus gap shown: the complete path supplies no meaningful available focus target. Use supplied implementation or observations only; do not infer library defaults, execute the UI or certify accessibility.",
        "choices": [
          "Trigger restored",
          "Alternate destination",
          "Focus gap shown",
          "Need focus evidence"
        ]
      }
    },
    {
      "id": "case-6",
      "label": "No close transition supplied",
      "expected": "Need focus evidence",
      "request": {
        "context": "{\n  \"task\": \"Use Jev to inspect where focus goes after a dialog closes. Compare an available opener, a task-relevant replacement and missing focus evidence.\",\n  \"evidence\": {\n    \"event\": null,\n    \"opener\": null,\n    \"path\": null\n  }\n}",
        "question": "Inspect one dialog close path. Need focus evidence: target role, trigger lifetime or behavior is missing/conflicting. Trigger restored: focus returns to the available opener. Alternate destination: a shown route change or task-relevant replacement receives focus. Focus gap shown: the complete path supplies no meaningful available focus target. Use supplied implementation or observations only; do not infer library defaults, execute the UI or certify accessibility.",
        "choices": [
          "Trigger restored",
          "Alternate destination",
          "Focus gap shown",
          "Need focus evidence"
        ]
      }
    }
  ],
  "consumer": "preview_choice_workflow.py"
}
