.tasks/interface/EXPL-005-explorer-tabs.md
Add browser-like tabs to Spacedrive Explorer, enabling users to browse multiple locations simultaneously. This requires careful integration with the keybind system, proper UI rendering, and preservation of context (selection, view mode, scroll position, navigation history) across tabs.
None - this is a standalone architectural feature.
Explorer Context (/packages/interface/src/components/Explorer/context.tsx):
navigationReducer (history, index) + uiReducer (view mode, sorting, UI state)useNavigate, useLocation)Keybind System (/packages/interface/src/util/keybinds/):
Existing Tab Pattern (/packages/interface/src/components/Inspector/Tabs.tsx):
layoutId for smooth transitionsEach tab will have isolated contexts created through React's key prop mechanism. This approach:
key propChallenge: React Router v6 only supports one browser router per app
Solution: Dynamic router type switching
createBrowserRouter (syncs to URL bar)createMemoryRouter (in-memory only)Each tab maintains:
Synchronized across all tabs:
TabManagerContext.tsx created with core state managementTabBar.tsx UI component implementedTabView.tsx rendering logic implementeduseTabManager.ts hook createdExplorer.tsx wrapped in TabManagerProvidercontext.tsx updated with isActiveTab propSelectionContext.tsx updated with isActiveTab propexplorer.openInNewTab keybind removed (conflicts with global)tabs.newTab (Cmd+T) - creates new tabtabs.closeTab (Cmd+W) - closes active tabtabs.nextTab (Cmd+Shift+]) - switches to next tabtabs.previousTab (Cmd+Shift+[) - switches to previous tabtabs.selectTab1-9 (Cmd+1-9) - jumps to specific tabtabPreferences.ts store createdTo be created:
packages/interface/src/components/TabManager/TabManagerContext.tsxpackages/interface/src/components/TabManager/TabBar.tsxpackages/interface/src/components/TabManager/TabView.tsxpackages/interface/src/components/TabManager/useTabManager.tspackages/interface/src/components/TabManager/TabContextMenu.tsx (Phase 6)packages/interface/src/components/TabManager/index.tspackages/ts-client/src/stores/tabPreferences.tsTo be modified:
packages/interface/src/Explorer.tsxpackages/interface/src/components/Explorer/context.tsxpackages/interface/src/components/Explorer/SelectionContext.tsxpackages/interface/src/components/Explorer/views/GridView/GridView.tsxpackages/interface/src/components/Explorer/views/ListView/ListView.tsxpackages/interface/src/util/keybinds/registry.tsBefore:
After: