refactor: remove the billing tier model (P0.1)

The community edition has no monetization (ADR-0001). Remove the tier
model (packages/shared/src/tiers.ts), the requireTier middleware and every
tier gate, GET/PATCH /api/tier and the trial start, and the Stripe
integration, which depends on the tier model.

Personal features a tier used to limit are open to everyone: unlimited
workspaces and connectors, every embedding provider including LiteLLM,
per-workspace costs, Approvals. The workspace session cap is one constant
(100). Team and enterprise surfaces are hidden instead of unlocked (team
dock zone, Settings Team/Enterprise/Plan tabs, workspace Team tab);
cloud sync reports unavailable, as it did for free users.

The sidecar ignores the tier keys in config.json but does not delete them:
both editions may still share ~/.waggle.

Web billing UI is deleted: plan cards, upgrade and trial modals, payment
success route, the KVARK sales block, tier 403 handling.
This commit is contained in:
shumeiko.it
2026-10-15 19:31:50 +02:00
parent 369d8269c1
commit fe2eb0f648
117 changed files with 342 additions and 6424 deletions

View File

@@ -1,5 +1,4 @@
import { useState, useEffect } from "react";
import { useNavigate } from "react-router-dom";
import { WifiOff, Search, Bell, Brain } from "lucide-react";
import waggleLogoDark from "@/assets/waggle-logo.jpeg";
import waggleLogoLight from "@/assets/waggle-logo.png";
@@ -25,15 +24,12 @@ interface StatusBarProps {
costUsd?: number;
offline?: boolean;
unreadNotifications?: number;
trialDaysRemaining?: number;
trialExpired?: boolean;
onSearchClick?: () => void;
onNotificationClick?: () => void;
}
const StatusBar = ({ workspaceName, focusedWindowLabel, model, tokensUsed, costUsd, offline, unreadNotifications = 0, trialDaysRemaining: trialDays, trialExpired, onSearchClick, onNotificationClick }: StatusBarProps) => {
const StatusBar = ({ workspaceName, focusedWindowLabel, model, tokensUsed, costUsd, offline, unreadNotifications = 0, onSearchClick, onNotificationClick }: StatusBarProps) => {
const [time, setTime] = useState(new Date());
const navigate = useNavigate();
const isLight = useIsLightTheme();
const waggleLogo = isLight ? waggleLogoLight : waggleLogoDark;
// M-20 / UX-5: token + cost are developer-facing signal. Hidden by
@@ -203,24 +199,6 @@ const StatusBar = ({ workspaceName, focusedWindowLabel, model, tokensUsed, costU
</div>
<div className="flex items-center gap-2 lg:gap-4 shrink-0">
{trialDays !== undefined && trialDays > 0 && (
<span className={`text-[10px] font-display font-semibold px-2 py-0.5 rounded-full whitespace-nowrap ${trialDays <= 3 ? 'bg-destructive/20 text-destructive' : 'bg-primary/15 text-honey'}`}>
Trial: {trialDays}d left
</span>
)}
{trialExpired && (
/* R9 Lane D: the amber pill "screamed" on every screen for a benign
steady state (you're on the free Solo plan). Demoted to a quiet
neutral text-chip — still a button that routes to plans. */
<button
type="button"
onClick={() => navigate('/settings?tab=billing')}
className="text-[10px] font-display px-1.5 py-0.5 rounded-md text-muted-foreground whitespace-nowrap transition-colors hover:text-honey"
title="You're on the free Solo plan (your trial ended). See plans."
>
Solo plan
</button>
)}
<HintTooltip content="Search (Ctrl+K)">
<button
onClick={onSearchClick}