Skip to content

Repair Electron background field preparation for typeText, Tab and paste #188

Closed

Description

@SSFSKIM

Problem & intent

Electron background typeText, pressKey.tab and paste @finder fail preparation on cua with “the field could not be given the focus”, while the vendor passes. This is hold-3 finding 3, distinct from the now-delivering click.button, setValue.text and selectText.text route-3 rows. Group these three operations around their shared preparation failure.

Seams: scripts/native-matrix/plan.mjs, native/engine/Sources/Engine/ElementInput.swift.

Constraints

Success criteria

  • Reproduce the fixture state and locate the common preparation failure before the actions.
  • Make all three actions produce expected outcomes on the background Electron fixture without changing the user's focus/frontmost/top window.
  • Keep interference/route metadata and safe refusal for genuinely un-focusable fields.
  • Compare repaired rows against the vendor; already-working click/setValue/selectText remain working.

Open questions

Harness preparation or engine focus transition? Follow the recorded prepare step before assuming the root cause.

Decision log

Sources

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P1
    on Oct 22, 2026
  2. added 3 commits that reference this issue on Oct 23, 2026
  3. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    Hold8 diagnostic not run: the preceding route-A/B failed shared Finder frame setup (status5 read-back nonconvergence), so coordinator’s repeat-refusal rule stopped dependent phases. Electron-focus uses the same unconditional setup pin. No new evidence about Electron field focus or its actions; no acceptance claim. Shared harness failure and clean put-back recorded on#182/#184.

  4. added 3 commits that reference this issue on Oct 23, 2026
  5. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    Hold9 electron-focus diagnostic skipped: preceding route-A/B pin succeeded, but its Finder bind was correctly refused because the run-owned Electron fixture window was genuinely above it. No rows or new field-focus evidence. Explicit cleanup restored baseline; ordering/raise residue recorded on#182/#184. No live retry or scope waiver.

  6. added a commit that references this issue on Oct 23, 2026
  7. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    2026-10-23 dogfood evidence, native engine d95261f (not the browser service). Sources: /Users/new/Developer/GitHub/MAWS/plugin/cua/dogfood-feedback/l3-input.md §§1,6; l6-artifacts.md §§5–6; l9-browser-delivery.md §1. Background composer keys/paste/AXPress sometimes returned without visible effect; one Codex typeText result had reordered punctuation/spacing. Verdict: plausible delivery/focus defect consistent with this issue, not confirmed input loss: L6/L9 found typed text later and stale pixels/AX can hide effects. Preserve separate checks for field preparation, delivered value and observation freshness.

    Pinned ElementInput.swift already has AXFocused plus a click fallback for field focus. Input.swift chooses the focused element’s owner PID. Do not implement the report’s proposed blanket non-frontmost refusal: it would violate #117’s background-driving contract and repeats the rejected guard in closed #162. Likewise an AXPress acceptance is not proof an editor acquired keyboard focus.

    Add fixture regressions for rich composer focus, background popup activation and exact text read-back after fresh observation. setValue is AXValue (ValueSetting.swift), not a DOM bypass guarantee; clearing with setValue(index, '') is the requested destructive write, not a separate defect. No live reproduction was run. Recommended P1 unchanged.

    Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)

  8. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    Hold10 on controller2f71911e/buildd0b2fa13 produced five validity-proven diagnostic arms, complete/rawFAIL with clean put-back. All connections1, sidecar noOpenVerified and no counter movement, balanced release and clean user interference. Selected natural route3: facade focus trailer absent with selected text, but AXFocused=true and app-local focused element=field. Natural-empty: facade/raw field focus agree. Thus selected natural exposes a selection-masked harness predicate, not proven failed delivery. held3 succeeds: primer focused AXButton, subsequent field click established AXTextArea focus. forced1/forced3 lacked facade focus; AXFocused=true alone disagreed with app-local AXError-25212 read. Supports further activation-lifetime/focus-read investigation but no natural click-plan tag or typing/Tab/paste repair claim. Raw five-arm evidence and compact judgment at /Users/new/.claude/jobs/1ea561bc/tmp/117/hold10-20261023-184-188/electron-focus/cua/run-1/result.json and electron-focus-judgment.json. No live code changes; matrix follow-up still running.

  9. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    Hold10 matrix follow-up retained the preparation failures: cua Electron background typeText.replace and pressKey.tab invalid because field focus predicate failed; paste.replace invalid because replacement word not present once. Vendor typeText shares focus-preparation invalidity; vendor pressKey.tab executes but moved=false; paste replacement also invalid. Both matrices completed with clean cleanup but rawFAIL. This does not negate the isolated diagnostic’s selection-masked natural focus finding, and does not establish an end-to-end fix. Raw rows exported without rejudging at hold10 evidence root/matrix-{vendor,cua}-issues.json. No product change during hold.

  10. 21 remaining items

  11. SSFSKIM commented on Nov 5, 2026

    @SSFSKIM
    OwnerAuthor

    PR #261 merged as Refs (squash ee709cb, main's tree = the reviewed head d550b14's). This ticket stays in-progress: it closes at the next attended MacBook slot (see PR #261, 'closes at the next attended slot').

  12. added 6 commits that reference this issue on Nov 5, 2026
  13. removed
    status:in-progress
    on Nov 5, 2026
  14. SSFSKIM commented on Nov 5, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: landed via #281 (evidence) on #261/#280's code

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:P1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions