From 4c77eefc5123f8f712741959649507811f7025d9 Mon Sep 17 00:00:00 2001 From: iris Date: Sat, 6 Jun 2026 11:55:28 +0200 Subject: [PATCH] feat(flow): filter the timeline by agent Adds an agent filter to the FL0W header (#1473): a select listing the live agents narrows the timeline to messages involving the chosen agent (matched on `from` OR `to`). Each message row now carries `data-from`/`data-to`; non-matching rows get `.flow-hidden`. New rows pick up the active filter at render time; changing the filter re-scans existing rows. The selection persists in localStorage so a reload or tab-switch keeps the view. The dropdown is populated from the live container list (and stays current on container add/remove); a saved selection survives even if that agent isn't currently listed. Pure frontend; composes with the sent+delivered collapse (the surviving collapsed row keeps its `data-from`/`data-to`). Closes #1473. --- frontend/packages/dashboard/src/flow.css | 16 ++++++ frontend/packages/dashboard/src/flow.html | 3 ++ frontend/packages/dashboard/src/flow.js | 59 ++++++++++++++++++++++- 3 files changed, 77 insertions(+), 1 deletion(-) diff --git a/frontend/packages/dashboard/src/flow.css b/frontend/packages/dashboard/src/flow.css index c07b0865..7818c530 100644 --- a/frontend/packages/dashboard/src/flow.css +++ b/frontend/packages/dashboard/src/flow.css @@ -163,3 +163,19 @@ body.flow-shell .flow-main-slim { wants `#inbox-section` in the DOM (legacy contract), but we surface the messages via the pill/flyout instead. */ .flow-inbox-headless { display: none !important; } + +/* Agent filter (#1473): a select in the FL0W header narrows the + timeline to messages involving one agent. Non-matching rows get + `.flow-hidden`; the select reuses the journal-unit control look. */ +.flow-filter { + font-family: inherit; + font-size: 0.85em; + background: var(--bg-elev); + color: var(--amber); + border: 1px solid var(--border); + border-radius: 4px; + padding: 0.25em 0.5em; + margin-left: auto; +} +.flow-filter:focus { outline: 1px solid var(--purple); } +.msgrow.flow-hidden { display: none; } diff --git a/frontend/packages/dashboard/src/flow.html b/frontend/packages/dashboard/src/flow.html index 061a076a..c98f3960 100644 --- a/frontend/packages/dashboard/src/flow.html +++ b/frontend/packages/dashboard/src/flow.html @@ -18,6 +18,9 @@
← dashboard FL0W +