Skip to content

[Bug] useTriggerMenu closes @ menus when the query contains whitespace #6110

Description

@testikun

Description

useTriggerMenu stops scanning an active trigger as soon as it encounters a space or newline. That single-token grammar is appropriate for / commands, but it prevents @ menus from searching multi-word entity names and prevents a trailing @ from keeping the complete reference list open.

Consumers currently have no option to configure whitespace behavior per trigger. Maka therefore carries a local @astryxdesign/core@0.5.2 patch for its Composer Session-reference picker. A public trigger option or built-in distinction between / and @ would let that patch be removed.

Expected behavior: a trigger can opt into queries containing whitespace. Slash-command behavior should remain unchanged by default.

Reproduction

  1. Configure useTriggerMenu with both / and @ triggers.
  2. Open the @ menu and type @Project Alpha, or type @ to browse all reference candidates.
  3. Observe that the active trigger is cleared at the first space, so the menu closes and cannot match the multi-word name.
  4. The same single-token behavior is desirable for /command args, so changing the global scanner without a per-trigger policy would regress slash commands.

Astryx Version

@astryxdesign/core@0.5.2

Environment

Electron 43 / Chromium, macOS. The behavior is in the trigger parser and is not platform-specific.

Downstream context: apache/maka#4446.

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