Skip to content

feat: restore Free vs Pro tier differentiation across backend, web pricing, and Apple paywall flows - #49

Merged
reason-machines[bot] merged 4 commits into
mainfrom
reason/fastshared-ativar-cobran-15b9ef9e
Oct 25, 2026
Merged

reason-machines[bot] merged 4 commits into
mainfrom
reason/fastshared-ativar-cobran-15b9ef9e

Conversation

@reason-machines

Copy link
Copy Markdown
Contributor

Summary

After disabling PRO_FOR_ALL_USERS in #48, a product & code audit of FastShared revealed that commit 8d84328 (Enable launch unlimited access (#31)) had left FREE_CAPS identical to PRO_CAPS across the backend, the Swift core package, and the marketing/pricing pages, plus several UX gaps in the paywall flows.

1. Backend (backend/)

  • backend/src/lib/tierCaps.ts: Restored FREE_CAPS to the canonical v1.1 Free limits (uploadsPerDay: 3, maxFileSizeMB: 100, maxRetentionHours: 24, allowsCloudSync: false) while keeping PRO_CAPS at uploadsPerDay: -1, maxFileSizeMB: 2048, maxRetentionHours: 720, allowsCloudSync: true.
  • backend/test/tierCaps.test.ts: Updated unit tests to assert explicit differentiation between FREE_CAPS and PRO_CAPS and their toWireCaps() serialization.

2. Apple App & Share Extension (apple/)

  • TierCaps.swift & UsageTrackerTests.swift: Restored TierCaps.free to 3 uploads/day, 100 MB max file size, and 24-hour retention so client preflight checks (SubscriptionGate) and lock badges on 7d/30d retention chips in GatedRetentionPicker and ShareRootView work out of the box.
  • ShareRootView.swift & Info.plist & FastSharedApp.swift: Fixed the Share Extension's SharePaywallSheet ("OPEN FASTSHARED PRO") deep link from fastsharedapp://paywall to fastshared://paywall?trigger=..., registered fastsharedapp as a fallback scheme in Info.plist/project.yml, and wired .onOpenURL on both iOS and macOS to open PaywallView with the matching trigger context. Also clamped stale >24h default retention in ShareRootView when the user is on Free.
  • SettingsView.swift: Added lock icons (lock.fill) to 7 days and 30 days in RetentionPickerSheet for Free users and routed taps on gated options to paywallCoordinator.present(.longRetentionRequested(policy:)).
  • PaywallTierCard.swift & PaywallView.swift: Changed the CTA button on the one-time Lifetime card from "Subscribe" to "Unlock Lifetime" and restored the longRetentionRequested subhead ("Pro supports up to 30-day retention. Free tops out at 24 hours.").
  • LibraryView.swift, MacCompanionView.swift, MacMenuBarView.swift, APIClient.swift: Wired SubscriptionGate and APIError.paymentRequired (including 429 free_tier_daily_exceeded on batch uploads) to open the Paywall across all macOS and iPad drop/import surfaces.

3. Web Landing & Pricing (web/)

  • web/src/pages/pricing.astro: Restored clear Free (3/day, 100 MB, up to 24 h) vs Pro (unlimited, 2 GB, up to 30 days, iCloud sync, priority support, Family Sharing up to 6 on Lifetime) comparison cards and FAQ answers.
  • web/src/components/Hero.astro, HowItWorks.astro, FAQ.astro: Updated proof strip (Free: 100 MB · 24 h | Pro: 2 GB · 30 d) and retention copy.
  • web/src/components/Nav.astro & Footer.astro: Made Pricing visible on mobile viewports (<640px) in the top nav and added pricing to the footer links.

Verification

  • cd backend && pnpm typecheck && pnpm test: 15 test suites passed (125/125 tests).
  • cd web && pnpm build: astro check (0 errors, 0 warnings) + 7 static pages built.
  • cd cli && pnpm typecheck && pnpm test && pnpm build: 5 test suites passed (13/13 tests).

Contributors

reason-machines Bot and others added 2 commits October 25, 2026 17:14
…fix IAP test fixtures

Co-authored-by: MatheusKindrazki <36010251+MatheusKindrazki@users.noreply.github.com>
…icing, and Apple paywall flows

Co-authored-by: MatheusKindrazki <36010251+MatheusKindrazki@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7b51960f-7404-499a-84f3-f9ef98130b21

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

reason-machines Bot and others added 2 commits October 25, 2026 18:57
…re values

Co-authored-by: MatheusKindrazki <36010251+MatheusKindrazki@users.noreply.github.com>
Co-authored-by: MatheusKindrazki <36010251+MatheusKindrazki@users.noreply.github.com>
@reason-machines
reason-machines Bot merged commit 616a015 into main Oct 25, 2026
6 checks passed
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.

0 participants