From 5463baa7da459164391ce9228624aa7f186f82f4 Mon Sep 17 00:00:00 2001 From: MananTank Date: Wed, 16 Apr 2025 11:34:58 +0000 Subject: [PATCH] Nebula: Fix chat session randomly showing empty state after first prompt (#6744) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR addresses an issue with updating the page URL in the `ChatPageContent.tsx` file due to changes in Next.js behavior. The existing method for updating the URL is commented out, and a temporary solution is proposed. ### Detailed summary - Commented out the line: `window.history.replaceState({}, "", `/chat/${sessionId}`);` - Added comments explaining that the URL update does not work anymore due to Next.js changes. - Stated intention to not update the URL until a better solution is found. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../src/app/nebula-app/(app)/components/ChatPageContent.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx index 25b6bee5919..012aa7b50fd 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx @@ -161,7 +161,9 @@ export function ChatPageContent(props: { (sessionId: string) => { _setSessionId(sessionId); // update page URL without reloading - window.history.replaceState({}, "", `/chat/${sessionId}`); + // THIS DOES NOT WORK ANYMORE!! - NEXT JS IS MONKEY PATCHING THIS TOO + // Until we find a better solution, we are just not gonna update the URL + // window.history.replaceState({}, "", `/chat/${sessionId}`); // if the current page is landing page, link to /chat // if current page is new /chat page, link to landing page