# fix\(snapshot\): fall back when provider display name is blank \(\#355\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/2b545120192d7d0bfc927de60144428078870a63)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: 2b545120192d7d0bfc927de60144428078870a63

Requested commit: 2b545120192d7d0bfc927de60144428078870a63

Commit: 2b545120192d7d0bfc927de60144428078870a63

Tree: f8fc35a1a43603936a8956214db32e7303088957

Author: Simone

Committer: GitHub

## Message

```
fix(snapshot): fall back when provider display name is blank (#355)

When a CLI provider record included a whitespace-only displayName, ProviderSnapshot.normalize treated it as truthy, trimmed it to an empty string, and broke out of the candidate loop without checking the fallback title or leaving displayName null. Downstream, snapshot.displayName === null evaluated to false, causing the empty string to bypass the configured roster display name and clear the provider title.

Require candidate display text to be non-empty after bounding and trimming before accepting it and breaking the candidate loop.

Regression tests: QtTest fallback in tst_provider_snapshot.qml and roster display-name retention in test_provider_metadata.py.
```

## Parents

- [370cae740322fcf28ce043fa9aa9d96e830542b3](https://git.cafe/lucenx/codexbar-plasma/commit/370cae740322fcf28ce043fa9aa9d96e830542b3?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/2b545120192d7d0bfc927de60144428078870a63?format=markdown)
