Skip to content

Deletion confirmation fails when application name contains trailing whitespace #8429

@mujtabaalmas

Description

@mujtabaalmas

Preliminary Checks

Reproduction

https://github.com/mujtabaalmas/clerk_issue_repository

Publishable key

pk_test_a25vd24tam9leS00NS5jbGVyay5hY2NvdW50cy5kZXYk

Description

There is a UX issue when deleting an application if the application name contains trailing whitespace.

Steps to reproduce:

  1. Create a new application with a name that includes 3 trailing space (e.g., "my application ").
  2. Go to delete the application.
  3. In the confirmation input, type "my application" (without trailing space).

Actual behavior:

  • The deletion fails with the message:
    Please type "my application " to confirm
  • However, the UI does not clearly show that there is a trailing space in the required text.
  • Even when typing the visible name exactly, deletion is rejected.

Expected behavior:

  • Either:

    • Trim whitespace when saving or validating names, OR
    • Clearly show trailing whitespace in the confirmation UI, OR
    • Ignore leading/trailing whitespace during confirmation matching

Impact:

  • Confusing UX
  • Users may get stuck and unable to delete applications
  • Invisible characters should not block destructive actions

Suggested fix:

  • Apply .trim() on both stored name and input during comparison
  • Or visually indicate whitespace (e.g., show · or highlight spaces)
Image Image

This seems like a small validation issue but creates a blocking experience.

Environment

Environment:
Clerk Dashboard: Development (dashboard.clerk.com)
Browser: Google Chrome 
OS: Windows 11
Device: Desktop

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageA ticket that needs to be triaged by a team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions