Skip to content

isOnboardingInputAllowed fails on mixed-case or untrimmed demo and input kinds #1831

Description

@hsusul

Describe the bug

In src/helpers/onboardingInputPolicy.js:

isOnboardingInputAllowed(onboardingActive, demoKind, inputKind) performs strict case-sensitive checks against ONBOARDING_DEMO_KINDS and demoKind === inputKind. When demoKind or inputKind is passed with mixed casing (e.g. "Dictation", "Assistant") or surrounding whitespace, it returns false during active onboarding demos instead of allowing the corresponding input.

To Reproduce

  1. Call isOnboardingInputAllowed(true, "Dictation", "dictation") -> returns false (expected true).
  2. Call isOnboardingInputAllowed(true, " Assistant ", "assistant") -> returns false (expected true).

Expected Behavior

isOnboardingInputAllowed should normalize demoKind and inputKind case-insensitively with whitespace trimming.

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