mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5803] [MERGED] feat(sh-admin): add search and pagination to teams list #5365
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5365
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5803
Author: @Leon-Luu
Created: 1/26/2026
Status: ✅ Merged
Merged: 2/20/2026
Merged by: @jamesgeorge007
Base:
next← Head:feature/search_for_workspace_in_adminpanel📝 Commits (10+)
e6718eefeat: add search functionality to workspace panel in admin page62513faMerge branch 'main' into feature/search_for_workspace_in_adminpanel3bd5e2afix: fix no teams condition correctly9889aebMerge branch 'feature/search_for_workspace_in_adminpanel' of github.com:Leon-Luu/hoppscotch into feature/search_for_workspace_in_adminpanel4d24384fix: add translation for no_search_results7d30f66Merge branch 'main' into feature/search_for_workspace_in_adminpanel4fff27dchore: co-pilot fix9253ab2chore: add allTeamsV2 for paginated team searchadc52a6Merge branch 'main' into feature/search_for_workspace_in_adminpanelc714a84feat(backend): stabilize team sort order withidtie-breaker inallTeamsV2query📊 Changes
9 files changed (+308 additions, -56 deletions)
View changed files
📝
packages/hoppscotch-backend/src/admin/admin.service.ts(+18 -0)📝
packages/hoppscotch-backend/src/admin/infra.resolver.ts(+20 -0)📝
packages/hoppscotch-backend/src/team/team.service.spec.ts(+80 -0)📝
packages/hoppscotch-backend/src/team/team.service.ts(+28 -0)📝
packages/hoppscotch-sh-admin/locales/en.json(+2 -0)📝
packages/hoppscotch-sh-admin/src/components.d.ts(+4 -1)➖
packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/TeamList.graphql(+0 -11)➕
packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/TeamListV2.graphql(+11 -0)📝
packages/hoppscotch-sh-admin/src/pages/teams/index.vue(+145 -44)📄 Description
Add a search input field to the Workspace panel that allows administrators to filter workspaces by name or ID, similar to the existing search functionality in the Users panel.
Closes #
https://github.com/hoppscotch/hoppscotch/issues/5802
What's changed
Backend
fetchAllTeamsV2toTeamServicewith offset pagination, case-insensitive search on name and ID, and a compoundorderBy: [{ name: 'asc' }, { id: 'asc' }]for stable pagination.allTeamsV2(searchString, skip, take)as a new@ResolveFieldonInfraResolver(oldallTeamsmarked@deprecated).Frontend
allTeamsV2with 500ms debounce.take: teamsPerPage + 1) to accurately determine next-page availability without a total count.search_placeholderandno_search_resultslocale keys toen.json.TeamList.graphql(v1) query document.Notes to reviewers
allTeamsV2is queried on every debounced keystroke withskip/takeoffset. There is no client-side filtering.en.json— consistent with all otherteams.*keys in the project (no other locale file contains teams translations; non-English translations follow the community pipeline).allTeamsv1 resolver is intentionally kept (marked deprecated) for backwards compatibility.Summary by cubic
Added server-side search with offset pagination to the Admin Workspaces list. Debounced search by name or ID, stable A–Z sort (ID tie-breaker), next/prev with lookahead, auto-reset on empty pages, improved empty/error states, and delete-aware paging, powered by infra.allTeamsV2 (v1 deprecated).
Written for commit
651c3462ee. Summary will update on new commits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.