From 7ae8de869d18ab54f649b43db43d509128927379 Mon Sep 17 00:00:00 2001 From: bowenliang123 Date: Fri, 16 Oct 2026 13:55:46 +0800 Subject: [PATCH] feat(client): add a session coverage picker to Context Insights, defaulting to all MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Archived sessions fold back into every figure the page derives off the session list: rowsOfSnapshot now tags archived rows instead of dropping them, and one coveredRowsOf pass scopes the KPI band, charts, heatmap, skills, and the session grid together. A "Filter sessions" select next to the list's search box offers dsh's own archived-filter set — All (show archived) by default, Hide archived, Archived only. The Active Sessions card follows the picked coverage (Sessions incl. the window's archived count under All; Active/Archived Sessions over the full-list total under the narrow scopes), archived cards wear an Archived tag and refuse to open like dsh does, and kpisOf drops its now-unused listed param. --- src/client/components/overviewCard.tsx | 4 +- src/client/components/overviewPanel.tsx | 43 ++++++++++---- src/client/i18nEn.ts | 9 +++ src/client/i18nZh.ts | 9 +++ src/client/overview.ts | 25 +++++--- src/client/styles/overview.css | 3 + tests/client/components/overviewCard.spec.ts | 1 + tests/client/components/overviewPanel.spec.ts | 58 +++++++++++++++++-- tests/client/overview.fixtures.ts | 1 + tests/client/overview.metrics.spec.ts | 7 +-- tests/client/overview.rows.spec.ts | 29 ++++++++-- 11 files changed, 156 insertions(+), 33 deletions(-) diff --git a/src/client/components/overviewCard.tsx b/src/client/components/overviewCard.tsx index 69314aa..00ea949 100644 --- a/src/client/components/overviewCard.tsx +++ b/src/client/components/overviewCard.tsx @@ -36,12 +36,14 @@ export function makeOverviewCard(kit: ViewKit): (props: OverviewCardProps) => Re