-
[OPIK-6346] Silent-skip playground logging when permissions are missing (#6574)
发布于
2026-05-06 13:02:26 +00:00 - [OPIK-6346] Silent-skip playground logging when permissions are missing
When a user has Use playground but lacks Log trace, span or thread,
clicking Run produced a destructive red toast because the playground
unconditionally posted to /traces/batch and /spans/batch (returning
401). Same for Create experiment in dataset mode.Gate createLogPlaygroundProcessor on canLogTraceSpanThread (and
additionally on canCreateExperiments in dataset mode). When
prerequisites are missing, swap in a no-op processor so no API calls
are made and no toast fires; the LLM run still completes and renders.
The destructive toast now only fires for genuine failures.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
- refactor(playground): hoist no-op log processor to shared constant
Address review feedback on PR #6574: the inline
{ log: () => {}, finishLogging: () => {} } empty state was duplicated
in three call sites. Hoist it to NOOP_LOG_PROCESSOR alongside the
LogProcessor interface and reuse from both v1 and v2.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
- refactor(playground): extract buildLogProcessor helper for shared gating
Address review feedback on PR #6574: the gating block (datasetName +
permissions -> processor or noop) was duplicated across three call
sites (v1 runAll, v2 runAllViaFrontend, v2 runSingleViaFrontend).
Extract buildLogProcessor in createLogPlaygroundProcessor and reuse
from all three.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
- fix(playground): hide "Test on" entry when experiment perms missing
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
- fix(playground): require both experiment perms to show "Test on"
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
- refactor(playground): collapse Test on visibility gate to single condition
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
- refactor(playground): apply De Morgan to Test on visibility gate
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com
下载附件