---
title: Name filter parameters in plain words in data view filter warnings
type: task
status: completed
description: >-
  The data view filter-scope warnings print raw param keys such as single_nfl_week_id and time_type;
  replace them with readable labels, adding labels where params lack one.
base_uri: user:task/league/data-views/name-filter-params-in-plain-words-in-filter-warnings.md
created_at: '2026-09-28T19:24:46.462Z'
entity_id: 38c0f020-1d82-45fa-a24c-bf454a57feaf
finished_at: '2026-09-28T20:52:47.010Z'
owner_identity_uri: █████████████████████████
priority: Low
public_read: true
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-09-28T20:52:47.010Z'
visibility_analyzed_at: '2026-11-05T23:48:54.863Z'
---

# Name filter parameters in plain words in data view filter warnings

The two filter-scope warnings in `app/core/data-views/data-view-notices.mjs` (`filter_param_key_absent_from_columns`, `filter_param_value_disjoint_from_columns`) print the raw param key and raw values, for example `Filter scopes "single_nfl_week_id" to 2024_POST_WEEK_1, but columns carry 2025_REG_WEEK_1`. The reader sees an internal identifier where a label like "NFL week" belongs.

## Context

- The `[object Object]` defect in the same warnings is fixed (league `f2bc996e3`, deployed). On 2026-09-28 the builder was run over all 838 saved and generated views on production: 0 broken messages now, 14 on the pre-fix code, and 10 remaining warnings, all genuine mismatches but all naming raw keys (`time_type`, `single_nfl_week_id`, `nfl_week_id`, `year`).
- Param labels, checked 2026-09-28: `nfl_week_id` and `single_nfl_week_id` already carry `label: 'NFL Week'` in `libs-shared/common-column-params.mjs`. `year` there has no top-level label. `time_type` is not a common param; it is `time_type_param` in `app/core/data-views-fields/nfl-team-seasonlogs-table-fields.js`, with value labels but no param label. The notice builder receives only `where` and `columns`; its one caller is the selector in `app/views/components/data-view-notices/index.js`.
- Operator approved 2026-09-28. Shipped in league `bb34c00eb`: the selector passes a resolver reading `fields[column_id].column_params[key].label`, and the builder falls back to the raw key.
- Scan after the change (838 views, with `migrate_table_state` applied as the page does — the earlier scan skipped it): 9 scope warnings, 2 now read "NFL Week", 0 broken. The other 7 name keys the filter column no longer declares, so the raw-key fallback is correct there: `time_type` on betting-market filters (renamed `market_timing` 2026-09-22 with no saved-view key migration) and `year` on `player_rush_attempts_from_plays` filters (that field no longer declares `year`). Those are stale saved-view params, not missing labels.

## Plan

- [x] Get the operator's go-ahead on replacing raw keys with labels
- [x] Add labels where missing (`year`, `single_year`, team seasonlog `time_type`)
- [x] Pass a label resolver into `get_data_view_notices` and use it in both warnings
- [x] Spec it (`test/data-views.notices-param-labels.spec.mjs`) and re-run the 838-view scan
- [x] Deploy: shipped in league `303259768`, live on both hosts at 20:51Z (bundle `main.6d1c9587.js`)
- [x] Browser-verify: signed-in probe on 2026-09-28 of two saved betting-market views shows `Filter scopes "NFL Week" to 2024 POST`; their `time_type` warning stays raw as designed (observation on [[█████████████████████████-████-██████-█████-████████]])
