Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
Welcome: ask which tool the customer is switching from, then go straight to checkout (#404)
Paulo Castellano6c4f7ad8a85c
diff --git a/AGENTS.md b/AGENTS.mdindex 5a31bde8a..719da547d 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -278,7 +278,7 @@ Standing constraints:- Empty coupon + card required + first-time must use `trialDays` — do **not** reintroduce a required-coupon throw.- Coupon qualification stays: card required, no prior real subscription (`incomplete` / `incomplete_expired` still qualify), **and** the checkout price is that plan's **monthly** price. Workspace count is irrelevant — Socials is already capped at one, and a first-time Workspaces subscriber qualifies the same way.- First-month coupons are **per plan**. Socials is `$18` off, Workspaces is `$88` off. Never apply one plan's coupon to the other price, and never apply either coupon to a yearly price — `$190 − $18` is not `$1`.-- Welcome checkout (`app.welcome.plan`) is monthly only. Yearly stays on the billing change-plan picker for existing subscribers (they do not get a first-month coupon).+- Welcome checkout is the last Welcome step (`app.welcome.software.store`): it always opens Stripe Checkout on the **Socials monthly** price, with no plan picker. Yearly and Workspaces stay on the billing change-plan picker for existing subscribers (they do not get a first-month coupon).- Prefer documenting durable billing decisions here (and in `AGENTS.md`) — do **not** create a `.ai/` rules folder for this project.## Plans and the workspace limit@@ -305,12 +305,13 @@ used** — `syncWorkspaceQuantity()` was removed with the per-workspace model.that plan's monthly price. Workspace count is not part of it.(`incomplete` / `incomplete_expired` still qualify; coupon +`allow_promotion_codes` still throws.) Each plan has its own coupon.-- Welcome is monthly only so the `$1` first month can exist. Billing keeps- yearly for subscribers swapping interval.+- Welcome checks out Socials monthly only so the `$1` first month can exist.+ Billing keeps yearly and Workspaces for subscribers changing plan.- The legacy plan is archived: it never appears in the picker, so nobody can moveback to it. Its `workspace_limit` is 1 because it costs less than Socials.-- Plan choice is a welcome step (`app.welcome.plan`) and the same `PlanPicker`- component drives upgrade/downgrade on the billing page (`app.billing.change-plan`).+- There is no plan choice in Welcome (removed October 2026): new owners always+ start on Socials. `PlanPicker` drives upgrade/downgrade on the billing page+ (`app.billing.change-plan`).A change is a `swap()` to another price id. `accounts.plan_id` is written by`changePlan` after a successful `swap()` only when the subscription is`active` or `trialing` (so create works before the webhook). Welcome checkoutdiff --git a/app/Actions/Billing/StartSubscriptionCheckout.php b/app/Actions/Billing/StartSubscriptionCheckout.phpindex 71386bb8d..f007d9cf3 100644--- a/app/Actions/Billing/StartSubscriptionCheckout.php+++ b/app/Actions/Billing/StartSubscriptionCheckout.php@@ -67,6 +67,7 @@ class StartSubscriptionCheckout'epik' => $owner?->epik,'persona' => $owner?->persona?->value,'goals' => implode(',', $owner?->goals ?? []),+ 'previous_software' => $owner?->previous_software?->value,'referral_source' => $owner?->referral_source?->value,ConfigureSubscriptionCheckout::FIRST_MONTH_COUPON_METADATA_KEY => $firstMonthCouponId,], filled(...));diff --git a/app/Enums/PostHog/WelcomeEvent.php b/app/Enums/PostHog/WelcomeEvent.phpindex 7d249d484..1b1ee0380 100644--- a/app/Enums/PostHog/WelcomeEvent.php+++ b/app/Enums/PostHog/WelcomeEvent.php@@ -8,6 +8,7 @@ enum WelcomeEvent: string{case Persona = 'welcome.persona';case Goals = 'welcome.goals';+ case Software = 'welcome.software';case Referral = 'welcome.referral';/**@@ -20,6 +21,7 @@ enum WelcomeEvent: stringreturn [self::Persona->value,self::Goals->value,+ self::Software->value,CheckoutEvent::Started->value,];}diff --git a/app/Enums/User/PreviousSoftware.php b/app/Enums/User/PreviousSoftware.phpnew file mode 100644index 000000000..b430894c6--- /dev/null+++ b/app/Enums/User/PreviousSoftware.php@@ -0,0 +1,42 @@+<?php++declare(strict_types=1);++namespace App\Enums\User;++enum PreviousSoftware: string+{+ case Buffer = 'buffer';+ case Hootsuite = 'hootsuite';+ case Later = 'later';+ case Metricool = 'metricool';+ case Typefully = 'typefully';+ case Hypefury = 'hypefury';+ case Publer = 'publer';+ case Postiz = 'postiz';+ case SproutSocial = 'sprout_social';+ case SocialBee = 'socialbee';+ case None = 'none';+ case Other = 'other';++ /**+ * Brand names read the same in every language, so they skip i18n.+ * Null for the options that are translated (none, other).+ */+ public function brandName(): ?string+ {+ return match ($this) {+ self::Buffer => 'Buffer',+ self::Hootsuite => 'Hootsuite',+ self::Later => 'Later',+ self::Metricool => 'Metricool',+ self::Typefully => 'Typefully',+ self::Hypefury => 'Hypefury',+ self::Publer => 'Publer',+ self::Postiz => 'Postiz',+ self::SproutSocial => 'Sprout Social',+ self::SocialBee => 'SocialBee',+ self::None, self::Other => null,+ };+ }+}diff --git a/app/Http/Controllers/App/WelcomeController.php b/app/Http/Controllers/App/WelcomeController.phpindex 6375f9977..5d3400670 100644--- a/app/Http/Controllers/App/WelcomeController.php+++ b/app/Http/Controllers/App/WelcomeController.php@@ -6,14 +6,15 @@ namespace App\Http\Controllers\App;use App\Actions\Billing\StartSubscriptionCheckout;use App\Enums\Billing\Interval;+use App\Enums\Plan\Slug;use App\Enums\PostHog\CheckoutEvent;use App\Enums\PostHog\WelcomeEvent;use App\Enums\User\Goal;use App\Enums\User\Persona;+use App\Enums\User\PreviousSoftware;use App\Http\Requests\App\Welcome\StoreWelcomeGoalsRequest;use App\Http\Requests\App\Welcome\StoreWelcomePersonaRequest;-use App\Http\Requests\App\Welcome\StoreWelcomePlanRequest;-use App\Http\Resources\App\PlanResource;+use App\Http\Requests\App\Welcome\StoreWelcomeSoftwareRequest;use App\Models\Plan;use App\Services\PostHogService;use Illuminate\Http\RedirectResponse;@@ -98,24 +99,28 @@ class WelcomeController extends Controller$user->account,);- return redirect()->route('app.welcome.plan');+ return redirect()->route('app.welcome.software');}- public function plan(Request $request): InertiaResponse|RedirectResponse+ public function software(Request $request): InertiaResponse|RedirectResponse{if ($redirect = $this->redirectIfStepIncomplete($request, requireGoals: true)) {return $redirect;}- return Inertia::render('welcome/Plan', [- 'plans' => PlanResource::collection(- Plan::active()->orderBy('sort')->get(),- )->resolve(),+ $user = $request->user();++ return Inertia::render('welcome/Software', [+ 'software' => array_map(fn (PreviousSoftware $software): array => [+ 'value' => $software->value,+ 'name' => $software->brandName(),+ ], PreviousSoftware::cases()),+ 'selected' => $user->previous_software?->value,]);}- public function storePlan(- StoreWelcomePlanRequest $request,+ public function storeSoftware(+ StoreWelcomeSoftwareRequest $request,StartSubscriptionCheckout $checkout,PostHogService $postHog,): Response|RedirectResponse {@@ -124,12 +129,26 @@ class WelcomeController extends Controller}$user = $request->user();- $plan = Plan::active()->findOrFail($request->validated('plan_id'));+ $previousSoftware = (string) $request->validated('previous_software');++ $user->update(['previous_software' => $previousSoftware]);++ $postHog->identify($user->id, [+ 'previous_software' => $previousSoftware,+ ]);+ $postHog->capture(+ $user->id,+ WelcomeEvent::Software->value,+ ['previous_software' => $previousSoftware],+ $user->account,+ );++ $plan = Plan::active()->where('slug', Slug::Socials)->firstOrFail();$priceId = Interval::Monthly->priceIdFor($plan);abort_if($priceId === null, Response::HTTP_INTERNAL_SERVER_ERROR, 'Price is not configured.');- $response = $checkout->redirect($user->account, $priceId, route('app.welcome.plan'), $plan);+ $response = $checkout->redirect($user->account, $priceId, route('app.welcome.software'), $plan);try {$postHog->capture(diff --git a/app/Http/Controllers/App/WorkspaceController.php b/app/Http/Controllers/App/WorkspaceController.phpindex 60f419a0f..b77c18c9d 100644--- a/app/Http/Controllers/App/WorkspaceController.php+++ b/app/Http/Controllers/App/WorkspaceController.php@@ -93,7 +93,7 @@ class WorkspaceController extends Controllerreturn $redirect;}- return redirect()->route('app.workspace.channels')+ return redirect()->route('app.posts.index')->with('success', __('workspaces.create.success'));}diff --git a/app/Http/Requests/App/Welcome/StoreWelcomePlanRequest.php b/app/Http/Requests/App/Welcome/StoreWelcomeSoftwareRequest.phpsimilarity index 58%rename from app/Http/Requests/App/Welcome/StoreWelcomePlanRequest.phprename to app/Http/Requests/App/Welcome/StoreWelcomeSoftwareRequest.phpindex c548f418e..91e93e858 100644--- a/app/Http/Requests/App/Welcome/StoreWelcomePlanRequest.php+++ b/app/Http/Requests/App/Welcome/StoreWelcomeSoftwareRequest.php@@ -4,10 +4,11 @@ declare(strict_types=1);namespace App\Http\Requests\App\Welcome;+use App\Enums\User\PreviousSoftware;use Illuminate\Foundation\Http\FormRequest;use Illuminate\Validation\Rule;-class StoreWelcomePlanRequest extends FormRequest+class StoreWelcomeSoftwareRequest extends FormRequest{public function authorize(): bool{@@ -20,11 +21,7 @@ class StoreWelcomePlanRequest extends FormRequestpublic function rules(): array{return [- 'plan_id' => [- 'required',- 'uuid',- Rule::exists('plans', 'id')->where(fn ($query) => $query->where('is_archived', false)),- ],+ 'previous_software' => ['required', Rule::enum(PreviousSoftware::class)],];}}diff --git a/app/Models/User.php b/app/Models/User.phpindex 73f364b78..0bccda4da 100644--- a/app/Models/User.php+++ b/app/Models/User.php@@ -9,6 +9,7 @@ use App\Enums\Notification\Type as NotificationType;use App\Enums\User\DefaultPostAction;use App\Enums\User\Locale;use App\Enums\User\Persona;+use App\Enums\User\PreviousSoftware;use App\Enums\User\ReferralSource;use App\Enums\User\Theme;use App\Enums\User\TimeFormat;@@ -61,6 +62,7 @@ class User extends Authenticatable implements HasLocalePreference, MustVerifyEma'registration_ip','persona','goals',+ 'previous_software','referral_source','locale','timezone',@@ -131,6 +133,7 @@ class User extends Authenticatable implements HasLocalePreference, MustVerifyEma'two_factor_confirmed_at' => 'datetime','persona' => Persona::class,'goals' => 'array',+ 'previous_software' => PreviousSoftware::class,'referral_source' => ReferralSource::class,'locale' => Locale::class,'theme' => Theme::class,diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.phpindex ba88015d8..9253f38d6 100644--- a/database/factories/UserFactory.php+++ b/database/factories/UserFactory.php@@ -54,6 +54,7 @@ class UserFactory extends Factory'utm_content' => null,'registration_ip' => null,'persona' => null,+ 'previous_software' => null,'referral_source' => ReferralSource::Google,'locale' => Locale::DEFAULT,'timezone' => Timezone::DEFAULT,diff --git a/database/migrations/2026_10_11_153245_add_previous_software_to_users_table.php b/database/migrations/2026_10_11_153245_add_previous_software_to_users_table.phpnew file mode 100644index 000000000..db28e4d2e--- /dev/null+++ b/database/migrations/2026_10_11_153245_add_previous_software_to_users_table.php@@ -0,0 +1,30 @@+<?php++declare(strict_types=1);++use Illuminate\Database\Migrations\Migration;+use Illuminate\Database\Schema\Blueprint;+use Illuminate\Support\Facades\Schema;++return new class extends Migration+{+ /**+ * Run the migrations.+ */+ public function up(): void+ {+ Schema::table('users', function (Blueprint $table) {+ $table->string('previous_software')->nullable()->after('goals');+ });+ }++ /**+ * Reverse the migrations.+ */+ public function down(): void+ {+ Schema::table('users', function (Blueprint $table) {+ $table->dropColumn('previous_software');+ });+ }+};diff --git a/lang/ar/billing.php b/lang/ar/billing.phpindex f24e7a1ca..09db5122a 100644--- a/lang/ar/billing.php+++ b/lang/ar/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'فوترة شهرية','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => 'اختر :plan','upgrade' => 'الترقية إلى :plan','downgrade' => 'الرجوع إلى :plan',- 'start_first_month' => 'ابدأ مقابل :price',- 'per_first_month' => '/الشهر الأول',- 'then_monthly' => 'ثم :price/شهر','billed_yearly_total' => 'فوترة سنوية · :price (شهران مجانًا)','socials_tagline' => 'مناسب لمنشئي المحتوى والعلامات الصغيرة.','workspaces_tagline' => 'مناسب للوكالات والأعمال الكبيرة.',diff --git a/lang/ar/welcome.php b/lang/ar/welcome.phpindex 234a46bbe..c8097c95d 100644--- a/lang/ar/welcome.php+++ b/lang/ar/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'عنك','goals' => 'أهدافك',- 'plan' => 'الخطة',+ 'software' => 'الأداة الحالية',],'personas' => ['creator' => 'صانع محتوى',@@ -39,6 +39,9 @@ return ['manage_clients' => 'إدارة العلامات أو العملاء','other' => 'شيء آخر',],- 'plan_title' => 'اختر خطتك',- 'plan_description' => 'الخطتان تحويان الميزات نفسها. الفرق في عدد مساحات العمل، ويمكنك تغيير الخطة في أي وقت.',+ 'software_title' => 'ما الأداة التي تستخدمها اليوم؟',+ 'software' => [+ 'none' => 'لا أستخدم أي أداة بعد',+ 'other' => 'أخرى',+ ],];diff --git a/lang/de/billing.php b/lang/de/billing.phpindex ac86e6079..024909487 100644--- a/lang/de/billing.php+++ b/lang/de/billing.php@@ -14,7 +14,6 @@ return ['subscribe' => ['billed_monthly' => 'Monatlich abgerechnet','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -35,9 +34,6 @@ return ['select' => ':plan wählen','upgrade' => 'Auf :plan upgraden','downgrade' => 'Auf :plan downgraden',- 'start_first_month' => 'Für :price starten',- 'per_first_month' => '/erster Monat',- 'then_monthly' => 'Danach :price/Monat','billed_yearly_total' => 'Jährlich abgerechnet · :price (2 Monate gratis)','socials_tagline' => 'Ideal für Creator und kleine Marken.','workspaces_tagline' => 'Ideal für Agenturen und größere Unternehmen.',diff --git a/lang/de/welcome.php b/lang/de/welcome.phpindex 27bf868b5..a4aa1ff59 100644--- a/lang/de/welcome.php+++ b/lang/de/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'Über dich','goals' => 'Deine Ziele',- 'plan' => 'Tarif',+ 'software' => 'Aktuelles Tool',],'personas' => ['creator' => 'Content Creator',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Marken oder Kunden verwalten','other' => 'Etwas anderes',],- 'plan_title' => 'Wähle deinen Tarif',- 'plan_description' => 'Beide Pläne haben dieselben Funktionen. Der Unterschied ist die Anzahl der Workspaces, und du kannst jederzeit wechseln.',+ 'software_title' => 'Welches Tool nutzt du heute?',+ 'software' => [+ 'none' => 'Ich nutze noch keins',+ 'other' => 'Anderes',+ ],];diff --git a/lang/el/billing.php b/lang/el/billing.phpindex f39b38969..e1345d70d 100644--- a/lang/el/billing.php+++ b/lang/el/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'Μηνιαία χρέωση','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => 'Επιλέξτε :plan','upgrade' => 'Αναβάθμιση σε :plan','downgrade' => 'Υποβάθμιση σε :plan',- 'start_first_month' => 'Ξεκίνα με :price',- 'per_first_month' => '/πρώτος μήνας',- 'then_monthly' => 'Μετά :price/μήνα','billed_yearly_total' => 'Ετήσια χρέωση · :price (2 μήνες δωρεάν)','socials_tagline' => 'Ιδανικό για creators και μικρά brands.','workspaces_tagline' => 'Ιδανικό για agencies και μεγαλύτερες επιχειρήσεις.',diff --git a/lang/el/welcome.php b/lang/el/welcome.phpindex 46dfb42bd..3a576fb91 100644--- a/lang/el/welcome.php+++ b/lang/el/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'Σχετικά με εσάς','goals' => 'Οι στόχοι σας',- 'plan' => 'Πλάνο',+ 'software' => 'Τρέχον εργαλείο',],'personas' => ['creator' => 'Δημιουργός περιεχομένου',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Διαχείριση brands ή πελατών','other' => 'Κάτι άλλο',],- 'plan_title' => 'Επιλέξτε το πλάνο σας',- 'plan_description' => 'Τα δύο πλάνα έχουν τις ίδιες λειτουργίες. Διαφέρουν μόνο στον αριθμό των workspaces, και μπορείτε να αλλάξετε πλάνο όποτε θέλετε.',+ 'software_title' => 'Ποιο εργαλείο χρησιμοποιείτε σήμερα;',+ 'software' => [+ 'none' => 'Δεν χρησιμοποιώ ακόμα κάποιο',+ 'other' => 'Άλλο',+ ],];diff --git a/lang/en/billing.php b/lang/en/billing.phpindex 7be1319c9..ada94eadd 100644--- a/lang/en/billing.php+++ b/lang/en/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'Billed monthly','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => 'Choose :plan','upgrade' => 'Upgrade to :plan','downgrade' => 'Downgrade to :plan',- 'start_first_month' => 'Start for :price',- 'per_first_month' => '/first month',- 'then_monthly' => 'Then :price/month','billed_yearly_total' => 'Billed annually · :price (2 months free)','socials_tagline' => 'Best for creators and small brands.','workspaces_tagline' => 'Best for agencies and larger businesses.',diff --git a/lang/en/welcome.php b/lang/en/welcome.phpindex 0335c1428..4483ce50c 100644--- a/lang/en/welcome.php+++ b/lang/en/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'About you','goals' => 'Your goals',- 'plan' => 'Plan',+ 'software' => 'Current tool',],'personas' => ['creator' => 'Content creator',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Manage brands or clients','other' => 'Something else',],- 'plan_title' => 'Choose your plan',- 'plan_description' => 'Both plans have the same features. The difference is how many workspaces you get, and you can switch plans whenever you like.',+ 'software_title' => 'Which tool do you use today?',+ 'software' => [+ 'none' => 'I don\'t use one yet',+ 'other' => 'Other',+ ],];diff --git a/lang/es/billing.php b/lang/es/billing.phpindex f6d5dd0b6..320ffd3a7 100644--- a/lang/es/billing.php+++ b/lang/es/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'Facturado mensualmente','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => 'Elegir :plan','upgrade' => 'Mejorar a :plan','downgrade' => 'Bajar a :plan',- 'start_first_month' => 'Empezar por :price',- 'per_first_month' => '/primer mes',- 'then_monthly' => 'Luego, :price/mes','billed_yearly_total' => 'Facturación anual · :price (2 meses gratis)','socials_tagline' => 'Ideal para creadores y marcas pequeñas.','workspaces_tagline' => 'Ideal para agencias y negocios grandes.',diff --git a/lang/es/welcome.php b/lang/es/welcome.phpindex 7b67a0943..c2c675b0c 100644--- a/lang/es/welcome.php+++ b/lang/es/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'Sobre ti','goals' => 'Tus objetivos',- 'plan' => 'Plan',+ 'software' => 'Herramienta actual',],'personas' => ['creator' => 'Creador de contenido',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Gestionar marcas o clientes','other' => 'Otra cosa',],- 'plan_title' => 'Elige tu plan',- 'plan_description' => 'Los dos planes tienen las mismas funciones. Lo que cambia es el número de workspaces, y puedes cambiar de plan cuando quieras.',+ 'software_title' => '¿Qué herramienta usas hoy?',+ 'software' => [+ 'none' => 'Aún no uso ninguna',+ 'other' => 'Otra',+ ],];diff --git a/lang/fr/billing.php b/lang/fr/billing.phpindex 15477e83c..7e48b294d 100644--- a/lang/fr/billing.php+++ b/lang/fr/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'Facturé mensuellement','prices' => [- 'first_month' => '1 $','socials' => ['monthly' => '19 $', 'yearly_per_month' => '15,83 $', 'yearly' => '190 $'],'workspaces' => ['monthly' => '99 $', 'yearly_per_month' => '82,50 $', 'yearly' => '990 $'],],@@ -33,9 +32,6 @@ return ['select' => 'Choisir :plan','upgrade' => 'Passer à :plan','downgrade' => 'Revenir à :plan',- 'start_first_month' => 'Commencer pour :price',- 'per_first_month' => '/premier mois',- 'then_monthly' => 'Puis :price/mois','billed_yearly_total' => 'Facturé annuellement · :price (2 mois offerts)','socials_tagline' => 'Idéal pour les créateurs et petites marques.','workspaces_tagline' => 'Idéal pour les agences et grandes entreprises.',diff --git a/lang/fr/welcome.php b/lang/fr/welcome.phpindex dd3be6675..5cf05dc3e 100644--- a/lang/fr/welcome.php+++ b/lang/fr/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'À propos de vous','goals' => 'Vos objectifs',- 'plan' => 'Forfait',+ 'software' => 'Outil actuel',],'personas' => ['creator' => 'Créateur de contenu',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Gérer marques ou clients','other' => 'Autre chose',],- 'plan_title' => 'Choisissez votre forfait',- 'plan_description' => 'Les deux formules ont les mêmes fonctionnalités. Seul le nombre de workspaces change, et vous pouvez changer de formule quand vous voulez.',+ 'software_title' => 'Quel outil utilisez-vous aujourd\'hui ?',+ 'software' => [+ 'none' => 'Je n\'en utilise pas encore',+ 'other' => 'Autre',+ ],];diff --git a/lang/it/billing.php b/lang/it/billing.phpindex 240134c84..afba26511 100644--- a/lang/it/billing.php+++ b/lang/it/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'Fatturazione mensile','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => 'Scegli :plan','upgrade' => 'Fai upgrade a :plan','downgrade' => 'Fai downgrade a :plan',- 'start_first_month' => 'Inizia a :price',- 'per_first_month' => '/primo mese',- 'then_monthly' => 'Poi :price/mese','billed_yearly_total' => 'Fatturato annualmente · :price (2 mesi gratis)','socials_tagline' => 'Ideale per creator e piccole marche.','workspaces_tagline' => 'Ideale per agenzie e grandi attività.',diff --git a/lang/it/welcome.php b/lang/it/welcome.phpindex ff345fef8..0cffc95e5 100644--- a/lang/it/welcome.php+++ b/lang/it/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'Su di te','goals' => 'I tuoi obiettivi',- 'plan' => 'Piano',+ 'software' => 'Strumento attuale',],'personas' => ['creator' => 'Creatore di contenuti',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Gestire brand o clienti','other' => 'Qualcos\'altro',],- 'plan_title' => 'Scegli il tuo piano',- 'plan_description' => 'I due piani hanno le stesse funzionalità. Cambia solo il numero di workspace, e puoi cambiare piano quando vuoi.',+ 'software_title' => 'Quale strumento usi oggi?',+ 'software' => [+ 'none' => 'Non ne uso ancora nessuno',+ 'other' => 'Altro',+ ],];diff --git a/lang/ja/billing.php b/lang/ja/billing.phpindex c69a80a68..921b2cdb8 100644--- a/lang/ja/billing.php+++ b/lang/ja/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => '月払い','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => ':plan を選ぶ','upgrade' => ':plan にアップグレード','downgrade' => ':plan にダウングレード',- 'start_first_month' => ':priceで始める',- 'per_first_month' => '/初月',- 'then_monthly' => 'その後は:price/月','billed_yearly_total' => '年払い · :price(2か月分無料)','socials_tagline' => 'クリエイターや小規模ブランド向け。','workspaces_tagline' => '代理店や大規模ビジネス向け。',diff --git a/lang/ja/welcome.php b/lang/ja/welcome.phpindex 89890492c..ba92aba79 100644--- a/lang/ja/welcome.php+++ b/lang/ja/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'あなたについて','goals' => '目標',- 'plan' => 'プラン',+ 'software' => '現在のツール',],'personas' => ['creator' => 'コンテンツクリエイター',@@ -39,6 +39,9 @@ return ['manage_clients' => 'ブランドやクライアントを管理','other' => 'その他',],- 'plan_title' => 'プランを選ぶ',- 'plan_description' => '2つのプランの機能は同じです。違いはワークスペースの数だけで、プランはいつでも変更できます。',+ 'software_title' => '今どのツールを使っていますか?',+ 'software' => [+ 'none' => 'まだ使っていない',+ 'other' => 'その他',+ ],];diff --git a/lang/ko/billing.php b/lang/ko/billing.phpindex 48c814274..b296f68c4 100644--- a/lang/ko/billing.php+++ b/lang/ko/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => '월간 결제','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => ':plan 선택','upgrade' => ':plan(으)로 업그레이드','downgrade' => ':plan(으)로 다운그레이드',- 'start_first_month' => ':price에 시작하기',- 'per_first_month' => '/첫 달',- 'then_monthly' => '이후 :price/월','billed_yearly_total' => '연간 결제 · :price (2개월 무료)','socials_tagline' => '크리에이터와 소규모 브랜드에 적합.','workspaces_tagline' => '에이전시와 대규모 비즈니스에 적합.',diff --git a/lang/ko/welcome.php b/lang/ko/welcome.phpindex 580075f2c..5e2fa8f77 100644--- a/lang/ko/welcome.php+++ b/lang/ko/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => '나에 대해','goals' => '목표',- 'plan' => '요금제',+ 'software' => '현재 도구',],'personas' => ['creator' => '콘텐츠 크리에이터',@@ -39,6 +39,9 @@ return ['manage_clients' => '브랜드나 고객 관리','other' => '다른 것',],- 'plan_title' => '요금제 선택',- 'plan_description' => '두 플랜의 기능은 같습니다. 차이는 워크스페이스 수이고, 플랜은 언제든 바꿀 수 있습니다.',+ 'software_title' => '지금 어떤 도구를 사용하고 있나요?',+ 'software' => [+ 'none' => '아직 사용하지 않아요',+ 'other' => '기타',+ ],];diff --git a/lang/nl/billing.php b/lang/nl/billing.phpindex 89bac0481..a805ab90b 100644--- a/lang/nl/billing.php+++ b/lang/nl/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'Maandelijks gefactureerd','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => 'Kies :plan','upgrade' => 'Upgrade naar :plan','downgrade' => 'Downgrade naar :plan',- 'start_first_month' => 'Start voor :price',- 'per_first_month' => '/eerste maand',- 'then_monthly' => 'Daarna :price/maand','billed_yearly_total' => 'Jaarlijks gefactureerd · :price (2 maanden gratis)','socials_tagline' => 'Ideaal voor creators en kleine merken.','workspaces_tagline' => 'Ideaal voor bureaus en grotere bedrijven.',diff --git a/lang/nl/welcome.php b/lang/nl/welcome.phpindex f236a44ae..963c5bd75 100644--- a/lang/nl/welcome.php+++ b/lang/nl/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'Over jou','goals' => 'Je doelen',- 'plan' => 'Abonnement',+ 'software' => 'Huidige tool',],'personas' => ['creator' => 'Contentmaker',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Merken of klanten beheren','other' => 'Iets anders',],- 'plan_title' => 'Kies je abonnement',- 'plan_description' => 'Beide plannen hebben dezelfde functies. Het verschil is het aantal workspaces, en je kunt wisselen wanneer je wilt.',+ 'software_title' => 'Welke tool gebruik je nu?',+ 'software' => [+ 'none' => 'Ik gebruik er nog geen',+ 'other' => 'Andere',+ ],];diff --git a/lang/pl/billing.php b/lang/pl/billing.phpindex 7a8fb7d7d..fa2eccaa4 100644--- a/lang/pl/billing.php+++ b/lang/pl/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'Rozliczane miesięcznie','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => 'Wybierz :plan','upgrade' => 'Przejdź na :plan','downgrade' => 'Zmień na :plan',- 'start_first_month' => 'Zacznij za :price',- 'per_first_month' => '/pierwszy miesiąc',- 'then_monthly' => 'Potem :price/mies.','billed_yearly_total' => 'Rozliczane rocznie · :price (2 miesiące gratis)','socials_tagline' => 'Dla twórców i małych marek.','workspaces_tagline' => 'Dla agencji i większych firm.',diff --git a/lang/pl/welcome.php b/lang/pl/welcome.phpindex d8bdb6775..939f6c2ca 100644--- a/lang/pl/welcome.php+++ b/lang/pl/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'O Tobie','goals' => 'Twoje cele',- 'plan' => 'Plan',+ 'software' => 'Obecne narzędzie',],'personas' => ['creator' => 'Twórca treści',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Zarządzaj markami lub klientami','other' => 'Coś innego',],- 'plan_title' => 'Wybierz plan',- 'plan_description' => 'Oba plany mają te same funkcje. Różnią się liczbą workspace’ów, a plan możesz zmienić w każdej chwili.',+ 'software_title' => 'Z jakiego narzędzia korzystasz dziś?',+ 'software' => [+ 'none' => 'Jeszcze żadnego nie używam',+ 'other' => 'Inne',+ ],];diff --git a/lang/pt-BR/billing.php b/lang/pt-BR/billing.phpindex ca39a60b1..c3a28d9e6 100644--- a/lang/pt-BR/billing.php+++ b/lang/pt-BR/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'Cobrança mensal','prices' => [- 'first_month' => 'R$ 1','socials' => ['monthly' => 'R$ 99', 'yearly_per_month' => 'R$ 82,50', 'yearly' => 'R$ 990'],'workspaces' => ['monthly' => 'R$ 499', 'yearly_per_month' => 'R$ 415,83', 'yearly' => 'R$ 4.990'],],@@ -33,9 +32,6 @@ return ['select' => 'Escolher :plan','upgrade' => 'Fazer upgrade para :plan','downgrade' => 'Fazer downgrade para :plan',- 'start_first_month' => 'Começar por :price',- 'per_first_month' => '/primeiro mês',- 'then_monthly' => 'Depois, :price/mês','billed_yearly_total' => 'Cobrança anual · :price (2 meses grátis)','socials_tagline' => 'Indicado para criadores e pequenas marcas.','workspaces_tagline' => 'Indicado para agências e grandes negócios.',diff --git a/lang/pt-BR/welcome.php b/lang/pt-BR/welcome.phpindex 60787e6c0..00c63e9dd 100644--- a/lang/pt-BR/welcome.php+++ b/lang/pt-BR/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'Sobre você','goals' => 'Seus objetivos',- 'plan' => 'Plano',+ 'software' => 'Ferramenta atual',],'personas' => ['creator' => 'Criador de conteúdo',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Gerenciar marcas ou clientes','other' => 'Outra coisa',],- 'plan_title' => 'Escolha seu plano',- 'plan_description' => 'Os dois planos têm os mesmos recursos. O que muda é o número de workspaces, e você pode trocar de plano quando quiser.',+ 'software_title' => 'Qual ferramenta você usa hoje?',+ 'software' => [+ 'none' => 'Ainda não uso nenhuma',+ 'other' => 'Outra',+ ],];diff --git a/lang/ru/billing.php b/lang/ru/billing.phpindex 584f12bea..dc5d50faa 100644--- a/lang/ru/billing.php+++ b/lang/ru/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'Ежемесячная оплата','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => 'Выбрать :plan','upgrade' => 'Перейти на :plan','downgrade' => 'Понизить до :plan',- 'start_first_month' => 'Начать за :price',- 'per_first_month' => '/первый месяц',- 'then_monthly' => 'Затем :price/мес.','billed_yearly_total' => 'Оплата раз в год · :price (2 месяца бесплатно)','socials_tagline' => 'Для авторов и небольших брендов.','workspaces_tagline' => 'Для агентств и крупного бизнеса.',diff --git a/lang/ru/welcome.php b/lang/ru/welcome.phpindex 1a633df5b..c2fe811ab 100644--- a/lang/ru/welcome.php+++ b/lang/ru/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'О вас','goals' => 'Ваши цели',- 'plan' => 'Тариф',+ 'software' => 'Текущий сервис',],'personas' => ['creator' => 'Автор контента',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Вести бренды или клиентов','other' => 'Что-то ещё',],- 'plan_title' => 'Выберите тариф',- 'plan_description' => 'У обоих планов одинаковые функции. Разница в количестве workspace, и сменить план можно в любой момент.',+ 'software_title' => 'Каким сервисом вы пользуетесь сейчас?',+ 'software' => [+ 'none' => 'Пока ничем не пользуюсь',+ 'other' => 'Другой',+ ],];diff --git a/lang/tr/billing.php b/lang/tr/billing.phpindex de00ef0ad..d9c620f3c 100644--- a/lang/tr/billing.php+++ b/lang/tr/billing.php@@ -14,7 +14,6 @@ return ['subscribe' => ['billed_monthly' => 'Aylık faturalandırılır','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -35,9 +34,6 @@ return ['select' => ':plan seç','upgrade' => ':plan’e yükselt','downgrade' => ':plan’e düşür',- 'start_first_month' => ':price ile başla',- 'per_first_month' => '/ilk ay',- 'then_monthly' => 'Sonra :price/ay','billed_yearly_total' => 'Yıllık faturalandırılır · :price (2 ay bedava)','socials_tagline' => 'İçerik üreticileri ve küçük markalar için.','workspaces_tagline' => 'Ajanslar ve büyük işletmeler için.',diff --git a/lang/tr/welcome.php b/lang/tr/welcome.phpindex 414a9ab3f..fc36b4504 100644--- a/lang/tr/welcome.php+++ b/lang/tr/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'Senin hakkında','goals' => 'Hedeflerin',- 'plan' => 'Plan',+ 'software' => 'Mevcut araç',],'personas' => ['creator' => 'İçerik üreticisi',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Marka veya müşteri yönetmek','other' => 'Başka bir şey',],- 'plan_title' => 'Planını seç',- 'plan_description' => 'İki planın özellikleri aynı. Fark, workspace sayısında; planı istediğiniz zaman değiştirebilirsiniz.',+ 'software_title' => 'Bugün hangi aracı kullanıyorsun?',+ 'software' => [+ 'none' => 'Henüz bir araç kullanmıyorum',+ 'other' => 'Diğer',+ ],];diff --git a/lang/uk/billing.php b/lang/uk/billing.phpindex ec92eb141..91c2b81f9 100644--- a/lang/uk/billing.php+++ b/lang/uk/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => 'Щомісячна оплата','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => 'Обрати :plan','upgrade' => 'Перейти на :plan','downgrade' => 'Понизити до :plan',- 'start_first_month' => 'Почати за :price',- 'per_first_month' => '/перший місяць',- 'then_monthly' => 'Потім :price/міс.','billed_yearly_total' => 'Оплата раз на рік · :price (2 місяці безкоштовно)','socials_tagline' => 'Для авторів і невеликих брендів.','workspaces_tagline' => 'Для агентств і великого бізнесу.',diff --git a/lang/uk/welcome.php b/lang/uk/welcome.phpindex 137f33d19..0762dc8d7 100644--- a/lang/uk/welcome.php+++ b/lang/uk/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => 'Про вас','goals' => 'Ваші цілі',- 'plan' => 'Тариф',+ 'software' => 'Поточний сервіс',],'personas' => ['creator' => 'Автор контенту',@@ -39,6 +39,9 @@ return ['manage_clients' => 'Вести бренди чи клієнтів','other' => 'Щось інше',],- 'plan_title' => 'Оберіть тариф',- 'plan_description' => 'Обидва плани мають однакові функції. Різниця лише в кількості workspace, і змінити план можна будь-коли.',+ 'software_title' => 'Яким сервісом ви користуєтеся зараз?',+ 'software' => [+ 'none' => 'Поки нічим не користуюся',+ 'other' => 'Інший',+ ],];diff --git a/lang/zh/billing.php b/lang/zh/billing.phpindex d78bf1f89..0c5531ab7 100644--- a/lang/zh/billing.php+++ b/lang/zh/billing.php@@ -12,7 +12,6 @@ return ['subscribe' => ['billed_monthly' => '按月计费','prices' => [- 'first_month' => '$1','socials' => ['monthly' => '$19', 'yearly_per_month' => '$15.83', 'yearly' => '$190'],'workspaces' => ['monthly' => '$99', 'yearly_per_month' => '$82.50', 'yearly' => '$990'],],@@ -33,9 +32,6 @@ return ['select' => '选择 :plan','upgrade' => '升级到 :plan','downgrade' => '降级到 :plan',- 'start_first_month' => '以 :price 开始',- 'per_first_month' => '/首月',- 'then_monthly' => '之后 :price/月','billed_yearly_total' => '按年计费 · :price(免两个月)','socials_tagline' => '适合创作者和小品牌。','workspaces_tagline' => '适合代理商和大型业务。',diff --git a/lang/zh/welcome.php b/lang/zh/welcome.phpindex 9ca785012..920f57f7f 100644--- a/lang/zh/welcome.php+++ b/lang/zh/welcome.php@@ -15,7 +15,7 @@ return ['steps' => ['persona' => '关于你','goals' => '你的目标',- 'plan' => '套餐',+ 'software' => '当前工具',],'personas' => ['creator' => '内容创作者',@@ -39,6 +39,9 @@ return ['manage_clients' => '管理品牌或客户','other' => '其他需求',],- 'plan_title' => '选择你的套餐',- 'plan_description' => '两个套餐功能相同,区别只在工作区数量,随时可以切换。',+ 'software_title' => '你目前在用哪个工具?',+ 'software' => [+ 'none' => '还没有使用任何工具',+ 'other' => '其他',+ ],];diff --git a/resources/js/components/billing/PlanPicker.vue b/resources/js/components/billing/PlanPicker.vueindex e8f3545c7..1b02bb983 100644--- a/resources/js/components/billing/PlanPicker.vue+++ b/resources/js/components/billing/PlanPicker.vue@@ -29,18 +29,12 @@ const props = withDefaults(currentInterval?: BillingInterval | null;disabledPlanIds?: string[];processing?: boolean;- allowYearly?: boolean;- offerFirstMonth?: boolean;- sharedFeaturesOnMobile?: boolean;}>(),{currentPlanId: null,currentInterval: null,disabledPlanIds: () => [],processing: false,- allowYearly: true,- offerFirstMonth: false,- sharedFeaturesOnMobile: false,},);@@ -80,13 +74,6 @@ const isDisabled = (plan: PlanOption): boolean =>const isFeatured = (plan: PlanOption): boolean => plan.slug === 'workspaces';-const firstMonthPrice = (): string =>- trans('billing.subscribe.prices.first_month');--const showsFirstMonthOffer = computed(- (): boolean => props.offerFirstMonth && props.interval === 'monthly',-);-const billingNote = (plan: PlanOption): string =>props.interval === 'yearly'? trans('billing.plans.billed_yearly_total', {@@ -95,12 +82,6 @@ const billingNote = (plan: PlanOption): string =>: trans('billing.subscribe.billed_monthly');const selectLabel = (plan: PlanOption): string => {- if (props.offerFirstMonth) {- return trans('billing.plans.start_first_month', {- price: firstMonthPrice(),- });- }-if (isCurrentSelection(plan)) {return trans('billing.plans.current');}@@ -130,10 +111,7 @@ const workspaceLabel = (plan: PlanOption): string =><template><div class="@container space-y-6">- <div- v-if="allowYearly"- class="grid grid-cols-[1fr_auto_1fr] items-center gap-x-4"- >+ <div class="grid grid-cols-[1fr_auto_1fr] items-center gap-x-4"><divclass="col-start-2 inline-flex gap-1 justify-self-center rounded-lg border border-border-strong bg-card p-[3px]">@@ -191,31 +169,7 @@ const workspaceLabel = (plan: PlanOption): string =></p></div>- <div v-if="showsFirstMonthOffer" class="flex flex-col gap-1">- <p class="flex items-baseline gap-2">- <span- class="text-2xl leading-9 font-strong tabular-nums"- :data-testid="`plan-price-first-month-${plan.slug}`"- >{{ firstMonthPrice() }}</span- >- <span- class="text-base text-foreground"- :data-testid="`plan-price-suffix-${plan.slug}`"- >{{ $t('billing.plans.per_first_month') }}</span- >- </p>- <p- class="text-sm text-muted-foreground"- :data-testid="`plan-price-note-${plan.slug}`"- >- {{- $t('billing.plans.then_monthly', {- price: price(plan),- })- }}- </p>- </div>- <div v-else class="flex flex-col gap-1">+ <div class="flex flex-col gap-1"><p class="flex items-baseline gap-2"><spanclass="text-2xl leading-9 font-strong tabular-nums"@@ -289,18 +243,9 @@ const workspaceLabel = (plan: PlanOption): string =><PlanFeatureList:scope="plan.slug"- :class="[- 'flex-1 border-t border-border pt-4',- sharedFeaturesOnMobile && 'max-sm:hidden',- ]"+ class="flex-1 border-t border-border pt-4"/></article></div>-- <PlanFeatureList- v-if="sharedFeaturesOnMobile"- scope="all"- class="rounded-xl border border-border bg-card p-5 sm:hidden"- /></div></template>diff --git a/resources/js/layouts/WelcomeLayout.vue b/resources/js/layouts/WelcomeLayout.vueindex 9023400bb..0eca5e959 100644--- a/resources/js/layouts/WelcomeLayout.vue+++ b/resources/js/layouts/WelcomeLayout.vue@@ -12,7 +12,7 @@ import { useBelowBreakpoint } from '@/composables/useBreakpoint';import {goals as goalsRoute,persona as personaRoute,- plan as planRoute,+ software as softwareRoute,} from '@/routes/app/welcome';import type { Language, SharedData, WelcomeStep } from '@/types';@@ -57,7 +57,7 @@ const changeLanguage = (locale: string): void => {const steps = [{ key: 'persona', route: personaRoute() },{ key: 'goals', route: goalsRoute() },- { key: 'plan', route: planRoute() },+ { key: 'software', route: softwareRoute() },] as const;const currentIndex = computed(() =>diff --git a/resources/js/lib/welcomeOptions.ts b/resources/js/lib/welcomeOptions.tsindex 00dfe1ef5..389cd3eae 100644--- a/resources/js/lib/welcomeOptions.ts+++ b/resources/js/lib/welcomeOptions.ts@@ -48,6 +48,21 @@ export const goalArt: Record<string, WelcomeOptionArt> = {other: FALLBACK,};+export const softwareArt: Record<string, WelcomeOptionArt> = {+ buffer: emoji('B', 'slate'),+ hootsuite: emoji('H', 'amber'),+ later: emoji('L', 'violet'),+ metricool: emoji('M', 'sky'),+ typefully: emoji('T', 'teal'),+ hypefury: emoji('H', 'orange'),+ publer: emoji('P', 'sky'),+ postiz: emoji('P', 'violet'),+ sprout_social: emoji('S', 'emerald'),+ socialbee: emoji('S', 'amber'),+ none: emoji('🌱', 'emerald'),+ other: FALLBACK,+};+export const welcomeOptionArt = (options: Record<string, WelcomeOptionArt>,value: string,diff --git a/resources/js/pages/welcome/Plan.vue b/resources/js/pages/welcome/Plan.vuedeleted file mode 100644index f8eae39fe..000000000--- a/resources/js/pages/welcome/Plan.vue+++ /dev/null@@ -1,47 +0,0 @@-<script setup lang="ts">-import { Head, useForm } from '@inertiajs/vue3';--import PlanPicker, {- type PlanOption,-} from '@/components/billing/PlanPicker.vue';-import WelcomeLayout from '@/layouts/WelcomeLayout.vue';-import { store } from '@/routes/app/welcome/plan';--defineProps<{- plans: PlanOption[];-}>();--const form = useForm<{ plan_id: string | null }>({- plan_id: null,-});--const select = (planId: string): void => {- if (form.processing) {- return;- }-- form.plan_id = planId;- form.submit(store());-};-</script>--<template>- <Head :title="$t('welcome.plan_title')" />-- <WelcomeLayout- :title="$t('welcome.plan_title')"- :description="$t('welcome.plan_description')"- step="plan"- size="4xl"- >- <PlanPicker- :plans="plans"- interval="monthly"- :allow-yearly="false"- :offer-first-month="true"- shared-features-on-mobile- :processing="form.processing"- @select="select"- />- </WelcomeLayout>-</template>diff --git a/resources/js/pages/welcome/Software.vue b/resources/js/pages/welcome/Software.vuenew file mode 100644index 000000000..364f6b8ec--- /dev/null+++ b/resources/js/pages/welcome/Software.vue@@ -0,0 +1,59 @@+<script setup lang="ts">+import { Head, useForm } from '@inertiajs/vue3';++import InputError from '@/components/InputError.vue';+import WelcomeChoiceCard from '@/components/welcome/WelcomeChoiceCard.vue';+import WelcomeContinueButton from '@/components/welcome/WelcomeContinueButton.vue';+import WelcomeLayout from '@/layouts/WelcomeLayout.vue';+import { softwareArt, welcomeOptionArt } from '@/lib/welcomeOptions';+import { store } from '@/routes/app/welcome/software';++const props = defineProps<{+ software: { value: string; name: string | null }[];+ selected?: string | null;+}>();++const form = useForm({ previous_software: props.selected ?? '' });++const select = (value: string): void => {+ form.previous_software = value;+};++const submit = (): void => {+ if (!form.previous_software || form.processing) {+ return;+ }++ form.submit(store());+};+</script>++<template>+ <Head :title="$t('welcome.software_title')" />++ <WelcomeLayout+ :title="$t('welcome.software_title')"+ step="software"+ >+ <div class="grid gap-2 sm:grid-cols-2">+ <WelcomeChoiceCard+ v-for="option in software"+ :key="option.value"+ :label="option.name ?? $t(`welcome.software.${option.value}`)"+ :art="welcomeOptionArt(softwareArt, option.value)"+ :selected="form.previous_software === option.value"+ :testid="`welcome-software-${option.value}`"+ @select="select(option.value)"+ />+ </div>++ <template #actions>+ <WelcomeContinueButton+ :disabled="!form.previous_software || form.processing"+ testid="welcome-software-continue"+ @continue="submit"+ />+ <InputError :message="form.errors.previous_software" />+ </template>+ </WelcomeLayout>+</template>diff --git a/resources/js/types/welcome.ts b/resources/js/types/welcome.tsindex 1ec0a6edb..b8862f20d 100644--- a/resources/js/types/welcome.ts+++ b/resources/js/types/welcome.ts@@ -1,4 +1,4 @@export type WelcomeStep =| 'persona'| 'goals'- | 'plan';+ | 'software';diff --git a/routes/app.php b/routes/app.phpindex d9083f955..8f01dfdd9 100644--- a/routes/app.php+++ b/routes/app.php@@ -87,10 +87,10 @@ Route::middleware(['auth'])->group(function () {Route::post('welcome/persona', [WelcomeController::class, 'storePersona'])->name('app.welcome.persona.store');Route::get('welcome/goals', [WelcomeController::class, 'goals'])->name('app.welcome.goals');Route::post('welcome/goals', [WelcomeController::class, 'storeGoals'])->name('app.welcome.goals.store');- Route::get('welcome/plan', [WelcomeController::class, 'plan'])->name('app.welcome.plan');- Route::post('welcome/plan', [WelcomeController::class, 'storePlan'])+ Route::get('welcome/software', [WelcomeController::class, 'software'])->name('app.welcome.software');+ Route::post('welcome/software', [WelcomeController::class, 'storeSoftware'])->middleware('throttle:6,1')- ->name('app.welcome.plan.store');+ ->name('app.welcome.software.store');Route::post('referral-source', [ReferralSourceController::class, 'store'])->middleware('throttle:6,1')->name('app.referral-source.store');diff --git a/tests/Browser/MobileOverflowTest.php b/tests/Browser/MobileOverflowTest.phpindex c42a9f62e..6d60e903a 100644--- a/tests/Browser/MobileOverflowTest.php+++ b/tests/Browser/MobileOverflowTest.php@@ -4,6 +4,7 @@ declare(strict_types=1);use App\Enums\User\Goal;use App\Enums\User\Persona;+use App\Enums\User\PreviousSoftware;use App\Enums\User\ReferralSource;use App\Models\Post;use App\Models\User;@@ -91,6 +92,7 @@ test('auth and welcome pages do not overflow horizontally on a phone', function$user->update(['persona' => Persona::Agency->value,'goals' => [Goal::SaveTime->value],+ 'previous_software' => PreviousSoftware::Buffer->value,'referral_source' => ReferralSource::ProductHunt->value,]);$workspace = Workspace::factory()->create([@@ -102,7 +104,7 @@ test('auth and welcome pages do not overflow horizontally on a phone', function$this->actingAs($user->fresh());$welcomePages = [- 'welcome plan' => route('app.welcome.plan'),+ 'welcome software' => route('app.welcome.software'),];foreach ($welcomePages as $label => $url) {diff --git a/tests/Browser/WelcomeHeaderTest.php b/tests/Browser/WelcomeHeaderTest.phpindex c93332540..282c47846 100644--- a/tests/Browser/WelcomeHeaderTest.php+++ b/tests/Browser/WelcomeHeaderTest.php@@ -5,6 +5,7 @@ declare(strict_types=1);use App\Enums\User\Goal;use App\Enums\User\Locale;use App\Enums\User\Persona;+use App\Enums\User\PreviousSoftware;use App\Enums\User\Theme;use App\Models\User;use App\Models\Workspace;@@ -33,6 +34,7 @@ function welcomeHeaderOwner(): User$user->update(['persona' => Persona::Agency->value,'goals' => [Goal::SaveTime->value],+ 'previous_software' => PreviousSoftware::Buffer->value,]);$workspace = Workspace::factory()->create([@@ -45,15 +47,15 @@ function welcomeHeaderOwner(): Userreturn $user->fresh();}-test('the plan step goes back to goals, the step right before it', function () {+test('the software step goes back to goals, the step right before it', function () {config(['trypost.self_hosted' => false]);$this->actingAs(welcomeHeaderOwner());- $page = visit(route('app.welcome.plan'));+ $page = visit(route('app.welcome.software'));waitForWelcomeTestId($page, 'welcome-back');- $page->assertMissing('@welcome-step-connect')+ $page->assertMissing('@welcome-step-plan')->click('@welcome-back');waitForWelcomeTestId($page, 'welcome-goals-continue');@@ -69,11 +71,11 @@ test('the welcome header switches language through the shared language select an$this->actingAs($user->fresh());- $page = visit(route('app.welcome.plan'));+ $page = visit(route('app.welcome.software'));waitForWelcomeTestId($page, 'welcome-language-trigger');$page->assertVisible('@welcome-back')- ->assertVisible('@welcome-step-plan')+ ->assertVisible('@welcome-step-software')->click('@welcome-language-trigger');waitForWelcomeTestId($page, 'welcome-language-search');diff --git a/tests/Browser/WelcomeMobileTest.php b/tests/Browser/WelcomeMobileTest.phpindex c3d8ddc26..5d218eecf 100644--- a/tests/Browser/WelcomeMobileTest.php+++ b/tests/Browser/WelcomeMobileTest.php@@ -4,7 +4,6 @@ declare(strict_types=1);use App\Enums\User\Goal;use App\Enums\User\Persona;-use App\Enums\User\ReferralSource;use App\Models\SocialAccount;use App\Models\User;use App\Models\Workspace;@@ -143,43 +142,8 @@ test('the welcome header fits a phone and the continue button stays on screen',})->with(['persona' => ['app.welcome.persona', [], 'welcome-persona-continue', 'welcome-persona-', false],'goals' => ['app.welcome.goals', ['persona' => Persona::Agency->value], 'welcome-goals-continue', 'welcome-goal-', true],- 'plan' => ['app.welcome.plan', [+ 'software' => ['app.welcome.software', ['persona' => Persona::Agency->value,'goals' => [Goal::SaveTime->value],- 'referral_source' => ReferralSource::ProductHunt->value,- ], null, null, true],+ ], 'welcome-software-continue', 'welcome-software-', true],]);--test('the plan step lists the features once on a phone and per plan on desktop', function () {- config(['trypost.self_hosted' => false]);-- $this->actingAs(welcomeMobileOwner([- 'persona' => Persona::Agency->value,- 'goals' => [Goal::SaveTime->value],- 'referral_source' => ReferralSource::ProductHunt->value,- ]));-- $countLists = <<<'JS'- [...document.querySelectorAll('[data-testid^="plan-feature-list-"]')]- .filter((element) => element.getClientRects().length > 0)- .map((element) => element.dataset.testid)- JS;-- $page = visit(route('app.welcome.plan'))->resize(390, 844);- waitForWelcomeMobileTestId($page, 'plan-feature-list-all');-- expect($page->script($countLists))->toBe(['plan-feature-list-all']);-- $page->assertVisible('@plan-select-socials')- ->assertVisible('@plan-highlight-workspaces')- ->assertNoJavaScriptErrors();-- $page->resize(1280, 900);- waitForWelcomeMobileTestId($page, 'plan-feature-list-socials');-- expect($page->script($countLists))->toBe(['plan-feature-list-socials', 'plan-feature-list-workspaces']);-- $page->assertVisible('@theme-toggle')- ->assertMissing('@theme-toggle-cycle')- ->assertNoJavaScriptErrors();-});diff --git a/tests/Browser/WelcomePlanTest.php b/tests/Browser/WelcomePlanTest.phpdeleted file mode 100644index 9e1ef0bb8..000000000--- a/tests/Browser/WelcomePlanTest.php+++ /dev/null@@ -1,96 +0,0 @@-<?php--declare(strict_types=1);--use App\Enums\User\Goal;-use App\Enums\User\Persona;-use App\Enums\User\ReferralSource;-use App\Models\SocialAccount;-use App\Models\User;-use App\Models\Workspace;--/**- * Wait for a data-testid element to mount and lay out. Pest browser `@`- * selectors resolve to data-testid, and assertions do not auto-wait on SPA paint.- */-function waitForWelcomePlanTestId(mixed $page, string $testId): void-{- $page->script(<<<JS- (async () => {- const sel = '[data-testid="{$testId}"]';- for (let i = 0; i < 100; i++) {- const el = document.querySelector(sel);- if (el && el.getBoundingClientRect().height > 0) return;- await new Promise((resolve) => setTimeout(resolve, 50));- }- })();- JS);-- waitForWebFonts($page);-}--function welcomeOwnerOnPlanStep(): User-{- $user = User::factory()->create();- $user->update([- 'persona' => Persona::Agency->value,- 'goals' => [Goal::SaveTime->value],- 'referral_source' => ReferralSource::ProductHunt->value,- ]);-- $workspace = Workspace::factory()->create([- 'account_id' => $user->account_id,- 'user_id' => $user->id,- ]);- $workspace->members()->attach($user->id, membershipPivot('admin'));- $user->update(['current_workspace_id' => $workspace->id]);-- SocialAccount::factory()->linkedin()->create([- 'workspace_id' => $workspace->id,- ]);-- return $user->fresh();-}--test('the plan step shows both plans with networks and no yearly toggle', function () {- config(['trypost.self_hosted' => false]);-- $this->actingAs(welcomeOwnerOnPlanStep());-- $page = visit(route('app.welcome.plan'));-- waitForWelcomePlanTestId($page, 'plan-networks-info-socials');- waitForWelcomePlanTestId($page, 'plan-card-socials');- waitForWelcomePlanTestId($page, 'plan-card-workspaces');- waitForWelcomePlanTestId($page, 'plan-price-first-month-socials');- waitForWelcomePlanTestId($page, 'welcome-language-trigger');-- $page->assertRoute('app.welcome.plan')- ->assertVisible('@plan-card-socials')- ->assertVisible('@plan-card-workspaces')- ->assertMissing('@plan-price-regular-socials')- ->assertMissing('@plan-price-regular-workspaces')- ->assertVisible('@plan-price-first-month-socials')- ->assertVisible('@plan-price-first-month-workspaces')- ->assertSeeIn('@plan-price-first-month-socials', '$1')- ->assertSeeIn('@plan-price-first-month-workspaces', '$1')- ->assertSeeIn('@plan-price-suffix-socials', '/first month')- ->assertSeeIn('@plan-price-suffix-workspaces', '/first month')- ->assertSeeIn('@plan-price-note-socials', 'Then $19/month')- ->assertSeeIn('@plan-price-note-workspaces', 'Then $99/month')- ->assertSeeIn('@plan-highlight-socials', 'One workspace')- ->assertSeeIn('@plan-highlight-workspaces', 'Unlimited workspaces')- ->assertVisible('@plan-workspaces-info-socials')- ->assertVisible('@plan-workspaces-info-workspaces')- ->assertVisible('@plan-networks-info-socials')- ->assertVisible('@plan-networks-info-workspaces')- ->assertVisible('@plan-select-socials')- ->assertVisible('@plan-select-workspaces')- ->assertVisible('@plan-highlight-socials')- ->assertVisible('@plan-highlight-workspaces')- ->assertVisible('@welcome-language-trigger')- ->assertVisible('@theme-toggle')- ->assertMissing('@plan-interval-yearly')- ->assertMissing('@plan-interval-monthly')- ->assertNoJavaScriptErrors();-});diff --git a/tests/Browser/WorkspaceCreateTest.php b/tests/Browser/WorkspaceCreateTest.phpindex 36f0501a5..58d241fee 100644--- a/tests/Browser/WorkspaceCreateTest.php+++ b/tests/Browser/WorkspaceCreateTest.php@@ -33,7 +33,7 @@ test('a workspace is created from its name alone', function () {$page->fill('@workspaces-create-name', 'Second')->click('@workspaces-create-submit')- ->assertPathIs(parse_url(route('app.workspace.channels'), PHP_URL_PATH))+ ->assertPathIs(parse_url(route('app.posts.index'), PHP_URL_PATH))->assertNoJavaScriptErrors();expect(Workspace::where('name', 'Second')->exists())->toBeTrue();diff --git a/tests/Feature/Welcome/PlanSelectionTest.php b/tests/Feature/Welcome/PlanSelectionTest.phpdeleted file mode 100644index 88e726885..000000000--- a/tests/Feature/Welcome/PlanSelectionTest.php+++ /dev/null@@ -1,122 +0,0 @@-<?php--declare(strict_types=1);--use App\Actions\Billing\StartSubscriptionCheckout;-use App\Enums\Plan\Slug;-use App\Enums\User\Goal;-use App\Enums\User\Locale;-use App\Enums\User\Persona;-use App\Enums\User\ReferralSource;-use App\Jobs\Analytics\BootstrapAccountAnalytics;-use App\Jobs\Analytics\CollectAccountDailySnapshot;-use App\Models\Plan;-use App\Models\User;-use App\Models\Workspace;-use Illuminate\Support\Facades\Queue;--beforeEach(function () {- Queue::fake([BootstrapAccountAnalytics::class, CollectAccountDailySnapshot::class]);-- config(['trypost.self_hosted' => false]);-- $this->user = User::factory()->create([- 'persona' => Persona::Creator,- 'goals' => [Goal::SaveTime->value],- 'referral_source' => ReferralSource::Google,- ]);-- $workspace = Workspace::factory()->create([- 'account_id' => $this->user->account_id,- 'user_id' => $this->user->id,- ]);- $workspace->members()->attach($this->user->id, membershipPivot('admin'));- $this->user->update(['current_workspace_id' => $workspace->id]);-});--test('the first-month offer copy mirrors the per-month suffix', function () {- expect(__('billing.plans.per_first_month'))- ->toBe('/first month')- ->and(__('billing.plans.per_month'))->toBe('/month')- ->and(__('billing.plans.then_monthly', ['price' => '$19']))->toBe('Then $19/month')- ->and(__('billing.subscribe.prices.first_month'))->toBe('$1');-});--test('the plan step lists only active plans, ordered by sort', function () {- $this->actingAs($this->user->fresh())- ->get(route('app.welcome.plan'))- ->assertOk()- ->assertInertia(fn ($page) => $page- ->component('welcome/Plan', false)- ->has('plans', 2)- ->where('plans.0.slug', Slug::Socials->value)- ->where('plans.0.workspace_limit', 1)- ->where('plans.1.slug', Slug::Workspaces->value)- ->where('plans.1.workspace_limit', null)- );-});--test('the welcome plan step stores a locale change and stays on the page', function () {- $this->actingAs($this->user->fresh())- ->from(route('app.welcome.plan'))- ->put(route('app.profile.language'), ['locale' => 'pt-BR'])- ->assertRedirect(route('app.welcome.plan'))- ->assertCookieMissing('locale');-- expect($this->user->fresh()->locale)->toBe(Locale::PortugueseBrazil);-});--test('the plan step opens without a connected social account', function () {- expect($this->user->fresh()->currentWorkspace->socialAccounts()->exists())->toBeFalse();-- $this->actingAs($this->user->fresh())- ->get(route('app.welcome.plan'))- ->assertOk()- ->assertInertia(fn ($page) => $page->component('welcome/Plan', false));-});--test('the plan step rejects an archived plan', function () {- $legacy = Plan::where('slug', Slug::Workspace)->firstOrFail();-- $this->actingAs($this->user->fresh())- ->post(route('app.welcome.plan.store'), [- 'plan_id' => $legacy->id,- 'interval' => 'monthly',- ])- ->assertSessionHasErrors('plan_id');-});--test('the plan step always checks out the monthly price of the chosen plan', function () {- $plan = Plan::where('slug', Slug::Workspaces)->firstOrFail();- $plan->update([- 'stripe_monthly_price_id' => 'price_workspaces_monthly',- 'stripe_yearly_price_id' => 'price_workspaces_yearly',- ]);-- $this->mock(StartSubscriptionCheckout::class)- ->shouldReceive('redirect')- ->once()- ->withArgs(fn ($account, $priceId, $cancelUrl, $passedPlan) => $priceId === 'price_workspaces_monthly' && $passedPlan->is($plan))- ->andReturn(redirect('https://checkout.stripe.test/session'));-- $this->actingAs($this->user->fresh())- ->post(route('app.welcome.plan.store'), [- 'plan_id' => $plan->id,- 'interval' => 'yearly',- ])- ->assertRedirect('https://checkout.stripe.test/session');-- expect($this->user->account->fresh()->plan_id)->toBeNull();-});--test('the plan step fails loudly when the price is not configured', function () {- $plan = Plan::where('slug', Slug::Socials)->firstOrFail();- $plan->update(['stripe_monthly_price_id' => null]);-- $this->actingAs($this->user->fresh())- ->post(route('app.welcome.plan.store'), [- 'plan_id' => $plan->id,- 'interval' => 'monthly',- ])- ->assertStatus(500);-});diff --git a/tests/Feature/Welcome/WelcomeControllerTest.php b/tests/Feature/Welcome/WelcomeControllerTest.phpindex 33078993c..89ad3bbcb 100644--- a/tests/Feature/Welcome/WelcomeControllerTest.php+++ b/tests/Feature/Welcome/WelcomeControllerTest.php@@ -6,7 +6,9 @@ use App\Actions\Billing\StartSubscriptionCheckout;use App\Enums\Plan\Slug;use App\Enums\PostHog\WelcomeEvent;use App\Enums\User\Goal;+use App\Enums\User\Locale;use App\Enums\User\Persona;+use App\Enums\User\PreviousSoftware;use App\Jobs\PostHog\SendEvent;use App\Models\Account;use App\Models\Plan;@@ -94,7 +96,7 @@ test('goals requires at least one valid goal', function (array $goals, string $e'invalid' => [['not-a-goal'], 'goals.0'],]);-test('goals store saves choices mirrors them to PostHog and advances to plan', function () {+test('goals store saves choices mirrors them to PostHog and advances to software', function () {config(['services.posthog.enabled' => true, 'services.posthog.api_key' => 'phc_test']);Bus::fake();$this->user->update(['persona' => Persona::Creator->value]);@@ -103,7 +105,7 @@ test('goals store saves choices mirrors them to PostHog and advances to plan', f$this->actingAs($this->user->fresh())->post(route('app.welcome.goals.store'), ['goals' => $goals])- ->assertRedirect(route('app.welcome.plan'));+ ->assertRedirect(route('app.welcome.software'));expect($this->user->fresh()->goals)->toBe($goals);Bus::assertDispatched(SendEvent::class, fn (SendEvent $event): bool => $event->method === 'capture'@@ -111,11 +113,118 @@ test('goals store saves choices mirrors them to PostHog and advances to plan', f&& data_get($event->payload, 'properties.goals') === $goals);});+test('software redirects to goals until a goal is selected', function () {+ $this->user->update(['persona' => Persona::Agency->value]);++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.software'))+ ->assertRedirect(route('app.welcome.goals'));+});++test('software renders after goals are selected', function () {+ completeWelcomeThroughGoals($this->user);++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.software'))+ ->assertOk()+ ->assertInertia(fn ($page) => $page+ ->component('welcome/Software', false)+ ->has('software', count(PreviousSoftware::cases()))+ ->where('software.0', ['value' => 'buffer', 'name' => 'Buffer'])+ ->where('software.10', ['value' => 'none', 'name' => null])+ ->where('selected', null)+ );+});++test('software requires a valid selection', function (array $payload) {+ completeWelcomeThroughGoals($this->user);++ $this->actingAs($this->user->fresh())+ ->post(route('app.welcome.software.store'), $payload)+ ->assertSessionHasErrors('previous_software');++ expect($this->user->fresh()->previous_software)->toBeNull();+})->with([+ 'missing' => [[]],+ 'invalid' => [['previous_software' => 'not-a-tool']],+]);++test('software store saves the selection and mirrors it to PostHog', function (PreviousSoftware $software) {+ config(['services.posthog.enabled' => true, 'services.posthog.api_key' => 'phc_test']);+ Bus::fake();+ completeWelcomeThroughGoals($this->user);+ Plan::where('slug', Slug::Socials)->update(['stripe_monthly_price_id' => 'price_monthly_test']);+ $this->mock(StartSubscriptionCheckout::class)+ ->shouldReceive('redirect')+ ->once()+ ->andReturn(redirect('https://checkout.stripe.test/session'));++ $this->actingAs($this->user->fresh())+ ->post(route('app.welcome.software.store'), ['previous_software' => $software->value])+ ->assertRedirect('https://checkout.stripe.test/session');++ expect($this->user->fresh()->previous_software)->toBe($software);+ Bus::assertDispatched(SendEvent::class, fn (SendEvent $event): bool => $event->method === 'identify'+ && data_get($event->payload, 'properties.previous_software') === $software->value);+ Bus::assertDispatched(SendEvent::class, fn (SendEvent $event): bool => $event->method === 'capture'+ && data_get($event->payload, 'event') === WelcomeEvent::Software->value+ && data_get($event->payload, 'properties.previous_software') === $software->value);+})->with([+ 'a competitor' => [PreviousSoftware::Metricool],+ 'no tool yet' => [PreviousSoftware::None],+]);++test('software store sends the owner to Stripe checkout on the Socials monthly price', function () {+ completeWelcomeThroughGoals($this->user);+ $socials = Plan::where('slug', Slug::Socials)->firstOrFail();+ $socials->update([+ 'stripe_monthly_price_id' => 'price_socials_monthly',+ 'stripe_yearly_price_id' => 'price_socials_yearly',+ ]);++ $this->mock(StartSubscriptionCheckout::class)+ ->shouldReceive('redirect')+ ->once()+ ->withArgs(fn ($account, $priceId, $cancelUrl, $plan): bool => $account->is($this->user->account)+ && $priceId === 'price_socials_monthly'+ && $cancelUrl === route('app.welcome.software')+ && $plan->is($socials))+ ->andReturn(redirect('https://checkout.stripe.test/session'));++ $this->actingAs($this->user->fresh())+ ->post(route('app.welcome.software.store'), ['previous_software' => PreviousSoftware::Buffer->value])+ ->assertRedirect('https://checkout.stripe.test/session');+});++test('software store fails loudly when the Socials price is not configured', function () {+ completeWelcomeThroughGoals($this->user);+ Plan::where('slug', Slug::Socials)->update(['stripe_monthly_price_id' => null]);++ $this->mock(StartSubscriptionCheckout::class)->shouldNotReceive('redirect');++ $this->actingAs($this->user->fresh())+ ->post(route('app.welcome.software.store'), ['previous_software' => PreviousSoftware::Buffer->value])+ ->assertStatus(500);+});++test('a welcome step stores a locale change and stays on the page', function () {+ completeWelcomeThroughGoals($this->user);++ $this->actingAs($this->user->fresh())+ ->from(route('app.welcome.software'))+ ->put(route('app.profile.language'), ['locale' => 'pt-BR'])+ ->assertRedirect(route('app.welcome.software'))+ ->assertCookieMissing('locale');++ expect($this->user->fresh()->locale)->toBe(Locale::PortugueseBrazil);+});+test('completed welcome steps remain reachable when going back', function () {attachCurrentWorkspace($this->user);$this->user->update(['persona' => Persona::Agency->value,'goals' => [Goal::SaveTime->value],+ 'previous_software' => PreviousSoftware::Buffer->value,]);$this->actingAs($this->user->fresh())@@ -129,12 +238,12 @@ test('completed welcome steps remain reachable when going back', function () {->assertInertia(fn ($page) => $page->component('welcome/Goals', false));$this->actingAs($this->user->fresh())- ->get(route('app.welcome.plan'))+ ->get(route('app.welcome.software'))->assertOk()- ->assertInertia(fn ($page) => $page->component('welcome/Plan', false));+ ->assertInertia(fn ($page) => $page->component('welcome/Software', false)->where('selected', PreviousSoftware::Buffer->value));});-test('welcome funnel captures goals before checkout.started', function () {+test('welcome funnel captures every step before checkout.started', function () {config(['services.posthog.enabled' => true, 'services.posthog.api_key' => 'phc_test']);Bus::fake();$workspace = attachCurrentWorkspace($this->user);@@ -156,13 +265,10 @@ test('welcome funnel captures goals before checkout.started', function () {$this->actingAs($this->user->fresh())->post(route('app.welcome.goals.store'), ['goals' => [Goal::SaveTime->value]])- ->assertRedirect(route('app.welcome.plan'));+ ->assertRedirect(route('app.welcome.software'));$this->actingAs($this->user->fresh())- ->post(route('app.welcome.plan.store'), [- 'plan_id' => $plan->id,- 'interval' => 'monthly',- ])+ ->post(route('app.welcome.software.store'), ['previous_software' => PreviousSoftware::None->value])->assertRedirect('https://checkout.stripe.test/session');$funnel = WelcomeEvent::funnel();@@ -189,10 +295,6 @@ test('welcome steps no longer share a workspace summary', function () {test('welcome steps redirect to calendar for subscribed accounts', function (string $routeName, string $method, array $payload = []) {subscribeAccount($this->user->account);- if ($routeName === 'app.welcome.plan.store') {- $payload['plan_id'] = Plan::where('slug', Slug::Socials)->value('id');- }-$this->actingAs($this->user->fresh());$response = $method === 'get'@@ -205,8 +307,8 @@ test('welcome steps redirect to calendar for subscribed accounts', function (str'persona store' => ['app.welcome.persona.store', 'post', ['persona' => Persona::Agency->value]],'goals' => ['app.welcome.goals', 'get'],'goals store' => ['app.welcome.goals.store', 'post', ['goals' => [Goal::SaveTime->value]]],- 'plan' => ['app.welcome.plan', 'get'],- 'plan store' => ['app.welcome.plan.store', 'post', ['interval' => 'monthly']],+ 'software' => ['app.welcome.software', 'get'],+ 'software store' => ['app.welcome.software.store', 'post', ['previous_software' => PreviousSoftware::Buffer->value]],]);test('welcome redirects generic-trial accounts with app access to calendar', function () {@@ -227,10 +329,6 @@ test('welcome redirects generic-trial accounts with app access to calendar', funtest('welcome steps redirect to calendar in self hosted mode', function (string $routeName, string $method, array $payload = []) {config(['trypost.self_hosted' => true]);- if ($routeName === 'app.welcome.plan.store') {- $payload['plan_id'] = Plan::where('slug', Slug::Socials)->value('id');- }-$this->actingAs($this->user);$response = $method === 'get'@@ -243,8 +341,8 @@ test('welcome steps redirect to calendar in self hosted mode', function (string'persona store' => ['app.welcome.persona.store', 'post', ['persona' => Persona::Agency->value]],'goals' => ['app.welcome.goals', 'get'],'goals store' => ['app.welcome.goals.store', 'post', ['goals' => [Goal::SaveTime->value]]],- 'plan' => ['app.welcome.plan', 'get'],- 'plan store' => ['app.welcome.plan.store', 'post', ['interval' => 'monthly']],+ 'software' => ['app.welcome.software', 'get'],+ 'software store' => ['app.welcome.software.store', 'post', ['previous_software' => PreviousSoftware::Buffer->value]],]);test('old onboarding routes are not registered', function (string $routeName) {@@ -260,6 +358,8 @@ test('old onboarding routes are not registered', function (string $routeName) {'welcome connect' => 'app.welcome.connect','welcome connect store' => 'app.welcome.connect.store','welcome referral source' => 'app.welcome.referral-source',+ 'welcome plan' => 'app.welcome.plan',+ 'welcome plan store' => 'app.welcome.plan.store','checkout' => 'app.onboarding.checkout',]);@@ -274,7 +374,7 @@ test('members cannot start Stripe checkout from welcome', function (bool $withWo$this->mock(StartSubscriptionCheckout::class)->shouldNotReceive('redirect');$this->actingAs($member->fresh())- ->get(route('app.welcome.plan'))+ ->post(route('app.welcome.software.store'), ['previous_software' => PreviousSoftware::Buffer->value])->assertRedirect(route('app.welcome.subscription-required'));})->with(['without workspace' => [false],@@ -284,10 +384,6 @@ test('members cannot start Stripe checkout from welcome', function (bool $withWotest('members without app access are held on the subscription required screen', function (string $routeName, string $method, array $payload = []) {$member = User::factory()->create(['account_id' => $this->user->account_id]);- if ($routeName === 'app.welcome.plan.store') {- $payload['plan_id'] = Plan::where('slug', Slug::Socials)->value('id');- }-$this->actingAs($member->fresh());$response = $method === 'get'@@ -300,8 +396,8 @@ test('members without app access are held on the subscription required screen','persona store' => ['app.welcome.persona.store', 'post', ['persona' => Persona::Agency->value]],'goals' => ['app.welcome.goals', 'get'],'goals store' => ['app.welcome.goals.store', 'post', ['goals' => [Goal::SaveTime->value]]],- 'plan' => ['app.welcome.plan', 'get'],- 'plan store' => ['app.welcome.plan.store', 'post', ['interval' => 'monthly']],+ 'software' => ['app.welcome.software', 'get'],+ 'software store' => ['app.welcome.software.store', 'post', ['previous_software' => PreviousSoftware::Buffer->value]],]);test('subscription required screen renders for members without app access', function () {diff --git a/tests/Feature/Workspace/WorkspaceLimitTest.php b/tests/Feature/Workspace/WorkspaceLimitTest.phpindex 44d11fcae..a7e93f7d9 100644--- a/tests/Feature/Workspace/WorkspaceLimitTest.php+++ b/tests/Feature/Workspace/WorkspaceLimitTest.php@@ -155,7 +155,7 @@ test('the workspaces plan can store another workspace', function () use ($onPlan$this->actingAs($user)->post(route('app.workspaces.store'), ['name' => 'Second'])- ->assertRedirect(route('app.workspace.channels'));+ ->assertRedirect(route('app.posts.index'));expect($user->account->workspaces()->count())->toBe(2);});@@ -169,7 +169,7 @@ test('storing a workspace checks the cap under a lock on the account row', funct$this->actingAs($user)->post(route('app.workspaces.store'), ['name' => 'Second'])- ->assertRedirect(route('app.workspace.channels'));+ ->assertRedirect(route('app.posts.index'));$lock = collect($statements)->search(fn (string $sql): bool => str_contains($sql, 'accounts') && str_contains($sql, 'for update'));$insert = collect($statements)->search(fn (string $sql): bool => str_starts_with($sql, 'insert into') && str_contains($sql, 'workspaces'));diff --git a/tests/Feature/WorkspaceBillingTest.php b/tests/Feature/WorkspaceBillingTest.phpindex a5362d22f..f16622325 100644--- a/tests/Feature/WorkspaceBillingTest.php+++ b/tests/Feature/WorkspaceBillingTest.php@@ -146,6 +146,6 @@ test('store creates an additional workspace with no count limit', function () {'name' => 'Second workspace',]);- $response->assertRedirect(route('app.workspace.channels'));+ $response->assertRedirect(route('app.posts.index'));expect($this->account->workspaces()->count())->toBe(2);});diff --git a/tests/Feature/WorkspaceControllerTest.php b/tests/Feature/WorkspaceControllerTest.phpindex 17dc0ccec..d7a8e3b86 100644--- a/tests/Feature/WorkspaceControllerTest.php+++ b/tests/Feature/WorkspaceControllerTest.php@@ -87,7 +87,7 @@ test('store workspace creates first workspace', function () {'name' => 'New Workspace',]);- $response->assertRedirect(route('app.workspace.channels'));+ $response->assertRedirect(route('app.posts.index'));$this->assertDatabaseHas('workspaces', ['name' => 'New Workspace',@@ -102,7 +102,7 @@ test('store workspace creates second workspace in self-hosted mode', function ()'name' => 'Second Workspace',]);- $response->assertRedirect(route('app.workspace.channels'));+ $response->assertRedirect(route('app.posts.index'));$this->assertDatabaseHas('workspaces', ['name' => 'Second Workspace',@@ -594,7 +594,7 @@ test('store persists the name and redirects to channels', function () {'name' => 'Acme Inc',]);- $response->assertRedirect(route('app.workspace.channels'));+ $response->assertRedirect(route('app.posts.index'));expect(Workspace::where('name', 'Acme Inc')->sole()->name)->toBe('Acme Inc');});@@ -612,7 +612,7 @@ test('store ignores retired brand fields', function () {'name' => 'Acme','brand_description' => 'x','content_language' => 'fr',- ])->assertRedirect(route('app.workspace.channels'));+ ])->assertRedirect(route('app.posts.index'));expect(Workspace::where('name', 'Acme')->exists())->toBeTrue();});@@ -637,7 +637,7 @@ test('store redirects additional workspace to /accounts', function () {'name' => 'Second Workspace',]);- $response->assertRedirect(route('app.workspace.channels'));+ $response->assertRedirect(route('app.posts.index'));expect(Workspace::where('account_id', $account->id)->count())->toBe(2);});diff --git a/tests/Unit/Actions/Billing/StartSubscriptionCheckoutTest.php b/tests/Unit/Actions/Billing/StartSubscriptionCheckoutTest.phpindex 86e7ab84b..37096b839 100644--- a/tests/Unit/Actions/Billing/StartSubscriptionCheckoutTest.php+++ b/tests/Unit/Actions/Billing/StartSubscriptionCheckoutTest.php@@ -5,6 +5,7 @@ declare(strict_types=1);use App\Actions\Billing\StartSubscriptionCheckout;use App\Enums\Plan\Slug;use App\Enums\User\Persona;+use App\Enums\User\PreviousSoftware;use App\Enums\User\ReferralSource;use App\Models\Account;use App\Models\Plan;@@ -83,6 +84,7 @@ test('redirect applies checkout configuration and attribution metadata before op'epik' => 'dj0yepik','persona' => Persona::Agency,'goals' => ['grow_audience', 'save_time'],+ 'previous_software' => PreviousSoftware::Metricool,'referral_source' => ReferralSource::ProductHunt,]);$account->refresh();@@ -106,6 +108,7 @@ test('redirect applies checkout configuration and attribution metadata before op'epik' => 'dj0yepik','persona' => 'agency','goals' => 'grow_audience,save_time',+ 'previous_software' => 'metricool','referral_source' => 'product_hunt',])->andReturnSelf();@@ -253,7 +256,7 @@ test('redirect applies the plan first-month coupon on a monthly price', functionapp(StartSubscriptionCheckout::class)->redirect($accountMock,'price_socials_monthly',- route('app.welcome.plan'),+ route('app.welcome.software'),$plan,);});@@ -293,7 +296,7 @@ test('redirect skips the first-month coupon on a yearly price', function () {app(StartSubscriptionCheckout::class)->redirect($accountMock,'price_workspaces_yearly',- route('app.welcome.plan'),+ route('app.welcome.software'),$plan,);});@@ -327,7 +330,7 @@ test('redirect clears a leftover plan_id before opening checkout', function () {$accountMock->shouldReceive('createOrGetStripeCustomer')->once()->andReturnNull();$accountMock->shouldReceive('newSubscription')->once()->andReturn($builder);- app(StartSubscriptionCheckout::class)->redirect($accountMock, 'price_monthly_test', route('app.welcome.plan'));+ app(StartSubscriptionCheckout::class)->redirect($accountMock, 'price_monthly_test', route('app.welcome.software'));expect($account->fresh()->plan_id)->toBeNull();});@@ -351,7 +354,7 @@ test('redirect creates a new stripe customer with the owner email and the accoun$accountMock = Mockery::mock($account)->makePartial();$accountMock->shouldReceive('newSubscription')->once()->andReturn(checkoutCustomerBuilder());- app(StartSubscriptionCheckout::class)->redirect($accountMock, 'price_monthly_test', route('app.welcome.plan'));+ app(StartSubscriptionCheckout::class)->redirect($accountMock, 'price_monthly_test', route('app.welcome.software'));expect($client->requests)->toHaveCount(1)->and($client->requests[0]['method'])->toBe('post')@@ -379,7 +382,7 @@ test('redirect leaves an existing stripe customer untouched', function () {$accountMock = Mockery::mock($account)->makePartial();$accountMock->shouldReceive('newSubscription')->once()->andReturn(checkoutCustomerBuilder());- app(StartSubscriptionCheckout::class)->redirect($accountMock, 'price_monthly_test', route('app.welcome.plan'));+ app(StartSubscriptionCheckout::class)->redirect($accountMock, 'price_monthly_test', route('app.welcome.software'));expect(collect($client->requests)->pluck('method')->all())->toBe(['get'])->and($client->requests[0]['url'])->toEndWith('/v1/customers/cus_existing')diff --git a/tests/Unit/Enums/PreviousSoftwareTest.php b/tests/Unit/Enums/PreviousSoftwareTest.phpnew file mode 100644index 000000000..0758c8807--- /dev/null+++ b/tests/Unit/Enums/PreviousSoftwareTest.php@@ -0,0 +1,25 @@+<?php++declare(strict_types=1);++use App\Enums\User\Locale;+use App\Enums\User\PreviousSoftware;++test('previous software values are stable', function () {+ expect(array_map(fn (PreviousSoftware $software): string => $software->value, PreviousSoftware::cases()))+ ->toBe(['buffer', 'hootsuite', 'later', 'metricool', 'typefully', 'hypefury', 'publer', 'postiz', 'sprout_social', 'socialbee', 'none', 'other']);+});++test('only none and other go without a brand name', function () {+ $unbranded = array_filter(PreviousSoftware::cases(), fn (PreviousSoftware $software): bool => $software->brandName() === null);++ expect(array_values($unbranded))->toBe([PreviousSoftware::None, PreviousSoftware::Other]);+});++test('the options without a brand name have a welcome label in every locale', function (string $locale) {+ foreach ([PreviousSoftware::None, PreviousSoftware::Other] as $software) {+ $key = "welcome.software.{$software->value}";++ expect(__($key, [], $locale))->not->toBe($key);+ }+})->with(Locale::values());diff --git a/tests/Unit/Enums/WelcomeEventTest.php b/tests/Unit/Enums/WelcomeEventTest.phpindex af39d8e48..c842a5192 100644--- a/tests/Unit/Enums/WelcomeEventTest.php+++ b/tests/Unit/Enums/WelcomeEventTest.php@@ -5,10 +5,11 @@ declare(strict_types=1);use App\Enums\PostHog\CheckoutEvent;use App\Enums\PostHog\WelcomeEvent;-test('welcome funnel goes from goals to checkout.started', function () {+test('welcome funnel goes from persona through software to checkout.started', function () {expect(WelcomeEvent::funnel())->toBe([WelcomeEvent::Persona->value,WelcomeEvent::Goals->value,+ WelcomeEvent::Software->value,CheckoutEvent::Started->value,]);});diff --git a/tests/fixtures/single-line-copy.php b/tests/fixtures/single-line-copy.phpindex c9883f316..7f502ebc6 100644--- a/tests/fixtures/single-line-copy.php+++ b/tests/fixtures/single-line-copy.php@@ -155,4 +155,6 @@ return ['welcome.personas.other' => 9,'welcome.personas.small_business' => 17,'welcome.personas.startup' => 10,+ 'welcome.software.none' => 28,+ 'welcome.software.other' => 7,];