Skip to content

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

Description

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first challengeNext step after good first issue - more scope or contract depth, still self-containedlevel-3Write a self-contained test, or add a flag following an existing sibling pattern.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions