Skip to content

fix(sections-editor): make the "Always" matcher option searchable by its translated label - #6437

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/matcher-picker-always-value-i18n-w1
Aug 24, 2026
Merged

fix(sections-editor): make the "Always" matcher option searchable by its translated label#6437
pedrofrxncx merged 1 commit into
mainfrom
fix/matcher-picker-always-value-i18n-w1

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Follows the same bug class fixed in #6408 (task-board filters), found while hunting for hardening follow-ups to recent merges.

Bug: In matcher-picker.tsx, the "Always" rule's CommandItem had a hardcoded English search value ("always Target all users") while its rendered label is fully translated (alwaysLabel / targetAllUsers). cmdk's fuzzy filter matches against the value prop, not the rendered children, so a pt-BR user typing what they actually see on screen ("Sempre", "Direcionar todos os usuários") gets zero results and can't find the option — exactly the failure #6408 fixed for the assignee/repo filters.

Fix: build the search value from the same two translation keys already used for the visible label, so the searchable text always matches what's rendered in the active locale.

Verify: open the matcher picker (sections-editor rule dialog) with language: pt-BR in preferences and type "Sempre" — the "Always / Target all users" option should now show up.

Checks run locally: bun run fmt, bun test apps/web/src/components/sections-editor/matcher-picker.test.ts (8 pass), bunx oxlint apps/web/src/components/sections-editor/matcher-picker.tsx (0 warnings/errors), cd apps/web && bunx tsc --noEmit (clean). Full CI validates the rest.


Summary by cubic

Makes the "Always" matcher option searchable in all locales by building its search value from the same translated strings used in the label. Previously the CommandItem.value was hardcoded to English, so cmdk search failed for non-English users; now it matches the rendered locale with no UI change.

  • Verify: switch language to pt-BR, open the sections editor matcher picker, type "Sempre" and confirm the "Always / Target all users" option appears.

Written for commit dae1a8c. Summary will update on new commits.

Review in cubic

…its translated label

The CommandItem's search value was hardcoded to the English string
"always Target all users", the same bug class fixed in #6408 for the
task-board filters: cmdk filters by the value prop, not the rendered
children, so a pt-BR user typing what they actually see ("Sempre",
"Direcionar todos os usuários") can't find this option. Build the
search value from the same translated strings already rendered.
@pedrofrxncx
pedrofrxncx merged commit 1b3408c into main Aug 24, 2026
34 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/matcher-picker-always-value-i18n-w1 branch August 24, 2026 16:04
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.

1 participant