feat: visca commands on timeline#438
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
cd7d0c6 to
52d7748
Compare
52d7748 to
a76c777
Compare
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/timeline-state-resolver/src/integrations/viscaOverIP/state.ts`:
- Around line 33-40: convertStateToVisca currently only filters by device type,
which can cause cross-device contamination when multiple VISCA_OVER_IP devices
share mappings; update convertStateToVisca to additionally check deviceId so
only layers mapped to the target device are processed. Modify the function
(convertStateToVisca) to accept a deviceId parameter or read deviceId from
this.context, then when iterating tlObject and resolving mapping
(mappings[tlObject.layer]), validate mapping.deviceId === deviceId along with
the existing checks (mapping && mapping.device === DeviceType.VISCA_OVER_IP &&
tlObject.content.deviceType === DeviceType.VISCA_OVER_IP) before processing the
tlObject. Ensure you handle undefined mapping.deviceId safely and add/update
tests for multiple VISCA_OVER_IP devices to prevent regressions.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
packages/timeline-state-resolver-types/src/__tests__/__snapshots__/index.spec.ts.snapis excluded by!**/*.snappackages/timeline-state-resolver-types/src/generated/viscaOverIP.tsis excluded by!**/generated/**packages/timeline-state-resolver/src/__tests__/__snapshots__/index.spec.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (14)
packages/timeline-state-resolver-api/$schemas/mapping-schema.jsonpackages/timeline-state-resolver-types/src/index.tspackages/timeline-state-resolver-types/src/integrations/viscaOverIP.tspackages/timeline-state-resolver/src/integrations/viscaOverIP/$schemas/mappings.jsonpackages/timeline-state-resolver/src/integrations/viscaOverIP/__tests__/diff.spec.tspackages/timeline-state-resolver/src/integrations/viscaOverIP/__tests__/state.spec.tspackages/timeline-state-resolver/src/integrations/viscaOverIP/connection/commands/visca/focusCommand.tspackages/timeline-state-resolver/src/integrations/viscaOverIP/connection/commands/visca/panTiltDriveCommand.tspackages/timeline-state-resolver/src/integrations/viscaOverIP/connection/commands/visca/presetCommand.tspackages/timeline-state-resolver/src/integrations/viscaOverIP/connection/commands/visca/zoomCommand.tspackages/timeline-state-resolver/src/integrations/viscaOverIP/connection/lib/socket.tspackages/timeline-state-resolver/src/integrations/viscaOverIP/diff.tspackages/timeline-state-resolver/src/integrations/viscaOverIP/index.tspackages/timeline-state-resolver/src/integrations/viscaOverIP/state.ts



About the Contributor
This pull request is posted on behalf of the BBC
Type of Contribution
This is a: Feature
New Behavior
The VISCA device exposes functionality as TSR actions, but not on the timeline. This translates relevant portions to be addressable on the timeline too.
Testing Instructions
Other Information
Status