Skip to content

Implement Event Filtering and Search#153

Merged
Abd-Standard merged 1 commit into
Core-Foundry:mainfrom
Osuochasam:chain16
Jun 22, 2026
Merged

Implement Event Filtering and Search#153
Abd-Standard merged 1 commit into
Core-Foundry:mainfrom
Osuochasam:chain16

Conversation

@Osuochasam

Copy link
Copy Markdown
Contributor

Advanced Event Explorer Search & Multi-Filter System

Overview

Enhanced the Event Explorer with a high-performance, reactive filtering system that allows users to quickly isolate and analyze Soroban smart contract events using multiple filter dimensions simultaneously. The new filtering experience supports contract address search, event type selection, and date range filtering while maintaining instant UI responsiveness and eliminating full-page reloads.

The implementation focuses on performance, usability, and scalability for large event datasets commonly found in blockchain monitoring environments.


What Was Implemented

1. Event Filter Panel

Added a dedicated EventFilterPanel component that serves as the central control surface for event discovery and filtering.

Included Filters

Contract ID Search

Allows users to:

  • Paste full contract addresses
  • Search by partial contract identifiers
  • Quickly locate events from a specific contract
Event Type Filter

Supports filtering by event classification:

  • Contract Events
  • System Events
  • Debug Events

Users can select one or multiple event categories simultaneously.

Date Range Filter

Allows filtering events within a specific timeframe using:

  • Start Date
  • End Date

Date handling supports both local timezone display and consistent UTC-based filtering logic.


2. Debounced Search Optimization

Implemented a debounced contract search mechanism to improve performance and reduce unnecessary filtering operations.

Optimization Details

  • 300ms debounce interval
  • Prevents filtering execution on every keystroke
  • Reduces expensive client-side computations
  • Prevents excessive API requests in server-driven configurations

Benefits

  • Smoother typing experience
  • Reduced UI lag
  • Improved scalability with large datasets
  • Lower network overhead

This ensures the Event Explorer remains responsive even when processing large volumes of blockchain events.


3. Multi-Filter Intersection Logic

Implemented additive filtering behavior where all active filters work together.

Example

A user can simultaneously:

  • Search for a specific Contract ID
  • Select only Contract Events
  • Restrict results to a specific date range

The resulting dataset contains only records matching all selected criteria.

This provides highly precise event discovery without requiring separate filtering steps.


4. Reactive State Management

Added centralized filter state management to drive dynamic event rendering.

Features

  • Real-time filter updates
  • Reactive UI rendering
  • No page refreshes
  • Instant visual feedback

Filtering operations update the displayed dataset immediately as filter values change.


5. Memoized Data Processing

Optimized event filtering logic using memoization techniques.

Benefits

  • Prevents unnecessary recalculations
  • Reduces component re-renders
  • Improves responsiveness
  • Maintains smooth interaction during large dataset filtering

This ensures efficient processing even when multiple filters are active.


6. Clear All Filters Functionality

Added a one-click reset mechanism.

Behavior

The "Clear All Filters" action:

  • Clears Contract ID search input
  • Resets Event Type selections
  • Removes Date Range restrictions
  • Restores the complete event dataset

This provides a quick path back to the default explorer view.


7. Empty Results Experience

Implemented a dedicated empty-state experience for filter combinations that produce no matching results.

User Experience

Displays:

  • Clear "No matching events found" messaging
  • Helpful guidance
  • Suggestions to broaden or adjust filter criteria

This prevents confusion and improves discoverability when searches are overly restrictive.


8. Responsive Mobile-First Design

Enhanced the filtering interface to work seamlessly across device sizes.

Desktop

  • Horizontal filter layout
  • Efficient use of available space
  • Optimized for power users

Tablet

  • Adaptive wrapping behavior
  • Consistent spacing and usability

Mobile

  • Vertical filter stacking
  • Touch-friendly controls
  • No horizontal scrolling

The interface remains fully functional and visually consistent down to small mobile viewports.


Testing Coverage

Added comprehensive test coverage for filtering functionality and performance behavior.

Debounce Verification

Validated:

  • Rapid typing does not trigger repeated filter executions
  • Filtering only occurs after debounce completion
  • Search performance remains stable

Multi-Filter Intersection Tests

Verified that combining:

  • Contract ID filters
  • Event Type filters
  • Date Range filters

correctly produces the expected subset of event records.

This confirms additive filtering behavior functions correctly.


Filter Reset Tests

Validated:

  • Clear All Filters resets state
  • Full event list is restored
  • UI controls return to default values

Empty State Tests

Verified:

  • No-result scenarios display correctly
  • Appropriate user guidance is shown

User Experience Improvements

Faster Event Discovery

Users can locate specific contract activity within large event streams more efficiently.

Better Performance

Debounced filtering and memoized computations reduce UI workload.

Improved Workflow

Multiple filters can be combined without interrupting browsing flow.

Zero Page Reloads

All filtering occurs dynamically for a smooth, application-like experience.

Mobile Accessibility

Full filtering functionality is available across desktop, tablet, and mobile devices.


Technical Highlights

  • TypeScript-first implementation
  • Dedicated EventFilterPanel architecture
  • Debounced search input handling
  • Multi-filter intersection logic
  • Reactive state management
  • Memoized filtering operations
  • Responsive mobile-first layout
  • Dynamic UI updates without page refreshes
  • Comprehensive test coverage

Acceptance Criteria Achieved

  • Contract ID search implemented
  • Event Type multi-select filtering implemented
  • Date Range filtering implemented
  • 300ms debounce optimization added
  • Combined filter intersection logic completed
  • Dynamic filtering without page reloads implemented
  • Clear All Filters functionality added
  • Empty results state implemented
  • Responsive design completed
  • Verification tests added for debounce, filtering, and reset behavior
  • Fully aligned with existing TypeScript and UI component patterns
    Closes Implement Event Filtering and Search #16

@Abd-Standard Abd-Standard merged commit 47e4e10 into Core-Foundry:main Jun 22, 2026
2 checks passed
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.

Implement Event Filtering and Search

2 participants