{!isConnected ? (
// Initial state: Show clear HolonID input interface (shown until user connects)
Enter a Holon ID to connect to the Holosphere
Supports numeric IDs (e.g., 1002848305066) or H3 cell IDs (e.g., 872a1070bffffff)
{/* Quick generate button */}
handleHolonIdChange(e.target.value)}
onPointerDown={(e) => e.stopPropagation()}
onWheel={handleWheel}
onKeyDown={(e) => {
if (e.key === 'Enter' && holonId.trim() !== '') {
e.preventDefault()
handleConnect()
}
}}
placeholder="1002848305066 or 872a1070bffffff"
style={{
flex: 1,
height: '48px',
fontSize: '15px',
fontFamily: 'monospace',
padding: '12px 16px',
border: '2px solid #22c55e',
borderRadius: '8px',
backgroundColor: 'white',
boxShadow: '0 2px 8px rgba(34, 197, 94, 0.15)',
outline: 'none',
transition: 'all 0.2s ease',
color: '#333',
boxSizing: 'border-box',
}}
onFocus={(e) => {
e.currentTarget.style.borderColor = '#16a34a'
e.currentTarget.style.boxShadow = '0 4px 12px rgba(34, 197, 94, 0.25)'
}}
onBlur={(e) => {
e.currentTarget.style.borderColor = '#22c55e'
e.currentTarget.style.boxShadow = '0 2px 8px rgba(34, 197, 94, 0.15)'
}}
/>
{error && (
{error}
)}
Press Enter or click the button to connect
{/* Holon Information Header */}
{isConnected && (
= 0 ? 'repeat(2, 1fr)' : '1fr',
gap: '8px',
fontSize: '11px'
}}>
{resolution >= 0 ? (
<>
Resolution:{' '}
{resolutionInfo.name} (Level {resolution})
Coordinates:{' '}
{latitude.toFixed(4)}, {longitude.toFixed(4)}
>
) : (
Type:{' '}
Workspace / Group Holon
)}
{resolution >= 0
? resolutionInfo.description
: 'This holon represents a workspace, organization, or group (not geospatially indexed)'}
)}
{/* Display all data from all lenses */}
{isConnected && data && Object.keys(data).length > 0 && (
Data Lenses ({Object.keys(data).length} categor{Object.keys(data).length !== 1 ? 'ies' : 'y'})
{Object.entries(data).map(([lensName, lensData]) => (
{getCategoryIcon(lensName)}
{getCategoryDisplayName(lensName)}
{lensData && typeof lensData === 'object' && (
({Object.keys(lensData).length} items)
)}
{lensData && typeof lensData === 'object' ? (
Object.entries(lensData).length > 0 ? (
{Object.entries(lensData).map(([key, value]) => {
// Render items - HoloSphere items have an 'id' field
const item = value as Record
const isHolonItem = item && typeof item === 'object' && 'id' in item
return (
{isHolonItem ? (
// Render as a holon item with structured display
{item.name || item.title || item.id}
{item.timestamp && (
{new Date(item.timestamp).toLocaleDateString()}
)}
{item.description && (
{item.description}
)}
{item.content && (
{String(item.content).slice(0, 100)}
{String(item.content).length > 100 && '...'}
)}
{/* Show other relevant fields */}
{Object.entries(item)
.filter(([k]) => !['id', 'name', 'title', 'description', 'content', 'timestamp', '_'].includes(k))
.slice(0, 3)
.map(([k, v]) => (
{k}: {String(v).slice(0, 50)}
))
}
) : (
// Render as key-value pair
{key}:
{typeof value === 'object' ? JSON.stringify(value, null, 2) : String(value)}
)}
)
})}
) : (
No data in this lens
)
) : (
{String(lensData)}
)}
))}
)}
{isConnected && (!data || Object.keys(data).length === 0) && (
No data found in this holon
This H3 cell may not have any data stored yet. You can add data using the + button above.
{isLoading && (
Loading data from GunDB...
)}
)}