fix: align static external_pads with computed defaults#492
Merged
Conversation
When dragging a block into the editor, the frontend renders the static external_pads from the block definition (computed_external_pads is None). After saving, the backend computes pads via get_external_pads() which could differ, causing ports to appear or disappear unexpectedly. Blocks fixed: - MPEG-TS/SRT Input: was missing audio port (A0 appeared after save) - MPEG-TS/SRT Output: was missing audio port (A0 appeared after save) - WHEP Output: showed audio+video but default mode is video-only (A0 disappeared after save) - Vision Mixer: showed MAX (10+4 DSK) inputs instead of DEFAULT (4+0) (10 inputs collapsed to 4 after save) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Aligns with all other audio/video blocks which default to 1 video + 1 audio. Updates the enum default, property default value, and static external_pads. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts commit 8b65ded.
This reverts commit f4cf85d.
Collaborator
Author
|
wait a bit with this. it changes default behavior for whep output ports; it adds a default audio port, which is more correct, but it's a change without proper migration for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Static
external_padsin each block definition now match whatget_external_pads()produces with default property values, so blocks look correct immediately when dragged into the editor.Test plan
cargo test --test openapi_testpasses🤖 Generated with Claude Code