mirror of
https://github.com/wweir/sower.git
synced 2026-10-19 16:14:33 +00:00
The rules page froze because block rules (164k+) were all transferred and rendered at once. The list API is now paginated and searchable: - GET /api/rules?category=X&q=...&offset=N&limit=M returns a page plus the total match count; q is a case-insensitive substring match (alloc-free scan in RuleSet.ListFiltered), limit clamps to 1000, default page 200. - POST/DELETE /api/rules now return 204; the frontend refetches the currently loaded range so totals stay accurate. - Rules view: server-side search box with 300ms debounce, load-more button appends pages, count badge shows loaded/total. Measured on the live box: first page 0.5ms, 164k-rule scan ~22ms.