Skip to content

Document native pixel coordinates, safe text semantics and screenshot export #207

Open

Description

@SSFSKIM

Problem & intent

Native API discoverability caused wrong clicks and unsafe retries: /Users/new/Developer/GitHub/MAWS/plugin/cua/dogfood-feedback/l3-input.md §§4–5,8,10 and Learning the API; l6-artifacts.md §§2–3,5–6,9; l9-browser-delivery.md §§2,5,7 and Learning the API. Confirmed: core.md has the array click signature but omits macOS screenshot pixel units and a supported evidence-export recipe; JPEG bytes lose format/path metadata in the facade. Screenshot.swift maps original screenshot pixels, not displayed preview coordinates.

Corrections: setValue writes AXValue, not DOM directly; paste posts Command-V (Paste.swift). Neither universally bypasses nor universally triggers application editor logic. Arbitrary filesystem writes are sandbox-denied by design; nodeRepl.tmpDir is available and the L9 reporter successfully wrote there. Key names are case-sensitive; invalidKey already names safe tokens. The JS timeout is configurable (30 s default), not a fixed 40 s ceiling.

Constraints

Documentation/examples only; no arbitrary writable-root expansion, silent IME switching, automatic foregrounding, or mandated DOM insertion. Keep confirmation and secret-handling policy intact. Respect the existing first-call-document approval policy when taking this ticket.

Success criteria

  • Explain click([x,y]) as original-image pixels and show conversion from a resized preview; include image dimensions/units in a concise caption if permitted.
  • Document JPEG bytes and a safe nodeRepl.tmpDir save/copy-out recipe; distinguish temporary evidence lifetime from durable user output.
  • Explain physical pressKey versus exact-text typeText; link the key vocabulary, case sensitivity and IME implications.
  • Explain AXValue/application-specific model behavior and inspect-before-retry after timeout; no guaranteed contenteditable bypass claims.
  • Put configurable timeout/reset/idle-rebind behavior and explicit document retrieval in an accessible quick reference. Submenu arrow-key navigation may be a qualified workaround, not a universal click prohibition.

Open questions

First-use docs absent in one reporter’s transcript is not reproduced; provide an explicit retrieval path rather than emit full docs on every bind. A save convenience API is optional later, not necessary for a working recipe.

Decision log

2026-10-23: Combine related safe-use documentation gaps instead of separate tiny tickets. Idle restart itself is by design (#107); method syntax user errors are not new engine defects. Category: enhancement; birth state: ready-for-implementer; parent N/A (dogfood follow-up, not a decomposition child); blocked-by N/A (can be investigated independently).

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

Activity

  1. added
    enhancement
    status:ready-for-implementer
    priority:P2
    on Oct 23, 2026
  2. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    Expanded documentation corrections from /Users/new/Developer/GitHub/MAWS/plugin/cua/dogfood-feedback/l1-sessions.md §§1,7,10; l2-transcript.md §§3–6; l4-approvals.md §§5–6; l5-code.md §§2–3,5,7; l6-artifacts.md extra-slot §11.

    • L2 concludes click uses displayed pixels and L5 proposes window points. Both conflict with Screenshot.swift: original screenshot pixels are the contract. Do not copy either proposed sentence into docs.
    • L2 calls cmd an unrecognized modifier. Keyboard.swift already accepts cmd/command/Command/super and parseKeySequence refuses unknown names before dispatch. Its no-op is not evidence aliases are missing.
    • Several first logical-caller calls lacked docs; create_tinysky_alt emits docs on facade construction, while a shared/reused connection may already have done so. Document cua.rewriteDocumentation(); do not assert a new logical caller is a new kernel or duplicate output from initialize/getState.
    • setTimeout(40000) exceeds the normal configurable 30-second cell budget. Prefer bounded readiness checks within an explicit timeout_ms; preserve neither live handles nor stale helpers across actual reset.
    • typeText’s paste route is input-source-dependent, not simply string length/non-US layout. The native engine already snapshots/restores with change-count checks; never recommend restoring a manual stale backup over a newer owner copy.
    • os.tmpdir()/nodeRepl.tmpDir works for JPEG export; external paths are denied by design. Localized secondary actions must come from advertised AX action names, not guesses.

    The noClipboard feature proposal is not implemented by pretending exact text can always be sent as physical keys; #187/#189 record the supported-or-refused policy question.

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

  3. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    Final-wave usage guidance from /Users/new/Developer/GitHub/MAWS/plugin/cua/dogfood-feedback/l7-shell.md §§1–2,4–7 and l8-settings.md §§2–3,7–8:

    • Fractional macOS scroll pages already work: ScrollDrag.swift accepts positive finite Double values and computes pages × target/window size. Document 0.35/0.6-style bounded adjustments. Element scrolling already tries positionElement before posting; a remaining invisible-element refusal is not proof scroll-into-view is wholly absent.
    • Distinguish Raise (window order) from activation (keyboard/front app); neither guarantees repaint freshness. Do not recommend hiding the owner’s covering app.
    • Observation can launch/reopen an app; action on an exited process does not share that behavior. A separate ticket owns argument-dependent development-runtime attachment; do not tell callers that original launch args are preserved.
    • end_task does not necessarily replace an MCP connection or clear app approval memory. Report a real decline, do not retry through another identifier; separate approval diagnostics are being tracked.
    • The per-run writable directory and shared-caller namespace need explicit ownership/lifetime guidance; use unique output names, not arbitrary path access.
    • First logical-caller use may reuse an existing facade; cua.rewriteDocumentation is the explicit retrieval path. Configurable timeout/reset rules remain unchanged.

    Structured status/preflight is useful but a locked screen is already refused before native dispatch, and a one-time probe cannot guarantee a later slot remains unlocked or the human remains absent.

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

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

    enhancementpriority:P2status:ready-for-implementer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions