Skip to content

feat(canvas): add T4 tier (full-host) + default T4 on SaaS - #1693

Merged
HongmingWang-Rabbit merged 3 commits into
mainfrom
feat/saas-tier-default-t3
Apr 23, 2026
Merged

feat(canvas): add T4 tier (full-host) + default T4 on SaaS#1693
HongmingWang-Rabbit merged 3 commits into
mainfrom
feat/saas-tier-default-t3

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

  • On SaaS every workspace gets its own EC2 VM — T1 (sandboxed) / T2 (standard Docker) tiers don't apply to a dedicated VM
  • Add isSaaSTenant() in canvas/src/lib/tenant.ts (SSR-safe: false on server, computed from hostname on client)
  • CreateWorkspaceDialog: when SaaS, render only the T3 option, default tier=3, single-column grid, label "Tier — dedicated VM"
  • Self-hosted unchanged — full T1/T2/T3 picker remains

Rationale

User feedback: "I also see its T2, default it should be T3 T4 since we should have full access of the platform." The tier picker was inherited from the local-Docker model where the tier controls sandbox level and resource caps. On EC2-per-workspace SaaS that mapping is meaningless — the VM is either there or it isn't, and it's always "full access" to its own machine.

Test plan

  • npx vitest run src/components/__tests__/CreateWorkspaceDialog.a11y.test.tsx — 19/19 pass (jsdom hostname is localhost → non-SaaS path, existing tests unaffected)
  • npx tsc --noEmit — no new errors attributable to this diff
  • Visual QA: on hongmingwang.moleculesai.app, Create Workspace dialog shows only T3 option; on localhost:3000, all three tiers remain
  • End-to-end: create Hermes workspace on SaaS, confirm tier=3 in DB + UI

Follow-ups (not blocking)

  • CP provisioner: for Hermes, step up default instance type to t3.medium (t3.small can OOM during hermes install.sh)
  • T4 option: if we add "super VM" (large instance type) later, surface it here

🤖 Generated with Claude Code

On SaaS every workspace gets its own EC2 VM — the Docker-sandbox
distinction between T1 (sandboxed), T2 (standard Docker), and T3
(full host access) doesn't apply. A SaaS workspace is always a
dedicated VM, which is "full access" by construction. Showing T1/T2
in that UI is a category error: users pick a sandbox level that has
no effect on the actual EC2 machine they get.

Changes:
- tenant.ts: export isSaaSTenant() — returns true when canvas is
  served at <slug>.moleculesai.app (SSR-safe: false on server)
- CreateWorkspaceDialog: when isSaaSTenant(), render only the T3
  option, default tier=3, grid collapses to a single column. Label
  gets a " — dedicated VM" hint so the user knows what they're
  getting. On self-hosted the full T1/T2/T3 picker is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@HongmingWang-Rabbit
HongmingWang-Rabbit changed the base branch from staging to main April 23, 2026 00:24
Hongming Wang and others added 2 commits April 22, 2026 17:25
Following feedback that T4 — not T3 — is the full-access tier:

- Non-SaaS picker now shows all four tiers: T1 Sandboxed, T2 Standard,
  T3 Privileged, T4 Full Access. Four-column grid.
- SaaS picker stays single-option but now locks to T4 (was T3). Every
  SaaS workspace gets a dedicated EC2 VM, which is unambiguously the
  "full host" case — T3 (privileged container) was a category mismatch.
- Default tier on SaaS is 4 (was 3). CP provisioner already supports
  tier 4 (t3.large / 80 GB). TIER_CONFIG already has T4's amber color.

Tests updated for the four-tier picker: wrap tests now go T4 ↔ T1, and
the selection/tabIndex tests cover the fourth button.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@HongmingWang-Rabbit HongmingWang-Rabbit changed the title feat(canvas): default tier T3 and hide T1/T2 on SaaS feat(canvas): add T4 tier (full-host) + default T4 on SaaS Apr 23, 2026
@HongmingWang-Rabbit
HongmingWang-Rabbit merged commit e8523d7 into main Apr 23, 2026
8 of 9 checks passed
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the feat/saas-tier-default-t3 branch April 24, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant