langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
51.81k stars 7.51k forks source link

The log page will redirect to the overview page when refreshing #8781

Closed QunBB closed 5 days ago

QunBB commented 1 month ago

Self Checks

Dify version

0.8.3

Cloud or Self Hosted

Cloud

Steps to reproduce

https://github.com/user-attachments/assets/1003c8db-d51e-467a-bac2-8b1c66bb4793

✔️ Expected Behavior

The log page should be still log page after refreshing

❌ Actual Behavior

The log page will redirect to the overview page when refreshing the log page

dosubot[bot] commented 1 month ago

Hello, @QunBB! I'm here to help you with any bugs, questions, or contributions you have regarding Dify. Let's work together to resolve the issue you're facing.

The issue you're experiencing, where the log page redirects to the overview page upon refreshing, could be related to the routing logic or state management in the log page component.

The pageType state is managed and initialized in the log page component by passing the PageType.log value as a prop to the Main component. The Main component, which is actually the LogAnnotation component, uses this pageType prop to determine which content to display [1][2].

Additionally, the TabSlider component changes the route based on the selected tab, which might be causing the redirection issue if the state is not preserved correctly during a refresh [2].

To address this, ensure that the pageType state is correctly set to PageType.log when the log page is loaded or refreshed. You might need to check the initialization logic and any conditional redirects that could be affecting the routing behavior.

To continue talking to Dosu, mention @dosu.