-
[OPIK-7728] [QA] fix: scope studio prompt editors to their message role (#7723)
发布于
2026-08-04 11:09:04 +00:00 The v2 new-run form now seeds system + user messages instead of a lone
user message, and each message card renders its own
playground-message-editor, so the POM's unscoped selector matched two
editors and every optimization-studio test failed on a strict-mode
violation.Scope the editor to the panel and the card's
data-role, mirroring the
prompts POMs. Two consequences of the new shape needed handling beyond
the selector: the schema requires every message to be non-empty while the
Optimize button's disabled gate does not cover message content, so a run
that filled only the user card submitted, got rejected by validation, and
timed out on navigation with no stated cause. Fill both cards, and report
the validation error when it happens.Split the spec's prompt the way the product intends — instruction in the
system message, the dataset variable alone in the user message — so the
optimizer cannot rewrite away{{text}}.Co-authored-by: Claude Opus 5 noreply@anthropic.com
下载附件