Skip to content

fix(queen): multiline input race condition — debounced binding #403

Description

@gHashTag

Problem: Chat input field in Queen UI постоянно ломается - нельзя писать, инпут не работает нормально.

Root Cause: Race condition в Coordinator.textDidChange() между NSTextView и SwiftUI binding.

Solution:

  • Added isUserEditing flag to prevent SwiftUI race
  • Debounced binding updates (50ms) in textDidChange
  • Added textDidEndEditing for final sync on focus loss
  • Enhanced updateNSView to check BOTH first responder AND isUserEditing
  • Added deinit for timer and notification cleanup

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions