Skip to content

feat(settings): search and paging for every admin list - #42

Merged
ProjectAJ14 merged 1 commit into
mainfrom
feat/list-search-pagination
Nov 6, 2026
Merged

ProjectAJ14 merged 1 commit into
mainfrom
feat/list-search-pagination

Conversation

@ProjectAJ14

Copy link
Copy Markdown
Owner

What

Search and pagination for every list in Settings.

List Search Paging
Connections, PHI rules, Users in-memory box (name/env/type/target · pattern/masking/scope · name/email/envs) 25 per page
Audit log server-side q: user, action, SQL, connection, honoured by live, archive and CSV export existing Prev/Next
AI chat log server-side q: user, prompt, query, error, model Prev/Next (was one 500-row load)

Notes

  • q is trimmed, capped at 200 chars, bound as a parameter; %, _ and \ are escaped (ESCAPE '\'), so they match literally. A repeated ?q= is ignored, not a 500.
  • Paging, Refresh and Export use the last search run, not unsubmitted text. Clear resets and reloads.
  • An audit export records its search term in the AUDIT_EXPORT entry.
  • New shared hook useListFilter replaces utils/user-search.ts. It resets to page 1 on a new search and clamps the page when the list shrinks.
  • LIKE '%…%' is a table scan. That's fine at admin-only volume, and the audit log is archived after 30 days.

Verified

  • npm run verify: 2,445 tests pass, coverage 100%, 0 lint errors.
  • End-to-end on local Postgres: ran real queries, then confirmed audit search (case-insensitive, %/_ literal), paging, CSV export with q, and every tab's search box in the browser.

🤖 Generated with Claude Code

Connections, PHI rules and Users get an in-memory search box and
25-row pages (shared useListFilter hook). The audit log (live,
archive and CSV export) and the AI chat log gain a server-side `q`
text search with LIKE wildcards escaped, and the AI chat log pages
like the audit log instead of loading 500 rows. Paging, Refresh and
Export use the last search run, not unsubmitted text in the box.
@ProjectAJ14
ProjectAJ14 merged commit dc79ca2 into main Nov 6, 2026
1 check passed
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant