Tabtopia is a Chrome extension that visualizes your browser history and open tabs using interactive D3.js visualizations. There are four core views: a treemap of open tabs, a graph of open tabs, an enhanced history session view, and a bookmark-centric stars view. All views support search using the excellent lunr.js library. The extension leverages Chrome's built-in AI capabilities to provide smart features like URL summarization.
-
Basic Navigation
- Double-click or press Enter/Space to jump to a tab
- Use arrow keys for keyboard navigation after selecting a node
- Single-click a node to make the readout panel sticky
- Press Escape to clear selection
-
Tab Management
- Long press (750ms) on a node to initiate drag and drop
- Drag nodes to move tabs between windows
- Bookmark tabs with a single click
- View domain-specific history and bookmarks in the readout panel
-
Smart Features
- AI-powered URL summarization in the readout panel
- Quick search with real-time filtering
- Domain grouping and window organization
- Automatic tab count and window statistics
- Readout panel updates only when selected element changes
-
View Modes
- Press 't' for time-based view
- Press 'd' for domain-based view
- Press 'r' to reset the view
-
Interaction
- Drag the canvas to pan
- Use scroll wheel to zoom
- Hover over nodes for details
- Click to focus on specific domains or time periods
The session view provides an enhanced way to visualize and explore browsing history organized into meaningful sessions:
-
Smart Session Organization
- Automatic session grouping based on user activity (30-minute inactivity threshold).
- Micro-sessions for more granular activity tracking (5-minute threshold, new windows, or new tabs).
- Window and tab context-aware separation.
- Search query and clicked link tracking.
-
Visual Representation
- Descriptive session titles based on link text and search queries.
- Graph visualization with dwell time-based node sizing.
- Domain grouping and session timelines.
- Favicon and hero image enrichment.
- Interactive modal for deep session exploration.
The Stars View provides a dedicated interface for your bookmarked pages, putting them in the context of your browsing history.
-
Contextual Bookmarks
- Displays recent bookmarks.
- For each bookmark, it shows the surrounding browsing context by fetching history from a 15-minute window around the time the bookmark was created.
-
Organized View
- Bookmarks are grouped by date (e.g., "Today", "Yesterday", "This Week").
- Each bookmark is presented as a "star card" showing the page and its related browsing context.
-
Tab Synchronization Engine
- Real-time tab state monitoring
- Cross-window communication
- Event-driven updates
- Bookmark integration
-
History Trail System
- Continuous browsing activity tracking.
- Domain-based aggregation.
- Temporal pattern analysis.
- Search indexing.
- Dwell time tracking and page importance scoring.
- Navigation source classification (link clicks, search results, direct entry).
- Audio playback duration tracking.
-
AI Integration
- Built-in Chrome AI Summarizer API for URL content with fallback support
- Aggressive crash detection and recovery system
- Smart context detection and adaptive readout generation
- Background worker content extraction to bypass security restrictions
- Automatic fallback to heuristic summaries when AI is unavailable
The underlying synchronization and history trail system can be leveraged for various scenarios:
-
Productivity Enhancement
- Work session analysis
- Research path tracking
- Context switching optimization
- Tab organization patterns
-
Knowledge Management
- Topic-based browsing clusters
- Research journey mapping
- Content relationship discovery
- Domain expertise tracking
-
Workflow Optimization
- Tab usage patterns
- Window organization strategies
- Frequent path identification
- Context restoration
- Clone this repository or download the zip
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer Mode" in the top-right corner
- Click "Load Unpacked" and select the repository folder
The extension provides several debug functions accessible via the browser console for troubleshooting and monitoring:
// View current summary queue statistics
getQueueStats()
// Returns: { queueSize, isProcessing, stats, config }
// Add URL to summary generation queue
addToSummaryQueue("https://example.com")
// Clear all pending summaries from queue
clearSummaryQueue()
// Manually process the summary queue
processSummaryQueue()// Check current summarizer status and crash information
getSummarizerStatus()
// Returns: { crashCount, inBackoff, globallyDisabled, etc. }
// Reset crash counter and re-enable summarizer
resetSummarizerCrashCounter()
// Flush all cached summaries (forces regeneration)
flushSummaryCache()// View audio playback statistics for all tabs
getAudioTrackingStats()
// Returns: { totalTrackedTabs, currentlyAudibleTabs, totalAudioDuration, trackedTabs[] }
// Get current audio duration for a specific tab (includes ongoing playback)
getCurrentAudioDuration(tabId)
// Returns: duration in milliseconds
// Reset audio tracking data (optionally for specific tab)
resetAudioTracking() // Reset all tabs
resetAudioTracking(tabId) // Reset specific tab only- Triple-click the "Debug" link in the header to access debug tools
- Navigate to
chrome-extension://[extension-id]/src/newtab/debug.htmldirectly - Debug tools include state inspection, cache management, and API testing
Open browser DevTools (F12) and use these commands:
// View all available debug functions
console.log(Object.keys(window).filter(k => k.includes('Queue') || k.includes('Summarizer')));
// Monitor summary generation in real-time
window.addEventListener('summaryGenerated', (e) => {
console.log('Summary generated:', e.detail);
});
// Check extension state
chrome.runtime.sendMessage({type: 'getInitialState'}, console.log);A potential future direction is to expose the rich browsing data captured by the extension as a "Memory Context Provider" (MCP) server. This would allow Large Language Models (LLMs) to securely access a user's browsing context, enabling a new class of personalized and context-aware AI applications. The structured data, including sessions, dwell time, and navigation paths, would provide a powerful foundation for this.
Problem: "The model process crashed too many times" error messages Solution:
- The extension automatically detects and suppresses these messages
- Summarizer is disabled for 10 minutes after crashes to prevent spam
- Use
resetSummarizerCrashCounter()in console to manually re-enable - Fallback summaries are generated using URL structure and metadata
Problem: Empty treemap or "Invalid data" warnings Solution:
- Check console for specific error messages
- Use
chrome.runtime.sendMessage({type: 'getInitialState'}, console.log)to inspect data - Extension automatically attempts to repair malformed data structures
- Refresh the page if state becomes corrupted
Problem: Summaries not appearing or stuck in loading state Solution:
// Check queue status
getQueueStats()
// Clear stuck queue
clearSummaryQueue()
// Force regeneration
flushSummaryCache()
// Check summarizer availability
getSummarizerStatus()Problem: Extension running slowly or consuming memory Solution:
- Summary cache is automatically cleaned every 5 minutes
- Use
flushSummaryCache()to clear all cached data - Queue processing is limited to 2 concurrent operations
- Background worker handles content extraction to reduce main thread load
- Via UI: Triple-click the "Debug" link in the extension header
- Direct URL: Navigate to
chrome-extension://[your-extension-id]/src/newtab/debug.html - Console Access: All debug functions are available in browser DevTools
When reporting bugs, please include:
- Console output from DevTools
- Output from
getSummarizerStatus()andgetQueueStats() - Chrome version and extension version
- Steps to reproduce the issue
❌ Never use inline scripts:
<!-- This will cause CSP violations -->
<script>
console.log('This breaks CSP!');
</script>✅ Always use external script files:
<!-- This is CSP compliant -->
<script src="my-script.js"></script>Other CSP Requirements:
- No
eval()ornew Function() - No inline event handlers (
onclick="...") - No inline styles (use external CSS files)
- Use
chrome.runtime.getURL()for extension resources
-
Error Handling
- Always implement graceful fallbacks for API failures
- Use try-catch blocks around Chrome API calls
- Provide meaningful error messages to users
-
Performance
- Debounce frequent operations (DOM updates, API calls)
- Use background workers for heavy processing
- Implement caching for expensive operations
- Clean up event listeners and timers
-
Permissions
- Request minimum necessary permissions
- Handle permission denials gracefully
- Document why each permission is needed
-
Chrome API Usage
- Always check
chrome.runtime.lastErrorafter API calls - Use
sendResponse()properly in message handlers - Return
truefrom async message handlers - Validate all incoming message data
- Always check
-
State Management
- Validate data structures before use
- Implement state repair mechanisms
- Use consistent data formats across components
- Handle edge cases (empty states, missing data)
- Use the built-in debug functions documented above
- Test with various tab/window configurations
- Verify CSP compliance in DevTools
- Test permission edge cases
- Monitor memory usage during development
This extension was developed as an exploration of browser data visualization, with significant portions of the code generated with the assistance of AI tools. The AI helped with:
- D3.js visualization implementations and layout algorithms
- Event handling and responsive design
- Chrome extension API integration
- UI component structure and styling
Anthropic and OpenAI models inside Visual Studio Code were the primary contributors, but a minority of development also occurred in Cursor with similar models.
Human oversight, editing, and testing were applied throughout development to ensure quality, performance, and proper integration with browser APIs.
Alternatives with similar functionality
- Tab Manager Plus: a treemap of favicons using an overlay
- Fuzzy Finder: 'ff' to url bar search your open tabs with fuzzy matching
- Older: Tab Switcher, fast tab switcher
- Search All Tabs
Inspiration
-
- Galaxy Tab: a D3 force visualization from 12 years ago, still works!



