Refactor appDetail state management from Zustand to TanStack Query #21739

Open
opened 2026-02-21 20:14:06 -05:00 by yindo · 1 comment
Owner

Originally created by @lyzno1 on GitHub (Jan 18, 2026).

Originally assigned to: @lyzno1 on GitHub.

Description

The current appDetail state management uses Zustand store with manual fetching and setting, which causes several issues:

  1. No automatic caching - data is refetched on every navigation
  2. Race conditions between sidebar state and app detail loading on mobile
  3. Inconsistent cache invalidation patterns across components
  4. Related to #31171 - loading state management issues
Originally created by @lyzno1 on GitHub (Jan 18, 2026). Originally assigned to: @lyzno1 on GitHub. ### Description The current `appDetail` state management uses Zustand store with manual fetching and setting, which causes several issues: 1. No automatic caching - data is refetched on every navigation 2. Race conditions between sidebar state and app detail loading on mobile 3. Inconsistent cache invalidation patterns across components 4. Related to #31171 - loading state management issues
yindo added the 💪 enhancementstale labels 2026-02-21 20:14:06 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 18, 2026):

Hi, @lyzno1. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You suggested refactoring the appDetail state management from Zustand to TanStack Query.
  • The goal is to fix issues like missing automatic caching, race conditions on mobile, inconsistent cache invalidation, and loading state handling.
  • This change aims to improve data fetching and maintain consistent state across components.
  • There has been no further activity or comments on this issue since it was opened.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
  • If I don’t hear back within 15 days, this issue will be automatically closed.

Thanks for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 18, 2026): Hi, @lyzno1. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You suggested refactoring the `appDetail` state management from Zustand to TanStack Query. - The goal is to fix issues like missing automatic caching, race conditions on mobile, inconsistent cache invalidation, and loading state handling. - This change aims to improve data fetching and maintain consistent state across components. - There has been no further activity or comments on this issue since it was opened. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here. - If I don’t hear back within 15 days, this issue will be automatically closed. Thanks for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21739