[PR #21014] [CLOSED] perf: eliminate duplicate requests on Prompts page load #96926

Closed
opened 2026-05-15 23:18:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/21014
Author: @Classic298
Created: 1/28/2026
Status: Closed

Base: devHead: dupe-request


📝 Commits (1)

  • 54234b2 perf: eliminate duplicate requests on Prompts page load

📊 Changes

1 file changed (+13 additions, -7 deletions)

View changed files

📝 src/lib/components/workspace/Prompts.svelte (+13 -7)

📄 Description

Summary

Fixes duplicate API requests and content flash when visiting the Prompts workspace page.

Root Cause

Two reactive statements were both triggering on mount:

  1. Query debounce block (fires when query goes from undefined to empty string)
  2. Page/filter block (fires when page is set to 1 in onMount)

Changes

src/lib/components/workspace/Prompts.svelte:

  • Added queryInitialized guard to skip initial empty query trigger
  • Added loaded check to page/filter reactive block
  • Reset page to 1 when search query changes (UX improvement)

Result

Single API request on page load instead of duplicates.

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.

Note

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


🔄 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/21014 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 1/28/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `dupe-request` --- ### 📝 Commits (1) - [`54234b2`](https://github.com/open-webui/open-webui/commit/54234b29f3e158384eab67fe14d7a78cf6c5c3f4) perf: eliminate duplicate requests on Prompts page load ### 📊 Changes **1 file changed** (+13 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/workspace/Prompts.svelte` (+13 -7) </details> ### 📄 Description ## Summary Fixes duplicate API requests and content flash when visiting the Prompts workspace page. ## Root Cause Two reactive statements were both triggering on mount: 1. Query debounce block (fires when query goes from undefined to empty string) 2. Page/filter block (fires when page is set to 1 in onMount) ## Changes src/lib/components/workspace/Prompts.svelte: - Added queryInitialized guard to skip initial empty query trigger - Added loaded check to page/filter reactive block - Reset page to 1 when search query changes (UX improvement) ## Result Single API request on page load instead of duplicates. ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <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 2026-05-15 23:18:22 -05: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#96926