Skip to content

macOS engine: type_text into a non-text element (Finder type-select) throws typeUnconfirmed after the keys landed #587

Done

Description

@SSFSKIM

Problem

cua's macOS engine throws typeUnconfirmed when type_text targets a focused element that isn't a text field, even when the keys landed and had their effect. Finder type-select is the common case: typing a name in a list or icon view jumps to and selects the matching row.

The vendor's engine answers ok in the same case. A model that gets cua's error is told "the text was typed, but the focused element is not a text field, so it is not confirmed and some or all of it may have gone in", and is likely to retry. Retrying type-select types the name again, which can land on a different row.

Evidence

Pilot C-5 (run 45373370067 @5377939be, artifacts in ~/.local/share/cua-m5-pilot/c-5/sitting/), cell finder/…/typeText.typeSelect:

  • cua: the row was found and selected (effect true), but the call threw typeUnconfirmed, reason notTextField.
  • vendor: returned ok.
  • The same throw appears inside finder/concurrent@textedit, whose row still passed.

The engine path:

  • TypeReadback.swift:508 returns .refused(.notTextField) when the focused role isn't in typeReadbackTextRoles.
  • typeUnconfirmed(.notTextField) (TypeReadback.swift:1099) turns that into an error.

This is an undeclared R3 departure from the vendor's contract.

Wanted (ruling 1219)

Follow the vendor's contract for a non-text-field target. type_text answers ok, with a model-visible note that:

  • the focused element isn't a text field, so the text couldn't be read back to confirm it;
  • the app should be observed (get_app_state or a screenshot) before relying on it.

These stay as they are:

  • the read-back and typeUnconfirmed for real text fields;
  • password fields (secure, becameSecure, noLongerSecure), which never become ok-with-note;
  • selectionChanged (nothing typed);
  • noFocusedElement. Decide and state whether this one follows the same contract; check what the vendor does.

Tests:

  • type_text into a focused non-text element (e.g. AXOutline/AXList/AXTable row focus) answers ok plus the note, not an error;
  • a text field whose read-back mismatches still throws;
  • the note reaches the tool result text.

Live check: the matrix cell finder/frontmost/typeText.typeSelect passes on cua in the next sitting C, with the note recorded.

Board

P2, enhancement. Blocks #506 (the flip). Parent #117. Relates to #584 (the same key-input reply surface).

Sminos-Session: cursor235#b93055dd (cua on macbook)

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P2
    on Nov 24, 2026
  2. SSFSKIM commented on Nov 24, 2026

    @SSFSKIM
    OwnerAuthor

    C-6 (run 45408876276): the same cause also fails Finder background typeSelect @textedit and @electron on cua. Effect true (the row was selected), then typeUnconfirmed thrown because the focused element isn't a text field. These cells are folded into this ticket (ruling 1223); its fix must cover the background route too.

  3. added a commit that references this issue on Nov 24, 2026
  4. added
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 27, 2026
  5. SSFSKIM commented on Nov 27, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: cursor235 taking under ruling 1236 (one PR for #587+#590)

  6. 17 remaining items

  7. SSFSKIM commented on Nov 28, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: PR #601 open; review converged (round 6 correct); live proof pending

  8. removed
    status:in-review
    on Nov 28, 2026
  9. SSFSKIM commented on Nov 28, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: merged in #601

  10. SSFSKIM commented on Nov 28, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: Landed via PR #601 (cua 0.30.3, engine 0.2.2)

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

    bugpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions