From 3cb66e3f27299b7e426b5817c350be59fd52ffb2 Mon Sep 17 00:00:00 2001 From: Yahya Alhinai Date: Sun, 28 Jun 2026 14:24:04 +0000 Subject: [PATCH] Simplify frontend room surfaces --- frontend/src/App.tsx | 114 +++------------------------- frontend/src/components/PodView.tsx | 63 +-------------- 2 files changed, 13 insertions(+), 164 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 07bbf2c..684192c 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -2,14 +2,8 @@ import { useEffect, useState } from 'react'; import type { Room } from 'livekit-client'; import { AlertCircleIcon, - BrainCircuitIcon, - CircleDotIcon, - RadioTowerIcon, RefreshCwIcon, SparklesIcon, - UsersIcon, - WifiIcon, - ShieldCheckIcon, } from 'lucide-react'; import type { Pod, PodInput } from '@podman/shared'; import { joinPod } from './lib/pod.js'; @@ -19,7 +13,6 @@ import { CreatePodForm } from './components/CreatePodForm.js'; import { PodView } from './components/PodView.js'; import { GraphView } from './components/GraphView.js'; import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'; -import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { Card, @@ -40,7 +33,6 @@ import { import { Skeleton } from '@/components/ui/skeleton'; const SESSION_KEY = 'podman.session'; -const fmt = new Intl.NumberFormat('en', { notation: 'compact' }); function pathPodId(): string | null { const [segment] = window.location.pathname.split('/').filter(Boolean); @@ -68,7 +60,6 @@ export default function App() { const [pending, setPending] = useState>(new Set()); const [error, setError] = useState(null); const [presence, setPresence] = useState>({}); - const [memory, setMemory] = useState(null); const [joinedPodId, setJoinedPodId] = useState(null); const [member, setMember] = useState(''); const [devMode, setDevMode] = useState(false); @@ -81,14 +72,12 @@ export default function App() { async function refresh() { setLoading(true); try { - const [nextPods, nextPresence, nextMemory] = await Promise.all([ + const [nextPods, nextPresence] = await Promise.all([ api.listPods(), api.getPresence().catch(() => presence), - api.getMemoryStats().catch(() => memory), ]); setPods(nextPods); setPresence(nextPresence); - setMemory(nextMemory); setError(null); } catch (e) { setError((e as Error).message); @@ -130,13 +119,9 @@ export default function App() { let alive = true; const tick = async () => { try { - const [p, m] = await Promise.all([ - api.getPresence(), - api.getMemoryStats().catch(() => memory), - ]); + const p = await api.getPresence(); if (alive) { setPresence(p); - setMemory(m); } } catch { /* presence is best-effort */ @@ -279,14 +264,6 @@ export default function App() { } const showReconnecting = restoring || (joinedPodId !== null && joinedPod === null); - const liveNames = Array.from(new Set(Object.values(presence).flat())); - const liveTotal = liveNames.length; - const totalMembers = pods.reduce((sum, p) => sum + p.members.length, 0); - const activeRooms = Object.values(presence).filter((names) => names.length > 0).length; - const podManOnline = liveNames.some((name) => name.toLowerCase() === 'podman'); - const latestActivity = memory - ? memory.observations + memory.collisions + memory.interventions + memory.outcomes - : 0; if (joinedPod) { return ( @@ -301,45 +278,21 @@ export default function App() { return (
-
-
+
+
PM
-
-

- PodMan -

- - - {podManOnline ? 'online' : 'standby'} - -
-

- Live engineering rooms, team memory, and intervention routing. -

+

PodMan

-
- - - Privacy-limited - - -
-
- -
- - - - +
@@ -374,9 +327,6 @@ export default function App() {

Workspaces

Active pods

-

- Join the room that matches your current workstream. -

{loading ? ( @@ -420,21 +370,6 @@ export default function App() { )} @@ -443,37 +378,6 @@ export default function App() { ); } -function StatPill({ - icon: Icon, - label, - value, -}: { - icon: React.ComponentType<{ className?: string }>; - label: string; - value: string; -}) { - return ( -
-
- -
-
-

{label}

-

{value}

-
-
- ); -} - -function BriefLine({ label, value }: { label: string; value: string }) { - return ( -
- {label} - {value} -
- ); -} - function PodSkeleton() { return ( diff --git a/frontend/src/components/PodView.tsx b/frontend/src/components/PodView.tsx index 789f982..e1644dc 100644 --- a/frontend/src/components/PodView.tsx +++ b/frontend/src/components/PodView.tsx @@ -51,7 +51,6 @@ import { } from '../lib/api.js'; import { useInterventions, primeSpeech } from '../livekit/useInterventions.js'; import { usePodActivity } from '../hooks/use-pod-activity.js'; -import LiveWaveform from '@/components/ruixen/live-waveform'; import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'; import { Avatar, AvatarBadge, AvatarFallback } from '@/components/ui/avatar'; import { Badge } from '@/components/ui/badge'; @@ -145,7 +144,7 @@ export function PodView({ const [testingVoice, setTestingVoice] = useState(false); const [note, setNote] = useState(null); const [audioBlocked, setAudioBlocked] = useState(false); - const [remoteAudioTracks, setRemoteAudioTracks] = useState(0); + const [, setRemoteAudioTracks] = useState(0); const [micOn, setMicOn] = useState(false); const [historyMember, setHistoryMember] = useState(null); const [history, setHistory] = useState(null); @@ -567,8 +566,6 @@ export function PodView({ } } - const podmanPresent = participants.some((p) => p.name.toLowerCase() === 'podman'); - return (
- -
- - - -
{devMode && ( @@ -922,41 +913,6 @@ export function PodView({ - - - Status - Connection, media, and agent presence. - - - -
- - - 0 - ? `${remoteAudioTracks} remote track${remoteAudioTracks === 1 ? '' : 's'}` - : beat.on - ? beat.mine - ? 'publishing' - : `${beat.by} playing` - : 'ready' - } - /> - -
-
-
- -

{label}

-

{value}

-
- - ); -} - function Participant({ participant, onOpenHistory, @@ -1548,7 +1493,7 @@ const ACTIVITY_CATEGORIES: { { id: 'signal', label: 'Signals', - hint: 'Screen logs and local git activity routed to this stream.', + hint: 'Recent screen and git activity.', icon: RadioTowerIcon, }, {