Files
OrcaSlicer/tests/slic3rutils
Andrew 33be9775dc Fix inconsistent displayed name (#13645)
* Add get_json_string_field helper

Introduce get_json_string_field in OrcaCloudServiceAgent.cpp to safely extract string fields from JSON objects.

* Add resolve_display_name helper

Introduce resolve_display_name to normalize provider metadata labels for the UI. The helper returns the first non-empty value from display_name, nickname, full_name, name, falling back to username, resolving human-facing label across varying provider payloads.

* Replace safe_str anonymous function

Replace get_json_string_field for better readability.

* Replace resolution flow for nickname with function

Consolidate both flows into one function for easier maintenance and more consistency.

* Update OrcaCloudServiceAgent.hpp

* Add OrcaCloudServiceAgent display name tests

Add unit tests verifying OrcaCloudServiceAgent resolves a user's display name from various session JSON shapes.
2026-05-13 17:58:08 +08:00
..