name: undo-tip-ctrl-c-clear-shows
description: >
  Ctrl+C variant of the undo tip with the contextual-hints master pinned on
  (`KIGI_CONTEXTUAL_HINTS=1` for deterministic env control; the feature now ships
  default-ON): with a substantial draft present, Ctrl+C clears the textarea (the
  cancel-with-draft fall-through) — a recoverable wipe that shows the "… to undo"
  banner.
terminal:
  rows: 32
  cols: 100
environment:
  env:
    - key: KIGI_CONTEXTUAL_HINTS
      value: "1"
mock:
  response: "unused"
steps:
  - action: wait_for_text
    text: Quit
    timeout_ms: 20000
  - action: focus_prompt
  # Type first so Ctrl+C lands in the agent view with a non-empty draft
  # (clear), not on the welcome screen (where bare Ctrl+C would quit).
  - action: type_text
    text: "bbbbbbbbbbbbbbbbbbbbbbbbb"
  - action: wait
    millis: 400
  - action: assert_contains
    text: "bbbbbbbbbb"
  - action: keys
    keys: "<C-c>"
  - action: wait_for_text
    text: "to undo"
    timeout_ms: 10000
  - action: assert_not_contains
    text: panicked
  - action: screenshot
    name: undo-tip-ctrl-c-shown
    note: Undo tip after a Ctrl+C clear of a substantial draft.
