A small module assembles ContactCard from raw profile data and prepares a string for the UI. After a recent PR, some records started showing incorrect labels, and for some inputs card construction fails with an error.
You need to review the changes and find the causes of the regressions.
displayName must be None if the name is missing, equals null, or consists only of spaces.email should be preserved only if it actually exists; absence of a value must not lead to an error.headline must be built according to the rules:
<name> <email>;<name>;anonymous.null at the input boundary.scala-cli run .
RawProfile("u-1", " ", null);RawProfile("u-2", null, null);RawProfile("u-3", "Mila", "mila@example.test").headline should be anonymous, and displayName should be None.email = null, creating the card must not crash.scala-cli run .Use line comments to explain the problem, its impact, the fix and how to test it.