Skip to content

Preserve committed text during rapid WGPU key input #3

Description

@kortexa-ai-bot

Problem

During the native mini-app experiment in https://github.com/kortexa-ai/zendo.sh/issues/25, rapid injected text into Warren textInput changed the actual input string. Loading the resulting path produced ENOENT with the corrupted path, so this was not just a text-rendering defect.

Reproduction

  • macOS 26.6.2 arm64, M4 Pro.
  • Electrobun 2.0.2-beta.13; Cottontail 0.6.0-canary.13, revision b1130364d5cc70882241753cf6c1ad7a9db730a4; runtime SHA-256 098ca38de283a8bcdd87687f8245e0fa5c5d9f5086480c98c3f75b0691fa9d8f.
  • Native Warren createUIWindow with a controlled textInput using signal, onInput: setValue, and onSubmit.
  • Focus the field and inject /tmp/zendo-25-ui-fixture.mjs as a rapid sequence with CUA native typeText, then Return.
  • Observed value: /zzzzznn22225i---ixurrjjjis (rather than the submitted path).
  • A subsequent short burst also changed characters. Discrete key calls improved the result but still lost a leading slash when sent immediately after Cmd+Backspace.

The reproduction uses synthetic native key events. Normal typing rates, IME, and other platforms have not been tested. Root cause is not confirmed. Inspect the native WGPU key callback, FFIType.cstring ownership across deferred/threadsafe callbacks, and input event ordering. If the defect belongs in Cottontail, create a native dependency there with a minimal reproduction.

Acceptance

  • Preserve exact ASCII and Unicode text, including punctuation, across bounded rapid key bursts and modifier transitions.
  • Retain a native regression fixture under the exact shipped Cottontail artifact, plus a normal typing check.
  • Do not paper over committed text corruption with a US keyboard map.
  • Integrate the fix into Zendo before treating its composer text-entry path as validated.

Current workaround

The mini-app workbench uses a native Open file dialog to choose source modules; built-in counter and GPU fixtures also launch by button. This does not fix Warren text input.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions