From 04366c64bc272f004e77ff98150ec7433737a5b1 Mon Sep 17 00:00:00 2001 From: tegwick Date: Sun, 7 Jun 2026 15:20:40 +0200 Subject: [PATCH] fix: restore overview workstream mode reactivity --- dashboard/src/index.md | 6 +++++- workplans/STATE-WP-0057-overview-workstream-stage-counts.md | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dashboard/src/index.md b/dashboard/src/index.md index 6d42b39..df80e1e 100644 --- a/dashboard/src/index.md +++ b/dashboard/src/index.md @@ -252,16 +252,20 @@ _modeSelect.value = _savedChartMode; _modeSelect.addEventListener("input", () => { globalThis.__stateHubOverviewChartMode = _modeSelect.value; }); +_modeSelect.addEventListener("change", () => { + globalThis.__stateHubOverviewChartMode = _modeSelect.value; +}); // view() is the idiomatic Observable Framework reactive input: // it displays the element AND returns a reactive value that re-runs dependent blocks. const _chartMode = _modeValue(view(_modeSelect)); -const _chartWsFiltered = _workstreamsForMode(_chartMode, wsAll); ``` ```js import * as Plot from "npm:@observablehq/plot"; +const _chartWsFiltered = _workstreamsForMode(_chartMode, wsAll); + // Sort by domain, then repository, then most recently updated workstream. // The axis labels show each domain/repo group once. const chartWs = [..._chartWsFiltered].sort((a, b) => { diff --git a/workplans/STATE-WP-0057-overview-workstream-stage-counts.md b/workplans/STATE-WP-0057-overview-workstream-stage-counts.md index 31dfb8b..a4396b2 100644 --- a/workplans/STATE-WP-0057-overview-workstream-stage-counts.md +++ b/workplans/STATE-WP-0057-overview-workstream-stage-counts.md @@ -239,6 +239,12 @@ accurate workstream counts for all mode groups. - `npm run test` in `dashboard/` passed 11 tests. - `npm run build` in `dashboard/` passed: Observable built 61 pages and validated 49 links. +- 2026-06-07 follow-up: Fixed a selector reactivity regression where + `_chartWsFiltered` was computed in the same cell as `view(_modeSelect)`. + Moving `_chartWsFiltered = _workstreamsForMode(_chartMode, wsAll)` into the + downstream chart cell restored filtering when operators choose a mode other + than `active`. Added a `change` listener alongside `input` for persisted mode + selection. `npm run test` and `npm run build` both passed after the fix. - Browser click-through remains pending because the Codex in-app browser bridge failed to start in this session with a Windows sandbox setup failure, and no local Playwright/Puppeteer package is installed for a headless fallback.