fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Improve `specific API endpoints` search table when adding API-only user

Open Leanngove opened this issue 4 months ago • 2 comments

Goal

User story
As an IT admin,
I want the "select API endpoints" table search to make sense
so that I can more easily add API-only users.

For help creating a user story, see "Writing a good user story" in the website handbook.

Change

  • [ ] https://github.com/fleetdm/fleet/pull/49613

Leanngove avatar Jul 21 '26 20:07 Leanngove

Branch: rc-minor-fleet-v4.91.0 · Server: 4.91.0-rc.2608241519 (rev 8d2f021ec7) · Validated: 2026-08-24 Fix: PR #49613 (8677e1cf53) "Fix Add API-only user > Specific API endpoints table search" — merged to main 2026-07-22; confirmed on the RC and in the running build. Method: code review + live UI (Settings → Users → New API-only user → Specific API endpoints) with screenshots + unit test.

What the PR changes (ApiEndpointSelectorTable.tsx):

  • Ranks search results by relevance — exact > prefix > whole-word > substring — matched against both name and path, with method matches ranked lowest and broader (fewer-segment) paths breaking ties. Fixed a bug where the table's default sort silently discarded that ranking.
  • Removed pagination from the results table (uses the dropdown's scrollbar).

Live results

# Check Expected Actual Result
1 Search by name ("hosts") best match ranked first "List hosts" (/api/v1/fleet/hosts) top, then "Get hosts summary" ✅
2 Search by path ("software/titles") path search works + ranked "List software titles" (/api/v1/fleet/software/titles) top, then /…/:id ✅
3 Searchbox placeholder reflects name+path search "Search by name or path" ✅
4 Results table scrollable, no pagination scrollbar, no pager controls; Name/Method/Path columns ✅
5 Unit test ApiEndpointSelectorTable.tests.tsx pass 9/9 pass ✅
6 Fix on RC + in running build present 8677e1cf53 on RC; build rev 8d2f021ec7 ✅

Verdict: Fixed and shipping in 4.91.0.

xpkoala avatar Aug 24 '26 17:08 xpkoala

Admins search with ease Finding endpoints like new paths Through the cloud gardens

fleet-release avatar Sep 02 '26 22:09 fleet-release