Problem
When users navigate to different URLs within the same browser tab, the chat history is shared across all URLs. This causes conversations from one page to incorrectly appear on a different page.
Reproduction Steps
- Open a URL (e.g.,
github.com/user/home)
- Start a chat conversation in the side panel
- Navigate to a different URL in the same tab (e.g.,
github.com/user/repos)
- Open the side panel - the previous page"s chat history is displayed
Expected Behavior
Each URL should have its own isolated chat history. When navigating to a different URL, the chat should be empty or show that URL"s specific history.
Root Cause
The chat history storage uses chat:tab:{tabId} as the storage key, which doesn"t include the URL. This means all URLs in the same tab share the same chat history storage.
Proposed Solution
Use chat:tab:{tabId}:{normalizedUrl} as the storage key to isolate chat history by URL.
Workaround
Users can manually clear chat history when switching pages, but this is not ideal.
Affected Files
apps/chrome-extension/src/entrypoints/sidepanel/chat-history-store.ts
apps/chrome-extension/src/entrypoints/sidepanel/chat-history-runtime.ts
apps/chrome-extension/src/entrypoints/sidepanel/main.ts
apps/chrome-extension/src/entrypoints/sidepanel/ui-state-runtime.ts
Problem
When users navigate to different URLs within the same browser tab, the chat history is shared across all URLs. This causes conversations from one page to incorrectly appear on a different page.
Reproduction Steps
github.com/user/home)github.com/user/repos)Expected Behavior
Each URL should have its own isolated chat history. When navigating to a different URL, the chat should be empty or show that URL"s specific history.
Root Cause
The chat history storage uses
chat:tab:{tabId}as the storage key, which doesn"t include the URL. This means all URLs in the same tab share the same chat history storage.Proposed Solution
Use
chat:tab:{tabId}:{normalizedUrl}as the storage key to isolate chat history by URL.Workaround
Users can manually clear chat history when switching pages, but this is not ideal.
Affected Files
apps/chrome-extension/src/entrypoints/sidepanel/chat-history-store.tsapps/chrome-extension/src/entrypoints/sidepanel/chat-history-runtime.tsapps/chrome-extension/src/entrypoints/sidepanel/main.tsapps/chrome-extension/src/entrypoints/sidepanel/ui-state-runtime.ts