发布

  • [OPIK-5912] [FE] feat: add tag autocomplete to filter UIs (#6517)

    frostbyte_neo 发布于 2026-04-28 12:32:38 +00:00

    • [OPIK-5912] [FE] feat: add tag autocomplete to filter UIs

    Tag filter inputs across v2 dashboards, logs, automations, annotation queues,
    and the experiments page now show a searchable dropdown of existing tags
    sourced from the relevant entity (traces, spans, threads, or experiments).
    Free-form typing is preserved so unknown tags still apply.

    Co-Authored-By: Claude Haiku 4.5 noreply@anthropic.com

    • fix(tags-autocomplete): match placeholder phrasing to other autocompletes

    Co-Authored-By: Claude Haiku 4.5 noreply@anthropic.com

    • refactor(tags-autocomplete): extract pure helpers, add tests, share filter config

    Addresses PR review feedback:

    • coerce filter.value to string in ListRow value cell to prevent crashes
      when persisted numeric values reach string-only consumers (uses the
      shared toString helper from lib/utils.ts)
    • extract extractTagsFromItems and filterTagsByQuery into pure helpers
      so the trim/dedupe/sort/case-insensitive-filter logic can be unit
      tested without React; add Vitest coverage for null/undefined,
      whitespace-only, dedupe, and case-insensitive cases
    • add getTagsFilterConfig() helper (mirrors getSpanTypeFilterConfig
      pattern from spanTypeFilter.tsx) so the eight integration sites
      spread a partial rowsMap instead of repeating the keyComponent cast
      and keyComponentProps block

    Co-Authored-By: Claude Haiku 4.5 noreply@anthropic.com

    • refactor(tags-autocomplete): split filter-config helper into its own file and move out of pages-shared/shared

    Mirrors the spanTypeFilter.tsx pattern: getTagsFilterConfig now lives at
    v2/pages-shared/TagsAutocomplete/tagsFilterConfig.ts (separate from the
    component). Also moves the directory from v2/pages-shared/shared/ up to
    v2/pages-shared/ to match the convention used by sibling autocompletes
    (DatasetVersionSelectBox, ExperimentFeedbackScoresViewer, etc.).

    Co-Authored-By: Claude Haiku 4.5 noreply@anthropic.com


    Co-authored-by: Claude Haiku 4.5 noreply@anthropic.com

    下载附件