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
+7
View File
@@ -824,6 +824,9 @@ async def test_cloud_projection_is_selected_explicitly_and_collaboration_runs_in
not_before=1,
expires_at=4102444800,
plan_name='free',
plan_revision=3,
monthly_bonus_credits=12,
subscription_started_at=1720000000,
limits={'bots.max': 2, 'pipelines.max': 3, 'plugins.max': 4, 'knowledge_bases.max': 5},
)
@@ -845,6 +848,10 @@ async def test_cloud_projection_is_selected_explicitly_and_collaboration_runs_in
assert current['placement_generation'] == 12
assert current['plan_name'] == 'free'
assert current['limitation']['max_bots'] == 2
assert current['current_plan']['subscription_started_at'] == 1720000000
assert current['current_plan']['revision'] == 3
assert current['current_plan']['monthly_bonus_credits'] == 12
assert current['current_plan']['limits']['bots.max'] == 2
create_workspace = await client.post(
'/api/v1/workspaces',