Menu

#435 dash: filter the live feed by verdict (All / PASS / AUTH / BLOCK)

open
nobody
2026-08-20
2026-08-20
Anonymous
No

Originally created by: fu351

The "Recent decisions" feed appends every streamed decision (source.addEventListener("decision", ...), src/doberman/dash/app.py:563-615) up to MAX_FEED_ROWS = 200 (:329). Finding the BLOCKs in 200 mixed rows means scrolling.

What to do

  1. Tag each feed <li> with li.dataset.verdict = row.verdict where it's created (around line 570).
  2. Add a <select id="feed-filter"> with All / PASS / AUTH / BLOCK in the Recent decisions header row (<h2> at line 274).
  3. On change, either toggle a class on #feed with matching CSS (.feed-only-block li:not([data-verdict="BLOCK"]) { display: none } and friends), or walk feedEl.children and set hidden. Rows added later must obey the current filter too, so apply it when a row is inserted.
  4. Test in tests/unit/test_dash_polish.py: the shell contains feed-filter and data-verdict/dataset.verdict.

Client-side only; nothing changes in what the server sends. Heads-up: two dashboard PRs are in flight (#401, [#415]), both editing dash/app.py's top bar; branch from a fresh main and expect a small rebase if they land while you work.

Related

Tickets: #415
Tickets: #448

Discussion


Log in to post a comment.