Skip to content

fix: update groups count to reflect filtered search results#25689

Open
silentoplayz wants to merge 1 commit into
open-webui:devfrom
silentoplayz:fix/groups-search-count
Open

fix: update groups count to reflect filtered search results#25689
silentoplayz wants to merge 1 commit into
open-webui:devfrom
silentoplayz:fix/groups-search-count

Conversation

@silentoplayz
Copy link
Copy Markdown
Collaborator

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.

This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.

Before submitting, make sure you've checked the following:

  • Linked Issue/Discussion: This PR fixes the Groups count not reflecting filtered search results.
  • Target branch: The pull request targets the dev branch. PRs targeting main will be immediately closed.
  • Description: A concise description of the changes is provided below.
  • Changelog: A changelog entry following Keep a Changelog format is included at the bottom.
  • Documentation: Relevant documentation has been added or updated in the Open WebUI Docs Repository.
  • Dependencies: Any new or updated dependencies are explained, tested, and documented.
  • Testing: Manual tests have been performed to verify the fix/feature works correctly and does not introduce regressions. Screenshots or recordings are included where applicable.
  • No Unchecked AI Code: This PR is either human-written or has undergone thorough human review AND manual testing. Unreviewed AI-generated PRs may be closed immediately.
  • Self-Review: A self-review of the code has been performed, ensuring adherence to project coding standards.
  • Architecture: Smart defaults are preferred over new settings. Local state is used for ephemeral UI logic. Major architectural or UX changes have been discussed first.
  • Git Hygiene: The PR is atomic (one logical change), rebased on dev, and contains no unrelated commits.
  • Title Prefix: The PR title uses one of the following prefixes:
    • fix: Bug fixes

Changelog Entry

Description

Fixes the Groups page count in the admin panel to reflect the number of filtered search results instead of always showing the total count.

The count next to the "Groups" heading used groups.length (the unfiltered total) instead of filteredGroups.length (the search-filtered result). This was the only search bar in the admin UI where the count did not update to reflect the active search query.

One-line change: {groups.length}{filteredGroups.length}

Fixed

  • Groups count now reflects filtered search results, consistent with every other searchable list in the admin UI

Additional Information

  • 1 file changed, 1 line modified
  • No structural, behavioral, or dependency changes

Manual Verification Performed

  1. Navigate to admin panel → Users → Groups
  2. Observe the count next to "Groups" heading matches total groups
  3. Type a search query in the search bar
  4. Before fix: Count remains the total number of groups regardless of search
  5. After fix: Count updates to reflect the number of matching search results
  6. Clear the search — count returns to the total

Before:

image

After:

image

Contributor License Agreement

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant