updateSessionLabelCache function
Implementation
void updateSessionLabelCache(
Map<String, String> labelsById,
SessionRecord record,
) {
if (record is! LabelRecord) return;
final label = record.label?.trim();
if (label != null && label.isNotEmpty) {
labelsById[record.targetId] = label;
} else {
labelsById.remove(record.targetId);
}
}