Skip to content

Commit 0fc5f39

Browse files
committed
Enhance AB channel display logic with source layer filters and improved logging
1 parent f32cbfa commit 0fc5f39

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
@@ -96,13 +96,23 @@ function shouldDisplayAbChannel(
9696
}
9797
}
9898

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

104114
// Check sourceLayer type match
105-
if (sourceLayer?.type && effectiveConfig.sourceLayerTypes.includes(sourceLayer.type)) {
115+
if (hasSourceLayerTypeFilter && sourceLayer?.type && effectiveConfig.sourceLayerTypes.includes(sourceLayer.type)) {
106116
return true
107117
}
108118

0 commit comments

Comments
 (0)