Skip to content

feat: category filters and hide partial runs#30

Open
ScuttleBot wants to merge 3 commits intomainfrom
feat/category-filters
Open

feat: category filters and hide partial runs#30
ScuttleBot wants to merge 3 commits intomainfrom
feat/category-filters

Conversation

@ScuttleBot
Copy link

Summary

This PR implements two related issues for improving benchmark visualization accuracy:

Issue #29 - Hide partial benchmark runs by default

  • Problem: Models that only ran a subset of categories (e.g., 100% on just 1 category) were appearing with misleading high scores
  • Solution: Added "Hide partial runs" toggle (default: enabled) that filters out models missing any categories
  • Shows count of hidden partial runs in the UI
  • Proper empty states when all models are partial

Issue #22 - Category selection filter

  • Problem: Users couldn't focus on categories that matter most to them
  • Solution: Added CategoryFilter dropdown component in Task Heatmap view
  • Multi-select with All/None quick actions
  • Recalculates model scores based only on selected categories
  • URL-persisted for shareability (?categories=coding,api)

Implementation Details

  • New lib/categories.ts with utility functions:
    • hasAllCategories() - check if submission is complete
    • calculateFilteredScore() - recalculate scores for selected categories
    • groupTasksByCategory() - organize tasks by category
  • New CategoryFilter component with dropdown UI
  • Updated TaskHeatmap to support both filters
  • URL params for sharing filtered views

Screenshots

The filters appear in the Task Heatmap view under Graphs tab

Testing

  • Build passes (npm run build)
  • TypeScript checks pass (excluding pre-existing mock-data issue)
  • Filters work together: can hide partial runs AND filter by category

Closes #22
Closes #29

@vercel
Copy link

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
leaderboard Ready Ready Preview, Comment Mar 16, 2026 4:24pm
pinchbench-leaderboard Ready Ready Preview, Comment Mar 16, 2026 4:24pm

Request Review

Issue #29 - Hide partial benchmark runs by default:
- Add 'Hide partial runs' toggle to Task Heatmap view (default: checked)
- Track isComplete flag for each model based on category coverage
- Show count of hidden partial runs in heatmap description
- Add proper empty state when all models are partial

Issue #22 - Category selection filter for benchmark visualizations:
- Add CategoryFilter component with multi-select dropdown
- Filter tasks displayed in heatmap by selected categories
- Recalculate model scores based on selected categories only
- Persist category selection in URL params for shareability

Shared infrastructure:
- Add lib/categories.ts with utility functions for category detection
- Add category grouping and filtered score calculation helpers

This prevents misleading scores like '100%' from models that only
completed a single category, and lets users focus on categories
that matter most to them.

Closes #22
Closes #29
CATEGORY_ICONS only defined 10 categories (api, validation, calendar, etc.)
but the API returns 15 different categories (basic, file_ops, creative,
data_analysis, memory, organization, synthesis, content_transformation, etc.).

This caused two bugs:
1. hasAllCategories() always returned false because it checked for categories
   like 'api' and 'validation' that don't exist in the data, so hidePartialRuns
   (default: true) filtered out ALL models -> 'No task data available'
2. Category filter with all selected still missed tasks in unrecognized
   categories (file_ops, creative, etc.) since they weren't in ALL_CATEGORIES

Also fixed CategoryFilter label showing 'All categories' when none were
selected (noneSelected case was incorrectly merged with allSelected).
Copy link
Member

@olearycrew olearycrew left a comment

Choose a reason for hiding this comment

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

The task heatmap is now blank. Need that fixed first

hasAllCategories() checks against the full CATEGORY_ICONS list (15 categories),
but older benchmark versions only had 7-9 categories. With hidePartialRuns
defaulting to true, submissions from older benchmarks were incorrectly filtered
out as 'partial' runs since they're missing categories that didn't exist in
their version.

Default to false until we track per-version category counts. URL param changed
from ?partial=show (to show) to ?partial=hide (to hide).
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.

Default to score across all categories feat: add task selection filter for benchmark runs

2 participants