Skip to content

Fix case/whitespace sensitivity in duplicate label detection#1346

Open
maebeale wants to merge 1 commit intomainfrom
maebeale/fix-dropdown-case-search
Open

Fix case/whitespace sensitivity in duplicate label detection#1346
maebeale wants to merge 1 commit intomainfrom
maebeale/fix-dropdown-case-search

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Mar 5, 2026

What is the goal of this PR and why is this important?

  • resolve_duplicate_labels used exact Ruby string comparison to detect duplicate workshop labels in remote-select dropdowns
  • Workshops with the same name but different casing (e.g. "Art Therapy" vs "art therapy") or extra whitespace would not get IDs appended, making them indistinguishable in the dropdown

How did you approach the change?

  • Normalize labels with .squish.downcase for grouping/comparison, while preserving the original label text for display
  • Added specs for case-insensitive and whitespace-insensitive duplicate detection

Anything else to add?

  • Also confirmed that all workshop search paths (remote search, title scope, full-text, author) are case insensitive via MySQL utf8mb4_unicode_ci collation

🤖 Generated with Claude Code

resolve_duplicate_labels was using exact string comparison to detect
duplicates, so workshops with the same name but different casing or
whitespace would not get IDs appended to disambiguate them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants