Skip to content

Fix feedback table layout with long metric names and many tags#6617

Open
simeonlee wants to merge 6 commits intomainfrom
simeonlee/feedback-table-layout
Open

Fix feedback table layout with long metric names and many tags#6617
simeonlee wants to merge 6 commits intomainfrom
simeonlee/feedback-table-layout

Conversation

@simeonlee
Copy link
Member

@simeonlee simeonlee commented Feb 27, 2026

Summary

  • Replace feedback table with card-based layout that handles long metric names and many tags gracefully
  • Each card shows: metric name + badges (row 1), ID + value (row 2), tags flowing naturally (row 3)
  • Tags display full content without truncation, wrapping as needed
  • Use proper design tokens (bg-bg-primary border-border, text-fg-muted/secondary/tertiary) and <Skeleton /> component
  • Add data-testid attributes for stable e2e test selectors

Closes #6437

Before

After

Feedback cards with long metric names, evaluation tags, and Latest/Overwritten badges

Empty state — no feedback

Test plan

  • All 107 e2e tests pass locally
  • Format, lint, typecheck pass
  • CI passes

- Truncate long metric names with ellipsis + tooltip on hover
- Constrain metric column to max-w-[300px]
- Collapse tags after 3 visible, showing "+N more" badge with tooltip
- Extract TagBadge into its own component for reuse

Closes #6437
@simeonlee simeonlee self-assigned this Feb 27, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97e4fd899e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 60 to 63
<TooltipTrigger asChild>
<Badge
variant="outline"
className="text-muted-foreground cursor-help text-xs"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make hidden-tags tooltip trigger focusable

The new +{hiddenCount} more control hides tags behind a tooltip, but its trigger is a Badge (renders as a non-focusable div) wrapped with TooltipTrigger asChild, so keyboard users cannot focus it to open the tooltip. In keyboard-only flows (and touch environments without hover), the hidden tags become effectively inaccessible, which is a regression from the previous behavior where all tags were visible.

Useful? React with 👍 / 👎.

Comment on lines 121 to 124
<TooltipTrigger asChild>
<span className="cursor-help truncate font-mono">
{getMetricName(item)}
</span>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose full metric names without hover-only interaction

This change truncates metric names and relies on a tooltip for the full value, but the tooltip trigger is a plain span inside TooltipTrigger asChild, which is not keyboard-focusable. As a result, keyboard-only users cannot reveal full metric names once truncated, so important row-identifying information is no longer reachable in non-mouse navigation.

Useful? React with 👍 / 👎.

Replace the table-based feedback layout with a card-based layout that
handles long metric names and many tags gracefully. Each card shows
metric name with badges on the first row, ID and value on the second
row, and tags flowing naturally on the third row.

- Use design tokens (text-fg-muted/secondary/tertiary) consistently
- Use Skeleton component for loading states
- Add data-testid attributes for stable e2e test selectors
- Remove all tag truncation to show full tag content
- Update e2e tests to use data-testid instead of table cell selectors
- Delete truncation test from TagsBadges.test.tsx (truncation was removed)
- Remove non-null assertions on optional last_id fields in feedback
  section consumers — props already accept undefined
- Add bg-bg-primary border-border tokens to match other cards in codebase
- Fix skeleton to match card layout (two-column header with timestamp)
- Extract getMetricName to local variable instead of calling 4x per card
- Remove redundant JSDoc comment on FeedbackCardsSkeleton
- Fix stale "table" references in comments
simeonlee added a commit that referenced this pull request Mar 2, 2026
simeonlee added a commit that referenced this pull request Mar 2, 2026
Scope getByText(json) to the feedback card to avoid strict mode
violation when the comment textarea hasn't closed yet.
Scope getByText("tensorzero::datapoint_id") to getByRole("cell") to
avoid strict mode violation — feedback cards now display tag badges
containing "tensorzero::datapoint_id=..." which matched the selector.
simeonlee added a commit that referenced this pull request Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feedback table on inference detail page breaks with long metric names or many tags

1 participant