"use client"; import Link from "next/link"; import { Puzzle, Timer, Sparkles, Settings } from "lucide-react"; import { useQueryClient } from "@tanstack/react-query"; import { StatusCard } from "@/components/StatusCard"; import { StatsCard } from "@/components/StatsCard"; import { SessionCard } from "@/components/SessionCard"; import { MemorySnapshotCard } from "@/components/MemorySnapshotCard"; import { PlatformBreakdown } from "@/components/PlatformBreakdown"; import { useSessions } from "@/lib/hooks"; import { usePullToRefresh } from "@/lib/usePullToRefresh"; const QUICK_LINKS = [ { href: "/skills", label: "Skills", icon: Puzzle }, { href: "/cron", label: "Cron", icon: Timer }, { href: "/soul", label: "Soul", icon: Sparkles }, { href: "/config", label: "Config", icon: Settings }, ] as const; export default function PulsePage() { const qc = useQueryClient(); const { data: sessionsData, isLoading } = useSessions(8); usePullToRefresh(() => { qc.invalidateQueries(); }); return (
{QUICK_LINKS.map(({ href, label, icon: Icon }) => (
{label}
))}
Recent
{isLoading ? (
{[...Array(3)].map((_, i) => (
))}
) : (
{sessionsData?.items?.map((s) => ( ))} {sessionsData?.items?.length === 0 && (

No sessions yet

)}
)}
); }