Skip to content

Dashboard Enhancement: Advanced Navigation and Filtering #80

Description

@ojfbot

Overview

Enhance dashboard navigation and filtering to help users quickly find relevant test results in large datasets.

Goal: Improve navigation efficiency and reduce time to find specific test runs.


Features

1. Advanced Search (Priority: High)

Multi-field search:

  • Search by: branch, commit, PR number, date range, author
  • Fuzzy matching for branch names
  • Search history (last 10 searches)
  • Saved searches (persist in localStorage)

Search UI:
```
┌──────────────────────────────────────┐
│ 🔍 Search: [feat/dashboard ] │
│ │
│ Filters: │
│ ☑ Branch ☑ Commit ☐ Author │
│ ☐ PR Number ☑ Date Range │
│ │
│ Date Range: [Last 30 days ▼] │
│ │
│ [Clear] [Save Search] │
└──────────────────────────────────────┘
```

2. Smart Filters (Priority: High)

Pre-built filter presets:

  • "Recent Failures" (failed in last 7 days)
  • "Flaky Tests" (flip-flopping status)
  • "Consistent Failures" (failed 3+ times)
  • "Long Running" (duration > 5 minutes)
  • "My PRs" (by author, if available)

Quick filters:

  • Status: All / Passed / Failed / Flaky
  • Date: Last 24h / 7d / 30d / Custom
  • Branch: main / feature / all
  • PR: Open / Closed / All

3. Deep Linking (Priority: Medium)

Shareable URLs with encoded state:
```
https://dashboard/visual-regression/?
run=1765676217672-c7b32fe&
filter=status:failed&
view=gallery
```

Support for:

  • Specific test run
  • Filter state
  • View mode (list/gallery)
  • Selected interaction/screenshot

Implementation:
```typescript
// Use URL search params
const params = new URLSearchParams(window.location.search);
const runId = params.get('run');
const filter = params.get('filter');
const view = params.get('view');

// Update URL when state changes
history.pushState({}, '', `?run=${runId}&filter=${filter}`);
```

4. Keyboard Navigation (Priority: Medium)

Shortcuts:

  • `/` - Focus search
  • `Esc` - Clear search / Close modals
  • `Arrow Keys` - Navigate test list
  • `Enter` - Open selected test
  • `g` + `h` - Go to home
  • `f` - Toggle failed filter
  • `?` - Show keyboard shortcuts

5. Bulk Actions (Priority: Low)

Multi-select tests:

  • Checkbox selection
  • "Select all failed"
  • "Select all flaky"

Actions:

  • Export selected (CSV/JSON)
  • Compare selected runs
  • Add to report

UI Components

SearchBar Component

```typescript
interface SearchBarProps {
onSearch: (query: string, filters: SearchFilters) => void;
savedSearches: SavedSearch[];
}

export function SearchBar({ onSearch, savedSearches }: SearchBarProps) {
// Advanced search input
// Filter chips
// Saved searches dropdown
// Search history
}
```

FilterPanel Component

```typescript
interface FilterPanelProps {
filters: FilterState;
onChange: (filters: FilterState) => void;
presets: FilterPreset[];
}

export function FilterPanel({ filters, onChange, presets }: FilterPanelProps) {
// Filter presets
// Quick filters
// Custom filter builder
}
```


Data Model

Saved Searches (localStorage)

```json
{
"savedSearches": [
{
"id": "search-1",
"name": "Failed Dashboard Tests",
"query": "dashboard",
"filters": {
"status": "failed",
"dateRange": "7d"
},
"created": "2025-12-14T00:00:00.000Z"
}
],
"searchHistory": [
{ "query": "feat/dashboard", "timestamp": "..." }
]
}
```


Implementation Plan

Phase 1: Advanced Search (1-2 days)

  • Multi-field search input
  • Fuzzy matching algorithm
  • Search history in localStorage
  • Saved searches UI

Phase 2: Smart Filters (1 day)

  • Pre-built filter presets
  • Quick filter buttons
  • Filter persistence

Phase 3: Deep Linking (1 day)

  • URL state encoding
  • State restoration from URL
  • Share button

Phase 4: Keyboard Navigation (1 day)

  • Keyboard event handlers
  • Shortcut overlay (? key)
  • Accessibility improvements

Acceptance Criteria

  • Search works across all fields
  • Saved searches persist across sessions
  • Deep links restore full state
  • Keyboard shortcuts work for all actions
  • Filter presets are easily accessible
  • Performance: Search results < 50ms
  • Accessibility: All actions keyboard-accessible

Technical Notes

  • Use React Router for URL state management
  • Implement debouncing for search input (300ms)
  • Use Fuse.js or similar for fuzzy search
  • Store preferences in localStorage
  • Add event listeners for keyboard shortcuts

Part of #71 (Visual Regression Testing Pipeline)
Follows #76 (GitHub Pages Dashboard)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions