发布

  • [OPIK-6840] [FE] Fix best trial configuration showing initial prompt instead of optimized prompt (#7009)

    frostbyte_neo 发布于 2026-06-10 13:55:57 +00:00

    • [NA] [FE] Fix best trial configuration showing initial prompt instead of optimized prompt

    The hasRichContent check in TrialConfigurationSection only recognized
    'prompt_messages' and 'model' as indicators of rich content. GEPA and
    Hierarchical Reflective optimizer trials store their prompt under the
    'prompt' key, so the check always fell through to
    buildConfigFromStudioConfig(studioConfig), displaying the baseline
    'Initial prompt' instead of the trial's actual optimized prompt.

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [NA] [FE] Fix best trial configuration showing initial prompt instead of optimized prompt
    • Add "prompt" key to hasRichContent check in TrialConfigurationSection so GEPA/Hierarchical optimizer trials use their own metadata.configuration instead of falling back to the baseline studioConfig
    • Merge studio config metadata (Dataset/Model/Algorithm/Metric) with trial's actual prompt so context fields remain visible alongside the correct optimized prompt
    • Move Dataset/Model/Algorithm/Metric above the Prompt entry in both Configuration and Diff vs baseline views
    • Improve Diff vs baseline view: remove accordion nesting for named prompts, style message blocks to match Configuration view (bg-muted/30, gray role tag), keep metadata fields visible when switching between tabs
    • Add extra_hosts host-gateway to python-backend in docker-compose.override.yaml to fix host.docker.internal resolution on macOS Docker Desktop

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [OPIK-6840] [FE] Fix linter errors in TrialConfigurationSection and PromptDiff

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [OPIK-6840] [FE] Add prompt column to Trials table and GEval metric expand
    • Add Prompt column to the Trials table showing all messages with role
      labels (System/User) formatted for readability
    • Add diff icon (GitCompareArrows) for all non-baseline rows that opens
      a popover with PromptDiff vs baseline prompt
    • Prompt cell respects row height: truncated single line for small/medium,
      scrollable multi-line (h-full overflow-y-auto) for large rows
    • Add expandable metric details in Best Trial Configuration panel:
      clicking the chevron on the Metric row reveals Task Introduction and
      Evaluation Criteria inline
    • Fix page scroll on Trials tab: switch from internal-scroll (h-full)
      layout to natural-height min-h-full so the page scrolls like other pages
    • Add bottom padding below the trials table

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [OPIK-6840] [FE] Fix linter errors

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [OPIK-6840] [FE] Fix NamedPromptsDiff flattening and DiffSection null safety
    • NamedPromptsDiff now iterates per named prompt key instead of
      flattening all prompts into one array — fixes incorrect diffs for
      multi-prompt optimizations (MetaPromptOptimizer) where each key is a
      separate prompt with its own message list
    • Single-key configs (the common case) render without a label as before;
      multi-key configs show a small label above each MessagesDiff group
    • DiffSection coerces undefined baseline/current to null before passing
      to PromptDiff so added/removed prompts don't cause a crash

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [OPIK-6840] [FE] Show prompt name in Best Trial Configuration section

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [OPIK-6840] [FE] Address PR review comments in TrialConfigurationSection
    • Extract METRIC_KEY constant instead of hardcoded "Metric" strings
    • Use extractNamedPrompts from @/lib/prompt instead of inline named-prompt check
    • Normalize messages via extractMessages when rendering named prompts to handle OpenAI content-parts arrays

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

    • [OPIK-6840] [FE] Restore isArray import removed by mistake

    Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com


    Co-authored-by: Claude Sonnet 4.6 noreply@anthropic.com

    下载附件