How aakashkardam/twintabtracker works
TwinTabTracker is a local-first browser extension for finding and switching to open tabs, managing duplicate copies, and parking pages for later. The principal workflow runs from the popup or dashboard through shared inventory and duplicate detection, then user actions perform cleanup or parking and persist the resulting state locally. The dashboard also exposes parked-tab management and settings; a background service worker supports browser-level behavior. Relationships below are limited to sampled source references and README statements, so unsampled implementations are represented only where the tree or documentation supports them.
Main entry points: actions.ts User actions · adapter.ts Browser adapter · service.ts Tab inventory · PopupApp.tsx Toolbar popup
Components 23
Extension surfaces
- Toolbar popup
src/popup/PopupApp.tsx - Dashboard
src/dashboard/DashboardApp.tsx - Parked tabs view
src/dashboard/ParkedView.tsx - Settings view
src/dashboard/SettingsView.tsx - Tab search
src/ui/components/SearchBox.tsx
Tab workflows
- User actions
src/ui/actions.ts - Inventory hook
src/ui/hooks/useInventory.ts - Tab inventory
src/shared/inventory/service.ts - Tab mapping
src/shared/tabs/map.ts - Duplicate detection
src/shared/duplicates/detect.ts - Cleanup planning
src/shared/duplicates/plan.ts - Cleanup execution
src/shared/cleanup/execute.ts - Cleanup undo
src/shared/cleanup/undo.ts - Parking operations
src/shared/park/operations.ts - Parked data export
src/shared/park/export.ts
Browser and state
- Browser adapter
src/shared/browser/adapter.ts - Storage client
src/shared/storage/client.ts - Extension local state
- Settings hook
src/ui/hooks/useSettings.ts
Background behavior
- Background service worker
src/background/service-worker.ts - Duplicate prevention
src/background/prevention.ts - Duplicate badge
src/background/badge.ts
Other components
- Browser user
Connections 35
- Browser user → Toolbar popup: opens
- Browser user → Dashboard: opens
- Toolbar popup → User actions: invokes
src/popup/PopupApp.tsx - Dashboard → User actions: invokes
src/dashboard/DashboardApp.tsx - Dashboard → Inventory hook: loads
src/dashboard/DashboardApp.tsx - Dashboard → Tab search: renders
src/dashboard/DashboardApp.tsx - Toolbar popup → Inventory hook: loads
src/popup/PopupApp.tsx - Toolbar popup → Tab search: renders
src/popup/PopupApp.tsx - Tab search → Browser user: offers results
src/ui/components/SearchBox.tsx - Inventory hook → Tab inventory: loads and subscribes
src/ui/hooks/useInventory.ts - Inventory hook → Duplicate detection: detects groups
src/ui/hooks/useInventory.ts - Tab inventory → Browser adapter: queries and listens
src/shared/inventory/service.ts - Tab inventory → Tab mapping: maps tabs
src/shared/inventory/service.ts - Tab mapping → Browser adapter: maps browser data
src/shared/tabs/map.ts - User actions → Cleanup planning: plans cleanup
src/ui/actions.ts - User actions → Cleanup execution: executes cleanup
src/ui/actions.ts - User actions → Cleanup undo: undoes cleanup
src/ui/actions.ts - User actions → Parking operations: parks tabs
src/ui/actions.ts - User actions → Browser adapter: activates and closes
src/ui/actions.ts - User actions → Storage client: persists actions
src/ui/actions.ts - Cleanup planning → Browser user: previews targets
- Browser user → Parked tabs view: manages parked tabs
- Parked tabs view → Parking operations: manages entries
src/dashboard/ParkedView.tsx - Parked tabs view → Parked data export: exports entries
src/dashboard/ParkedView.tsx - Settings view → Settings hook: edits settings
- Settings hook → Storage client: reads and updates
src/ui/hooks/useSettings.ts - Storage client → Browser adapter: uses storage API
src/shared/storage/client.ts - Browser adapter → Extension local state: reads and writes
src/shared/browser/adapter.ts - Background service worker → Browser adapter: uses adapter
src/background/service-worker.ts - Background service worker → Duplicate prevention: registers behavior
src/background/service-worker.ts - Background service worker → Duplicate badge: updates badge
src/background/service-worker.ts - Duplicate prevention → Tab inventory: checks inventory
src/background/prevention.ts - Duplicate prevention → Duplicate detection: checks duplicates
src/background/prevention.ts - Duplicate badge → Tab inventory: loads tabs
src/background/badge.ts - Duplicate badge → Duplicate detection: counts duplicates
src/background/badge.ts