Browser Sessions
({allSessions.length})
{/* Search */}
setSearchQuery(e.target.value)}
placeholder="Search sessions, tabs, or tags..."
className="w-full pl-10 pr-4 py-2.5 bg-white/5 border border-white/10 rounded-xl text-white placeholder-white/40 focus:outline-none focus:ring-2 focus:ring-teal-500"
/>
{/* Import Modal */}
{isImporting && (
)}
{/* Add Session Form */}
{isAdding && (
)}
{/* Sessions List */}
{sessions.length === 0 ? (
{searchQuery ? `No sessions found for "${searchQuery}"` : "No saved sessions yet"}
{searchQuery ? "Try a different search term" : "Save your browser tabs to access them anywhere"}
) : (
{sessions
.sort((a, b) => (b.createdAt || 0) - (a.createdAt || 0))
.map((item, index) => {
const isExpanded = expandedSessions.has(index)
const tabCount = item.tabs?.length || 0
return (
{/* Session Header */}
toggleExpanded(index)}
>
{item.name}
{item.browserType}
{tabCount} tab{tabCount !== 1 ? "s" : ""}
{item.description && (
{item.description}
)}
{formatDate(item.createdAt)}
{item.tags && item.tags.length > 0 && (
{item.tags.join(", ")}
)}
{/* Expanded Tabs */}
{isExpanded && item.tabs && (
{item.tabs.map((tab, tabIndex) => (
))}
)}
)
})}
)}