Skip to content

Correct mid-switch cua/entered accounting so model resume does not duplicate a character #186

Open

Description

@SSFSKIM

Problem & intent

On an input-source switch, cua/entered can be one short of the field's committed prefix. Holds 2a/2b recorded chrome 198/199, electron 188/189 and chrome 180/181 (reported/observed); hold 3 confirms 3 of 6 chrome/electron samples, TextEdit exact. A model resuming at that offset types a character twice.

Seams: native/engine/Sources/Engine/Keyboard.swift, cua/entered.

Constraints

Success criteria

  • Pin the counting unit and post/check boundary; cover switches immediately before and after one input unit.
  • Report the correct resume offset with no missed/double-counted unit; do not treat “sent” as proof of delivery.
  • Live fixture read-back in Chrome for Testing and Electron agrees with the offset; TextEdit remains exact.
  • Preserve inputSourceChanged and bounded termination, with no duplicating retry.

Open questions

Which ordering makes the count lag, and what unit does the public resume contract count? Compare the actual committed prefix.

Decision log

Sources

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P1status:ready-for-implementer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions