[PR #14002] [MERGED] feat: enhance search with username/email search across workspace pages #10151

Closed
opened 2025-11-11 18:57:27 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/14002
Author: @silentoplayz
Created: 5/18/2025
Status: Merged
Merged: 5/18/2025
Merged by: @tjbck

Base: devHead: search-by-user-or-email


📝 Commits (1)

  • 95badda feat: username and email search in workspace pages

📊 Changes

4 files changed (+41 additions, -12 deletions)

View changed files

📝 src/lib/components/workspace/Knowledge.svelte (+12 -2)
📝 src/lib/components/workspace/Models.svelte (+9 -3)
📝 src/lib/components/workspace/Prompts.svelte (+10 -1)
📝 src/lib/components/workspace/Tools.svelte (+10 -6)

📄 Description

Pull Request Checklist

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

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources? (Assuming this is an internal enhancement and public docs for search might not need specific updates unless detailing all searchable fields.)
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation? (No new dependencies)
  • Testing: Have you written and run sufficient tests to validate the changes? (Assumed manual testing was performed by the developer.)
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?

Changelog Entry

Description

  • This pull request enhances the search functionality on the Prompts, Knowledge, Models, and Tools pages. It enables users to search for items not only by their primary attributes (like name, command, or ID) but also by the name or email of the user associated with them. This provides a more consistent and comprehensive search experience across the application.

Added

  • Ability to search by associated user's name or email on the Knowledge page (Knowledge.svelte).
  • Ability to search by associated user's name or email on the Models page (Models.svelte).
  • Ability to search by associated user's name or email on the Prompts page (Prompts.svelte).
  • Ability to search by associated user's name or email on the Tools page (Tools.svelte).

Changed

  • Knowledge Page (Knowledge.svelte):
    • Updated Fuse.js configuration to include user.name and user.email in the search keys, allowing for searching by these user-specific fields.
  • Models Page (Models.svelte):
    • Modified the filteredModels reactive statement to include checks for searchValue within model.user.name and model.user.email (case-insensitive).
  • Tools Page (Tools.svelte):
    • Modified the filteredItems reactive statement to include checks for query within tool.user.name and tool.user.email (case-insensitive).
  • Prompts Page (prompts.svelte):
    • filteredItems are derived by checking the search query against prompt.title, prompt.command, prompt.user.name, and prompt.user.email (case-insensitive).

Additional Information

  • These changes aim to unify the search experience across different sections of the application, making it easier for users to locate resources associated with specific creators or owners.
  • No new external dependencies were introduced. Existing libraries (Fuse.js or manual Svelte reactivity) were leveraged.

Screenshots or Videos

After modification:
image

If an email address of a user's name is typed incorrectly (mistype of last letter for example):
image

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/14002 **Author:** [@silentoplayz](https://github.com/silentoplayz) **Created:** 5/18/2025 **Status:** ✅ Merged **Merged:** 5/18/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `search-by-user-or-email` --- ### 📝 Commits (1) - [`95badda`](https://github.com/open-webui/open-webui/commit/95badda1c27fa5fea3d8b4b5891a73a7e76e8036) feat: username and email search in workspace pages ### 📊 Changes **4 files changed** (+41 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/workspace/Knowledge.svelte` (+12 -2) 📝 `src/lib/components/workspace/Models.svelte` (+9 -3) 📝 `src/lib/components/workspace/Prompts.svelte` (+10 -1) 📝 `src/lib/components/workspace/Tools.svelte` (+10 -6) </details> ### 📄 Description # Pull Request Checklist **Before submitting, make sure you've checked the following:** - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Provide a concise description of the changes made in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? (Assuming this is an internal enhancement and public docs for search might not need specific updates unless detailing all searchable fields.) - [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? (No new dependencies) - [x] **Testing:** Have you written and run sufficient tests to validate the changes? (Assumed manual testing was performed by the developer.) - [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? --- # Changelog Entry ### Description - This pull request enhances the search functionality on the Prompts, Knowledge, Models, and Tools pages. It enables users to search for items not only by their primary attributes (like name, command, or ID) but also by the name or email of the user associated with them. This provides a more consistent and comprehensive search experience across the application. ### Added - Ability to search by associated user's name or email on the Knowledge page (`Knowledge.svelte`). - Ability to search by associated user's name or email on the Models page (`Models.svelte`). - Ability to search by associated user's name or email on the Prompts page (`Prompts.svelte`). - Ability to search by associated user's name or email on the Tools page (`Tools.svelte`). ### Changed - **Knowledge Page (`Knowledge.svelte`):** - Updated Fuse.js configuration to include `user.name` and `user.email` in the search keys, allowing for searching by these user-specific fields. - **Models Page (`Models.svelte`):** - Modified the `filteredModels` reactive statement to include checks for `searchValue` within `model.user.name` and `model.user.email` (case-insensitive). - **Tools Page (`Tools.svelte`):** - Modified the `filteredItems` reactive statement to include checks for `query` within `tool.user.name` and `tool.user.email` (case-insensitive). - **Prompts Page (`prompts.svelte`):** - `filteredItems` are derived by checking the search `query` against `prompt.title`, `prompt.command`, `prompt.user.name`, and `prompt.user.email` (case-insensitive). --- ### Additional Information - These changes aim to unify the search experience across different sections of the application, making it easier for users to locate resources associated with specific creators or owners. - No new external dependencies were introduced. Existing libraries (`Fuse.js` or manual Svelte reactivity) were leveraged. ### Screenshots or Videos **After modification:** ![image](https://github.com/user-attachments/assets/d92e61d7-b3b8-491c-98f9-3bb5ee767cea) **If an email address of a user's name is typed incorrectly (mistype of last letter for example):** ![image](https://github.com/user-attachments/assets/1c883294-98ca-40ba-b22f-ea6083baf06f) ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 18:57:27 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#10151