You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ui): click-to-filter chips on test names (#231)
## Summary
Each chip on a test name (gas, opcode, fork, params, labels) is now a
button. Click toggles the matching term in the page search; the chip
lights up blue while that term is pinned. Lets you drill into "all 90M
tests" or "all ORIGIN tests" without typing.
To make chip filters precise without losing typed-search convenience,
the filter syntax now supports two separators:
- **`key:value`** — substring (existing behavior). `opcode:ORIG` matches
`ORIGIN`.
- **`key=value`** — exact match. `calldata_size=0` matches only
`calldata_size_0`, not `calldata_size_1024`. Chip clicks emit this form.
A shared `TEST_FILTER_HINT` constant feeds every search-box tooltip so
they stay in sync.
## Wired in
- `run-detail/TestsTable` name cell
- `run-detail/TestHeatmap` modal
- `suite-detail/TestHeatmap` row labels
- `compare/TestComparisonTable` (plumbed from ComparePage)
- `compare/TestDetailModal` (plumbed from CompareGroupsPage)
Heatmap tooltips stay non-interactive on purpose
(`pointer-events-none`).
## Test plan
- [ ] Click an `ORIGIN` opcode chip in the tests table — `opcode=ORIGIN`
is added to the search, chip turns blue, the table filters. Click again
— term removed, chip un-styled.
- [ ] Type `opcode:ORIG` manually — table filters by substring; chips
don't light up since the typed term is the substring form.
- [ ] Click `0` on a `calldata_size:0` chip — only `calldata_size_0`
rows remain (not `calldata_size_1024`).
- [ ] Click a chip in the run-detail heatmap modal and the compare
detail modal — both pin the term to the page filter.
- [ ] Active chips stay highlighted across name-mode and theme toggles.
placeholder={testFilterRegex ? 'Regex...' : 'Filter or e.g. opcode:ORIGIN'}
80
-
title={testFilterRegex
81
-
? 'Regex against the raw test name.'
82
-
: 'Free text matches the raw name. Or filter by extracted fields:\nopcode:ORIGIN gas:90M fork:Amsterdam file:tx_context fn:codecopy path:compute label:LOG1\nUnrecognized keys hit params: mem_size:1024 code_size:0\nMultiple terms are AND.'}
81
+
title={testFilterRegex ? 'Regex against the raw test name.' : TEST_FILTER_HINT}
placeholder="Search… or e.g. opcode:ORIGIN gas:90M"
313
-
title={`Free text matches anywhere in the raw name. Or filter by extracted fields:\nopcode:ORIGIN gas:90M fork:Amsterdam file:tx_context fn:codecopy path:compute label:LOG1\nUnrecognized keys hit params: mem_size:1024 code_size:0\nMultiple terms are AND.`}
title={'Free text matches the raw name. Or filter by extracted fields:\nopcode:ORIGIN gas:90M fork:Amsterdam file:tx_context fn:codecopy path:compute label:LOG1\nUnrecognized keys hit params: mem_size:1024 code_size:0\nMultiple terms are AND.'}
placeholder={useRegex ? 'Regex...' : 'Filter or e.g. opcode:ORIGIN'}
531
-
title={useRegex
532
-
? 'Regex against the raw test name.'
533
-
: 'Free text matches the raw name. Or filter by extracted fields:\nopcode:ORIGIN gas:90M fork:Amsterdam file:tx_context fn:codecopy path:compute label:LOG1\nUnrecognized keys hit params: mem_size:1024 code_size:0\nMultiple terms are AND.'}
531
+
title={useRegex ? 'Regex against the raw test name.' : TEST_FILTER_HINT}
@@ -450,7 +450,7 @@ export function CompareGroupsPage() {
450
450
placeholder={testFilterRegex ? 'Regex...' : 'Filter or e.g. opcode:ORIGIN'}
451
451
title={testFilterRegex
452
452
? 'Regex against the raw test name.'
453
-
: 'Free text matches the raw name. Or filter by extracted fields:\nopcode:ORIGIN gas:90M fork:Amsterdam file:tx_context fn:codecopy path:compute label:LOG1\nUnrecognized keys hit params: mem_size:1024 code_size:0\nMultiple terms are AND.'}
@@ -579,9 +579,7 @@ export function CompareGroupsPage() {
579
579
<input
580
580
type="text"
581
581
placeholder={testFilterRegex ? 'Regex pattern...' : 'Filter… or e.g. opcode:ORIGIN'}
582
-
title={testFilterRegex
583
-
? 'Regex against the raw test name.'
584
-
: 'Free text matches the raw name. Or filter by extracted fields:\nopcode:ORIGIN gas:90M fork:Amsterdam file:tx_context fn:codecopy path:compute label:LOG1\nUnrecognized keys hit params: mem_size:1024 code_size:0\nMultiple terms are AND.'}
582
+
title={testFilterRegex ? 'Regex against the raw test name.' : TEST_FILTER_HINT}
0 commit comments