Skip to content

Rework free trial paywall for macOS desktop app (3-day premium trial) #7329

Description

@beastoin

Objective

macOS desktop app users should get a 3-day trial of premium features with a polished, conversion-optimized experience.

Current State

The 3-day trial mechanism exists but provides a poor UX:

  • Trial is invisible — no countdown, no awareness UI
  • User gets hard-blocked without warning when trial expires
  • No pre-expiry upgrade nudge
  • Backend exposes trial state only as a boolean paywall check, not as structured trial metadata
  • No trial-specific feature showcase or onboarding

What "Best Feature" Looks Like

Backend (Python)

  1. Trial metadata endpoint — expose GET /v1/users/me/trial returning:

    • trial_started_at (unix seconds)
    • trial_ends_at (unix seconds)
    • trial_remaining_seconds (computed)
    • trial_expired (boolean)
    • trial_features (list of premium features available during trial)
    • plan_after_trial (what the user falls to: "Free" with 30q/month)
  2. Configurable trial duration — move TRIAL_LENGTH_SECONDS to env var (default 3 days)

  3. Trial notification triggers — emit events at:

    • Trial start (user creation)
    • 24h before expiry ("1 day left")
    • 1h before expiry ("expiring soon")
    • Trial expired (existing freemium_threshold_reached)
  4. Graceful degradation — don't hard-cut mid-session; let active sessions finish, paywall on next session start

Desktop macOS App (Swift)

  1. Trial awareness banner — persistent subtle banner showing "Trial: X days Xh remaining"

    • Positioned in settings or floating bar area
    • Taps → plan comparison / upgrade page
  2. Pre-expiry upgrade nudge — non-blocking notification at 24h and 1h before trial ends

    • "Your premium trial ends tomorrow — upgrade to keep unlimited conversations"
    • One-tap "Upgrade" action
  3. Trial expired screen — replace abrupt paywall popup with a proper trial-ended view:

    • Summary of what they used during trial (conversations captured, questions asked)
    • Clear comparison: Free (30 questions/month) vs Operator vs Architect
    • "Upgrade" primary CTA + "Continue with Free" secondary
  4. Feature showcase during trial — subtle indicators on premium features:

    • "Premium" badge on features that will be locked post-trial
    • First-use tooltips: "This is a premium feature included in your trial"
  5. Settings page trial section — show trial status, days remaining, what's included

Desktop Rust Backend

  1. Cache trial metadata (not just boolean) — cache trial_ends_at timestamp for countdown UI
  2. Pass through trial notification events to Swift client via existing event channel

Implementation Plan

Phase 1: Backend trial metadata + configurable duration

  • Add /v1/users/me/trial endpoint
  • Make TRIAL_LENGTH_SECONDS env-configurable
  • Add trial notification event emission (24h, 1h before expiry)

Phase 2: Desktop trial awareness UI

  • Trial countdown banner (Swift)
  • Pre-expiry notifications (local + backend-triggered)
  • Trial expired screen redesign

Phase 3: Feature showcase + polish

  • Premium badges on gated features during trial
  • Trial summary on expiry (usage stats)
  • A/B test conversion rates

Acceptance Criteria

  • Backend returns structured trial metadata via /v1/users/me/trial
  • Trial duration configurable via env var
  • Desktop shows trial countdown (days/hours remaining)
  • Pre-expiry nudge at 24h before trial ends
  • Trial expired screen shows plan comparison + upgrade CTA
  • Active sessions not hard-cut mid-conversation
  • Existing paywall logic preserved (backward compatible)
  • Unit tests for new endpoint + notification triggers

Context

  • Current trial: 3 days, calculated from Firebase Auth creation_timestamp
  • Key files: backend/utils/subscription.py, backend/routers/users.py, desktop/Desktop/Sources/AppState.swift, desktop/Backend-Rust/src/paywall.rs
  • Related: Plan types are Free/Operator/Architect (Neo hidden from desktop)
  • BYOK bypass must continue to work (exempts from paywall)

Priority

High — trial is the primary conversion funnel for desktop users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions