[codex] Harden dynamic media preset graph node#6
Merged
Conversation
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
This PR hardens Graph Studio's Media Preset path around one schema-driven
Media Presetnode instead of generated per-preset nodes.It adds a backend preset catalog for node definitions, dynamic preset fields and image-slot ports, runtime validation for selected models and required slots, and browser-facing helpers so selecting a preset updates the visible fields/model options without stale generated node definitions.
It also reduces graph history noise by adding lightweight run summary endpoints and caps history loading to the recent run summaries rather than pulling full run payloads by default.
Validation
./scripts/with_shared_python.sh -m pytest apps/api/tests/test_graph_studio.py -qnpm --workspace apps/web run test -- graph-media-preset graph-node-field graph-tabs graph-media-previewnpm --workspace apps/web run test -- studio-gallery media-studio-helpers studio-composer-restore studio-attachment-staging studio-polling studio-shortcuts media-payloadnpm run typecheck:webnpm run lint:webnpm run build:webgit diff --checkDream Magazine Cover Portrait Demoin Graph Studio: reference image -> dynamic Media Preset -> preview completed with generated assetasset_4af76e9f143cand no visible runtime error.Notes