feat(personas): add server-side persona search endpoint#30469
feat(personas): add server-side persona search endpoint#30469harsh-vador wants to merge 3 commits into
Conversation
Code Review ✅ Approved 3 resolved / 3 findingsAdds a server-side persona search endpoint and integrates it into the UI persona picker, addressing issues with multi-select state loss, race conditions from out-of-order responses, and case-sensitive local filtering. ✅ 3 resolved✅ Bug: Multi-select loses prior selections after server-side search
✅ Bug: Debounced search results can arrive out of order
✅ Bug: Local personaList filter is case-sensitive, unlike server search
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|
🔴 Playwright Results — workflow failedValidated commit ✅ 746 passed · ❌ 1 failed · 🟡 1 flaky · ⏭️ 8 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 46m 20s ⏱️ Max setup 3m 34s · max shard execution 16m 32s · max shard-job elapsed before upload 19m 35s · reporting 7s 🌐 196.01 requests/attempt · 2.53 app boots/UI scenario · 19.56% common-shard skew Optimization targets still in progress:
Genuine Failures (failed on all attempts)❌
|
|



Describe your changes:
Adds a server-side search endpoint for personas, mirroring the existing
GET /roles/search.Why
The persona picker (assign personas to a user) had no way to search server-side — clients fetch a page of personas and filter locally, which silently misses personas beyond the fetched page once a deployment has many. Roles and domains already have server-side search; personas did not.
Changes
PersonaResource: newGET /v1/personas/search?q=&fields=&limit=&offset=&include=. Thin wrapper over the sharedsearchInternal(DBnameFilterLIKE on name/displayName), identical shape toRoleResource.search.PersonaAPI.searchPersonas(query, limit)→GET /personas/search.PersonaResourceIT.test_searchPersonasEndpoint: name + displayName matches, name ordering, case-insensitivity, empty-result, offset pagination (no dupes), empty-query fallback, deleted-persona exclusion. MirrorsRoleResourceIT.PersonaAPI.test.ts: asserts the endpoint/params and that an empty query dropsq.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Greptile Summary
Adds server-side persona search and integrates it into the persona picker.
/v1/personas/searchbackend endpoint.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failures remain.
Important Files Changed
Sequence Diagram
Reviews (3): Last reviewed commit: "address comments" | Re-trigger Greptile
Context used: