diff --git a/canvas/src/components/Legend.tsx b/canvas/src/components/Legend.tsx index 647479ef..c6d67365 100644 --- a/canvas/src/components/Legend.tsx +++ b/canvas/src/components/Legend.tsx @@ -1,11 +1,23 @@ "use client"; import { useEffect, useState } from "react"; -import { STATUS_CONFIG } from "@/lib/design-tokens"; +import { STATUS_CONFIG, TIER_CONFIG } from "@/lib/design-tokens"; import { useCanvasStore } from "@/store/canvas"; const LEGEND_STATUSES = ["online", "provisioning", "degraded", "failed", "paused", "offline"] as const; +// Tier descriptions kept in sync with CreateWorkspaceDialog.tsx (the +// source of truth for what each tier means semantically). Colors come +// from TIER_CONFIG so the legend swatch matches the badge actually +// rendered on every WorkspaceNode — drift here misled users into +// thinking the legend documented a different tier than the one shown. +const LEGEND_TIERS: ReadonlyArray<{ tier: number; label: string }> = [ + { tier: 1, label: "Sandboxed" }, + { tier: 2, label: "Standard" }, + { tier: 3, label: "Privileged" }, + { tier: 4, label: "Full Access" }, +]; + // Persist the user's choice across sessions. Default is "open" so // first-time users still see the symbol key; once dismissed we // respect that until they explicitly reopen via the floating pill. @@ -102,9 +114,9 @@ export function Legend() {
Tier
- - - + {LEGEND_TIERS.map(({ tier, label }) => ( + + ))}
diff --git a/canvas/src/components/tabs/ConfigTab.tsx b/canvas/src/components/tabs/ConfigTab.tsx index da2eb206..8682073b 100644 --- a/canvas/src/components/tabs/ConfigTab.tsx +++ b/canvas/src/components/tabs/ConfigTab.tsx @@ -655,7 +655,8 @@ export function ConfigTab({ workspaceId }: Props) { > - + + diff --git a/canvas/src/lib/tenant.ts b/canvas/src/lib/tenant.ts index 13881037..095b1391 100644 --- a/canvas/src/lib/tenant.ts +++ b/canvas/src/lib/tenant.ts @@ -59,8 +59,8 @@ export function getTenantSlug(): string { * isSaaSTenant reports whether the canvas is running as the UI for a * SaaS tenant (served at .moleculesai.app). Use for client-side * UX branches that should behave differently on SaaS vs self-hosted — - * e.g. the workspace tier picker hides T1/T2 sandbox tiers because every - * SaaS workspace gets its own EC2 VM (inherently T3 Full Access). + * e.g. the workspace tier picker hides T1/T2/T3 sandbox tiers because + * every SaaS workspace gets its own EC2 VM (inherently T4 Full Access). * * SSR-safe: returns false on the server to avoid hydration drift; call * sites should tolerate a flip from false→true on first client render.