'use client'; import React from 'react'; import { OperatorSession } from './types'; interface OperationsSessionProps { session: OperatorSession; onSignOut: () => void; signingOut?: boolean; } export function OperationsSessionView({ session, onSignOut, signingOut = false, }: OperationsSessionProps) { function formatDate(isoString?: string) { if (!isoString) return '--'; return new Date(isoString).toLocaleString('en-US', { year: 'numeric', month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit', second: '2-digit', timeZoneName: 'short', }); } const isOwner = session.role === 'owner'; return (
{/* Header Row */}
Session Credentials

My Session

Cryptographic authority and active authentication status for this browser session.

{/* Session Details Card */}
{/* Verified Identity */}
Verified Identity
{session.identity}
ops.operators identity
{/* Operations Role */}
Operations Role
{session.role}
{isOwner ? 'Full platform authority' : 'Standard operator telemetry read'}
{/* Session Status */}
Session Status
{session.status}
Validated on-demand
{/* Environment */}
Runtime Environment
{session.environment ?? 'production'}
Target API host boundary
{/* Created Timestamp */}
Session Created
{formatDate(session.createdAt)}
{/* Last Activity */}
Last Activity
{formatDate(session.lastActivityAt)}
{/* Absolute Expiry */}
Absolute Expiry
{formatDate(session.expiresAt)}
{/* Action Row */}
Cookie: __Host-motorsignal_ops (HttpOnly, Secure, SameSite=Strict)
); }