The sync-back effect ran whenever the popup transitioned to closed
and unconditionally re-filled the input from labels[value]. Result:
clearing a Combobox visually erased the text but onValueChange
never fired and the original selection reappeared on blur.
Reconcile properly:
- empty input + closed popup → clear value via setValue(null), so
consumers get notified and can reset dependent UI (e.g. roles
filtered by application);
- non-empty input that doesn't match the current label → restore
the label (existing behaviour, kept for the "abandoned typing"
case);
- input already matches → no-op.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>