-
- );
-}
-
-function statusIcon(status: CommunityComputeHealthSummary["status"]) {
- switch (status) {
- case "healthy":
- return CheckCircle2;
- case "attention":
- return AlertTriangle;
- case "critical":
- return XCircle;
- case "empty":
- return MinusCircle;
- case "unknown":
- return CircleHelp;
- }
-}
-
-function healthClass(status: CommunityComputeDeploymentHealth): string {
- switch (status) {
- case "healthy":
- return "border-solid bg-foreground/[0.04]";
- case "warming":
- return "border-dashed bg-foreground/[0.03]";
- case "idle":
- return "border-dotted";
- case "degraded":
- return "border-dashed border-foreground/50";
- case "offline":
- return "border-foreground/50 bg-muted/50 line-through decoration-muted-foreground/50";
- case "unknown":
- return "border-dotted bg-muted/20";
- }
-}
-
-function healthDescription(
- status: CommunityComputeHealthSummary["status"],
- total: number,
-): string {
- switch (status) {
- case "healthy":
- return "No reporting device needs attention; some may still be warming or idle.";
- case "attention":
- return "Some deployments may have reduced availability.";
- case "critical":
- return "Shared compute is currently unavailable.";
- case "empty":
- return "No deployments have joined this community yet.";
- case "unknown":
- return total === 0
- ? "Waiting for deployment health reports."
- : "Deployment health could not be determined.";
- }
-}
diff --git a/desktop/src/features/mesh-compute/ui/CommunityComputeKpiRow.tsx b/desktop/src/features/mesh-compute/ui/CommunityComputeKpiRow.tsx
index 7e77943f6e..dac942562e 100644
--- a/desktop/src/features/mesh-compute/ui/CommunityComputeKpiRow.tsx
+++ b/desktop/src/features/mesh-compute/ui/CommunityComputeKpiRow.tsx
@@ -20,7 +20,7 @@ export function CommunityComputeKpiRow({
{
label: "Contributed VRAM",
value: formatCapacity(kpis.sharedCapacityGb),
- detail: `${formatCount(kpis.deploymentCount)} deployments`,
+ detail: `${formatCount(kpis.deploymentCount)} models available`,
},
{
label: "VRAM allocated",
diff --git a/desktop/src/features/mesh-compute/ui/CommunityComputeTerritoryMap.tsx b/desktop/src/features/mesh-compute/ui/CommunityComputeTerritoryMap.tsx
index 75f34fc277..91dd44d2ab 100644
--- a/desktop/src/features/mesh-compute/ui/CommunityComputeTerritoryMap.tsx
+++ b/desktop/src/features/mesh-compute/ui/CommunityComputeTerritoryMap.tsx
@@ -1,8 +1,6 @@
import * as React from "react";
import { cn } from "@/shared/lib/cn";
-import { getAvatarSnapshotUrl } from "@/shared/lib/animatedAvatar";
-import { rewriteRelayUrl } from "@/shared/lib/mediaUrl";
import {
hexTerritoryBoundaryEdges,
layoutCommunityComputeHexTerritories,
@@ -10,18 +8,12 @@ import {
} from "../communityComputeHexLayout";
import type {
CommunityComputeDeployment,
- CommunityComputeDeploymentHealth,
CommunityComputeMapModel,
} from "../communityComputeMapModel";
export type CommunityComputeTerritoryMapProps = {
model: CommunityComputeMapModel;
- selectedDeploymentId?: string | null;
- onSelectedDeploymentChange?: (deploymentId: string) => void;
className?: string;
- /** Tutorial-only simulated activity; live snapshots cannot attribute requests. */
- inferenceDeploymentIds?: readonly string[];
- contributorProfiles?: ContributorProfiles;
};
type Point = { x: number; y: number };
@@ -45,15 +37,8 @@ const SQRT_THREE = Math.sqrt(3);
*/
export function CommunityComputeTerritoryMap({
model,
- selectedDeploymentId,
- onSelectedDeploymentChange,
className,
- inferenceDeploymentIds = [],
- contributorProfiles = {},
}: CommunityComputeTerritoryMapProps) {
- const [internalSelection, setInternalSelection] = React.useState<
- string | null
- >(null);
const deploymentById = React.useMemo(
() =>
new Map(
@@ -75,29 +60,14 @@ export function CommunityComputeTerritoryMap({
React.useEffect(() => {
previousLayoutRef.current = layout;
}, [layout]);
- const fallbackId = model.deployments[0]?.id ?? null;
- const requestedId = selectedDeploymentId ?? internalSelection;
- const activeId =
- requestedId !== null && deploymentById.has(requestedId)
- ? requestedId
- : fallbackId;
- const activeDeployment = activeId
- ? (deploymentById.get(activeId) ?? null)
- : null;
const viewBox = computeViewBox(layout.cells);
- const inferenceIds = React.useMemo(
- () => new Set(inferenceDeploymentIds),
- [inferenceDeploymentIds],
- );
const [hoveredId, setHoveredId] = React.useState(null);
const lowerTimerRef = React.useRef | null>(
null,
);
- const [deploymentSearch, setDeploymentSearch] = React.useState("");
const hoveredDeployment = hoveredId
? (deploymentById.get(hoveredId) ?? null)
: null;
- const isHeroDeployment = model.deployments.length === 1;
const isDenseMap = model.deployments.length >= 50;
React.useEffect(
@@ -109,26 +79,18 @@ export function CommunityComputeTerritoryMap({
function raiseTerritory(deploymentId: string, territoryElement: SVGGElement) {
if (lowerTimerRef.current) clearTimeout(lowerTimerRef.current);
- // SVG paints in DOM order. Move the existing node rather than sorting the
- // React children: sorting reconstructs animated SVG content and restarts
- // its breathing phase whenever hover changes.
+ // SVG paints in DOM order. Move the existing node instead of rebuilding
+ // children so hover stays smooth as territories scale.
territoryElement.parentNode?.appendChild(territoryElement);
setHoveredId(deploymentId);
}
function lowerTerritory() {
if (lowerTimerRef.current) clearTimeout(lowerTimerRef.current);
- // Delay only the contributor overlay; the CSS scale settles independently.
+ // Let the detail card linger briefly while the territory settles.
lowerTimerRef.current = setTimeout(() => setHoveredId(null), 280);
}
- function selectDeployment(deploymentId: string) {
- if (selectedDeploymentId === undefined) {
- setInternalSelection(deploymentId);
- }
- onSelectedDeploymentChange?.(deploymentId);
- }
-
if (model.status === "loading") {
return (
- Mapping community deployments…
+ Mapping community compute…
);
@@ -161,7 +123,8 @@ export function CommunityComputeTerritoryMap({
No compute territories yet
- Deployments appear here when members share compute with the community.
+ Shared compute appears here when members make it available to the
+ community.
);
@@ -177,9 +140,8 @@ export function CommunityComputeTerritoryMap({
data-testid="community-compute-territory-map"
>
{model.deployments.length === 1
? "This machine is the foundation of the mesh. More contributors add capacity, model choice, and resilience."
- : "Each territory is one ready model on one device. Area reflects its reported model-memory tier."}
+ : "See the compute currently available to your community. Larger territories offer more model memory."}
- {!simulated ? (
-
- ) : null}
+
-
+
- {simulated
- ? "Deterministic tutorial snapshot"
- : observedAt
- ? `Recently reported · updated ${formatAge(observedAt)}`
- : "Recently reported by community members · presence may take up to two minutes to expire"}
+ {observedAt
+ ? `Recently reported · updated ${formatAge(observedAt)}`
+ : "Recently reported by community members · presence may take up to two minutes to expire"}
-
-
-
-
Mesh health
-
- Current ready, warming, and idle states from community status
- reports.
-
- {isSharing
- ? usage?.inflight
- ? `Helping run ${usage.inflight} request${usage.inflight === 1 ? "" : "s"} right now.`
- : "Available when your community needs more compute."
- : "Turn on automatic contribution to start building your impact."}
-
-
- {isSharing ? (
-
- Live
-
- ) : null}
-
-
- {items.map(({ icon: Icon, label, value }) => (
-
-
- {label}
-
-
- {value}
-
-
- ))}
-
-
- Session totals from this machine. Request attribution to other members
- is coming soon.
-
-
- );
-}
-
-function formatCount(value: number): string {
- return new Intl.NumberFormat(undefined, { maximumFractionDigits: 0 }).format(
- value,
- );
-}
-
-function formatGb(value: number): string {
- return `${new Intl.NumberFormat(undefined, { maximumFractionDigits: 1 }).format(value)} GB`;
-}
diff --git a/desktop/src/features/mesh-compute/ui/MeshComputePage.tsx b/desktop/src/features/mesh-compute/ui/MeshComputePage.tsx
index 3a4d5d165b..12de3356ce 100644
--- a/desktop/src/features/mesh-compute/ui/MeshComputePage.tsx
+++ b/desktop/src/features/mesh-compute/ui/MeshComputePage.tsx
@@ -1,67 +1,28 @@
import * as React from "react";
-import { BookOpen } from "lucide-react";
import { useCommunities } from "@/features/communities/useCommunities";
import { SettingsSectionHeader } from "@/features/settings/ui/SettingsSectionHeader";
-import { Button } from "@/shared/ui/button";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/shared/ui/tabs";
-import {
- COMMUNITY_COMPUTE_TUTORIAL_FIXTURES,
- type CommunityComputeTutorialFixtureId,
-} from "../communityComputeFixtures";
import { useMeshComputeState } from "../hooks/useMeshComputeState";
-import { CommunityComputeTutorialPanel } from "./CommunityComputeTutorialPanel";
import { MeshComputeCommunityView } from "./MeshComputeCommunityView";
-import { MeshComputeImpactReceipt } from "./MeshComputeImpactReceipt";
import { MeshComputeSettingsCard } from "./MeshComputeSettingsCard";
import { MeshComputeShareBanner } from "./MeshComputeShareBanner";
-import { MeshComputeTokenLeaderboard } from "./MeshComputeTokenLeaderboard";
export function MeshComputePage() {
const { activeCommunity } = useCommunities();
const mesh = useMeshComputeState();
const [tab, setTab] = React.useState("community");
- const [tutorialOpen, setTutorialOpen] = React.useState(false);
- const [tutorialStep, setTutorialStep] = React.useState(0);
- const [fixtureId, setFixtureId] =
- React.useState("small-company");
const communityName = activeCommunity?.name ?? "this community";
- const tutorialFixture = COMMUNITY_COMPUTE_TUTORIAL_FIXTURES[fixtureId];
-
- function toggleTutorial() {
- if (tutorialOpen) {
- setTutorialOpen(false);
- return;
- }
- setTab("community");
- setTutorialOpen(true);
- setTutorialStep(0);
- setFixtureId("small-company");
- }
return (
- Tutorial
-
- }
description={`Contribute this machine’s spare capacity to unlock more models and keep ${communityName}’s agents available when demand grows.`}
title="Compute"
/>
- {simulated
- ? "Tokenmaxxing, inverted: celebrate the tokens you serve—not the tokens you consume."
- : "Your locally reported total. Community rankings will appear when aggregate reporting is available."}
-