发布

  • [OPIK-6167] [FE] fix: rename Test suite column to Item source (#6504)

    frostbyte_neo 发布于 2026-05-13 15:31:15 +00:00

    • [OPIK-6167] [FE] fix: rename "Test suite" column to "Item source" with dynamic icon and group label

    Unifies the experiment list dataset/test-suite column to "Item source",
    showing a Database/ListChecks icon per row and a dynamic "Dataset"/"Test suite"
    prefix on grouped rows; v2 only.

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

    • [OPIK-6167] [FE] fix: align Item source rename across charts, prompt experiments tab, and dashboard widgets

    Apply the rename and icon badge to remaining v2 surfaces missed in the
    first pass: experiments-grouped chart legend, Prompt page experiments tab,
    ExperimentWidgetDataSection filter list, and the leaderboard widget cell.

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

    • [OPIK-6167] [FE] fix: move ItemSourceCell to pages-shared and align deleted-entity label

    Resolves frontend dependency-cruiser violations: ItemSourceCell no longer
    lives under a page module imported by another page or by pages-shared
    helpers. Also retires the stale "Deleted test suite" string from the
    chart legend in favor of a neutral "Deleted dataset" matching the
    underlying entity.

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

    • [OPIK-6167] [FE] fix: fall back to "Item source" when dataset type is unknown in group row label

    Avoids confidently mislabeling unknown/deleted/orphan groups as "Dataset"
    when the dataset is not in the loaded datasets slice. Returning an empty
    string lets generateGroupedRowCellDef fall back to the static column
    label, which is neutral and correct.

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

    • [OPIK-6167] [FE] fix: drop trailing colon on Item source group row label to match Figma

    Figma OPIK-6167 shows the prefix as "Test suite test_suite_name (23)"
    (no colon between the label and the linked entity). Add an additive
    hideGroupRowLabelColon flag in customMeta and set it for the dataset
    group case in v2; v1 group rows keep their existing colon since they
    do not pass the flag.

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

    • [OPIK-6167] [FE] fix: route Item source cell to test-suite URL based on evaluation_method
    • ItemSourceCell: derive resource (and icon) from evaluation_method so
      TEST_SUITE experiments link to /test-suites/{suiteId}/items instead of
      the dataset URL; drop now-redundant resource field from customMeta.
    • ResourceCell.Group: add optional getResource(cellData) callback so
      callers can pick the link's resource at render time.
    • useExperimentsTableConfig: wire getResource on the dataset_id group
      cell to switch to RESOURCE_TYPE.testSuite when the row is a test
      suite, and read evaluation_method on the row directly in
      getGroupRowLabel before falling back to datasetTypeMap (covers
      datasets beyond the page-1 slice fetched by useDatasetsList).
    • Extract ITEM_SOURCE_LABEL constant from ItemSourceCell and reuse it
      across the experiments table, filters/groups config, dashboard
      widgets, and prompt experiments tab to avoid drift.
    • [OPIK-6167] [FE] fix: drop link when item source resource type is unknown

    When an experiment row lacks evaluation_method and the dataset isn't
    in the (page-1-only) datasetTypeMap, ItemSourceCell and the dataset
    group cell were silently routing to /datasets/:id/items, which 404s
    for test suites. Extract a shared resolveItemSourceResource helper,
    plumb datasetTypeMap through TableMeta so ItemSourceCell can use the
    same fallback as the group cell, and render plain text (no link)
    when the resource type can't be determined.

    • [OPIK-6167] [FE] revert: drop overcomplicated TableMeta/ResourceCell plumbing

    Reverts 98e05eb190 surgically — keeps the rename, dynamic icon, and
    test-suite routing from the prior commits, and drops:

    • DataTable TableMeta augmentation with datasetTypeMap (touched table core)
    • ResourceCell.Group signature widening + plain-text fallback (shared cell)
    • resolveItemSourceResource helper + datasetTypeMap plumbing in ItemSourceCell
    • shared resolver call sites in useExperimentsTableConfig

    Group cell falls back to RESOURCE_TYPE.dataset when the type is unknown,
    which can mis-route deleted/orphan rows. That's an acceptable trade-off
    for OPIK-6167 versus modifying core table types and shared cells.

    • [OPIK-6167] [FE] revert: drop entity-specific knobs from generateGroupedRowCellDef

    generateGroupedRowCellDef is a shared helper. getGroupRowLabel and
    hideGroupRowLabelColon were added solely for the experiments dataset
    column — neither has any other caller. They don't belong in shared
    table utils.

    Group rows now show the column's static "Item source" label with the
    default trailing colon, matching every other grouped table.

    • [OPIK-6167] [FE] feat: icon-in-pill cell + custom group cell with dynamic prefix
    • Wrap data-cell icon in slate-100 24x24 rounded pill matching Figma node 6095:48496
    • Add createItemSourceGroupCell factory owning the full group-row layout
      (checkbox + chevron + dynamic prefix + resource link/text + count + explainer),
      keeping generateGroupedRowCellDef and ResourceCell.Group untouched
    • Pass datasetTypeMap via column customMeta instead of TableMeta

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

    • [OPIK-6167] [FE] feat: add hover tooltip with item name on source cell

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

    • [OPIK-6167] [FE] fix: shrink Item source icon to 20px and truncate long names

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

    • [OPIK-6167] [FE] fix: keep Item source in columns menu when grouping by dataset

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

    • [OPIK-6167] [FE] fix: preserve filtered-out column IDs when reordering columns

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

    • [OPIK-6167] [FE] fix: always show border-right on last left-pinned column

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

    • [OPIK-6167] [FE] fix: prettier formatting in ItemSourceCell group cell

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


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

    下载附件