发布

  • [OPIK-6818] [FE] Redesign dataset & test suite creation flow (#7014)

    frostbyte_neo 发布于 2026-06-11 12:14:53 +00:00

    • feat(datasets): redesign create flow for datasets & test suites

    Add a two-path creation experience for datasets and test suites:

    • "Create" now opens a dropdown with two options (Upload a file / Use
      SDK), shared via CreateEntityMenu so the header button and the empty
      state stay in sync.
    • Empty state shows the two options as cards alongside the illustration
      (DatasetEmptyState); the header button is hidden while empty.
    • Upload path: a tall, full-area dropzone (DatasetCsvDropzone) accepting
      CSV/JSON, auto-naming from the filename (with a date suffix), then
      Name + optional Description and, for test suites, an "Advanced options"
      accordion reusing EvaluationCriteriaSection.
    • SDK path: Name + segmented Python/TypeScript snippet + optional
      Description.
    • Assertions empty state now uses the opik-leaf icon (theme-aware).

    useDatasetForm gains an opt-in appendDateToAutoName and exposes the
    runs/threshold setters for the reused criteria section.

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

    • ui updates from feedback;

    • fix(datasets): address review feedback (tokens, a11y, regressions)

    • AssertionsField: restore type="button" on the "Add assertion" button so
      it doesn't submit the surrounding form (regression from the DS Button swap).
    • Tokenize create-flow colors: use --toggle-outline-active for the hover/drag
      state and add --upload-chip-{bg,border,icon-bg} tokens (light + dark) in
      main.scss instead of hardcoded hexes.
    • DatasetCsvDropzone: announce upload validation errors via role="alert".
    • useDatasetForm: derive the auto-name date suffix from the user's local day
      (toLocaleDateString en-CA) rather than UTC.
    • CreateDatasetSidebar: treat uploadError as dirty for the close guard, and
      clear evaluation criteria when switching to the SDK flow.

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

    • sidebar is not closable and edit is open smoothly;

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

    下载附件