feat(cloud): show purchased plan revision alongside the latest revision

- Expose the workspace's purchased plan revision from the entitlement
  snapshot.
- Stack the purchased revision card in front of the latest revision in
  the plan comparison dialog; both cards share the same layout, and the
  purchased card's copy and prices come from the Space revision endpoint
  while benefits stay on the entitlement snapshot.
- Add a cancel-first tooltip for subscribing to the newer revision.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
RockChinQ
2026-10-17 00:25:41 +08:00
co-authored by Claude Opus 5.5
parent ececcb8749
commit 16cfb6f8bd
22 changed files with 1054 additions and 144 deletions
+8
View File
@@ -24,6 +24,14 @@ export interface WorkspaceMembership {
}
export interface CurrentWorkspace {
current_plan?: {
subscription_started_at?: number | null;
name: string;
revision: number;
limits: Record<string, number>;
entitlement_features: Record<string, boolean>;
monthly_bonus_credits: number;
} | null;
workspace: Workspace;
membership: WorkspaceMembership;
permissions: string[];