Skip to content

Change free trial duration from 30 days to 14 days#667

Merged
alexkgold merged 2 commits intomainfrom
change-trial-duration-30-to-14
Mar 3, 2026
Merged

Change free trial duration from 30 days to 14 days#667
alexkgold merged 2 commits intomainfrom
change-trial-duration-30-to-14

Conversation

@kilo-code-bot
Copy link
Contributor

@kilo-code-bot kilo-code-bot bot commented Feb 27, 2026

Summary

  • Updates the TRIAL_DURATION_DAYS constant from 30 to 14 in src/lib/constants.ts (single source of truth)
  • Updates the fallback logic comment in trial-utils.ts to reference the constant name instead of hardcoded "30"
  • Updates all user-facing copy across 5 components/files that mentioned "30-day" trials
  • Updates the backfill script SQL INTERVAL from '30 days' to '14 days'
  • Updates test assertions in trial-utils.test.ts to reflect 14-day trial duration

Files changed

File Change
src/lib/constants.ts TRIAL_DURATION_DAYS = 3014
src/lib/organizations/trial-utils.ts Fallback comment now references constant name
src/components/organizations/new/CreateOrganizationPage.tsx "30-day" → "14-day" (2 locations)
src/components/organizations/NoOrganizationsState.tsx "30-day" → "14-day"
src/app/get-started/slack/_components/WorkspaceSelector.tsx "30-day" → "14-day"
src/app/get-started/teams/page.tsx "30-day" → "14-day"
src/lib/notifications.ts "Free for 30 Days" → "Free for 14 Days"
src/scripts/db/backfill-free-trial-end-at.ts SQL interval + comment
src/lib/organizations/trial-utils.test.ts All assertions updated for 14-day math

Not changed (intentionally)

  • OSS sponsorship dialog (OssSponsorshipDialog.tsx): "30-day credit reset mechanism" refers to the billing/credit cycle, not the trial duration
  • Admin router comments (organization-admin-router.ts): "created within 30 days" are admin query filters, not trial duration references
  • Other "30 days" references: Usage stats, stale PR workflows, session durations, promo credits — all unrelated to trial duration

Built for Alex Gold by Kilo for Slack

- Update TRIAL_DURATION_DAYS constant from 30 to 14
- Update fallback comment in trial-utils to reference constant name
- Update all user-facing copy (create org page, no-orgs state, Slack
  workspace selector, teams get-started page, notifications)
- Update backfill script SQL INTERVAL from 30 to 14 days
- Update test assertions to reflect 14-day trial duration
@kilo-code-bot
Copy link
Contributor Author

kilo-code-bot bot commented Feb 27, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/scripts/db/backfill-free-trial-end-at.ts 34 Backfill interval changed from 30→14 days could retroactively shorten trials for existing orgs with NULL free_trial_end_at
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
src/routers/organizations/organization-admin-router.ts 435, 458 Stale comments reference "created within 30 days" for trialing metrics — should be updated to 14 days for consistency
Files Reviewed (9 files)
  • src/lib/constants.ts - 0 issues
  • src/lib/notifications.ts - 0 issues
  • src/lib/organizations/trial-utils.ts - 0 issues
  • src/lib/organizations/trial-utils.test.ts - 0 issues
  • src/scripts/db/backfill-free-trial-end-at.ts - 1 issue
  • src/app/get-started/slack/_components/WorkspaceSelector.tsx - 0 issues
  • src/app/get-started/teams/page.tsx - 0 issues
  • src/components/organizations/NoOrganizationsState.tsx - 0 issues
  • src/components/organizations/new/CreateOrganizationPage.tsx - 0 issues

Fix these issues in Kilo Cloud

@kilo-code-bot
Copy link
Contributor Author

kilo-code-bot bot commented Feb 27, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/lib/organizations/trial-utils.ts 33-48 Trial status thresholds not adjusted for shorter trial — with 14-day trial, trial_active only lasts 6 days (days 14→8), while "ending soon" warnings show for 8 of 14 days (57% of the trial). Consider lowering the thresholds (e.g. >= 8>= 4) so users aren't warned for the majority of their trial.
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
src/routers/organizations/organization-admin-router.ts 435, 458 Stale comments say "created within 30 days" but the actual SQL queries don't filter by creation date at all. These comments were already inaccurate before this PR but are worth cleaning up.
Files Reviewed (9 files)
  • src/lib/constants.ts - 0 issues
  • src/lib/notifications.ts - 0 issues
  • src/lib/organizations/trial-utils.ts - 1 issue (thresholds not in diff)
  • src/lib/organizations/trial-utils.test.ts - 0 issues
  • src/scripts/db/backfill-free-trial-end-at.ts - 0 new issues (3 existing comments)
  • src/app/get-started/slack/_components/WorkspaceSelector.tsx - 0 issues
  • src/app/get-started/teams/page.tsx - 0 issues
  • src/components/organizations/NoOrganizationsState.tsx - 0 issues
  • src/components/organizations/new/CreateOrganizationPage.tsx - 0 issues

Fix these issues in Kilo Cloud

@alexkgold alexkgold requested a review from jrf0110 February 28, 2026 19:44
@alexkgold alexkgold merged commit 56dcf53 into main Mar 3, 2026
12 checks passed
@alexkgold alexkgold deleted the change-trial-duration-30-to-14 branch March 3, 2026 20:21
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.

2 participants