发布

  • [OPIK-6838] [FE] fix: show prompt name + version instead of commit hash in experiment views (#7031)

    frostbyte_neo 发布于 2026-06-12 10:33:15 +00:00

    • [OPIK-6838] [FE] fix: show prompt name + version instead of commit hash

    Follow-up to PR #7017. Review feedback on the prompt-linkage work flagged
    that experiment surfaces show the raw prompt commit hash, which users don't
    recognize. Show the human-readable version (version_number, e.g. v3) next to
    the prompt name, mirroring the already-approved Prompt Library experiments
    tab, and fall back to the commit hash only when no version number is
    available (null for masks).

    Surfaces updated (all v2, display-only — no data-layer/BE change):

    • ExperimentsPage/GeneralDatasetsTab: "Prompt commit" column -> "Prompt",
      rendering " ()" via version_label.
    • CompareExperimentsPage/ConfigurationTab: NavigationTag label built from
      version_number ?? commit instead of commit.
    • dashboards/ExperimentsLeaderboardWidget: same column fix (caught in review;
      identical commit-hash issue on the dashboard leaderboard).

    Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

    • [OPIK-6838] [FE] refactor: extract shared formatPromptVersionLabel helper

    Address review feedback (baz): the " ()" formatting was
    duplicated across the three surfaces. Centralize it in a single tested
    helper in lib/experiments.ts and reuse it from the Experiments table column,
    the single-experiment Configuration tab, and the dashboard leaderboard widget
    so the display rule changes in one place.

    Also adds unit tests for the version-number/commit fallback and the
    no-version case.

    Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com


    Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

    下载附件