feat(ui): preset filter buttons via QUICK_FILTERS - #24
Merged
Conversation
Add a QUICK_FILTERS setting ("Label=needle;…") that renders preset buttons
under the search box. Clicking one fills the search with its needle;
clicking the active one clears it. The active preset is highlighted and
persisted with the other UI preferences.
A needle may hold several |-separated terms matched as OR, and the search
box now accepts the same syntax ("desktop|laptop"), so a single button can
cover a family of clients.
Parsing lives in Settings.quick_filter_list (labels default to the needle,
blanks and duplicate labels dropped, at most 20 entries, labels ≤ 40 chars,
validated at startup). Covered by tests/test_quick_filters.py (parsing,
rendering, HTML escaping) and a Playwright e2e test that exercises the
OR matching, the highlight and the toggle. The e2e `_serve` helper now
accepts Settings overrides for such fixtures.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0113DEa3m359srdD3TtkNm2n
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…ette ships #3498 anyio 4.15 (2026-09-02) deprecates the `anyio.abc.BlockingPortal` alias, which starlette's TestClient still imports at module load in its latest release (1.6.0, 2026-08-08). With `filterwarnings = ["error"]` the warning aborts conftest import: pytest exits with code 4 before running a single test, on every fresh install since the anyio release. Reproduced locally by pinning anyio==4.15.1. Dependencies are current; the fix simply is not published yet: starlette switched to `anyio.from_thread.BlockingPortal` on master on 2026-09-05 (Kludex/starlette#3498). The ignore is scoped to that one message and marked to be removed at the first starlette release after 1.6.0. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_0113DEa3m359srdD3TtkNm2n
Upellift99
force-pushed
the
feat/quick-filters
branch
from
September 12, 2026 17:22
099218d to
f822484
Compare
Merged
Upellift99
added a commit
that referenced
this pull request
Sep 12, 2026
The setting shipped in #24 with README and compose examples, but the .env.example that compose.example.yml tells users to copy was left out. Claude-Session: https://claude.ai/code/session_0113DEa3m359srdD3TtkNm2n Co-authored-by: Claude Fable 5.1 <[email protected]>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A
QUICK_FILTERSsetting (Label=needle;…) renders preset buttons under the search box. Clicking one fills the search with its needle; clicking the active one clears it. The active preset is highlighted and persisted with the other UI preferences.A needle may hold several
|-separated terms matched as OR, and the search box now accepts the same syntax (desktop|laptop), so one button can cover a family of clients.Example, for a fleet mixing workstations and servers:
How
Settings.quick_filters+quick_filter_list(labels default to the needle, blanks and duplicate labels dropped, at most 20 entries, labels ≤ 40 chars, validated at startup).index.html; buttons are plain<button aria-pressed>styled in the existing inline stylesheet (no Tailwind rebuild needed).filterTerms()splits the filter on|,renderQuickFilters()syncs the highlight with the search box, a click handler toggles the preset.Tests
tests/test_quick_filters.py: parsing edge cases, validation errors, rendering and HTML escaping of labels/needles, block omitted when unset.tests/e2e/test_dashboard.py::test_quick_filter_buttons_filter_rows_and_toggle: OR matching, highlight, toggle, and manual typing highlighting the matching button._servegained**overridesfor such fixtures.CI
The first run failed before collecting a single test: anyio 4.15.1 (released after main's last CI run) deprecates
anyio.abc.BlockingPortal, which starlette's TestClient still imports, andfilterwarnings = errorturned that into an ImportError oftests/conftest.py(exit code 4). Unrelated to this feature, but it blocks every PR: a second commit adds a warning filter scoped to that one message, to drop once starlette catches up.Docs
README: new row in the configuration table and a "Quick filters" section;
QUICK_FILTERSadded tocompose.example.ymlandcompose.oidc.example.yml. CHANGELOG untouched (release-please).🤖 Generated with Claude Code
https://claude.ai/code/session_0113DEa3m359srdD3TtkNm2n