Skip to content

feat: implement searchable multi-select filtering for java instrument…#390

Open
hussainjamal760 wants to merge 18 commits intoopen-telemetry:mainfrom
hussainjamal760:feat/instrumentation-filters
Open

feat: implement searchable multi-select filtering for java instrument…#390
hussainjamal760 wants to merge 18 commits intoopen-telemetry:mainfrom
hussainjamal760:feat/instrumentation-filters

Conversation

@hussainjamal760
Copy link
Copy Markdown
Contributor

@hussainjamal760 hussainjamal760 commented May 8, 2026

Issue: 224
#224

Description
This PR implements a scalable and production-ready filtering system for the Java Instrumentation list page. The previous flat filtering logic has been replaced with a more robust architecture that handles a large number of Semantic Conventions and Features without cluttering the UI.

Key Changes

  1. Searchable Multi-Select Component
    Created a new reusable SearchableMultiSelect component that supports internal searching and scrolling.
    This allows users to quickly find specific conventions or features from a list of 100+ options.

  2. Advanced Filtering Logic
    Implemented real-time filtering with standard multi-select logic:
    OR logic within a specific category (e.g., selecting multiple features).
    AND logic between categories (e.g., filtering for a specific telemetry type AND a semantic convention).
    Expanded the "Features" list to include features, tags, and explicitly derived telemetry types (TRACING, METRICS).

  3. Visual Feedback & UI Polish
    Filter Chips: Selected filters now appear as removable chips in the filter bar for easy management.
    Card Badges: Updated InstrumentationCard to display Semantic Conventions and Feature/Tag badges. These badges now "light up" (change color) when they match an active filter, providing immediate visual confirmation.
    Improved UX:
    Enhanced selection states for Telemetry and Type buttons with glow effects.
    Fixed z-index layering issues to ensure dropdowns overlap correctly.
    Optimized scroll propagation to prevent page-level scrolling while interacting with dropdowns.
    Motivation
    As the number of instrumentations in the ecosystem grows, a flat list of checkboxes for 100+ semantic conventions is no longer sustainable. This searchable approach ensures the Explorer remains usable and performant as more data is added to the registry.

Testing Performed
Verified filtering logic against local instrumentation data.
Tested searchable dropdowns with long lists to ensure scrolling and search functionality.
Verified mobile/responsive layout for the new filter bar.
opt1

@hussainjamal760 hussainjamal760 requested review from a team as code owners May 8, 2026 01:56
@netlify
Copy link
Copy Markdown

netlify Bot commented May 8, 2026

Deploy Preview for otel-ecosystem-explorer ready!

Name Link
🔨 Latest commit aa4aff9
🔍 Latest deploy log https://app.netlify.com/projects/otel-ecosystem-explorer/deploys/69ffb84af513d90008809427
😎 Deploy Preview https://deploy-preview-390--otel-ecosystem-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 8, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements scalable filtering for the Java instrumentation list by adding searchable multi-select controls (semantic conventions + features/tags) and wiring the selected filters into list filtering and card-level visual feedback.

Changes:

  • Added a reusable SearchableMultiSelect UI component (plus selected “chip” rendering) for long option lists.
  • Extended Java instrumentation filtering to support semantic convention + feature/tag filters (OR within a category, AND across categories).
  • Updated Java agent UI styling and card badges; expanded/updated related unit tests to account for the new filter state shape.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
ecosystem-explorer/src/index.css Adds global custom-scrollbar styling used by the new dropdown option list.
ecosystem-explorer/src/features/java-agent/styles/filter-styles.ts Updates active/inactive styling for telemetry/target filter buttons.
ecosystem-explorer/src/features/java-agent/java-instrumentation-list-page.tsx Adds semantic + feature/tag filter logic and passes instrumentation data into the filter bar for option generation.
ecosystem-explorer/src/features/java-agent/components/instrumentation-filter-bar.tsx Adds semantic/features multi-select controls, options derivation from instrumentation data, and selected chips.
ecosystem-explorer/src/features/java-agent/components/instrumentation-card.tsx Displays semantic conventions/features/tags as badges and highlights them when matching active filters.
ecosystem-explorer/src/components/ui/searchable-multi-select.tsx Introduces the new searchable multi-select dropdown and selected-chips UI.
ecosystem-explorer/src/features/java-agent/components/instrumentation-group-card.test.tsx Updates default filter state for new filter fields.
ecosystem-explorer/src/features/java-agent/components/instrumentation-filter-bar.test.tsx Updates filter bar tests to pass new required props and filter state fields.
ecosystem-explorer/src/features/java-agent/components/instrumentation-card.test.tsx Updates tests to include new filter state fields.
ecosystem-explorer/src/features/java-agent/components/instrumentation-badges.test.tsx Updates tests to include new filter state fields.

Comment thread ecosystem-explorer/src/features/java-agent/components/instrumentation-card.tsx Outdated
Comment thread ecosystem-explorer/src/components/ui/searchable-multi-select.tsx Outdated
Comment thread ecosystem-explorer/src/components/ui/searchable-multi-select.tsx Outdated
@lucacavenaghi97
Copy link
Copy Markdown
Member

Heads up: the tags field is empty for every instrumentation in 2.27.0 (see #398), so the #tag badges and the instr.tags match in this PR don't fire on the default version users see.

My take: tags don't add much as a filter dimension anyway. Their values are essentially the prefix of the instrumentation name (akka-actor-2.3 belongs to tag akka, etc.), so a user searching for "akka" gets the same cards from the search box. I would drop the tag rendering and the instr.tags?.includes(f) branch from this PR and keep only semantic_conventions and features, which is what #224 originally asked for.

That said, the broader call on tags belongs to #398.

Comment thread ecosystem-explorer/src/features/java-agent/components/instrumentation-card.tsx Outdated
@lucacavenaghi97
Copy link
Copy Markdown
Member

lucacavenaghi97 commented May 9, 2026

A searchable dropdown is the right pattern for scalability. The concern in my opinion is the custom implementation: this rebuilds keyboard navigation, ARIA roles, focus management, click-outside, and z-index/portal logic from scratch. Switching to the Radix approach would also subsume Copilot's comment about the trigger semantics directly.

Since the project already depends on Radix (@radix-ui/react-tabs, tooltip, hover-card), @radix-ui/react-popover paired with a small list primitive like cmdk would give all of that for free and stay consistent with the existing UI primitives.

I tried this locally and the rewrite comes in at fewer lines with the same UX, plus keyboard navigation, Escape to close, and proper ARIA roles work out of the box.

@lucacavenaghi97
Copy link
Copy Markdown
Member

nice work overall 🚀 I left a few comments above, mostly on three threads: the tags data state (linked to #398), the dropdown architecture, and the synthetic TRACING/METRICS. The rest are smaller notes

@hussainjamal760
Copy link
Copy Markdown
Contributor Author

nice work overall 🚀 I left a few comments above, mostly on three threads: the tags data state (linked to #398), the dropdown architecture, and the synthetic TRACING/METRICS. The rest are smaller notes

Thanks for the detailed review.

I’ll address the issues in the next update:

  • move all imports to the top
  • add missing a11y (ARIA, button types, labels)
  • add tests for new filter logic (OR/AND + TRACING/METRICS cases)
  • remove or simplify tag filtering based on Java instrumentation tags empty in file_format 0.5 builds #398 discussion
  • revisit TRACING/METRICS synthetic filters to avoid duplication
  • reduce badge noise and improve card readability
  • fix dropdown implementation or consider Radix-based approach
  • fix minor UI alignment issues in filter bar

Will push an updated PR soon.

@lucacavenaghi97
Copy link
Copy Markdown
Member

sounds good, thanks!

@hussainjamal760
Copy link
Copy Markdown
Contributor Author

A searchable dropdown is the right pattern for scalability. The concern in my opinion is the custom implementation: this rebuilds keyboard navigation, ARIA roles, focus management, click-outside, and z-index/portal logic from scratch. Switching to the Radix approach would also subsume Copilot's comment about the trigger semantics directly.

Since the project already depends on Radix (@radix-ui/react-tabs, tooltip, hover-card), @radix-ui/react-popover paired with a small list primitive like cmdk would give all of that for free and stay consistent with the existing UI primitives.

I tried this locally and the rewrite comes in at fewer lines with the same UX, plus keyboard navigation, Escape to close, and proper ARIA roles work out of the box.

Updated

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.

Comment thread ecosystem-explorer/src/features/java-agent/components/instrumentation-card.tsx Outdated
Comment thread ecosystem-explorer/src/components/ui/searchable-multi-select.tsx
@hussainjamal760 hussainjamal760 requested a review from Copilot May 9, 2026 04:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.

Comment thread ecosystem-explorer/src/features/java-agent/components/instrumentation-card.tsx Outdated
Comment thread ecosystem-explorer/src/features/java-agent/components/instrumentation-card.tsx Outdated
Comment thread ecosystem-explorer/src/features/java-agent/components/instrumentation-card.tsx Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.

Comment on lines +16 to +29
import { useState, useId } from "react";
import { Search, ChevronDown, Check, X } from "lucide-react";
import * as Popover from "@radix-ui/react-popover";
import { Command } from "cmdk";

interface SearchableMultiSelectProps {
label: string;
placeholder: string;
options: string[];
selected: string[];
onChange: (selected: string[]) => void;
renderOption?: (option: string) => React.ReactNode;
className?: string;
}
Comment thread ecosystem-explorer/src/test/setup.ts Outdated
Comment on lines +144 to +150
{renderItem ? renderItem(item) : item}
<button
type="button"
onClick={() => onRemove(item)}
aria-label={`Remove ${item}`}
className="hover:text-foreground transition-colors"
>
Comment on lines +51 to +69
<div className={`relative space-y-2 ${className}`}>
<label htmlFor={triggerId} className="text-muted-foreground text-sm font-medium">
{label}
</label>

<Popover.Root open={isOpen} onOpenChange={setIsOpen}>
<Popover.Trigger asChild>
<button
type="button"
id={triggerId}
className={`border-border/60 bg-background/80 hover:border-primary/50 focus:ring-primary/20 flex min-h-[42px] w-full cursor-pointer items-center justify-between rounded-lg border px-4 py-2 text-left text-sm backdrop-blur-sm transition-all duration-200 focus:ring-2 focus:outline-none ${
isOpen ? "border-primary/50 ring-primary/20 ring-2" : ""
}`}
>
<span
className={selected.length === 0 ? "text-muted-foreground/50" : "text-foreground"}
>
{selected.length === 0 ? placeholder : `${selected.length} selected`}
</span>
@hussainjamal760 hussainjamal760 requested a review from jaydeluca May 9, 2026 22:30
hussainjamal760 and others added 3 commits May 10, 2026 03:31
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

4 participants