-
[OPIK-4571] [FE] fix: hydrate video/audio data in playground dataset items (#5487)
发布于
2026-03-03 15:40:06 +00:00 - [OPIK-4571] [FE] fix: hydrate video/audio data in playground dataset items
The playground only checked for [image] placeholders when deciding
whether to re-fetch full dataset item data, missing truncated video
and audio base64 content. Extended detection to cover all media types
(image/video/audio placeholders and data URIs).Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- fix(video): cache permanent thumbnail failures to prevent repeated errors
Only caches decode/format errors (MEDIA_ERR_DECODE, MEDIA_ERR_SRC_NOT_SUPPORTED),
not network errors or timeouts which are transient and should retry.Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- [OPIK-4571] [FE] Optimize media detection and dataset hydration performance
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- refactor(playground): extract containsTruncatedMedia to lib/media with tests
Move truncation detection logic from useHydrateDatasetItemData into
lib/media.ts as containsTruncatedMedia. Narrow placeholder regex to
only match [image] (backend never generates [video]/[audio] placeholders).
Add 22 tests covering placeholders, truncated data URIs, nested
structures, and false positive prevention.Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- fix(playground): show all dataset items immediately during hydration
Return all items upfront and replace each with hydrated data in-place
as it completes, instead of appending items one by one.Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Co-authored-by: Claude Opus 4.6 noreply@anthropic.com
下载附件