Skip to content

Remove Workspace trial fields and trial extension logic #32

Description

@BrewingCoder

Parent: #25 — Remove all SaaS billing code

What to Remove

Workspace struct fields

Field Line Type
TrialEndDate 299 *time.Time
EligibleForTrialExtension 302 bool
TrialExtensionEnabled 303 bool

Also in Organization struct

Field Line
TrialEndDate 241

Also in Project struct

Field Line
TrialEndDate 392

Callers

Backend

File Line Usage
private-graph/graph/resolver.go 503, 529, 530 Field mapping to response
private-graph/graph/schema.resolvers.go 537-538 Set on workspace creation
private-graph/graph/schema.resolvers.go 3823-3826 Trial extension mutation (check eligible, extend 7 days, mark ineligible)
private-graph/graph/schema.resolvers.go 6468 TrialEndDate comparison: .Before(time.Now())
private-graph/graph/generated/generated.go 1740, 1759, 11738, 11871 GraphQL complexity resolvers

Frontend (crosses into UI)

File Usage
src/frontend/src/pages/Billing/utils/utils.ts:49-53 getTrialEndDateMessage()
src/frontend/src/components/Header/Header.tsx:831 Trial end date banner display

Migration Required

  • Add DB migration to drop 3 columns from workspaces, 1 from organizations, 1 from projects

Test Plan

  • Remove fields from all 3 structs
  • Remove trial extension mutation
  • Update frontend: remove trial banner and getTrialEndDateMessage()
  • Update GraphQL schema
  • Regenerate: make private-gen + yarn codegen
  • Add column-drop migrations
  • Verify build + tests (backend and frontend)

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions