Skip to content

feat: basic support for enterprise trials#1989

Open
chase-crumbaugh wants to merge 4 commits intomainfrom
chase/free-trials2
Open

feat: basic support for enterprise trials#1989
chase-crumbaugh wants to merge 4 commits intomainfrom
chase/free-trials2

Conversation

@chase-crumbaugh
Copy link
Copy Markdown
Member

@chase-crumbaugh chase-crumbaugh commented Mar 25, 2026

  • New orgs now automatically get full enterprise access for 2 weeks
  • UI has been updated to show trial information / expiring soon / expired information
CleanShot 2026-03-25 at 15 22 44@2x
Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 25, 2026

🦋 Changeset detected

Latest commit: 065a363

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
dashboard Patch
@gram/client Patch
server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gram-docs-redirect Ready Ready Preview, Comment Mar 25, 2026 10:34pm

Request Review

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 new potential issues.

🐛 1 issue in files not directly in the diff

🐛 EnterpriseGate does not recognize enterprise_free_trial tier, blocking trial users from enterprise features (client/dashboard/src/components/enterprise-gate.tsx:21-23)

The EnterpriseGate component at client/dashboard/src/components/enterprise-gate.tsx:21 only checks productTier === "enterprise" to allow access. However, users on the new free trial have productTier set to "enterprise_free_trial" (from client/dashboard/src/hooks/useProductTier.ts:19-20). Since "enterprise_free_trial" !== "enterprise", trial users are blocked from enterprise-gated features (Slack App integration at pages/slackapp/SlackApp.tsx:291 and Hooks at pages/hooks/Hooks.tsx:598). This defeats the core purpose of the enterprise trial, showing trial users a "This feature is available on the Enterprise plan" lock screen instead of giving them access.

View 6 additional findings in Devin Review.

Open in Devin Review

if orgMetadata.FreeTrialEndsAt.Valid && orgMetadata.FreeTrialEndsAt.Time.After(time.Now().UTC()) {
org.GramAccountType = "enterprise"
org.IsFreeTrial = true
org.FreeTrialEndsAt = org.FreeTrialEndsAt
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Self-assignment org.FreeTrialEndsAt = org.FreeTrialEndsAt is a no-op copy-paste error

In the free trial branch at server/internal/mv/organization.go:48, org.FreeTrialEndsAt = org.FreeTrialEndsAt is a self-assignment that does nothing. Looking at the enterprise branch above (line 40: org.FreeTrialEndsAt = orgMetadata.FreeTrialEndsAt.Time), this was clearly meant to be org.FreeTrialEndsAt = orgMetadata.FreeTrialEndsAt.Time. The code is currently correct because org.FreeTrialEndsAt was already initialized to orgMetadata.FreeTrialEndsAt.Time on line 33, but this copy-paste error could become a real bug if the initialization logic changes.

Suggested change
org.FreeTrialEndsAt = org.FreeTrialEndsAt
org.FreeTrialEndsAt = orgMetadata.FreeTrialEndsAt.Time
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +45 to 49
if orgMetadata.FreeTrialEndsAt.Valid && orgMetadata.FreeTrialEndsAt.Time.After(time.Now().UTC()) {
org.GramAccountType = "enterprise"
org.IsFreeTrial = true
org.FreeTrialEndsAt = org.FreeTrialEndsAt
return &org, nil
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Free trial users have HasActiveSubscription=false, which may incorrectly limit MCP server enabling

The free trial branch in DescribeOrganization (server/internal/mv/organization.go:44-51) sets GramAccountType to "enterprise" and IsFreeTrial to true, but does NOT set HasActiveSubscription to true. It remains at the default false from line 31.

This matters because server/internal/toolsets/impl.go:351 uses isUnpaidAccount := !authCtx.HasActiveSubscription to limit the number of enabled MCP servers. Free trial users (who are supposed to have enterprise access) would be subject to the unpaid account MCP server limit.

If the intent is that free trial = full enterprise access, then HasActiveSubscription should be set to true in the free trial branch. If free trial users are intentionally limited, this is fine but inconsistent with setting their account type to "enterprise".

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@adaam2
Copy link
Copy Markdown
Member

adaam2 commented Mar 26, 2026

@chase-crumbaugh have you got screenshots of the other bits of UI (e.g expired?)

Copy link
Copy Markdown
Member

@simplesagar simplesagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great - lets use https://www.speakeasy.com/book-demo as the primary link for booking time for enterprise upgrades. We should probably add that link to the pop up on left nav bar showing time left in trial as a clear CTA

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.

3 participants