From 2bba3e9322b1102a319a6a3a76a804266e2dfc8e Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 16 Sep 2026 17:47:40 -0400 Subject: [PATCH] Offer dimensions in the segment filter, not just dates and filter columns The load filter dropdown listed role 'date' and role 'filter' only, so a segment could not be cut on sseas without recoding it -- and role is a single value, so that trade would have taken it off the pivot to put it in a dropdown. Nothing downstream required the restriction: the server drops filter_clause into the load's WHERE against the source table without consulting col_meta, and this form takes values as free text rather than through the key-only values endpoint. So the fix is to stop filtering them out. Co-Authored-By: Claude Opus 5 (1M context) --- ui/src/views/Baseline.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/views/Baseline.jsx b/ui/src/views/Baseline.jsx index 7b363d4..7913c78 100644 --- a/ui/src/views/Baseline.jsx +++ b/ui/src/views/Baseline.jsx @@ -98,7 +98,11 @@ export default function Baseline({ sources = [], sourceId, versions = [], versio useEffect(() => { if (!sourceId) return fetch(`/api/sources/${sourceId}/cols`).then(r => r.json()).then(cols => { - const fc = cols.filter(c => c.role === 'date' || c.role === 'filter') + // What a load is filtered by and what the pivot groups by are separate + // concerns: a dimension is exactly the sort of thing a segment is cut on + // (sseas, channel_new), and forcing it to role 'filter' to get it here + // would cost it its place on the pivot. Only measures are excluded. + const fc = cols.filter(c => ['date', 'filter', 'dimension'].includes(c.role)) setFilterCols(fc) setFilters(fc.length > 0 ? [emptyGroup(fc)] : []) })