Skip to content

Commit e4d7d11

Browse files
committed
Enhance AB channel display logic with source layer filters and improved logging
1 parent e2e0450 commit e4d7d11

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

packages/webui/src/client/ui/ClockView/DirectorScreen.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,23 @@ function shouldDisplayAbChannel(
100100
}
101101
}
102102

103+
// Check source layer filters (ID or Type)
104+
// If both filters are empty, show all pieces (no filtering)
105+
const hasSourceLayerIdFilter = effectiveConfig.sourceLayerIds.length > 0
106+
const hasSourceLayerTypeFilter = effectiveConfig.sourceLayerTypes.length > 0
107+
108+
if (!hasSourceLayerIdFilter && !hasSourceLayerTypeFilter) {
109+
console.log(`[AB Channel] ✓ No source layer filters specified, showing all`)
110+
return true
111+
}
112+
103113
// Check if source layer ID is explicitly listed
104-
if (effectiveConfig.sourceLayerIds.includes(pieceInstance.piece.sourceLayerId)) {
114+
if (hasSourceLayerIdFilter && effectiveConfig.sourceLayerIds.includes(pieceInstance.piece.sourceLayerId)) {
105115
return true
106116
}
107117

108118
// Check sourceLayer type match
109-
if (sourceLayer?.type && effectiveConfig.sourceLayerTypes.includes(sourceLayer.type)) {
119+
if (hasSourceLayerTypeFilter && sourceLayer?.type && effectiveConfig.sourceLayerTypes.includes(sourceLayer.type)) {
110120
return true
111121
}
112122

0 commit comments

Comments
 (0)