Bug: Tab content does not persist across tab switches (last navigated site appears on all tabs)
description
When multiple tabs are opened and navigated to different URLs, switching between them does not preserve the correct site content per tab.
Observed Behavior:
- Open Tab 1 → navigate to Site A
- Open Tab 2 → navigate to Site B
- Switch back to Tab 1 → still shows Site B
- Closing all tabs still shows the last site content in the view area
Expected Behavior
Each tab should remember and display its own content, and switching tabs should properly switch the associated BrowserView.
Steps to Reproduce
- Open the app
- Open two or more tabs
- Navigate each to a different website
- Switch between tabs
- Observe that all tabs show the last navigated site regardless of which tab is selected
Possible Cause
Likely caused by not properly maintaining a 1:1 mapping between UI tabs and their respective BrowserView instances in main.js.
The tab switch currently sets the active index but may not actually update the visible BrowserView or maintain isolated webContents per tab.
Suggested Fixes
- Ensure each tab has its own persistent
BrowserViewthat is correctly added/removed onswitchTab(index) - Avoid reusing a single view across all tabs
- Double-check tab view management in
main.jsand align logic withtabRefs[]inrenderer.js
Environment
- OS: Windows
- App: GhostShell (Electron)
- Electron Version: 35.1.3