Skip to content

fix(users): ignore words made only of removed characters in the login suggestion - #21

Merged
MendesMat merged 1 commit into
mainfrom
fix/login-suggestion-symbol-words
Sep 27, 2026
Merged

MendesMat merged 1 commit into
mainfrom
fix/login-suggestion-symbol-words

Conversation

@MendesMat

Copy link
Copy Markdown
Owner

Follow-up to #19, found in the post-merge review of issue #5. No issue to close.

What

LoginSuggestion now normalizes and cleans each word of the full name before picking the first and last words, and drops words that become empty.

Full name Before After
"Ana Souza '" ana. ana.souza
"' Ana Souza" .souza ana.souza

Why

USR-15 says characters outside the login rule (apostrophes, extra spaces, symbols) are removed. They were removed only after the first and last words were joined, so a word made only of such characters left the joining dot behind.

A hyphen is inside the login rule, so a lone hyphen is still kept as a word ("José Silva -" gives jose.-), which is the literal reading of USR-15. Changing that would be a new rule for the owner to decide.

How to test

From backend/ControlService:

dotnet build ControlService.slnx -v q -clp:Summary
dotnet test --solution ControlService.slnx
dotnet format ControlService.slnx --verify-no-changes

Result: 0 warnings, 107 tests passing, formatting clean.

Checklist

  • Developed test-first (ADR-0033): Word_made_only_of_removed_characters_is_ignored failed with the outputs above before the fix
  • dotnet test --solution ControlService.slnx passes locally
  • Documentation updated (docs/product/, ADRs, README) when behavior or decisions changed: none needed, the code now matches USR-15
  • Rule IDs covered or changed are listed above: USR-15 (covered, not changed)
  • User-facing messages are verbatim from the feature document (CNV-16): none added

… suggestion

Characters outside the login rule were removed after picking the first
and last words, so a lone symbol left a stray dot ("Ana Souza '" gave
"ana."). Each word is now cleaned first and empty words are dropped
(USR-15).
@MendesMat
MendesMat enabled auto-merge (squash) September 27, 2026 05:52
@MendesMat
MendesMat merged commit 8437785 into main Sep 27, 2026
5 checks passed
@MendesMat
MendesMat deleted the fix/login-suggestion-symbol-words branch September 27, 2026 05:54
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