[PR #5155] fix: unnecessory data fetch when swithing apps category on explore page #24799

Closed
opened 2026-02-21 20:23:42 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/5155

State: closed
Merged: Yes


Description

On the explore page, switching the apps category triggers a refetch of the allList data because the URL changes with the category as a search parameter via router push for sharing. Additionally, the category list sometimes renders in a different order.

To prevent page reload, it might be better to use the history API instead of route for changing the URL for sharing.

https://github.com/langgenius/dify/assets/3824431/6cc40514-8b13-4d28-a193-11863b65602a

Type of Change

Please delete options that are not relevant.

  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement

How Has This Been Tested?

  1. on the explore page, apps category swith with the right data. No more data fetching. Url changed correctly with category search parameter.
  2. open a new tab of the url with category search parameter, the correct category tab activated.
  3. No error found on the studio page when add app with template.
  4. No error found on the studio page and tools page when changing category or type.

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes
**Original Pull Request:** https://github.com/langgenius/dify/pull/5155 **State:** closed **Merged:** Yes --- # Description On the explore page, switching the apps category triggers a refetch of the allList data because the URL changes with the category as a search parameter via router push for sharing. Additionally, the category list sometimes renders in a different order. To prevent page reload, it might be better to use the history API instead of route for changing the URL for sharing. https://github.com/langgenius/dify/assets/3824431/6cc40514-8b13-4d28-a193-11863b65602a ## Type of Change Please delete options that are not relevant. - [x] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement # How Has This Been Tested? 1. on the explore page, apps category swith with the right data. No more data fetching. Url changed correctly with category search parameter. 2. open a new tab of the url with category search parameter, the correct category tab activated. 3. No error found on the studio page when add app with template. 4. No error found on the studio page and tools page when changing category or type. # Suggested Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods - [ ] `optional` I have made corresponding changes to the documentation - [ ] `optional` I have added tests that prove my fix is effective or that my feature works - [ ] `optional` New and existing unit tests pass locally with my changes
yindo added the pull-request label 2026-02-21 20:23:42 -05:00
yindo closed this issue 2026-02-21 20:23:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#24799