Skip to content

refactor/show all tags#1617

Open
kolbeyang wants to merge 3 commits intodevfrom
refactor/show-all-tags
Open

refactor/show all tags#1617
kolbeyang wants to merge 3 commits intodevfrom
refactor/show-all-tags

Conversation

@kolbeyang
Copy link
Copy Markdown
Collaborator

@kolbeyang kolbeyang commented Apr 9, 2026

List all tags in trace view header and span view header

image

Note

Low Risk
Mostly UI refactor to render tags as badges instead of a compact count, with minimal behavioral changes; small risk of layout/regression in dropdown trigger rendering and tag color handling.

Overview
Updates trace and span tag controls to always display all applied tags inline as Badges next to a simplified "Tags" dropdown button, replacing the prior compact dot/count button UI.

Renames/rewires usages to TraceTagsList and SpanTagsList in the trace header and span controls, and adjusts .gitignore to ignore the entire .agent-team/ directory.

Reviewed by Cursor Bugbot for commit 137f91d. Bugbot is set up for automated code reviews on this repo. Configure here.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 9, 2026

CLA assistant check
All committers have signed the CLA.

@kolbeyang kolbeyang changed the base branch from main to dev April 9, 2026 12:44
@kolbeyang kolbeyang self-assigned this Apr 9, 2026
@kolbeyang kolbeyang requested a review from olzhik11 April 9, 2026 12:44
</DropdownMenuTrigger>
</TagsDropdown>
{tags.map(({ name, color }) => (
<Badge variant="outline" className="rounded-full gap-1">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@kolbeyang need a key here

</DropdownMenuTrigger>
</TagsDropdown>
{tags.map(({ name, color }) => (
<Badge variant="outline" className="rounded-full gap-1">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here, key prop

olzhik11
olzhik11 previously approved these changes Apr 9, 2026
Copy link
Copy Markdown
Member

@olzhik11 olzhik11 left a comment

Choose a reason for hiding this comment

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

other than 2 comments lgtm

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 9, 2026

Greptile Summary

This PR refactors the trace and span view headers to display all tags inline as Badge components rather than only showing them inside a dropdown. Two new components, TraceTagsList and SpanTagsList, are introduced — each rendering the Tags dropdown button followed by the full list of applied tags as colored pill badges.

  • trace-tags-list.tsx — new component: renders TraceTagsList with inline tag badges; correctly structured.
  • span-tags-list.tsx — new component: renders SpanTagsList with inline tag badges; contains a duplicate nested DropdownMenuTrigger asChild that should be one level only (see inline comment).
  • span-controls.tsx — updated to render SpanTagsList in the span header controls row.
  • trace-view/header/index.tsx — updated to render TraceTagsList directly in the header flex row.
  • .gitignore — widens .agent-team/TODO.md ignore to the entire .agent-team/ directory.

Confidence Score: 4/5

Safe to merge after fixing the duplicate DropdownMenuTrigger nesting in span-tags-list.tsx.

The overall change is straightforward UI — displaying tags inline instead of only inside a dropdown. The trace side (trace-tags-list.tsx) is clean. The only concrete issue is the accidental double-nested DropdownMenuTrigger asChild in span-tags-list.tsx, which is a one-line fix and does not affect data integrity or security.

frontend/components/tags/span-tags-list.tsx — remove the outer duplicate DropdownMenuTrigger wrapper (lines 158-165).

Vulnerabilities

No security concerns identified.

Important Files Changed

Filename Overview
frontend/components/tags/span-tags-list.tsx New component showing span tags as inline badges; contains a duplicate nested DropdownMenuTrigger asChild (lines 158-165) that is absent from the equivalent trace-tags-list.tsx.
frontend/components/tags/trace-tags-list.tsx New component showing trace tags as inline badges; correctly structured with a single DropdownMenuTrigger wrapping the Tags button.
frontend/components/traces/span-controls.tsx Renders SpanTagsList inline in the span controls header so all tags are visible without opening the dropdown.
frontend/components/traces/trace-view/header/index.tsx Renders TraceTagsList inline in the trace view header; logic is correct and consistent with the existing header layout.
.gitignore Widens the .agent-team/TODO.md ignore entry to ignore the entire .agent-team/ directory — benign cleanup.

Reviews (1): Last reviewed commit: "fix: add keys to mapped badges" | Re-trigger Greptile

Comment on lines +158 to +165
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger asChild>
<Button variant="outline" className={cn("h-6 text-xs px-1.5 gap-1.5", className)}>
<Tag className="size-3.5" />
Tags
</Button>
</DropdownMenuTrigger>
</DropdownMenuTrigger>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Duplicate nested DropdownMenuTrigger

There are two nested DropdownMenuTrigger asChild wrappers here — the outer one (line 158) wraps the inner one (line 159). With Radix UI's asChild, each trigger clones its immediate child and merges event handlers/refs. The outer trigger will clone the inner trigger, and the inner trigger will clone the Button, so the Button ends up with two layers of trigger wiring. This is clearly unintentional — compare to trace-tags-list.tsx which correctly has a single DropdownMenuTrigger.

Suggested change
<DropdownMenuTrigger asChild>
<DropdownMenuTrigger asChild>
<Button variant="outline" className={cn("h-6 text-xs px-1.5 gap-1.5", className)}>
<Tag className="size-3.5" />
Tags
</Button>
</DropdownMenuTrigger>
</DropdownMenuTrigger>
<DropdownMenuTrigger asChild>
<Button variant="outline" className={cn("h-6 text-xs px-1.5 gap-1.5", className)}>
<Tag className="size-3.5" />
Tags
</Button>
</DropdownMenuTrigger>

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 137f91d. Configure here.

Tags
</Button>
</DropdownMenuTrigger>
</DropdownMenuTrigger>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doubled DropdownMenuTrigger breaks span tags dropdown

High Severity

In span-tags-list.tsx, the Button is wrapped by two nested DropdownMenuTrigger asChild components. This accidental duplication registers multiple Radix triggers, leading to duplicated event handlers and ARIA attributes. The dropdown will likely malfunction, failing to open or toggling erratically.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 137f91d. Configure here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@kolbeyang oh yeah we should fix that

</TagsDropdown>
{tags.map(({ name, color, id }) => (
<Badge key={id} variant="outline" className="rounded-full gap-1">
<div className="rounded-full size-2.5" style={{ backgroundColor: color }} />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing fallback color for tags without a color

Medium Severity

The color dot for tags displayed in the SpanTagsList component is invisible when a tag's color property is undefined. This is a visual regression, as the backgroundColor style is applied directly without a fallback, unlike other tag rendering components that use a bg-gray-300 default.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 137f91d. Configure here.

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.

3 participants