j-chim Claude Fable 5 commited on
Commit
04bb7fe
·
1 Parent(s): d20ae12

Source select always displays 'All sources (merged)' on merged pages

Browse files

Binding the ?source= came-from param as the select's VALUE made a
merged page read as a single-source view (maintainer report: mmlu-pro
showing 'Artificial Analysis' in the dropdown while the hero says
'merged across 7 sources'). The select is a navigator, not state; the
came-from source keeps only its row highlight.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

components/merged-benchmark-view.tsx CHANGED
@@ -198,17 +198,15 @@ export function MergedBenchmarkView({
198
  </span>
199
  <select
200
  className="ec-select"
201
- value={preselectedSource}
 
 
 
 
 
202
  onChange={(e) => {
203
  const slug = e.target.value
204
- if (!slug) {
205
- // Back to "All sources": clear the pre-highlight param.
206
- const params = new URLSearchParams(searchParams.toString())
207
- params.delete("source")
208
- const qs = params.toString()
209
- router.replace(qs ? `${pathname}?${qs}` : pathname)
210
- return
211
- }
212
  const source = summary.aggregate_sources.find((s) => s.composite_slug === slug)
213
  if (source?.evaluation_id) {
214
  // Navigate-on-select to the per-source page (spec Q5).
 
198
  </span>
199
  <select
200
  className="ec-select"
201
+ // ALWAYS displays "All sources (merged)" here: this page IS
202
+ // the merged view, and the select is a navigator, not state.
203
+ // The ?source= came-from param must never render as the
204
+ // select's value — that read as "you are viewing one source"
205
+ // on a merged page. It only drives the row highlight.
206
+ value=""
207
  onChange={(e) => {
208
  const slug = e.target.value
209
+ if (!slug) return
 
 
 
 
 
 
 
210
  const source = summary.aggregate_sources.find((s) => s.composite_slug === slug)
211
  if (source?.evaluation_id) {
212
  // Navigate-on-select to the per-source page (spec Q5).