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
Stripe customer metadata, Welcome plan and MCP steps, MCP settings redesign and funnel tracking (#405)
Paulo Castellano1d4bb3f1de9a
diff --git a/AGENTS.md b/AGENTS.mdindex 719da547d..d24d9022b 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -225,8 +225,8 @@ In dialogs and slide-overs with Cancel and a primary action, render **Cancel firCritical means losing it breaks something outside the item itself or cannot be rebuilt by the user in a minute. Only these ask the user to type:-- **The resource's name or identity:** deleting a workspace (its name), removing a member or invitation (their email) and removing an MCP client (its name).-- **A fixed keyword:** deleting or regenerating an API key (`REGENERATE` for the latter), because integrations stop working at once, and disconnecting a channel (`DISCONNECT`), because its queue and automations stop.+- **The resource's name or identity:** deleting a workspace (its name) and removing a member or invitation (their email).+- **A fixed keyword:** deleting or regenerating an API key (`REGENERATE` for the latter), because integrations stop working at once, and disconnecting a channel or an MCP app (`disconnect`), because its queue and automations, or the AI integration, stop.Do not add typing to a new dialog unless it meets that bar; when in doubt, ask.@@ -237,6 +237,7 @@ Typing the exact name is the stronger guard for the identity-bound ones, on purp- Resolve it with `$t` in the template, not `trans()` in script (see `.ai/rules/js.md`).- Regenerating an API key uses its own keyword, `settings.api_keys.regenerate_modal.keyword` (`REGENERATE`, `REGENERAR`, …), under the same rules.- **Exception — disconnecting a channel** (`DisconnectChannelDialog`, user decision October 2026): its keyword, `channels.disconnect_modal.keyword`, is translated and **lowercase** (`disconnect`, `desconectar`, …), shown as the input placeholder and in the copyable keyword line `Type [disconnect ⧉] to confirm.` (same markup as `ConfirmDeleteModal`), and still compared case-sensitively after trimming (`DISCONNECT` must not confirm). The dialog ends its description with a bold `This cannot be undone.` and offers **Refresh connection** before disconnecting. Do not carry either into the other dialogs.+- **Disconnecting an MCP app** (`settings/workspace/Mcp.vue`, owner decision October 2026) asks for the same `channels.disconnect_modal.keyword`, not the app's name, so the word matches the channel dialog in every locale (compared case-sensitively after trimming). It keeps the plain `ConfirmDeleteModal` without the refresh option or the bold line.## Translated copy must fit its UI slot@@ -278,7 +279,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 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).+- Welcome checkout is the last Welcome step, the plan step (`app.welcome.plan.store`): it shows only **Socials**, monthly, with the first-month offer, and always opens Stripe Checkout on the **Socials monthly** price. 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@@ -309,8 +310,9 @@ used** — `syncWorkspaceQuantity()` was removed with the per-workspace model.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.-- There is no plan choice in Welcome (removed October 2026): new owners always- start on Socials. `PlanPicker` drives upgrade/downgrade on the billing page+- Welcome's plan step (`app.welcome.plan`, after the current-tool step) shows+ only Socials (owner decision October 2026): new owners always start on+ Socials. The same `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 isdiff --git a/app/Actions/Billing/StartSubscriptionCheckout.php b/app/Actions/Billing/StartSubscriptionCheckout.phpindex f007d9cf3..68dbdf45d 100644--- a/app/Actions/Billing/StartSubscriptionCheckout.php+++ b/app/Actions/Billing/StartSubscriptionCheckout.php@@ -7,18 +7,11 @@ namespace App\Actions\Billing;use App\Models\Account;use App\Models\Plan;use App\Support\Billing\ConfigureSubscriptionCheckout;-use Illuminate\Support\Str;use Inertia\Inertia;use Symfony\Component\HttpFoundation\Response;class StartSubscriptionCheckout{- /**- * Stripe metadata values are capped at 500 characters and rejected if longer:- * https://docs.stripe.com/api/metadata- */- private const STRIPE_METADATA_MAX_LENGTH = 500;-public function redirect(Account $account, string $priceId, string $cancelUrl, ?Plan $plan = null): Response{// A leftover Workspaces row (unpaid/canceled without `deleted`) would@@ -27,16 +20,15 @@ class StartSubscriptionCheckout$account->update(['plan_id' => null]);}- $account->createOrGetStripeCustomer([- 'email' => $account->stripeEmail(),- 'name' => $account->stripeName(),- ]);+ $account->syncOrCreateStripeCustomer();$monthlyPlan = $this->monthlyPlan($plan, $priceId);$subscription = $account->newSubscription(Account::SUBSCRIPTION_NAME, $priceId);ConfigureSubscriptionCheckout::apply($subscription, $account, $monthlyPlan);- $subscription->withMetadata($this->subscriptionMetadata($account, $subscription->couponId));+ $subscription->withMetadata(array_filter([+ ConfigureSubscriptionCheckout::FIRST_MONTH_COUPON_METADATA_KEY => $subscription->couponId,+ ], filled(...)));$session = $subscription->checkout(['success_url' => route('app.billing.processing').'?session_id={CHECKOUT_SESSION_ID}',@@ -46,38 +38,6 @@ class StartSubscriptionCheckoutreturn Inertia::location($session->url);}- /**- * @return array<string, string>- */- private function subscriptionMetadata(Account $account, ?string $firstMonthCouponId): array- {- $owner = $account->owner;-- $metadata = array_filter([- 'utm_source' => $owner?->utm_source,- 'utm_medium' => $owner?->utm_medium,- 'utm_campaign' => $owner?->utm_campaign,- 'utm_term' => $owner?->utm_term,- 'utm_content' => $owner?->utm_content,- 'gclid' => $owner?->gclid,- 'fbclid' => $owner?->fbclid,- 'li_fat_id' => $owner?->li_fat_id,- 'ttclid' => $owner?->ttclid,- 'rdt_cid' => $owner?->rdt_cid,- '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(...));-- return array_map(- fn (string $value): string => Str::limit($value, self::STRIPE_METADATA_MAX_LENGTH, ''),- $metadata,- );- }-private function monthlyPlan(?Plan $plan, string $priceId): ?Plan{return $plan?->stripe_monthly_price_id === $priceId ? $plan : null;diff --git a/app/Enums/AccessToken/McpClient.php b/app/Enums/AccessToken/McpClient.phpnew file mode 100644index 000000000..84773e743--- /dev/null+++ b/app/Enums/AccessToken/McpClient.php@@ -0,0 +1,27 @@+<?php++declare(strict_types=1);++namespace App\Enums\AccessToken;++use Illuminate\Support\Str;++enum McpClient: string+{+ case Claude = 'claude';+ case ChatGpt = 'chatgpt';+ case Other = 'other';++ /**+ * The AI app behind an OAuth client, read from the name it registered with+ * (the same match the MCP settings page uses for the app logos).+ */+ public static function fromClientName(string $name): self+ {+ return match (true) {+ Str::contains($name, 'claude', ignoreCase: true) => self::Claude,+ Str::contains($name, 'chatgpt', ignoreCase: true) => self::ChatGpt,+ default => self::Other,+ };+ }+}diff --git a/app/Enums/PostHog/McpEvent.php b/app/Enums/PostHog/McpEvent.phpnew file mode 100644index 000000000..ffc56f86e--- /dev/null+++ b/app/Enums/PostHog/McpEvent.php@@ -0,0 +1,10 @@+<?php++declare(strict_types=1);++namespace App\Enums\PostHog;++enum McpEvent: string+{+ case Connected = 'mcp.connected';+}diff --git a/app/Enums/PostHog/WelcomeEvent.php b/app/Enums/PostHog/WelcomeEvent.phpindex 1b1ee0380..f4e80fbdf 100644--- a/app/Enums/PostHog/WelcomeEvent.php+++ b/app/Enums/PostHog/WelcomeEvent.php@@ -10,6 +10,8 @@ enum WelcomeEvent: stringcase Goals = 'welcome.goals';case Software = 'welcome.software';case Referral = 'welcome.referral';+ case McpConnectClicked = 'welcome.mcp.connect_clicked';+ case McpSkipped = 'welcome.mcp.skipped';/*** Welcome capture order through Stripe Checkout.diff --git a/app/Http/Controllers/App/ReferralSourceController.php b/app/Http/Controllers/App/ReferralSourceController.phpindex 52e8d35cf..d2200e7b7 100644--- a/app/Http/Controllers/App/ReferralSourceController.php+++ b/app/Http/Controllers/App/ReferralSourceController.php@@ -6,9 +6,11 @@ namespace App\Http\Controllers\App;use App\Enums\PostHog\WelcomeEvent;use App\Http\Controllers\Controller;+use App\Http\Middleware\App\HandleInertiaRequests;use App\Http\Requests\App\ReferralSource\StoreReferralSourceRequest;use App\Services\PostHogService;use Illuminate\Http\RedirectResponse;+use Illuminate\Support\Facades\Cache;class ReferralSourceController extends Controller{@@ -18,6 +20,7 @@ class ReferralSourceController extends Controller$referralSource = (string) $request->validated('referral_source');$user->update(['referral_source' => $referralSource]);+ Cache::forget(HandleInertiaRequests::referralSourcesCacheKey($user));$postHog->identify($user->id, ['referral_source' => $referralSource,diff --git a/app/Http/Controllers/App/WelcomeController.php b/app/Http/Controllers/App/WelcomeController.phpindex 5d3400670..aa06d57a3 100644--- a/app/Http/Controllers/App/WelcomeController.php+++ b/app/Http/Controllers/App/WelcomeController.php@@ -4,6 +4,7 @@ declare(strict_types=1);namespace App\Http\Controllers\App;+use App\Actions\AccessToken\ListConnectedMcpClients;use App\Actions\Billing\StartSubscriptionCheckout;use App\Enums\Billing\Interval;use App\Enums\Plan\Slug;@@ -13,10 +14,13 @@ 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\StoreWelcomeMcpConnectClickRequest;use App\Http\Requests\App\Welcome\StoreWelcomePersonaRequest;use App\Http\Requests\App\Welcome\StoreWelcomeSoftwareRequest;+use App\Http\Resources\App\PlanResource;use App\Models\Plan;use App\Services\PostHogService;+use App\Support\Billing\ConfigureSubscriptionCheckout;use Illuminate\Http\RedirectResponse;use Illuminate\Http\Request;use Inertia\Inertia;@@ -119,11 +123,8 @@ class WelcomeController extends Controller]);}- public function storeSoftware(- StoreWelcomeSoftwareRequest $request,- StartSubscriptionCheckout $checkout,- PostHogService $postHog,- ): Response|RedirectResponse {+ public function storeSoftware(StoreWelcomeSoftwareRequest $request, PostHogService $postHog): RedirectResponse+ {if ($redirect = $this->redirectIfStepIncomplete($request, requireGoals: true)) {return $redirect;}@@ -143,18 +144,50 @@ class WelcomeController extends Controller$user->account,);+ return redirect()->route('app.welcome.plan');+ }++ public function plan(Request $request): InertiaResponse|RedirectResponse+ {+ if ($redirect = $this->redirectIfStepIncomplete($request, requireGoals: true, requireSoftware: true)) {+ return $redirect;+ }++ $plan = Plan::active()->where('slug', Slug::Socials)->firstOrFail();++ return Inertia::render('welcome/Plan', [+ 'plan' => PlanResource::make($plan)->resolve(),+ 'firstMonthOffer' => ConfigureSubscriptionCheckout::offersFirstMonthCoupon($request->user()->account, $plan),+ ]);+ }++ public function storePlan(+ Request $request,+ StartSubscriptionCheckout $checkout,+ PostHogService $postHog,+ ): Response|RedirectResponse {+ if ($redirect = $this->redirectIfStepIncomplete($request, requireGoals: true, requireSoftware: true)) {+ return $redirect;+ }++ $user = $request->user();$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.software'), $plan);+ $firstMonthOffer = ConfigureSubscriptionCheckout::offersFirstMonthCoupon($user->account, $plan);+ $response = $checkout->redirect($user->account, $priceId, route('app.welcome.plan'), $plan);try {$postHog->capture($user->id,CheckoutEvent::Started->value,- ['plan_name' => $plan->name, 'interval' => Interval::Monthly->value],+ [+ 'plan_name' => $plan->name,+ 'interval' => Interval::Monthly->value,+ 'is_first_month_offer' => $firstMonthOffer,+ ],$user->account,);} catch (Throwable $e) {@@ -164,6 +197,60 @@ class WelcomeController extends Controllerreturn $response;}+ public function mcp(Request $request): InertiaResponse|RedirectResponse+ {+ $user = $request->user();++ if (! $user->account?->hasAppAccess()) {+ return redirect()->route('app.welcome.persona');+ }++ $workspace = $user->currentWorkspace;++ if (blank($workspace)) {+ return redirect()->route('app.workspaces.create');+ }++ $this->authorize('view', $workspace);++ return Inertia::render('welcome/Mcp', [+ 'mcpUrl' => route('mcp.trypost'),+ 'connectedClients' => ListConnectedMcpClients::forUser($user, $workspace),+ ]);+ }++ public function storeMcpConnectClick(StoreWelcomeMcpConnectClickRequest $request, PostHogService $postHog): Response+ {+ $user = $request->user();++ $postHog->capture(+ $user->id,+ WelcomeEvent::McpConnectClicked->value,+ ['client' => (string) $request->validated('client')],+ $user->account,+ );++ return response()->noContent();+ }++ public function skipMcp(Request $request, PostHogService $postHog): RedirectResponse+ {+ $user = $request->user();++ if (! $user->account?->hasAppAccess()) {+ return redirect()->route('app.welcome.persona');+ }++ $postHog->capture(+ $user->id,+ WelcomeEvent::McpSkipped->value,+ [],+ $user->account,+ );++ return redirect()->route('app.posts.index');+ }+public function subscriptionRequired(Request $request): InertiaResponse|RedirectResponse{$user = $request->user();@@ -184,6 +271,7 @@ class WelcomeController extends Controllerprivate function redirectIfStepIncomplete(Request $request,bool $requireGoals = false,+ bool $requireSoftware = false,): ?RedirectResponse {if ($redirect = $this->redirectIfUnavailable($request)) {return $redirect;@@ -191,7 +279,7 @@ class WelcomeController extends Controller$user = $request->user();- if (! $user->persona) {+ if (blank($user->persona)) {return redirect()->route('app.welcome.persona');}@@ -199,6 +287,10 @@ class WelcomeController extends Controllerreturn redirect()->route('app.welcome.goals');}+ if ($requireSoftware && blank($user->previous_software)) {+ return redirect()->route('app.welcome.software');+ }+return null;}diff --git a/app/Http/Middleware/App/HandleInertiaRequests.php b/app/Http/Middleware/App/HandleInertiaRequests.phpindex bbc219a00..7ec1cdcb7 100644--- a/app/Http/Middleware/App/HandleInertiaRequests.php+++ b/app/Http/Middleware/App/HandleInertiaRequests.php@@ -18,11 +18,14 @@ use App\Http\Resources\App\HandleInertiaRequests\AuthWorkspaceResource;use App\Http\Resources\App\HandleInertiaRequests\ComposerResource;use App\Http\Resources\App\HandleInertiaRequests\SidebarChannelResource;use App\Http\Resources\App\PlanResource;+use App\Models\Account;use App\Models\Plan;+use App\Models\User;use App\Models\Workspace;use App\Support\HeicConverter;use App\Support\LinkTlds;use Illuminate\Http\Request;+use Illuminate\Support\Facades\Cache;use Inertia\Middleware;class HandleInertiaRequests extends Middleware@@ -62,10 +65,7 @@ class HandleInertiaRequests extends Middleware'channels' => fn (): array => $user?->currentWorkspace? SidebarChannelResource::collection($user->currentWorkspace): [],- 'referralSources' => fn (): ?array => $user !== null- && ! $isSelfHosted- && $account?->hasAppAccess()- && $user->getRawOriginal('referral_source') === null+ 'referralSources' => fn (): ?array => $this->showsReferralSources($user, $account, $isSelfHosted)? array_map(fn (ReferralSource $source): string => $source->value, ReferralSource::cases()): null,'usage' => fn (): ?array => $account && ! $isSelfHosted ? $account->usage() : null,@@ -92,7 +92,7 @@ class HandleInertiaRequests extends Middleware'contentTypeMediaRules' => fn (): array => ContentType::mediaRulesForFrontend(),'defaultCropPresets' => fn (): array => ContentType::defaultCropPresets(),'plans' => function (): array {- if (config('trypost.self_hosted') || auth()->user()?->account === null) {+ if (config('trypost.self_hosted') || blank(auth()->user()?->account)) {return [];}@@ -108,7 +108,7 @@ class HandleInertiaRequests extends Middleware'aiEnabled' => fn (): bool => filled(config('ai.providers.'.config('ai.default').'.key')),'googleAuthEnabled' => fn (): bool => SocialAuthProvider::Google->isEnabled(),'githubAuthEnabled' => fn (): bool => SocialAuthProvider::GitHub->isEnabled(),- ...($user !== null ? [+ ...(filled($user) ? ['mediaSources' => fn (): array => ['menu' => MediaSource::menu()],'mediaUploadLimits' => fn (): array => ['max_bytes' => [@@ -125,8 +125,29 @@ class HandleInertiaRequests extends Middleware'heic' => HeicConverter::available(),],] : []),- ...($workspace !== null ? ['composer' => ComposerResource::once($workspace)] : []),- ...($user !== null && config('trypost.platforms.x.defuse_links') ? ['xLinkTlds' => fn (): array => LinkTlds::all()] : []),+ ...(filled($workspace) ? ['composer' => ComposerResource::once($workspace)] : []),+ ...(filled($user) && config('trypost.platforms.x.defuse_links') ? ['xLinkTlds' => fn (): array => LinkTlds::all()] : []),];}++ public static function referralSourcesCacheKey(User $user): string+ {+ return "referral-sources.{$user->id}";+ }++ private function showsReferralSources(?User $user, ?Account $account, bool $isSelfHosted): bool+ {+ if (blank($user)) {+ return false;+ }++ return Cache::remember(+ self::referralSourcesCacheKey($user),+ now()->addMinutes(5),+ fn (): bool => ! $isSelfHosted+ && blank($user->getRawOriginal('referral_source'))+ && $user->created_at?->lte(now()->subHour()) === true+ && $account?->hasAppAccess() === true,+ );+ }}diff --git a/app/Http/Requests/App/Welcome/StoreWelcomeMcpConnectClickRequest.php b/app/Http/Requests/App/Welcome/StoreWelcomeMcpConnectClickRequest.phpnew file mode 100644index 000000000..06ee625bd--- /dev/null+++ b/app/Http/Requests/App/Welcome/StoreWelcomeMcpConnectClickRequest.php@@ -0,0 +1,27 @@+<?php++declare(strict_types=1);++namespace App\Http\Requests\App\Welcome;++use App\Enums\AccessToken\McpClient;+use Illuminate\Foundation\Http\FormRequest;+use Illuminate\Validation\Rule;++class StoreWelcomeMcpConnectClickRequest extends FormRequest+{+ public function authorize(): bool+ {+ return true;+ }++ /**+ * @return array<string, mixed>+ */+ public function rules(): array+ {+ return [+ 'client' => ['required', Rule::enum(McpClient::class)],+ ];+ }+}diff --git a/app/Jobs/Billing/SyncStripeCustomer.php b/app/Jobs/Billing/SyncStripeCustomer.phpnew file mode 100644index 000000000..59ffed814--- /dev/null+++ b/app/Jobs/Billing/SyncStripeCustomer.php@@ -0,0 +1,51 @@+<?php++declare(strict_types=1);++namespace App\Jobs\Billing;++use App\Models\User;+use Illuminate\Bus\Queueable;+use Illuminate\Contracts\Queue\ShouldQueue;+use Illuminate\Foundation\Bus\Dispatchable;+use Illuminate\Queue\InteractsWithQueue;+use Illuminate\Queue\SerializesModels;+use Stripe\Exception\InvalidRequestException;++/**+ * Mirrors the owner's name, email and Stripe metadata onto the account's+ * Stripe customer. Members and accounts without a customer are skipped, and a+ * customer deleted in Stripe is reported once instead of retried.+ */+class SyncStripeCustomer implements ShouldQueue+{+ use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;++ public int $tries = 3;++ public int $backoff = 60;++ public int $timeout = 30;++ public function __construct(public string $userId) {}++ public function handle(): void+ {+ $user = User::with('account')->find($this->userId);+ $account = $user?->account;++ if (blank($account) || $account->owner_id !== $user->id || ! $account->hasStripeId()) {+ return;+ }++ try {+ $account->syncStripeCustomerDetails();+ } catch (InvalidRequestException $exception) {+ if ($exception->getStripeCode() !== 'resource_missing') {+ throw $exception;+ }++ report($exception);+ }+ }+}diff --git a/app/Listeners/PostHog/TrackMcpConnection.php b/app/Listeners/PostHog/TrackMcpConnection.phpnew file mode 100644index 000000000..b012f584a--- /dev/null+++ b/app/Listeners/PostHog/TrackMcpConnection.php@@ -0,0 +1,52 @@+<?php++declare(strict_types=1);++namespace App\Listeners\PostHog;++use App\Enums\AccessToken\McpClient;+use App\Enums\PostHog\McpEvent;+use App\Models\AccessToken;+use App\Services\PostHogService;+use Laravel\Passport\Events\AccessTokenCreated;++/**+ * Records an MCP connection when an AI app finishes the OAuth authorization.+ * Refreshed tokens of an existing connection are not new connections.+ */+class TrackMcpConnection+{+ public function __construct(private PostHogService $postHog) {}++ public function handle(AccessTokenCreated $event): void+ {+ if (! PostHogService::isEnabled() || request('grant_type') !== 'authorization_code') {+ return;+ }++ rescue(fn () => $this->capture($event));+ }++ private function capture(AccessTokenCreated $event): void+ {+ $token = AccessToken::query()+ ->mcpOAuth()+ ->with(['client', 'workspace.account'])+ ->find($event->tokenId);++ if (blank($token?->workspace)) {+ return;+ }++ $this->postHog->capture(+ (string) $event->userId,+ McpEvent::Connected->value,+ [+ 'client' => McpClient::fromClientName($token->client->name)->value,+ 'client_name' => $token->client->name,+ 'workspace_id' => $token->workspace_id,+ ],+ $token->workspace->account,+ );+ }+}diff --git a/app/Models/Account.php b/app/Models/Account.phpindex a95e52ad7..650ec5bf7 100644--- a/app/Models/Account.php+++ b/app/Models/Account.php@@ -4,6 +4,7 @@ declare(strict_types=1);namespace App\Models;+use App\Models\Traits\BillsOwnerAsStripeCustomer;use App\Models\Traits\HasUsage;use Carbon\CarbonInterface;use Database\Factories\AccountFactory;@@ -12,12 +13,11 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;use Illuminate\Database\Eloquent\Model;use Illuminate\Database\Eloquent\Relations\BelongsTo;use Illuminate\Database\Eloquent\Relations\HasMany;-use Laravel\Cashier\Billable;class Account extends Model{/** @use HasFactory<AccountFactory> */- use Billable, HasFactory, HasUsage, HasUuids;+ use BillsOwnerAsStripeCustomer, HasFactory, HasUsage, HasUuids;public const SUBSCRIPTION_NAME = 'default';@@ -181,14 +181,4 @@ class Account extends Model'exp_year' => $card->exp_year,];}-- public function stripeEmail(): string- {- return $this->owner?->email ?? '';- }-- public function stripeName(): string- {- return $this->name;- }}diff --git a/app/Models/Traits/BillsOwnerAsStripeCustomer.php b/app/Models/Traits/BillsOwnerAsStripeCustomer.phpnew file mode 100644index 000000000..c140d7b55--- /dev/null+++ b/app/Models/Traits/BillsOwnerAsStripeCustomer.php@@ -0,0 +1,47 @@+<?php++declare(strict_types=1);++namespace App\Models\Traits;++use Laravel\Cashier\Billable;+use Stripe\Customer;++/**+ * Cashier's Billable, with the owner as the Stripe customer: their name,+ * email and the metadata from SyncsStripeCustomer.+ */+trait BillsOwnerAsStripeCustomer+{+ use Billable;++ public function stripeName(): ?string+ {+ return $this->owner?->name;+ }++ public function stripeEmail(): ?string+ {+ return $this->owner?->email;+ }++ /**+ * @return array<string, string>+ */+ public function stripeMetadata(): array+ {+ return $this->owner?->stripeMetadata() ?? [];+ }++ /**+ * @return Customer+ */+ public function syncStripeCustomerDetails()+ {+ return $this->updateStripeCustomer([+ 'name' => $this->stripeName(),+ 'email' => $this->stripeEmail(),+ 'metadata' => $this->owner?->stripeMetadataForUpdate() ?? [],+ ]);+ }+}diff --git a/app/Models/Traits/SyncsStripeCustomer.php b/app/Models/Traits/SyncsStripeCustomer.phpnew file mode 100644index 000000000..6ac4031e0--- /dev/null+++ b/app/Models/Traits/SyncsStripeCustomer.php@@ -0,0 +1,70 @@+<?php++declare(strict_types=1);++namespace App\Models\Traits;++use App\Jobs\Billing\SyncStripeCustomer;+use App\Support\AttributionKeys;+use BackedEnum;+use Illuminate\Support\Str;++/**+ * Keeps the owner's attribution and Welcome answers on the account's Stripe+ * customer, so they survive an abandoned Checkout.+ */+trait SyncsStripeCustomer+{+ private const array STRIPE_METADATA_ATTRIBUTES = [+ ...AttributionKeys::UTM,+ ...AttributionKeys::CLICK_ID,+ 'persona',+ 'goals',+ 'previous_software',+ 'referral_source',+ ];++ public static function bootSyncsStripeCustomer(): void+ {+ static::updated(function (self $user): void {+ if (! $user->wasChanged(['name', 'email', ...self::STRIPE_METADATA_ATTRIBUTES])) {+ return;+ }++ SyncStripeCustomer::dispatch($user->id);+ });+ }++ /**+ * Stripe rejects metadata values longer than 500 characters:+ * https://docs.stripe.com/api/metadata+ *+ * @return array<string, string>+ */+ public function stripeMetadata(): array+ {+ return collect($this->only(self::STRIPE_METADATA_ATTRIBUTES))+ ->map(fn (mixed $value): string => match (true) {+ $value instanceof BackedEnum => (string) $value->value,+ is_array($value) => implode(',', $value),+ default => (string) $value,+ })+ ->filter(filled(...))+ ->map(fn (string $value): string => Str::limit($value, 500, ''))+ ->all();+ }++ /**+ * Stripe merges metadata on update, so a cleared answer has to be sent as+ * an empty string to remove its key from the customer.+ *+ * @return array<string, string>+ */+ public function stripeMetadataForUpdate(): array+ {+ return [+ ...array_fill_keys(self::STRIPE_METADATA_ATTRIBUTES, ''),+ ...$this->stripeMetadata(),+ ];+ }+}diff --git a/app/Models/User.php b/app/Models/User.phpindex 0bccda4da..e14a41688 100644--- a/app/Models/User.php+++ b/app/Models/User.php@@ -17,6 +17,7 @@ use App\Enums\User\WeekStart;use App\Models\Traits\HasAccount;use App\Models\Traits\HasMedia;use App\Models\Traits\HasWorkspace;+use App\Models\Traits\SyncsStripeCustomer;use Database\Factories\UserFactory;use Illuminate\Contracts\Auth\MustVerifyEmail;use Illuminate\Contracts\Translation\HasLocalePreference;@@ -34,7 +35,7 @@ use Laravel\Passport\HasApiTokens;class User extends Authenticatable implements HasLocalePreference, MustVerifyEmail, OAuthenticatable{/** @use HasFactory<UserFactory> */- use HasAccount, HasApiTokens, HasFactory, HasMedia, HasUuids, HasWorkspace, RoutesNotifications;+ use HasAccount, HasApiTokens, HasFactory, HasMedia, HasUuids, HasWorkspace, RoutesNotifications, SyncsStripeCustomer;/*** @var list<string>diff --git a/app/Support/Billing/ConfigureSubscriptionCheckout.php b/app/Support/Billing/ConfigureSubscriptionCheckout.phpindex da97a4b24..36a80de84 100644--- a/app/Support/Billing/ConfigureSubscriptionCheckout.php+++ b/app/Support/Billing/ConfigureSubscriptionCheckout.php@@ -55,6 +55,11 @@ final class ConfigureSubscriptionCheckoutreturn $subscription;}+ public static function offersFirstMonthCoupon(Account $account, Plan $plan): bool+ {+ return self::firstMonthCouponId($account, $plan) !== null;+ }+private static function firstMonthCouponId(Account $account, ?Plan $plan): ?string{if ($plan === null || ! (bool) config('trypost.billing.require_card_for_trial', true)) {diff --git a/lang/ar/billing.php b/lang/ar/billing.phpindex 09db5122a..431f07977 100644--- a/lang/ar/billing.php+++ b/lang/ar/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => 'اختر :plan','upgrade' => 'الترقية إلى :plan','downgrade' => 'الرجوع إلى :plan',+ 'start_first_month' => 'فعّل مقابل :price','billed_yearly_total' => 'فوترة سنوية · :price (شهران مجانًا)','socials_tagline' => 'مناسب لمنشئي المحتوى والعلامات الصغيرة.','workspaces_tagline' => 'مناسب للوكالات والأعمال الكبيرة.','everything_included' => 'كل شيء مشمول','features' => ['networks_all' => 'جميع الشبكات الاجتماعية مشمولة',- 'networks_all_tooltip' => 'يمكنك النشر على كل هذه الشبكات.',+ 'networks_all_tooltip' => 'انشر عليها كلها من مكان واحد.','accounts_unlimited' => 'حسابات اجتماعية غير محدودة','accounts_unlimited_tooltip' => 'اربط أي عدد من الحسابات، حتى عدة حسابات من الشبكة نفسها. ثلاثة حسابات Instagram مثلًا.',- 'calendar' => 'تقويم شهري وأسبوعي',- 'calendar_tooltip' => 'شاهد شهرك كاملاً بنظرة واحدة: ما هو مخطط، ومجدول، وما نُشر بالفعل. انتقل إلى عرض الأسبوع عندما تحتاج إلى التفاصيل.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'مساعدك بالذكاء الاصطناعي لكتابة المنشورات ومراجعتها.',- 'mcp' => 'MCP: انشر من Claude أو ChatGPT أو Grok',- 'mcp_tooltip' => 'اربط Claude أو ChatGPT أو Grok بمساحة عملك. اطلب منه إنشاء المنشورات وجدولتها، وجلب المقاييس، ومعرفة الأفضل أداءً، والتخطيط للمحتوى التالي بناءً على بياناتك.',- 'repurpose' => 'Repurpose: حوّل منشورًا واحدًا إلى عدة منشورات',- 'repurpose_tooltip' => 'اختر حسابًا مصدرًا. كل منشور جديد تنشره هناك يُعاد نشره تلقائيًا على شبكاتك الأخرى. لا تحتاج إلى فتح TryPost.',- 'analytics' => 'التحليلات',- 'analytics_tooltip' => 'احصل على مقاييس مثل مرات الظهور والوصول والإعجابات والتعليقات لكل منشور ولكل حساب، كلها في مكان واحد.',- 'team' => 'أعضاء بلا حدود',+ 'calendar' => 'تقويم المحتوى',+ 'ideas' => 'تخطيط المحتوى',+ 'ideas_tooltip' => 'دوّن أفكارك ونظّمها في مكان واحد وحوّل أفضلها إلى محتوى متى شئت.',+ 'calendar_tooltip' => 'شاهد كل منشوراتك المجدولة والمنشورة في مكان واحد، حسب الشهر أو الأسبوع.',+ 'ai' => 'مساعد كتابة بالذكاء الاصطناعي',+ 'ai_tooltip' => 'اكتب منشوراتك وأعد صياغتها واضبط نبرتها بالذكاء الاصطناعي، بلغتك.',+ 'mcp' => 'استخدم TryPost من Claude أو ChatGPT',+ 'mcp_tooltip' => 'اربط Claude أو ChatGPT أو ذكاءً اصطناعيًا آخر. اطلب منه إنشاء المنشورات وجدولتها وملء قائمة الانتظار وتنظيم الأفكار وعرض نموك.',+ 'repurpose' => 'إعادة نشر الفيديوهات تلقائيًا',+ 'repurpose_tooltip' => 'نشرت فيديو على Instagram؟ يعيد TryPost نشره تلقائيًا على TikTok وYouTube وFacebook وشبكاتك الأخرى.',+ 'analytics' => 'تحليلات متقدمة',+ 'analytics_tooltip' => 'شاهد كل شبكاتك معًا، مثل إجمالي المتابعين، أو صفِّ حسب الشبكة والمنشور. المشاهدات والوصول والإعجابات والتعليقات وغيرها، لتعرف ما الذي ينجح.',+ 'team' => 'أعضاء فريق غير محدودين','team_tooltip' => 'ادعُ أي عدد من الأشخاص إلى فريقك دون تكلفة إضافية. حدّد ما يمكن لكل شخص فعله ووافق على المنشورات قبل نشرها.',],],diff --git a/lang/ar/common.php b/lang/ar/common.phpindex 85ee76e77..e32f542c7 100644--- a/lang/ar/common.php+++ b/lang/ar/common.php@@ -59,6 +59,7 @@ return ['clear' => 'مسح','close' => 'إغلاق','more' => 'المزيد',+ 'learn_more' => 'اعرف المزيد','play' => 'تشغيل','loading' => 'جارٍ التحميل...','loading_more' => 'جارٍ تحميل المزيد...',diff --git a/lang/ar/mcp.php b/lang/ar/mcp.phpindex b0f8498b7..d987a91fb 100644--- a/lang/ar/mcp.php+++ b/lang/ar/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'اربط مساعدي الذكاء الاصطناعي بمساحتك.',- 'copy_step' => 'انسخ عنوان خادم TryPost',- 'open_step' => 'افتح مساعد الذكاء الاصطناعي',- 'copy' => 'نسخ الرابط',+ 'copy' => 'نسخ','connect' => 'اتصال :client',- 'step_add' => 'الصق الاسم أو الرابط أو الإعداد أدناه في تطبيقك. يفتح تسجيل الدخول في المتصفح عند أول اتصال.','name_label' => 'الاسم','url_label' => 'رابط الخادم','config_label' => 'الإعداد',- 'connected_title' => 'التطبيقات المتصلة',+ 'tabs' => [+ 'connected' => 'التطبيقات المتصلة',+ 'connect' => 'ربط تطبيق',+ ],+ 'connect_other' => 'ربط',+ 'other_hint' => 'أي تطبيق يدعم MCP.',+ 'other_dialog_title' => 'اربط TryPost بتطبيق آخر','connected_description' => 'المساعدون الذين سجّلت الدخول إليهم. يمكنك قطع اتصال ما لم تعد تستخدمه.','connected_empty_title' => 'لا توجد تطبيقات متصلة',- 'connected_empty' => 'استخدم Claude أو ChatGPT أو عميلًا آخر أعلاه.',+ 'connected_empty' => 'اربط Claude أو ChatGPT أو تطبيقًا آخر لتراه هنا.','disconnect' => 'قطع الاتصال','disconnect_title' => 'قطع اتصال التطبيق','disconnect_confirm' => 'يؤدي هذا إلى تسجيل خروج التطبيق من TryPost. سيحتاج إلى إعادة الاتصال قبل استخدام MCP مجددًا.',@@ -24,9 +27,6 @@ return ['copied' => 'تم النسخ','last_used' => 'آخر استخدام','never' => 'أبدًا',- 'documentation_title' => 'التوثيق',- 'documentation_description' => 'أدلة الإعداد لكل عميل، والأدوات المتاحة، وحل المشكلات.',- 'view_docs' => 'عرض التوثيق','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'تطبيقات أخرى',- 'other_clients_description' => 'Cursor وVS Code وClaude Code وأي تطبيق يدعم MCP.',- 'clients' => [- 'claude' => 'افتح Settings → Connectors، أضِف موصلًا مخصصًا، ثم الصق الرابط أعلاه.',- 'chatgpt' => 'افتح Settings → Apps & Connectors، أنشئ موصلًا مخصصًا، ثم الصق الرابط أعلاه.',- 'cursor' => 'أضف TryPost كخادم MCP بعيد في Cursor.',- 'cursor_name' => 'Cursor',- 'vscode' => 'الصق الإعداد أدناه في إعدادات MCP في VS Code.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'الصق الإعداد أدناه في إعدادات MCP في Claude Code.',- 'claude_code_name' => 'Claude Code',- 'other' => 'يعمل مع أي عميل يقرأ إعداد mcpServers.',- 'other_name' => 'أخرى',+ 'dialog' => [+ 'title' => 'اربط TryPost بـ :client',+ 'description' => 'يستغرق الأمر دقيقة تقريبًا. ستتحدّث هذه الصفحة فور اتصالك.',+ 'open' => 'افتح :client',+ 'steps' => [+ 'claude' => [+ 'paste' => 'الصق الرابط في حقل رابط الموصل',+ 'add' => 'انقر على إضافة ثم على اتصال',+ 'login' => 'سجّل الدخول إلى TryPost واختر مساحة العمل',+ ],+ 'chatgpt' => [+ 'developer' => 'فعّل وضع المطوّر في إعدادات ChatGPT',+ 'create' => 'أنشئ تطبيقًا باسم TryPost والصق الرابط',+ 'login' => 'سجّل الدخول إلى TryPost واختر مساحة العمل',+ ],+ 'other' => [+ 'add' => 'أضف خادم MCP مخصصًا في تطبيقك',+ 'paste' => 'الصق الاسم والرابط، أو الإعدادات',+ 'login' => 'سجّل الدخول إلى TryPost واختر مساحة العمل',+ ],+ ],+ 'waiting' => 'بانتظار اتصال الذكاء الاصطناعي…',],+];diff --git a/lang/ar/settings.php b/lang/ar/settings.phpindex 64b0faf45..eb327b876 100644--- a/lang/ar/settings.php+++ b/lang/ar/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'شخصي','workspace' => 'مساحة العمل',- 'features' => 'الميزات',- 'developers' => 'المطورون',- 'account' => 'الحساب',+ 'content' => 'المحتوى',+ 'integrations' => 'التكاملات',],'items' => ['profile' => 'الملف الشخصي',@@ -24,7 +23,7 @@ return ['signatures' => 'التوقيعات','labels' => 'التسميات','webhooks' => 'Webhooks',- 'api_keys' => 'مفاتيح API',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'الفوترة',],diff --git a/lang/ar/welcome.php b/lang/ar/welcome.phpindex c8097c95d..9fc76a6af 100644--- a/lang/ar/welcome.php+++ b/lang/ar/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'عنك','goals' => 'أهدافك','software' => 'الأداة الحالية',+ 'plan' => 'الخطة',],'personas' => ['creator' => 'صانع محتوى',@@ -44,4 +45,47 @@ return ['none' => 'لا أستخدم أي أداة بعد','other' => 'أخرى',],+ 'plan_title' => 'فعّل حسابك',+ 'plan_description' => 'اربط حساباتك وجدول أول منشور لك اليوم.',+ 'plan_first_month' => 'للشهر الأول',+ 'plan_terms' => 'ثم :price/شهر. ألغِ في أي وقت.',+ 'plan_per_month' => 'شهريًا',+ 'plan_cancel_anytime' => 'ألغِ في أي وقت.',+ 'mcp' => [+ 'title' => 'أدِر حساباتك الاجتماعية من الدردشة',+ 'description' => 'أنشئ منشوراتك في TryPost وجدولها وحللها باستخدام ذكائك الاصطناعي المفضل.',+ 'connect_with' => 'الربط مع :client',+ 'connect_ai' => 'اربط ذكاءك الاصطناعي',+ 'pick_ai' => 'أين تريد استخدام TryPost؟',+ 'connect_other' => 'ربط تطبيق آخر',+ 'composer' => 'اسأل عن أي شيء',+ 'connected' => 'تم ربط :client',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'أنشئ وجدول من المحادثة',+ 'hint' => 'دوّارات وسلاسل ومقاطع فيديو',+ 'ask' => 'خذ الفكرة التالية من لوحتي وحوّلها إلى كاروسيل وجدوله يوم الثلاثاء الساعة :time على Instagram وLinkedIn.',+ 'reply' => 'تم. جُدول الكاروسيل على Instagram وLinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'تابع نموّك',+ 'hint' => 'كل حساباتك في تقرير واحد',+ 'ask' => 'كيف كان شهري؟ هل كسبت متابعين؟',+ 'reply' => 'اكتسبتَ 1,200 متابع هذا الشهر. كان LinkedIn الأسرع نموًا.',+ ],+ 'queue' => [+ 'title' => 'املأ قائمة الانتظار',+ 'hint' => 'في أفضل أوقات النشر',+ 'ask' => 'خذ مسوداتي الجاهزة وأضفها إلى قائمة الانتظار في أوقاتي الفارغة القادمة.',+ 'reply' => 'تم. مسوداتك الثلاث في قائمة الانتظار، في أوقات الغد الفارغة.',+ ],+ 'ideas' => [+ 'title' => 'نظّم أفكارك',+ 'hint' => 'من العصف الذهني إلى خطة المحتوى',+ 'ask' => 'أعطني 8 أفكار منشورات للأسبوع القادم واحفظها في لوحتي.',+ 'reply' => 'حفظت 8 أفكار في لوحتك، جاهزة لتتحول إلى منشورات.',+ ],+ ],+ 'skip' => 'تخطَّ الآن',+ ],];diff --git a/lang/de/billing.php b/lang/de/billing.phpindex 024909487..36a9e3b8a 100644--- a/lang/de/billing.php+++ b/lang/de/billing.php@@ -14,6 +14,7 @@ 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'],],@@ -34,26 +35,29 @@ return ['select' => ':plan wählen','upgrade' => 'Auf :plan upgraden','downgrade' => 'Auf :plan downgraden',+ 'start_first_month' => 'Für :price aktivieren','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.','everything_included' => 'Alles inklusive','features' => ['networks_all' => 'Alle sozialen Netzwerke inklusive',- 'networks_all_tooltip' => 'Du kannst auf allen diesen Netzwerken posten.',- 'accounts_unlimited' => 'Unbegrenzte Social-Accounts',+ 'networks_all_tooltip' => 'Poste überall von einem Ort aus.',+ 'accounts_unlimited' => 'Unbegrenzt viele Konten','accounts_unlimited_tooltip' => 'Verbinde so viele Konten, wie du willst, auch mehrere vom selben Netzwerk. Zum Beispiel drei Instagram-Konten.',- 'calendar' => 'Kalender: Monats- und Wochenansicht',- 'calendar_tooltip' => 'Sieh deinen ganzen Monat auf einen Blick: was geplant, terminiert und schon veröffentlicht ist. Wechsle zur Woche, wenn du Details brauchst.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Dein KI-Assistent zum Schreiben und Überarbeiten von Posts.',- 'mcp' => 'MCP: posten mit Claude, ChatGPT oder Grok',- 'mcp_tooltip' => 'Verbinde Claude, ChatGPT oder Grok mit deinem Workspace. Lass es Posts erstellen und planen, Kennzahlen abrufen, die besten Posts erkennen und aus deinen Daten den nächsten Content planen.',- 'repurpose' => 'Repurpose: aus einem Post viele machen',- 'repurpose_tooltip' => 'Wähle ein Quellkonto. Jeder neue Post, den du dort veröffentlichst, wird automatisch auf deinen anderen Netzwerken veröffentlicht. Du musst TryPost nicht öffnen.',- 'analytics' => 'Analytics',- 'analytics_tooltip' => 'Hol dir Kennzahlen wie Impressionen, Reichweite, Likes und Kommentare für jeden Post und jedes Konto, alles an einem Ort.',- 'team' => 'Unbegrenzte Mitglieder',+ 'calendar' => 'Content-Kalender',+ 'ideas' => 'Content-Planung',+ 'ideas_tooltip' => 'Halte deine Ideen fest, behalte sie an einem Ort im Blick und mach aus den besten Content, wann du willst.',+ 'calendar_tooltip' => 'Sieh alle geplanten und veröffentlichten Posts an einem Ort, nach Monat oder Woche.',+ 'ai' => 'KI-Schreibassistent',+ 'ai_tooltip' => 'Schreibe und überarbeite deine Posts mit KI und passe den Ton an – in deiner Sprache.',+ 'mcp' => 'TryPost in Claude oder ChatGPT nutzen',+ 'mcp_tooltip' => 'Verbinde Claude, ChatGPT oder eine andere KI. Lass sie Posts erstellen und planen, deine Warteschlange füllen, Ideen ordnen und dein Wachstum zeigen.',+ 'repurpose' => 'Automatisches Video-Reposting',+ 'repurpose_tooltip' => 'Ein Video auf Instagram gepostet? TryPost veröffentlicht es automatisch erneut auf TikTok, YouTube, Facebook und deinen anderen Netzwerken.',+ 'analytics' => 'Erweiterte Analysen',+ 'analytics_tooltip' => 'Sieh alle Netzwerke zusammen, etwa deine Follower insgesamt, oder filtere nach Netzwerk und Post. Aufrufe, Reichweite, Likes, Kommentare und mehr – damit du weißt, was funktioniert.',+ 'team' => 'Unbegrenzt viele Teammitglieder','team_tooltip' => 'Lade so viele Personen in dein Team ein, wie du willst, ohne Aufpreis. Lege fest, was jede Person darf, und gib Posts vor der Veröffentlichung frei.',],],diff --git a/lang/de/common.php b/lang/de/common.phpindex c716db4a2..5161e5bf9 100644--- a/lang/de/common.php+++ b/lang/de/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Zurücksetzen','close' => 'Schließen','more' => 'Mehr',+ 'learn_more' => 'Mehr erfahren','play' => 'Abspielen','loading' => 'Wird geladen...','loading_more' => 'Weitere werden geladen...',diff --git a/lang/de/mcp.php b/lang/de/mcp.phpindex e70e8b3b8..b8f8a7b11 100644--- a/lang/de/mcp.php+++ b/lang/de/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Verbinde KI-Assistenten mit deinem Workspace.',- 'copy_step' => 'Kopiere deine TryPost-Server-URL',- 'open_step' => 'Öffne deinen KI-Assistenten',- 'copy' => 'URL kopieren',+ 'copy' => 'Kopieren','connect' => ':client verbinden',- 'step_add' => 'Füge Name, URL oder Config unten in deine App ein. Die Anmeldung öffnet sich beim ersten Verbinden im Browser.','name_label' => 'Name','url_label' => 'Server-URL','config_label' => 'Config',- 'connected_title' => 'Verbundene Apps',+ 'tabs' => [+ 'connected' => 'Verbundene Apps',+ 'connect' => 'App verbinden',+ ],+ 'connect_other' => 'Verbinden',+ 'other_hint' => 'Jede App mit MCP-Unterstützung.',+ 'other_dialog_title' => 'TryPost mit einer anderen App verbinden','connected_description' => 'Assistenten, mit denen du dich angemeldet hast. Trenne Verbindungen, die du nicht mehr brauchst.','connected_empty_title' => 'Keine verbundenen Apps',- 'connected_empty' => 'Nutze Claude, ChatGPT oder einen anderen Client oben.',+ 'connected_empty' => 'Verbinde Claude, ChatGPT oder eine andere App, um sie hier zu sehen.','disconnect' => 'Trennen','disconnect_title' => 'App trennen','disconnect_confirm' => 'Dadurch wird die App von TryPost abgemeldet. Sie muss sich neu verbinden, bevor sie MCP wieder nutzen kann.',@@ -24,9 +27,6 @@ return ['copied' => 'Kopiert','last_used' => 'Zuletzt verwendet','never' => 'Nie',- 'documentation_title' => 'Dokumentation',- 'documentation_description' => 'Einrichtungsguides pro Client, verfügbare Tools und Fehlerhilfe.',- 'view_docs' => 'Dokumentation ansehen','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Andere Apps',- 'other_clients_description' => 'Cursor, VS Code, Claude Code und alles andere, das MCP spricht.',- 'clients' => [- 'claude' => 'Öffne Settings → Connectors, füge einen benutzerdefinierten Connector hinzu und füge die URL oben ein.',- 'chatgpt' => 'Öffne Settings → Apps & Connectors, erstelle einen benutzerdefinierten Connector und füge die URL oben ein.',- 'cursor' => 'Füge TryPost in Cursor als Remote-MCP-Server hinzu.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Füge die Konfiguration unten in die MCP-Einstellungen von VS Code ein.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Füge die Konfiguration unten in die MCP-Einstellungen von Claude Code ein.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Funktioniert mit jedem Client, der eine mcpServers-Config liest.',- 'other_name' => 'Andere',+ 'dialog' => [+ 'title' => 'Verbinde TryPost mit :client',+ 'description' => 'Dauert etwa eine Minute. Diese Seite aktualisiert sich, sobald du verbunden bist.',+ 'open' => ':client öffnen',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Füge die URL in das URL-Feld des Connectors ein',+ 'add' => 'Klicke auf Hinzufügen und dann auf Verbinden',+ 'login' => 'Melde dich bei TryPost an und wähle den Workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Aktiviere den Entwicklermodus in den ChatGPT-Einstellungen',+ 'create' => 'Erstelle eine App namens TryPost und füge die URL ein',+ 'login' => 'Melde dich bei TryPost an und wähle den Workspace',+ ],+ 'other' => [+ 'add' => 'Füge in deiner App einen eigenen MCP-Server hinzu',+ 'paste' => 'Füge Name und URL oder die Konfiguration ein',+ 'login' => 'Melde dich bei TryPost an und wähle den Workspace',+ ],+ ],+ 'waiting' => 'Warte auf die Verbindung deiner KI…',],+];diff --git a/lang/de/settings.php b/lang/de/settings.phpindex bc4a193cd..2c8906f1f 100644--- a/lang/de/settings.php+++ b/lang/de/settings.php@@ -11,9 +11,8 @@ return ['groups' => ['personal' => 'Persönlich','workspace' => 'Workspace',- 'features' => 'Funktionen',- 'developers' => 'Entwickler',- 'account' => 'Konto',+ 'content' => 'Inhalte',+ 'integrations' => 'Integrationen',],'items' => ['profile' => 'Profil',@@ -26,7 +25,7 @@ return ['signatures' => 'Signaturen','labels' => 'Labels','webhooks' => 'Webhooks',- 'api_keys' => 'API-Keys',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Abrechnung',],diff --git a/lang/de/welcome.php b/lang/de/welcome.phpindex a4aa1ff59..902626924 100644--- a/lang/de/welcome.php+++ b/lang/de/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'Über dich','goals' => 'Deine Ziele','software' => 'Aktuelles Tool',+ 'plan' => 'Tarif',],'personas' => ['creator' => 'Content Creator',@@ -44,4 +45,47 @@ return ['none' => 'Ich nutze noch keins','other' => 'Anderes',],+ 'plan_title' => 'Aktiviere dein Konto',+ 'plan_description' => 'Verbinde deine Kanäle und plane noch heute deinen ersten Post.',+ 'plan_first_month' => 'im ersten Monat',+ 'plan_terms' => 'Danach :price/Monat. Jederzeit kündbar.',+ 'plan_per_month' => 'pro Monat',+ 'plan_cancel_anytime' => 'Jederzeit kündbar.',+ 'mcp' => [+ 'title' => 'Social Media per Chat steuern',+ 'description' => 'Erstelle, plane und analysiere Posts in TryPost mit deiner Lieblings-KI.',+ 'connect_with' => 'Mit :client verbinden',+ 'connect_ai' => 'Deine KI verbinden',+ 'pick_ai' => 'Wo willst du TryPost nutzen?',+ 'connect_other' => 'Andere App verbinden',+ 'composer' => 'Frag mich alles',+ 'connected' => ':client ist verbunden',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Erstellen und planen im Chat',+ 'hint' => 'Karussells, Threads und Videos',+ 'ask' => 'Nimm die nächste Idee vom Board, mach ein Karussell daraus und plane es für Dienstag, :time, auf Instagram und LinkedIn.',+ 'reply' => 'Erledigt. Dein Karussell ist auf Instagram und LinkedIn geplant.',+ ],+ 'analytics' => [+ 'title' => 'Verfolge dein Wachstum',+ 'hint' => 'Alle Konten in einem Bericht',+ 'ask' => 'Wie war mein Monat? Habe ich Follower gewonnen?',+ 'reply' => 'Du hast diesen Monat 1,2 Tsd. Follower gewonnen. LinkedIn ist am stärksten gewachsen.',+ ],+ 'queue' => [+ 'title' => 'Fülle deine Warteschlange',+ 'hint' => 'Zu deinen besten Zeiten',+ 'ask' => 'Nimm meine fertigen Entwürfe und pack sie in meine nächsten freien Slots.',+ 'reply' => 'Erledigt. Deine 3 Entwürfe stehen in der Warteschlange, in den freien Slots von morgen.',+ ],+ 'ideas' => [+ 'title' => 'Ordne deine Ideen',+ 'hint' => 'Vom Brainstorming zum Redaktionsplan',+ 'ask' => 'Gib mir 8 Post-Ideen für nächste Woche und speichere sie auf meinem Board.',+ 'reply' => 'Ich habe 8 Ideen auf deinem Board gespeichert, bereit für neue Posts.',+ ],+ ],+ 'skip' => 'Jetzt überspringen',+ ],];diff --git a/lang/el/billing.php b/lang/el/billing.phpindex e1345d70d..c6ecf655a 100644--- a/lang/el/billing.php+++ b/lang/el/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => 'Επιλέξτε :plan','upgrade' => 'Αναβάθμιση σε :plan','downgrade' => 'Υποβάθμιση σε :plan',+ 'start_first_month' => 'Ενεργοποίηση με :price','billed_yearly_total' => 'Ετήσια χρέωση · :price (2 μήνες δωρεάν)','socials_tagline' => 'Ιδανικό για creators και μικρά brands.','workspaces_tagline' => 'Ιδανικό για agencies και μεγαλύτερες επιχειρήσεις.','everything_included' => 'Όλα περιλαμβάνονται','features' => ['networks_all' => 'Όλα τα κοινωνικά δίκτυα περιλαμβάνονται',- 'networks_all_tooltip' => 'Μπορείτε να δημοσιεύετε σε όλα αυτά τα δίκτυα.',- 'accounts_unlimited' => 'Απεριόριστοι λογαριασμοί social',+ 'networks_all_tooltip' => 'Δημοσιεύστε σε όλα από ένα σημείο.',+ 'accounts_unlimited' => 'Απεριόριστοι λογαριασμοί','accounts_unlimited_tooltip' => 'Συνδέστε όσους λογαριασμούς θέλετε, ακόμη και πολλούς από το ίδιο δίκτυο. Τρία Instagram, για παράδειγμα.',- 'calendar' => 'Ημερολόγιο: μήνας και εβδομάδα',- 'calendar_tooltip' => 'Δείτε όλο τον μήνα με μια ματιά: τι είναι σχεδιασμένο, προγραμματισμένο και ήδη δημοσιευμένο. Περάστε σε εβδομάδα όταν χρειάζεστε λεπτομέρεια.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Ο βοηθός AI σας για να γράφετε και να ελέγχετε posts.',- 'mcp' => 'MCP: δημοσίευση από Claude, ChatGPT ή Grok',- 'mcp_tooltip' => 'Συνδέστε το Claude, το ChatGPT ή το Grok στο workspace σας. Ζητήστε του να δημιουργεί και να προγραμματίζει posts, να φέρνει μετρήσεις, να βρίσκει τι πήγε καλύτερα και να σχεδιάζει το επόμενο περιεχόμενο από τα δικά σας δεδομένα.',- 'repurpose' => 'Repurpose: ένα post γίνεται πολλά',- 'repurpose_tooltip' => 'Επιλέξτε έναν λογαριασμό-πηγή. Κάθε νέο post που δημοσιεύετε εκεί αναδημοσιεύεται αυτόματα στα άλλα σας δίκτυα. Δεν χρειάζεται να ανοίξετε το TryPost.',- 'analytics' => 'Analytics',- 'analytics_tooltip' => 'Δείτε μετρήσεις όπως εμφανίσεις, απήχηση, likes και σχόλια για κάθε post και κάθε λογαριασμό, όλα σε ένα μέρος.',- 'team' => 'Απεριόριστα μέλη',+ 'calendar' => 'Ημερολόγιο περιεχομένου',+ 'ideas' => 'Σχεδιασμός περιεχομένου',+ 'ideas_tooltip' => 'Σημειώστε τις ιδέες σας, οργανώστε τες σε ένα σημείο και κάντε τις καλύτερες περιεχόμενο όποτε θέλετε.',+ 'calendar_tooltip' => 'Δείτε όλα τα προγραμματισμένα και δημοσιευμένα posts σε ένα σημείο, ανά μήνα ή εβδομάδα.',+ 'ai' => 'Βοηθός γραφής AI',+ 'ai_tooltip' => 'Γράψτε, ξαναγράψτε και προσαρμόστε τον τόνο των posts σας με AI, στη γλώσσα σας.',+ 'mcp' => 'Χρησιμοποιήστε το TryPost από Claude ή ChatGPT',+ 'mcp_tooltip' => 'Συνδέστε το Claude, το ChatGPT ή άλλη AI. Ζητήστε της να δημιουργεί και να προγραμματίζει posts, να γεμίζει την ουρά, να οργανώνει ιδέες και να δείχνει την ανάπτυξή σας.',+ 'repurpose' => 'Αυτόματη αναδημοσίευση βίντεο',+ 'repurpose_tooltip' => 'Ανεβάσατε ένα βίντεο στο Instagram; Το TryPost το αναδημοσιεύει αυτόματα σε TikTok, YouTube, Facebook και στα άλλα δίκτυά σας.',+ 'analytics' => 'Προηγμένα στατιστικά',+ 'analytics_tooltip' => 'Δείτε όλα τα δίκτυά σας μαζί, όπως τους συνολικούς ακόλουθους, ή φιλτράρετε ανά δίκτυο και ανά post. Προβολές, απήχηση, likes, σχόλια και άλλα, για να ξέρετε τι αποδίδει.',+ 'team' => 'Απεριόριστα μέλη ομάδας','team_tooltip' => 'Προσκαλέστε όσα άτομα θέλετε στην ομάδα σας, χωρίς επιπλέον κόστος. Ορίστε τι μπορεί να κάνει ο καθένας και εγκρίνετε τα posts πριν δημοσιευτούν.',],],diff --git a/lang/el/common.php b/lang/el/common.phpindex da1e8ffa5..f32dabf14 100644--- a/lang/el/common.php+++ b/lang/el/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Καθαρισμός','close' => 'Κλείσιμο','more' => 'Περισσότερα',+ 'learn_more' => 'Μάθετε περισσότερα','play' => 'Αναπαραγωγή','loading' => 'Φόρτωση...','loading_more' => 'Φόρτωση περισσότερων...',diff --git a/lang/el/mcp.php b/lang/el/mcp.phpindex 31411f261..56ee37479 100644--- a/lang/el/mcp.php+++ b/lang/el/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Συνδέστε βοηθούς AI στον χώρο σας.',- 'copy_step' => 'Αντίγραψε το URL του διακομιστή TryPost',- 'open_step' => 'Άνοιξε τον βοηθό AI σου',- 'copy' => 'Αντιγραφή URL',+ 'copy' => 'Αντιγραφή','connect' => 'Σύνδεση :client',- 'step_add' => 'Επικολλήστε το όνομα, το URL ή το config παρακάτω στην εφαρμογή σας. Η σύνδεση ανοίγει στο πρόγραμμα περιήγησης την πρώτη φορά.','name_label' => 'Όνομα','url_label' => 'URL διακομιστή','config_label' => 'Config',- 'connected_title' => 'Συνδεδεμένες εφαρμογές',+ 'tabs' => [+ 'connected' => 'Συνδεδεμένες εφαρμογές',+ 'connect' => 'Σύνδεση εφαρμογής',+ ],+ 'connect_other' => 'Σύνδεση',+ 'other_hint' => 'Οποιαδήποτε εφαρμογή υποστηρίζει MCP.',+ 'other_dialog_title' => 'Συνδέστε το TryPost με άλλη εφαρμογή','connected_description' => 'Βοηθοί στους οποίους έχετε συνδεθεί. Μπορείτε να αποσυνδέσετε όσους δεν χρησιμοποιείτε πλέον.','connected_empty_title' => 'Καμία συνδεδεμένη εφαρμογή',- 'connected_empty' => 'Χρησιμοποιήστε Claude, ChatGPT ή άλλο client παραπάνω.',+ 'connected_empty' => 'Συνδέστε το Claude, το ChatGPT ή άλλη εφαρμογή για να τη δείτε εδώ.','disconnect' => 'Αποσύνδεση','disconnect_title' => 'Αποσύνδεση εφαρμογής','disconnect_confirm' => 'Αυτό αποσυνδέει την εφαρμογή από το TryPost. Θα χρειαστεί να συνδεθεί ξανά πριν χρησιμοποιήσει το MCP.',@@ -24,9 +27,6 @@ return ['copied' => 'Αντιγράφηκε','last_used' => 'Τελευταία χρήση','never' => 'Ποτέ',- 'documentation_title' => 'Τεκμηρίωση',- 'documentation_description' => 'Οδηγοί ανά client, διαθέσιμα tools και αντιμετώπιση προβλημάτων.',- 'view_docs' => 'Δείτε την τεκμηρίωση','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Άλλες εφαρμογές',- 'other_clients_description' => 'Cursor, VS Code, Claude Code και ό,τι άλλο μιλάει MCP.',- 'clients' => [- 'claude' => 'Άνοιξε Settings → Connectors, πρόσθεσε έναν προσαρμοσμένο connector και επικόλλησε το παραπάνω URL.',- 'chatgpt' => 'Άνοιξε Settings → Apps & Connectors, δημιούργησε έναν προσαρμοσμένο connector και επικόλλησε το παραπάνω URL.',- 'cursor' => 'Προσθέστε το TryPost ως απομακρυσμένο MCP server στο Cursor.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Επικολλήστε το config παρακάτω στις ρυθμίσεις MCP του VS Code.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Επικολλήστε το config παρακάτω στις ρυθμίσεις MCP του Claude Code.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Λειτουργεί με κάθε client που διαβάζει config mcpServers.',- 'other_name' => 'Άλλα',+ 'dialog' => [+ 'title' => 'Συνδέστε το TryPost με το :client',+ 'description' => 'Χρειάζεται περίπου ένα λεπτό. Η σελίδα θα ενημερωθεί μόλις συνδεθείτε.',+ 'open' => 'Άνοιγμα του :client',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Επικολλήστε το URL στο πεδίο URL του connector',+ 'add' => 'Πατήστε Προσθήκη και μετά Σύνδεση',+ 'login' => 'Συνδεθείτε στο TryPost και επιλέξτε workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Ενεργοποιήστε τη λειτουργία προγραμματιστή στις ρυθμίσεις του ChatGPT',+ 'create' => 'Δημιουργήστε μια εφαρμογή με όνομα TryPost και επικολλήστε το URL',+ 'login' => 'Συνδεθείτε στο TryPost και επιλέξτε workspace',+ ],+ 'other' => [+ 'add' => 'Προσθέστε έναν προσαρμοσμένο διακομιστή MCP στην εφαρμογή σας',+ 'paste' => 'Επικολλήστε το όνομα και το URL ή τις ρυθμίσεις',+ 'login' => 'Συνδεθείτε στο TryPost και επιλέξτε workspace',+ ],+ ],+ 'waiting' => 'Αναμονή για σύνδεση του AI σας…',],+];diff --git a/lang/el/settings.php b/lang/el/settings.phpindex 134fdb27b..af4528cae 100644--- a/lang/el/settings.php+++ b/lang/el/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'Προσωπικά','workspace' => 'Workspace',- 'features' => 'Λειτουργίες',- 'developers' => 'Προγραμματιστές',- 'account' => 'Λογαριασμός',+ 'content' => 'Περιεχόμενο',+ 'integrations' => 'Ενσωματώσεις',],'items' => ['profile' => 'Προφίλ',@@ -24,7 +23,7 @@ return ['signatures' => 'Υπογραφές','labels' => 'Ετικέτες','webhooks' => 'Webhooks',- 'api_keys' => 'Κλειδιά API',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Χρέωση',],diff --git a/lang/el/welcome.php b/lang/el/welcome.phpindex 3a576fb91..20f96fe56 100644--- a/lang/el/welcome.php+++ b/lang/el/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'Σχετικά με εσάς','goals' => 'Οι στόχοι σας','software' => 'Τρέχον εργαλείο',+ 'plan' => 'Πλάνο',],'personas' => ['creator' => 'Δημιουργός περιεχομένου',@@ -44,4 +45,47 @@ return ['none' => 'Δεν χρησιμοποιώ ακόμα κάποιο','other' => 'Άλλο',],+ 'plan_title' => 'Ενεργοποιήστε τον λογαριασμό σας',+ 'plan_description' => 'Συνδέστε τα κανάλια σας και προγραμματίστε την πρώτη σας ανάρτηση σήμερα.',+ 'plan_first_month' => 'για τον πρώτο μήνα',+ 'plan_terms' => 'Μετά :price/μήνα. Ακύρωση οποτεδήποτε.',+ 'plan_per_month' => 'τον μήνα',+ 'plan_cancel_anytime' => 'Ακύρωση οποτεδήποτε.',+ 'mcp' => [+ 'title' => 'Διαχειριστείτε τα social μέσω chat',+ 'description' => 'Φτιάξτε, προγραμματίστε και αναλύστε posts στο TryPost με την AI σας.',+ 'connect_with' => 'Σύνδεση με :client',+ 'connect_ai' => 'Συνδέστε την AI σας',+ 'pick_ai' => 'Πού θα χρησιμοποιήσετε το TryPost;',+ 'connect_other' => 'Σύνδεση άλλης εφαρμογής',+ 'composer' => 'Ρωτήστε οτιδήποτε',+ 'connected' => 'Το :client συνδέθηκε',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Δημιουργία και προγραμματισμός από το chat',+ 'hint' => 'Carousel, threads και βίντεο',+ 'ask' => 'Πάρε την επόμενη ιδέα από τον πίνακά μου, κάν’ την carousel και προγραμμάτισέ το για Τρίτη στις :time σε Instagram και LinkedIn.',+ 'reply' => 'Έγινε. Το carousel σου είναι προγραμματισμένο σε Instagram και LinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'Παρακολουθήστε την ανάπτυξή σας',+ 'hint' => 'Όλοι οι λογαριασμοί σε μία αναφορά',+ 'ask' => 'Πώς πήγε ο μήνας μου; Κέρδισα ακόλουθους;',+ 'reply' => 'Κερδίσατε 1,2 χιλ. ακόλουθους αυτόν τον μήνα. Το LinkedIn αναπτύχθηκε πιο γρήγορα.',+ ],+ 'queue' => [+ 'title' => 'Γεμίστε την ουρά',+ 'hint' => 'Στις καλύτερες ώρες σας',+ 'ask' => 'Πάρε τα έτοιμα πρόχειρά μου και βάλ’ τα στην ουρά, στις επόμενες ελεύθερες ώρες μου.',+ 'reply' => 'Έγινε. Τα 3 πρόχειρά σου είναι στην ουρά, στις ελεύθερες ώρες της αύριο.',+ ],+ 'ideas' => [+ 'title' => 'Οργανώστε τις ιδέες σας',+ 'hint' => 'Από το brainstorming στο πλάνο περιεχομένου',+ 'ask' => 'Δώσε μου 8 ιδέες για posts για την επόμενη εβδομάδα και αποθήκευσέ τες στον πίνακά μου.',+ 'reply' => 'Αποθήκευσα 8 ιδέες στον πίνακά σου, έτοιμες να γίνουν posts.',+ ],+ ],+ 'skip' => 'Παράλειψη',+ ],];diff --git a/lang/en/billing.php b/lang/en/billing.phpindex ada94eadd..10fea5dda 100644--- a/lang/en/billing.php+++ b/lang/en/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => 'Choose :plan','upgrade' => 'Upgrade to :plan','downgrade' => 'Downgrade to :plan',+ 'start_first_month' => 'Activate for :price','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.','everything_included' => 'Everything included','features' => ['networks_all' => 'All social networks included',- 'networks_all_tooltip' => 'You can post to every one of these.',+ 'networks_all_tooltip' => 'Post to all of them from one place.','accounts_unlimited' => 'Unlimited social accounts','accounts_unlimited_tooltip' => 'Connect as many accounts as you want, even several from the same network. Three Instagrams, for example.',- 'calendar' => 'Calendar: month and week views',- 'calendar_tooltip' => 'See your whole month at a glance: what\'s planned, scheduled, and already published. Switch to week when you need the detail.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Your AI assistant for writing and reviewing posts.',- 'mcp' => 'MCP: post from Claude, ChatGPT, or Grok',- 'mcp_tooltip' => 'Connect Claude, ChatGPT, or Grok to your workspace. Ask it to create and schedule posts, pull metrics, spot what performed best, and plan what comes next from your own data.',- 'repurpose' => 'Repurpose: turn one post into many',- 'repurpose_tooltip' => 'Choose a source account. Every new post you publish there is automatically republished to your other networks. You don\'t need to open TryPost.',- 'analytics' => 'Analytics',- 'analytics_tooltip' => 'Get metrics like impressions, reach, likes, and comments for every post and every account, all in one place.',- 'team' => 'Unlimited members',+ 'calendar' => 'Content calendar',+ 'ideas' => 'Content planning',+ 'ideas_tooltip' => 'Jot down your ideas, keep them organized in one place and turn the best ones into content whenever you want.',+ 'calendar_tooltip' => 'See every scheduled and published post in one place, by month or by week.',+ 'ai' => 'AI writing assistant',+ 'ai_tooltip' => 'Write, rewrite and adjust the tone of your posts with AI, in your language.',+ 'mcp' => 'Run TryPost from Claude or ChatGPT',+ 'mcp_tooltip' => 'Connect Claude, ChatGPT or another AI. Ask it to create and schedule posts, fill your queue, organize ideas and show how you\'re growing.',+ 'repurpose' => 'Automatic video reposting',+ 'repurpose_tooltip' => 'Posted a video on Instagram? TryPost automatically reposts it to TikTok, YouTube, Facebook and your other networks.',+ 'analytics' => 'Advanced analytics',+ 'analytics_tooltip' => 'See all your networks together, like your total followers, or filter by network and by post. Views, reach, likes, comments and more, so you know what works.',+ 'team' => 'Unlimited team members','team_tooltip' => 'Invite as many people as you want to your team, at no extra cost. Set what each person can do and approve posts before they go out.',],],diff --git a/lang/en/common.php b/lang/en/common.phpindex f0a040dfc..8c5944020 100644--- a/lang/en/common.php+++ b/lang/en/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Clear','close' => 'Close','more' => 'More',+ 'learn_more' => 'Learn more','play' => 'Play','loading' => 'Loading...','loading_more' => 'Loading more...',diff --git a/lang/en/mcp.php b/lang/en/mcp.phpindex 6c0ca77c1..41a303ac8 100644--- a/lang/en/mcp.php+++ b/lang/en/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Connect AI assistants to your workspace.',- 'copy_step' => 'Copy your TryPost server URL',- 'open_step' => 'Open your AI assistant',- 'copy' => 'Copy URL',+ 'copy' => 'Copy','connect' => 'Connect :client',- 'step_add' => 'Paste the name, URL, or config below into your app. Sign-in opens in the browser the first time it connects.','name_label' => 'Name','url_label' => 'Server URL','config_label' => 'Config',- 'connected_title' => 'Connected apps',+ 'tabs' => [+ 'connected' => 'Connected apps',+ 'connect' => 'Connect an app',+ ],+ 'connect_other' => 'Connect',+ 'other_hint' => 'Any app that supports MCP.',+ 'other_dialog_title' => 'Connect TryPost to another app','connected_description' => 'Assistants you\'ve signed in with. You can disconnect any you no longer use.','connected_empty_title' => 'No connected apps',- 'connected_empty' => 'Use Claude, ChatGPT, or another client above.',+ 'connected_empty' => 'Connect Claude, ChatGPT or another app to see it here.','disconnect' => 'Disconnect','disconnect_title' => 'Disconnect app','disconnect_confirm' => 'This signs the app out of TryPost. It will need to reconnect before it can use MCP again.',@@ -24,9 +27,6 @@ return ['copied' => 'Copied','last_used' => 'Last used','never' => 'Never',- 'documentation_title' => 'Documentation',- 'documentation_description' => 'Client setup guides, available tools, and troubleshooting.',- 'view_docs' => 'View docs','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Other apps',- 'other_clients_description' => 'Cursor, VS Code, Claude Code, and anything else that speaks MCP.',- 'clients' => [- 'claude' => 'Open Settings → Connectors, add a custom connector, then paste the URL above.',- 'chatgpt' => 'Open Settings → Apps & Connectors, create a custom connector, then paste the URL above.',- 'cursor' => 'Add TryPost as a remote MCP server in Cursor.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Paste the config below into VS Code\'s MCP settings.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Paste the config below into Claude Code\'s MCP settings.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Works with any client that reads an mcpServers config.',- 'other_name' => 'Other',+ 'dialog' => [+ 'title' => 'Connect TryPost to :client',+ 'description' => 'Takes about a minute. This page updates as soon as you\'re connected.',+ 'open' => 'Open :client',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Paste the URL into the connector\'s URL field',+ 'add' => 'Click Add, then Connect',+ 'login' => 'Log in to TryPost and pick your workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Turn on Developer mode in ChatGPT\'s settings',+ 'create' => 'Create an app named TryPost and paste the URL',+ 'login' => 'Log in to TryPost and pick your workspace',+ ],+ 'other' => [+ 'add' => 'Add a custom MCP server in your app',+ 'paste' => 'Paste the name and URL, or the config',+ 'login' => 'Log in to TryPost and pick your workspace',+ ],+ ],+ 'waiting' => 'Waiting for your AI to connect…',],+];diff --git a/lang/en/settings.php b/lang/en/settings.phpindex 435c8ceba..eb0f60b8b 100644--- a/lang/en/settings.php+++ b/lang/en/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'Personal','workspace' => 'Workspace',- 'features' => 'Features',- 'developers' => 'Developers',- 'account' => 'Account',+ 'content' => 'Content',+ 'integrations' => 'Integrations',],'items' => ['profile' => 'Profile',@@ -24,7 +23,7 @@ return ['signatures' => 'Signatures','labels' => 'Labels','webhooks' => 'Webhooks',- 'api_keys' => 'API Keys',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Billing',],diff --git a/lang/en/welcome.php b/lang/en/welcome.phpindex 4483ce50c..47bf16b03 100644--- a/lang/en/welcome.php+++ b/lang/en/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'About you','goals' => 'Your goals','software' => 'Current tool',+ 'plan' => 'Plan',],'personas' => ['creator' => 'Content creator',@@ -44,4 +45,47 @@ return ['none' => 'I don\'t use one yet','other' => 'Other',],+ 'plan_title' => 'Activate your account',+ 'plan_description' => 'Connect your channels and schedule your first post today.',+ 'plan_first_month' => 'for your first month',+ 'plan_terms' => 'Then :price/month. Cancel anytime.',+ 'plan_per_month' => 'per month',+ 'plan_cancel_anytime' => 'Cancel anytime.',+ 'mcp' => [+ 'title' => 'Run your social media from a chat',+ 'description' => 'Create, schedule and analyze your TryPost posts with your favorite AI.',+ 'connect_with' => 'Connect with :client',+ 'connect_ai' => 'Connect your AI',+ 'pick_ai' => 'Where do you want to use TryPost?',+ 'connect_other' => 'Connect another app',+ 'composer' => 'Ask anything',+ 'connected' => ':client is connected',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Create and schedule from chat',+ 'hint' => 'Carousels, threads and videos',+ 'ask' => 'Take the next idea on my board, turn it into a carousel and schedule it for Tuesday at :time on Instagram and LinkedIn.',+ 'reply' => 'Done. Your carousel is scheduled on Instagram and LinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'Track your growth',+ 'hint' => 'Every account in one report',+ 'ask' => 'How was my month? Did I gain followers?',+ 'reply' => 'You gained 1.2k followers this month. LinkedIn grew the fastest.',+ ],+ 'queue' => [+ 'title' => 'Fill your queue',+ 'hint' => 'At your best posting times',+ 'ask' => 'Take my finished drafts and add them to my queue, in my next free slots.',+ 'reply' => 'Done. Your 3 drafts are in your queue, in tomorrow\'s next free slots.',+ ],+ 'ideas' => [+ 'title' => 'Organize your ideas',+ 'hint' => 'From brainstorm to content plan',+ 'ask' => 'Give me 8 post ideas for next week and save them to my board.',+ 'reply' => 'I saved 8 ideas to your board, ready to become posts.',+ ],+ ],+ 'skip' => 'Skip for now',+ ],];diff --git a/lang/es/billing.php b/lang/es/billing.phpindex 320ffd3a7..3ea50e820 100644--- a/lang/es/billing.php+++ b/lang/es/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => 'Elegir :plan','upgrade' => 'Mejorar a :plan','downgrade' => 'Bajar a :plan',+ 'start_first_month' => 'Activar por :price','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.','everything_included' => 'Todo incluido','features' => ['networks_all' => 'Todas las redes sociales incluidas',- 'networks_all_tooltip' => 'Puedes publicar en todas estas redes.',+ 'networks_all_tooltip' => 'Publica en todas desde un solo lugar.','accounts_unlimited' => 'Cuentas sociales ilimitadas','accounts_unlimited_tooltip' => 'Conecta todas las cuentas que quieras, incluso varias de la misma red. Tres Instagrams, por ejemplo.',- 'calendar' => 'Calendario mensual y semanal',- 'calendar_tooltip' => 'Ve todo tu mes de un vistazo: lo planificado, lo programado y lo ya publicado. Cambia a semana cuando necesites el detalle.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Tu asistente de IA para escribir y revisar posts.',- 'mcp' => 'MCP: publica desde Claude, ChatGPT o Grok',- 'mcp_tooltip' => 'Conecta Claude, ChatGPT o Grok a tu workspace. Pídele crear y programar posts, sacar métricas, ver qué funcionó mejor y planificar lo siguiente con tus propios datos.',- 'repurpose' => 'Repurpose: convierte un post en muchos',- 'repurpose_tooltip' => 'Elige una cuenta de origen. Cada publicación nueva que hagas ahí se republica automáticamente en tus otras redes. No necesitas abrir TryPost.',- 'analytics' => 'Analytics',- 'analytics_tooltip' => 'Obtén métricas como impresiones, alcance, likes y comentarios de cada publicación y cada cuenta, todo en un solo lugar.',- 'team' => 'Miembros ilimitados',+ 'calendar' => 'Calendario de contenido',+ 'ideas' => 'Planificación de contenido',+ 'ideas_tooltip' => 'Anota tus ideas, organízalas en un solo lugar y convierte las mejores en contenido cuando quieras.',+ 'calendar_tooltip' => 'Ve todos tus posts programados y publicados en un solo lugar, por mes o por semana.',+ 'ai' => 'Asistente de IA para escribir',+ 'ai_tooltip' => 'Escribe, reescribe y ajusta el tono de tus posts con IA, en tu idioma.',+ 'mcp' => 'Usa TryPost desde Claude o ChatGPT',+ 'mcp_tooltip' => 'Conecta Claude, ChatGPT u otra IA. Pídele crear y programar posts, llenar tu cola, organizar ideas y mostrar tu crecimiento.',+ 'repurpose' => 'Republicación automática de videos',+ 'repurpose_tooltip' => '¿Publicaste un video en Instagram? TryPost lo republica automáticamente en TikTok, YouTube, Facebook y tus otras redes.',+ 'analytics' => 'Analíticas avanzadas',+ 'analytics_tooltip' => 'Ve todas tus redes juntas, como el total de seguidores, o filtra por red y por post. Vistas, alcance, me gusta, comentarios y más, para saber qué funciona.',+ 'team' => 'Miembros de equipo ilimitados','team_tooltip' => 'Invita a todas las personas que quieras a tu equipo, sin coste extra. Define qué puede hacer cada una y aprueba los posts antes de publicarlos.',],],diff --git a/lang/es/common.php b/lang/es/common.phpindex 1d09c67b0..cc269bab8 100644--- a/lang/es/common.php+++ b/lang/es/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Limpiar','close' => 'Cerrar','more' => 'Más',+ 'learn_more' => 'Más información','play' => 'Reproducir','loading' => 'Cargando...','loading_more' => 'Cargando más...',diff --git a/lang/es/mcp.php b/lang/es/mcp.phpindex 5bcac8316..6fccee5d6 100644--- a/lang/es/mcp.php+++ b/lang/es/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Conecta asistentes de IA a tu workspace.',- 'copy_step' => 'Copia la URL del servidor TryPost',- 'open_step' => 'Abre tu asistente de IA',- 'copy' => 'Copiar URL',+ 'copy' => 'Copiar','connect' => 'Conectar :client',- 'step_add' => 'Pega el nombre, la URL o la config abajo en tu app. El inicio de sesión se abre en el navegador la primera vez.','name_label' => 'Nombre','url_label' => 'URL del servidor','config_label' => 'Config',- 'connected_title' => 'Apps conectadas',+ 'tabs' => [+ 'connected' => 'Apps conectadas',+ 'connect' => 'Conectar app',+ ],+ 'connect_other' => 'Conectar',+ 'other_hint' => 'Cualquier app compatible con MCP.',+ 'other_dialog_title' => 'Conecta TryPost a otra app','connected_description' => 'Asistentes con los que has iniciado sesión. Puedes desconectar los que ya no uses.','connected_empty_title' => 'No hay apps conectadas',- 'connected_empty' => 'Usa Claude, ChatGPT u otro cliente arriba.',+ 'connected_empty' => 'Conecta Claude, ChatGPT u otra app para verla aquí.','disconnect' => 'Desconectar','disconnect_title' => 'Desconectar app','disconnect_confirm' => 'Esto cierra la sesión de la app en TryPost. Tendrá que reconectar para usar MCP otra vez.',@@ -24,9 +27,6 @@ return ['copied' => 'Copiado','last_used' => 'Último uso','never' => 'Nunca',- 'documentation_title' => 'Documentación',- 'documentation_description' => 'Guías por cliente, tools disponibles y solución de problemas.',- 'view_docs' => 'Ver documentación','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Otras apps',- 'other_clients_description' => 'Cursor, VS Code, Claude Code y cualquier app que hable MCP.',- 'clients' => [- 'claude' => 'Abre Settings → Connectors, añade un conector personalizado y pega la URL de arriba.',- 'chatgpt' => 'Abre Settings → Apps & Connectors, crea un conector personalizado y pega la URL de arriba.',- 'cursor' => 'Añade TryPost como servidor MCP remoto en Cursor.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Pega la configuración de abajo en los ajustes MCP de VS Code.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Pega la configuración de abajo en los ajustes MCP de Claude Code.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Funciona con cualquier cliente que lea una config mcpServers.',- 'other_name' => 'Otros',+ 'dialog' => [+ 'title' => 'Conecta TryPost a :client',+ 'description' => 'Tarda un minuto. Esta página se actualiza en cuanto te conectes.',+ 'open' => 'Abrir :client',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Pega la URL en el campo de URL del conector',+ 'add' => 'Haz clic en Añadir y luego en Conectar',+ 'login' => 'Inicia sesión en TryPost y elige el workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Activa el modo desarrollador en la configuración de ChatGPT',+ 'create' => 'Crea una app llamada TryPost y pega la URL',+ 'login' => 'Inicia sesión en TryPost y elige el workspace',+ ],+ 'other' => [+ 'add' => 'Añade un servidor MCP personalizado en tu app',+ 'paste' => 'Pega el nombre y la URL, o la configuración',+ 'login' => 'Inicia sesión en TryPost y elige el workspace',+ ],+ ],+ 'waiting' => 'Esperando a que tu IA se conecte…',],+];diff --git a/lang/es/settings.php b/lang/es/settings.phpindex d3beb41f9..2e81f05eb 100644--- a/lang/es/settings.php+++ b/lang/es/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'Personal','workspace' => 'Workspace',- 'features' => 'Funciones',- 'developers' => 'Desarrolladores',- 'account' => 'Cuenta',+ 'content' => 'Contenido',+ 'integrations' => 'Integraciones',],'items' => ['profile' => 'Perfil',@@ -24,7 +23,7 @@ return ['signatures' => 'Firmas','labels' => 'Etiquetas','webhooks' => 'Webhooks',- 'api_keys' => 'Claves API',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Facturación',],diff --git a/lang/es/welcome.php b/lang/es/welcome.phpindex c2c675b0c..96fdd3ef5 100644--- a/lang/es/welcome.php+++ b/lang/es/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'Sobre ti','goals' => 'Tus objetivos','software' => 'Herramienta actual',+ 'plan' => 'Plan',],'personas' => ['creator' => 'Creador de contenido',@@ -44,4 +45,47 @@ return ['none' => 'Aún no uso ninguna','other' => 'Otra',],+ 'plan_title' => 'Activa tu cuenta',+ 'plan_description' => 'Conecta tus redes y programa tu primer post hoy.',+ 'plan_first_month' => 'el primer mes',+ 'plan_terms' => 'Luego, :price/mes. Cancela cuando quieras.',+ 'plan_per_month' => 'al mes',+ 'plan_cancel_anytime' => 'Cancela cuando quieras.',+ 'mcp' => [+ 'title' => 'Gestiona tus redes desde el chat',+ 'description' => 'Crea, programa y analiza posts en TryPost con tu IA favorita.',+ 'connect_with' => 'Conectar con :client',+ 'connect_ai' => 'Conectar tu IA',+ 'pick_ai' => '¿Dónde quieres usar TryPost?',+ 'connect_other' => 'Conectar otra app',+ 'composer' => 'Pregunta lo que quieras',+ 'connected' => ':client está conectado',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Crea y programa desde el chat',+ 'hint' => 'Carruseles, hilos y videos',+ 'ask' => 'Toma la siguiente idea de mi tablero, conviértela en un carrusel y prográmalo para el martes a las :time en Instagram y LinkedIn.',+ 'reply' => 'Listo. Tu carrusel está programado en Instagram y LinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'Sigue tu crecimiento',+ 'hint' => 'Todas tus cuentas en un informe',+ 'ask' => '¿Cómo fue mi mes? ¿Gané seguidores?',+ 'reply' => 'Ganaste 1,2 mil seguidores este mes. LinkedIn fue la que más creció.',+ ],+ 'queue' => [+ 'title' => 'Llena tu cola',+ 'hint' => 'En tus mejores horarios',+ 'ask' => 'Toma mis borradores listos y ponlos en mi cola, en mis próximos horarios libres.',+ 'reply' => 'Listo. Tus 3 borradores están en la cola, en los próximos horarios libres de mañana.',+ ],+ 'ideas' => [+ 'title' => 'Organiza tus ideas',+ 'hint' => 'De la lluvia de ideas al plan',+ 'ask' => 'Dame 8 ideas de posts para la próxima semana y guárdalas en mi tablero.',+ 'reply' => 'Guardé 8 ideas en tu tablero, listas para convertirse en posts.',+ ],+ ],+ 'skip' => 'Omitir por ahora',+ ],];diff --git a/lang/fr/billing.php b/lang/fr/billing.phpindex 7e48b294d..413571ee6 100644--- a/lang/fr/billing.php+++ b/lang/fr/billing.php@@ -12,6 +12,7 @@ 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 $'],],@@ -32,26 +33,29 @@ return ['select' => 'Choisir :plan','upgrade' => 'Passer à :plan','downgrade' => 'Revenir à :plan',+ 'start_first_month' => 'Activer pour :price','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.','everything_included' => 'Tout est inclus','features' => ['networks_all' => 'Tous les réseaux sociaux inclus',- 'networks_all_tooltip' => 'Vous pouvez publier sur tous ces réseaux.',+ 'networks_all_tooltip' => 'Publiez sur tous depuis un seul endroit.','accounts_unlimited' => 'Comptes sociaux illimités','accounts_unlimited_tooltip' => 'Connectez autant de comptes que vous voulez, même plusieurs du même réseau. Trois Instagram, par exemple.',- 'calendar' => 'Calendrier mensuel et hebdomadaire',- 'calendar_tooltip' => 'Voyez tout votre mois d\'un coup d\'œil : ce qui est prévu, planifié et déjà publié. Passez à la semaine quand il vous faut le détail.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Votre assistant IA pour rédiger et relire vos posts.',- 'mcp' => 'MCP : publiez depuis Claude, ChatGPT ou Grok',- 'mcp_tooltip' => 'Connectez Claude, ChatGPT ou Grok à votre workspace. Demandez-lui de créer et planifier des posts, de sortir les métriques, de repérer ce qui a le mieux marché et de préparer la suite à partir de vos données.',- 'repurpose' => 'Repurpose : transformez un post en plusieurs',- 'repurpose_tooltip' => 'Choisissez un compte source. Chaque nouveau post que vous y publiez est automatiquement republié sur vos autres réseaux. Pas besoin d\'ouvrir TryPost.',- 'analytics' => 'Analytics',- 'analytics_tooltip' => 'Obtenez des métriques comme les impressions, la portée, les likes et les commentaires pour chaque post et chaque compte, tout au même endroit.',- 'team' => 'Membres illimités',+ 'calendar' => 'Calendrier de contenu',+ 'ideas' => 'Planification de contenu',+ 'ideas_tooltip' => 'Notez vos idées, organisez-les au même endroit et transformez les meilleures en contenu quand vous voulez.',+ 'calendar_tooltip' => 'Voyez tous vos posts planifiés et publiés au même endroit, par mois ou par semaine.',+ 'ai' => 'Assistant IA de rédaction',+ 'ai_tooltip' => 'Rédigez, réécrivez et ajustez le ton de vos posts avec l’IA, dans votre langue.',+ 'mcp' => 'Utilisez TryPost depuis Claude ou ChatGPT',+ 'mcp_tooltip' => 'Connectez Claude, ChatGPT ou une autre IA. Demandez-lui de créer et planifier des posts, remplir votre file, organiser vos idées et suivre votre croissance.',+ 'repurpose' => 'Republication automatique de vidéos',+ 'repurpose_tooltip' => 'Vous avez publié une vidéo sur Instagram ? TryPost la republie automatiquement sur TikTok, YouTube, Facebook et vos autres réseaux.',+ 'analytics' => 'Statistiques avancées',+ 'analytics_tooltip' => 'Voyez tous vos réseaux ensemble, comme vos abonnés au total, ou filtrez par réseau et par post. Vues, portée, j’aime, commentaires et plus, pour savoir ce qui marche.',+ 'team' => 'Membres d’équipe illimités','team_tooltip' => 'Invitez autant de personnes que vous voulez dans votre équipe, sans frais supplémentaires. Définissez ce que chacun peut faire et validez les posts avant publication.',],],diff --git a/lang/fr/common.php b/lang/fr/common.phpindex fbbfb44aa..27d8c1acc 100644--- a/lang/fr/common.php+++ b/lang/fr/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Effacer','close' => 'Fermer','more' => 'Plus',+ 'learn_more' => 'En savoir plus','play' => 'Lire','loading' => 'Chargement...','loading_more' => 'Chargement...',diff --git a/lang/fr/mcp.php b/lang/fr/mcp.phpindex bca9da1e0..84320af67 100644--- a/lang/fr/mcp.php+++ b/lang/fr/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Connectez des assistants IA à votre espace.',- 'copy_step' => 'Copiez l’URL du serveur TryPost',- 'open_step' => 'Ouvrez votre assistant IA',- 'copy' => 'Copier l’URL',+ 'copy' => 'Copier','connect' => 'Connecter :client',- 'step_add' => 'Collez le nom, l’URL ou la config ci-dessous dans votre app. La connexion s’ouvre dans le navigateur la première fois.','name_label' => 'Nom','url_label' => 'URL du serveur','config_label' => 'Config',- 'connected_title' => 'Apps connectées',+ 'tabs' => [+ 'connected' => 'Apps connectées',+ 'connect' => 'Connecter une app',+ ],+ 'connect_other' => 'Connecter',+ 'other_hint' => 'Toute app compatible MCP.',+ 'other_dialog_title' => 'Connectez TryPost à une autre app','connected_description' => 'Assistants auxquels vous vous êtes connecté. Déconnectez ceux dont vous n’avez plus besoin.','connected_empty_title' => 'Aucune app connectée',- 'connected_empty' => 'Utilisez Claude, ChatGPT ou un autre client ci-dessus.',+ 'connected_empty' => 'Connectez Claude, ChatGPT ou une autre app pour la voir ici.','disconnect' => 'Déconnecter','disconnect_title' => 'Déconnecter l’app','disconnect_confirm' => 'Cela déconnecte l’app de TryPost. Elle devra se reconnecter pour utiliser MCP à nouveau.',@@ -24,9 +27,6 @@ return ['copied' => 'Copié','last_used' => 'Dernière utilisation','never' => 'Jamais',- 'documentation_title' => 'Documentation',- 'documentation_description' => 'Guides par client, tools disponibles et dépannage.',- 'view_docs' => 'Voir la documentation','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Autres apps',- 'other_clients_description' => 'Cursor, VS Code, Claude Code et toute app qui parle MCP.',- 'clients' => [- 'claude' => 'Ouvrez Settings → Connectors, ajoutez un connecteur personnalisé, puis collez l’URL ci-dessus.',- 'chatgpt' => 'Ouvrez Settings → Apps & Connectors, créez un connecteur personnalisé, puis collez l’URL ci-dessus.',- 'cursor' => 'Ajoutez TryPost comme serveur MCP distant dans Cursor.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Collez la configuration ci-dessous dans les paramètres MCP de VS Code.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Collez la configuration ci-dessous dans les paramètres MCP de Claude Code.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Fonctionne avec tout client qui lit une config mcpServers.',- 'other_name' => 'Autres',+ 'dialog' => [+ 'title' => 'Connectez TryPost à :client',+ 'description' => 'Cela prend une minute. Cette page se met à jour dès que vous êtes connecté.',+ 'open' => 'Ouvrir :client',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Collez l’URL dans le champ URL du connecteur',+ 'add' => 'Cliquez sur Ajouter, puis sur Connecter',+ 'login' => 'Connectez-vous à TryPost et choisissez le workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Activez le mode développeur dans les réglages de ChatGPT',+ 'create' => 'Créez une app nommée TryPost et collez l’URL',+ 'login' => 'Connectez-vous à TryPost et choisissez le workspace',+ ],+ 'other' => [+ 'add' => 'Ajoutez un serveur MCP personnalisé dans votre app',+ 'paste' => 'Collez le nom et l’URL, ou la configuration',+ 'login' => 'Connectez-vous à TryPost et choisissez le workspace',+ ],+ ],+ 'waiting' => 'En attente de la connexion de votre IA…',],+];diff --git a/lang/fr/settings.php b/lang/fr/settings.phpindex 847e7b388..b5594b5f6 100644--- a/lang/fr/settings.php+++ b/lang/fr/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'Personnel','workspace' => 'Espace de travail',- 'features' => 'Fonctionnalités',- 'developers' => 'Développeurs',- 'account' => 'Compte',+ 'content' => 'Contenu',+ 'integrations' => 'Intégrations',],'items' => ['profile' => 'Profil',@@ -24,7 +23,7 @@ return ['signatures' => 'Signatures','labels' => 'Étiquettes','webhooks' => 'Webhooks',- 'api_keys' => 'Clés API',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Facturation',],diff --git a/lang/fr/welcome.php b/lang/fr/welcome.phpindex 5cf05dc3e..317453456 100644--- a/lang/fr/welcome.php+++ b/lang/fr/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'À propos de vous','goals' => 'Vos objectifs','software' => 'Outil actuel',+ 'plan' => 'Forfait',],'personas' => ['creator' => 'Créateur de contenu',@@ -44,4 +45,47 @@ return ['none' => 'Je n\'en utilise pas encore','other' => 'Autre',],+ 'plan_title' => 'Activez votre compte',+ 'plan_description' => 'Connectez vos réseaux et programmez votre premier post dès aujourd’hui.',+ 'plan_first_month' => 'pour le premier mois',+ 'plan_terms' => 'Puis :price/mois. Annulez à tout moment.',+ 'plan_per_month' => 'par mois',+ 'plan_cancel_anytime' => 'Annulez à tout moment.',+ 'mcp' => [+ 'title' => 'Gérez vos réseaux par chat',+ 'description' => 'Créez, planifiez et analysez vos posts TryPost avec votre IA préférée.',+ 'connect_with' => 'Connecter :client',+ 'connect_ai' => 'Connecter votre IA',+ 'pick_ai' => 'Où voulez-vous utiliser TryPost ?',+ 'connect_other' => 'Connecter une autre app',+ 'composer' => 'Posez votre question',+ 'connected' => ':client est connecté',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Créez et planifiez depuis le chat',+ 'hint' => 'Carrousels, threads et vidéos',+ 'ask' => 'Prends la prochaine idée de mon tableau, fais-en un carrousel et planifie-le mardi à :time sur Instagram et LinkedIn.',+ 'reply' => 'C’est fait. Ton carrousel est planifié sur Instagram et LinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'Suivez votre croissance',+ 'hint' => 'Tous vos comptes dans un rapport',+ 'ask' => 'Comment s’est passé mon mois ? J’ai gagné des abonnés ?',+ 'reply' => 'Vous avez gagné 1,2 k abonnés ce mois-ci. LinkedIn a le plus progressé.',+ ],+ 'queue' => [+ 'title' => 'Remplissez votre file',+ 'hint' => 'Aux meilleurs horaires',+ 'ask' => 'Prends mes brouillons prêts et ajoute-les à ma file, sur mes prochains créneaux libres.',+ 'reply' => 'C’est fait. Tes 3 brouillons sont dans ta file, sur les prochains créneaux libres de demain.',+ ],+ 'ideas' => [+ 'title' => 'Organisez vos idées',+ 'hint' => 'Du brainstorming au planning',+ 'ask' => 'Donne-moi 8 idées de posts pour la semaine prochaine et enregistre-les dans mon tableau.',+ 'reply' => 'J’ai enregistré 8 idées dans ton tableau, prêtes à devenir des posts.',+ ],+ ],+ 'skip' => 'Passer pour l’instant',+ ],];diff --git a/lang/it/billing.php b/lang/it/billing.phpindex afba26511..61a74e56c 100644--- a/lang/it/billing.php+++ b/lang/it/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => 'Scegli :plan','upgrade' => 'Fai upgrade a :plan','downgrade' => 'Fai downgrade a :plan',+ 'start_first_month' => 'Attiva a :price','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à.','everything_included' => 'Tutto incluso','features' => ['networks_all' => 'Tutti i social network inclusi',- 'networks_all_tooltip' => 'Puoi pubblicare su tutti questi social.',+ 'networks_all_tooltip' => 'Pubblica su tutti da un unico posto.','accounts_unlimited' => 'Account social illimitati','accounts_unlimited_tooltip' => 'Collega tutti gli account che vuoi, anche più di uno dello stesso social. Tre Instagram, per esempio.',- 'calendar' => 'Calendario mensile e settimanale',- 'calendar_tooltip' => 'Guarda tutto il mese in un colpo d\'occhio: cosa è pianificato, programmato e già pubblicato. Passa alla settimana quando ti serve il dettaglio.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Il tuo assistente IA per scrivere e rivedere i post.',- 'mcp' => 'MCP: pubblica da Claude, ChatGPT o Grok',- 'mcp_tooltip' => 'Collega Claude, ChatGPT o Grok al tuo workspace. Chiedigli di creare e programmare post, recuperare le metriche, capire cosa ha funzionato meglio e pianificare il prossimo contenuto dai tuoi dati.',- 'repurpose' => 'Repurpose: trasforma un post in tanti',- 'repurpose_tooltip' => 'Scegli un account di origine. Ogni nuovo post che pubblichi lì viene ripubblicato automaticamente sugli altri tuoi social. Non devi aprire TryPost.',- 'analytics' => 'Analytics',- 'analytics_tooltip' => 'Ottieni metriche come impression, copertura, like e commenti per ogni post e ogni account, tutto in un unico posto.',- 'team' => 'Membri illimitati',+ 'calendar' => 'Calendario dei contenuti',+ 'ideas' => 'Pianificazione dei contenuti',+ 'ideas_tooltip' => 'Annota le tue idee, organizzale in un unico posto e trasforma le migliori in contenuti quando vuoi.',+ 'calendar_tooltip' => 'Vedi tutti i post programmati e pubblicati in un unico posto, per mese o per settimana.',+ 'ai' => 'Assistente IA per scrivere',+ 'ai_tooltip' => 'Scrivi, riscrivi e regola il tono dei tuoi post con l’IA, nella tua lingua.',+ 'mcp' => 'Usa TryPost da Claude o ChatGPT',+ 'mcp_tooltip' => 'Collega Claude, ChatGPT o un’altra IA. Chiedile di creare e programmare post, riempire la coda, organizzare le idee e mostrarti la crescita.',+ 'repurpose' => 'Ripubblicazione automatica dei video',+ 'repurpose_tooltip' => 'Hai pubblicato un video su Instagram? TryPost lo ripubblica automaticamente su TikTok, YouTube, Facebook e sugli altri tuoi social.',+ 'analytics' => 'Analisi avanzate',+ 'analytics_tooltip' => 'Vedi tutti i tuoi social insieme, come i follower totali, o filtra per social e per post. Visualizzazioni, copertura, like, commenti e altro, per capire cosa funziona.',+ 'team' => 'Membri del team illimitati','team_tooltip' => 'Invita nel team tutte le persone che vuoi, senza costi extra. Decidi cosa può fare ciascuna e approva i post prima della pubblicazione.',],],diff --git a/lang/it/common.php b/lang/it/common.phpindex abb1d5e0f..5c8b29535 100644--- a/lang/it/common.php+++ b/lang/it/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Cancella','close' => 'Chiudi','more' => 'Altro',+ 'learn_more' => 'Scopri di più','play' => 'Riproduci','loading' => 'Caricamento...','loading_more' => 'Caricamento in corso...',diff --git a/lang/it/mcp.php b/lang/it/mcp.phpindex 99a9dcee3..4ee81a4cd 100644--- a/lang/it/mcp.php+++ b/lang/it/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Collega assistenti IA al tuo workspace.',- 'copy_step' => 'Copia l’URL del server TryPost',- 'open_step' => 'Apri il tuo assistente IA',- 'copy' => 'Copia URL',+ 'copy' => 'Copia','connect' => 'Collega :client',- 'step_add' => 'Incolla nome, URL o config qui sotto nella tua app. Il login si apre nel browser al primo collegamento.','name_label' => 'Nome','url_label' => 'URL del server','config_label' => 'Config',- 'connected_title' => 'App collegate',+ 'tabs' => [+ 'connected' => 'App collegate',+ 'connect' => 'Collega un\'app',+ ],+ 'connect_other' => 'Collega',+ 'other_hint' => 'Qualsiasi app compatibile con MCP.',+ 'other_dialog_title' => 'Collega TryPost a un\'altra app','connected_description' => 'Assistenti a cui hai effettuato l’accesso. Puoi disconnettere quelli che non usi più.','connected_empty_title' => 'Nessuna app connessa',- 'connected_empty' => 'Usa Claude, ChatGPT o un altro client sopra.',+ 'connected_empty' => 'Collega Claude, ChatGPT o un\'altra app per vederla qui.','disconnect' => 'Scollega','disconnect_title' => 'Scollega app','disconnect_confirm' => 'Questo scollega l’app da TryPost. Dovrà riconnettersi prima di usare di nuovo MCP.',@@ -24,9 +27,6 @@ return ['copied' => 'Copiato','last_used' => 'Ultimo uso','never' => 'Mai',- 'documentation_title' => 'Documentazione',- 'documentation_description' => 'Guide per client, tools disponibili e risoluzione problemi.',- 'view_docs' => 'Vedi documentazione','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Altre app',- 'other_clients_description' => 'Cursor, VS Code, Claude Code e qualsiasi app che parla MCP.',- 'clients' => [- 'claude' => 'Apri Settings → Connectors, aggiungi un connettore personalizzato e incolla l’URL qui sopra.',- 'chatgpt' => 'Apri Settings → Apps & Connectors, crea un connettore personalizzato e incolla l’URL qui sopra.',- 'cursor' => 'Aggiungi TryPost come server MCP remoto in Cursor.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Incolla la config qui sotto nelle impostazioni MCP di VS Code.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Incolla la config qui sotto nelle impostazioni MCP di Claude Code.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Funziona con qualsiasi client che legge una config mcpServers.',- 'other_name' => 'Altri',+ 'dialog' => [+ 'title' => 'Collega TryPost a :client',+ 'description' => 'Ci vuole un minuto. Questa pagina si aggiorna appena ti colleghi.',+ 'open' => 'Apri :client',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Incolla l’URL nel campo URL del connettore',+ 'add' => 'Clicca su Aggiungi e poi su Connetti',+ 'login' => 'Accedi a TryPost e scegli il workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Attiva la modalità sviluppatore nelle impostazioni di ChatGPT',+ 'create' => 'Crea un’app chiamata TryPost e incolla l’URL',+ 'login' => 'Accedi a TryPost e scegli il workspace',+ ],+ 'other' => [+ 'add' => 'Aggiungi un server MCP personalizzato nella tua app',+ 'paste' => 'Incolla il nome e l’URL, oppure la configurazione',+ 'login' => 'Accedi a TryPost e scegli il workspace',+ ],+ ],+ 'waiting' => 'In attesa che la tua IA si colleghi…',],+];diff --git a/lang/it/settings.php b/lang/it/settings.phpindex 91a67b060..8943c497e 100644--- a/lang/it/settings.php+++ b/lang/it/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'Personale','workspace' => 'Workspace',- 'features' => 'Funzionalità',- 'developers' => 'Sviluppatori',- 'account' => 'Account',+ 'content' => 'Contenuti',+ 'integrations' => 'Integrazioni',],'items' => ['profile' => 'Profilo',@@ -24,7 +23,7 @@ return ['signatures' => 'Firme','labels' => 'Etichette','webhooks' => 'Webhook',- 'api_keys' => 'Chiavi API',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Fatturazione',],diff --git a/lang/it/welcome.php b/lang/it/welcome.phpindex 0cffc95e5..2ffd765a1 100644--- a/lang/it/welcome.php+++ b/lang/it/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'Su di te','goals' => 'I tuoi obiettivi','software' => 'Strumento attuale',+ 'plan' => 'Piano',],'personas' => ['creator' => 'Creatore di contenuti',@@ -44,4 +45,47 @@ return ['none' => 'Non ne uso ancora nessuno','other' => 'Altro',],+ 'plan_title' => 'Attiva il tuo account',+ 'plan_description' => 'Collega i tuoi canali e programma il tuo primo post oggi.',+ 'plan_first_month' => 'per il primo mese',+ 'plan_terms' => 'Poi :price/mese. Disdici quando vuoi.',+ 'plan_per_month' => 'al mese',+ 'plan_cancel_anytime' => 'Disdici quando vuoi.',+ 'mcp' => [+ 'title' => 'Gestisci i social dalla chat',+ 'description' => 'Crea, programma e analizza i post su TryPost con la tua IA preferita.',+ 'connect_with' => 'Collega :client',+ 'connect_ai' => 'Collega la tua IA',+ 'pick_ai' => 'Dove vuoi usare TryPost?',+ 'connect_other' => 'Collega un\'altra app',+ 'composer' => 'Chiedi qualsiasi cosa',+ 'connected' => ':client è collegato',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Crea e programma dalla chat',+ 'hint' => 'Caroselli, thread e video',+ 'ask' => 'Prendi la prossima idea dalla mia bacheca, trasformala in un carosello e programmalo per martedì alle :time su Instagram e LinkedIn.',+ 'reply' => 'Fatto. Il tuo carosello è programmato su Instagram e LinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'Segui la tua crescita',+ 'hint' => 'Tutti gli account in un report',+ 'ask' => 'Com’è andato il mio mese? Ho guadagnato follower?',+ 'reply' => 'Hai guadagnato 1,2k follower questo mese. LinkedIn è cresciuto di più.',+ ],+ 'queue' => [+ 'title' => 'Riempi la coda',+ 'hint' => 'Nei tuoi orari migliori',+ 'ask' => 'Prendi le mie bozze pronte e mettile in coda, nei miei prossimi orari liberi.',+ 'reply' => 'Fatto. Le tue 3 bozze sono in coda, nei prossimi orari liberi di domani.',+ ],+ 'ideas' => [+ 'title' => 'Organizza le tue idee',+ 'hint' => 'Dal brainstorming al piano editoriale',+ 'ask' => 'Dammi 8 idee di post per la prossima settimana e salvale nella mia bacheca.',+ 'reply' => 'Ho salvato 8 idee nella tua bacheca, pronte a diventare post.',+ ],+ ],+ 'skip' => 'Salta per ora',+ ],];diff --git a/lang/ja/billing.php b/lang/ja/billing.phpindex 921b2cdb8..4dbf006be 100644--- a/lang/ja/billing.php+++ b/lang/ja/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => ':plan を選ぶ','upgrade' => ':plan にアップグレード','downgrade' => ':plan にダウングレード',+ 'start_first_month' => ':priceで有効にする','billed_yearly_total' => '年払い · :price(2か月分無料)','socials_tagline' => 'クリエイターや小規模ブランド向け。','workspaces_tagline' => '代理店や大規模ビジネス向け。','everything_included' => 'すべて含まれます','features' => ['networks_all' => 'すべてのSNSに対応',- 'networks_all_tooltip' => 'これらすべてのSNSに投稿できます。',- 'accounts_unlimited' => 'ソーシャルアカウント数無制限',+ 'networks_all_tooltip' => 'すべてに1か所から投稿できます。',+ 'accounts_unlimited' => 'SNSアカウント無制限','accounts_unlimited_tooltip' => 'アカウントはいくつでも接続できます。同じSNSの複数アカウントも可能です。例えばInstagramを3つ。',- 'calendar' => 'カレンダー:月・週表示',- 'calendar_tooltip' => '1か月をひと目で把握:予定中、予約済み、公開済みの投稿がすべて見えます。詳しく見たいときは週表示に切り替え。',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => '投稿の作成と見直しを手伝うAIアシスタント。',- 'mcp' => 'MCP:Claude、ChatGPT、Grokから投稿',- 'mcp_tooltip' => 'Claude、ChatGPT、Grok をワークスペースに接続。投稿の作成と予約、指標の取得、成果の高い投稿の把握、自分のデータに基づく次のコンテンツの計画まで頼めます。',- 'repurpose' => 'Repurpose:1本の投稿を複数に展開',- 'repurpose_tooltip' => '元になるアカウントを選びます。そこに新しく投稿するたびに、他のSNSへ自動で再投稿されます。TryPostを開く必要はありません。',- 'analytics' => 'アナリティクス',- 'analytics_tooltip' => 'インプレッション、リーチ、いいね、コメントなどの指標を、投稿ごと・アカウントごとに1か所で確認できます。',- 'team' => 'メンバー数無制限',+ 'calendar' => 'コンテンツカレンダー',+ 'ideas' => 'コンテンツ企画',+ 'ideas_tooltip' => 'アイデアをメモして1か所にまとめ、いいものはいつでもコンテンツにできます。',+ 'calendar_tooltip' => '予約済み・公開済みの投稿を、月表示や週表示でまとめて確認できます。',+ 'ai' => 'AIライティングアシスタント',+ 'ai_tooltip' => 'AIで投稿を作成・書き直し、トーンも調整。あなたの言語で使えます。',+ 'mcp' => 'ClaudeやChatGPTからTryPostを操作',+ 'mcp_tooltip' => 'Claude、ChatGPT、その他のAIを接続。投稿の作成と予約、キューの補充、アイデアの整理、成長の確認を頼めます。',+ 'repurpose' => '動画の自動再投稿',+ 'repurpose_tooltip' => 'Instagramに動画を投稿しましたか?TryPostがTikTok、YouTube、Facebookなど他のSNSに自動で再投稿します。',+ 'analytics' => '高度な分析',+ 'analytics_tooltip' => 'フォロワー合計など全SNSをまとめて確認、またはSNS別・投稿別に絞り込み。再生数、リーチ、いいね、コメントなどで、何が効果的かがわかります。',+ 'team' => 'チームメンバー無制限','team_tooltip' => '追加料金なしで、チームに何人でも招待できます。各メンバーができることを設定し、公開前に投稿を承認できます。',],],diff --git a/lang/ja/common.php b/lang/ja/common.phpindex 64898a1b0..bc8586d71 100644--- a/lang/ja/common.php+++ b/lang/ja/common.php@@ -59,6 +59,7 @@ return ['clear' => 'クリア','close' => '閉じる','more' => 'その他',+ 'learn_more' => '詳細を見る','play' => '再生','loading' => '読み込み中...','loading_more' => 'さらに読み込み中...',diff --git a/lang/ja/mcp.php b/lang/ja/mcp.phpindex 55a589afa..7de350271 100644--- a/lang/ja/mcp.php+++ b/lang/ja/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'AI アシスタントを接続します。',- 'copy_step' => 'TryPostサーバーURLをコピー',- 'open_step' => 'AIアシスタントを開く',- 'copy' => 'URLをコピー',+ 'copy' => 'コピー','connect' => ':clientを接続',- 'step_add' => '下の名前・URL・設定をアプリに貼り付けてください。初回接続時はブラウザでログインが開きます。','name_label' => '名前','url_label' => 'サーバーURL','config_label' => '設定',- 'connected_title' => '接続済みアプリ',+ 'tabs' => [+ 'connected' => '接続済みアプリ',+ 'connect' => 'アプリを接続',+ ],+ 'connect_other' => '接続',+ 'other_hint' => 'MCP対応のあらゆるアプリ。',+ 'other_dialog_title' => 'TryPostを他のアプリに接続','connected_description' => 'サインインしたアシスタントです。不要な接続は切断できます。','connected_empty_title' => '接続済みのアプリはありません',- 'connected_empty' => '上の Claude、ChatGPT、または他のクライアントを使ってください。',+ 'connected_empty' => 'Claude、ChatGPTなどのアプリを接続すると、ここに表示されます。','disconnect' => '切断','disconnect_title' => 'アプリを切断','disconnect_confirm' => 'TryPostからアプリを切断します。再度MCPを使うには再接続が必要です。',@@ -24,9 +27,6 @@ return ['copied' => 'コピーしました','last_used' => '最終使用','never' => 'なし',- 'documentation_title' => 'ドキュメント',- 'documentation_description' => 'クライアント別のセットアップ、利用可能なツール、トラブルシューティング。',- 'view_docs' => 'ドキュメントを見る','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'その他のアプリ',- 'other_clients_description' => 'Cursor、VS Code、Claude Code、その他MCP対応アプリ。',- 'clients' => [- 'claude' => 'Settings → Connectors を開き、カスタムコネクタを追加して上のURLを貼り付けます。',- 'chatgpt' => 'Settings → Apps & Connectors を開き、カスタムコネクタを作成して上のURLを貼り付けます。',- 'cursor' => 'CursorでTryPostをリモートMCPサーバーとして追加します。',- 'cursor_name' => 'Cursor',- 'vscode' => '下の設定をVS CodeのMCP設定に貼り付けます。',- 'vscode_name' => 'VS Code',- 'claude_code' => '下の設定をClaude CodeのMCP設定に貼り付けます。',- 'claude_code_name' => 'Claude Code',- 'other' => 'mcpServers設定を読むクライアントならどれでも使えます。',- 'other_name' => 'その他',+ 'dialog' => [+ 'title' => 'TryPostを:clientに接続',+ 'description' => '1分ほどで完了します。接続するとこのページが自動で更新されます。',+ 'open' => ':clientを開く',+ 'steps' => [+ 'claude' => [+ 'paste' => 'コネクタのURL欄にURLを貼り付け',+ 'add' => '「追加」→「接続」をクリック',+ 'login' => 'TryPostにログインしてワークスペースを選択',+ ],+ 'chatgpt' => [+ 'developer' => 'ChatGPTの設定で開発者モードをオン',+ 'create' => '「TryPost」という名前でアプリを作成し、URLを貼り付け',+ 'login' => 'TryPostにログインしてワークスペースを選択',+ ],+ 'other' => [+ 'add' => 'アプリにカスタムMCPサーバーを追加',+ 'paste' => '名前とURL、または設定を貼り付け',+ 'login' => 'TryPostにログインしてワークスペースを選択',+ ],+ ],+ 'waiting' => 'AIの接続を待っています…',],+];diff --git a/lang/ja/settings.php b/lang/ja/settings.phpindex 243556fdd..fc0c97065 100644--- a/lang/ja/settings.php+++ b/lang/ja/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => '個人','workspace' => 'ワークスペース',- 'features' => '機能',- 'developers' => '開発者',- 'account' => 'アカウント',+ 'content' => 'コンテンツ',+ 'integrations' => '連携',],'items' => ['profile' => 'プロフィール',@@ -24,7 +23,7 @@ return ['signatures' => '署名','labels' => 'ラベル','webhooks' => 'ウェブフック',- 'api_keys' => 'API キー',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'お支払い',],diff --git a/lang/ja/welcome.php b/lang/ja/welcome.phpindex ba92aba79..58c151704 100644--- a/lang/ja/welcome.php+++ b/lang/ja/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'あなたについて','goals' => '目標','software' => '現在のツール',+ 'plan' => 'プラン',],'personas' => ['creator' => 'コンテンツクリエイター',@@ -44,4 +45,47 @@ return ['none' => 'まだ使っていない','other' => 'その他',],+ 'plan_title' => 'アカウントを有効にしましょう',+ 'plan_description' => 'チャンネルを連携して、今日最初の投稿を予約しましょう。',+ 'plan_first_month' => '初月の料金',+ 'plan_terms' => 'その後は:price/月。いつでも解約できます。',+ 'plan_per_month' => '毎月',+ 'plan_cancel_anytime' => 'いつでも解約できます。',+ 'mcp' => [+ 'title' => 'AIとの会話でSNSを運用',+ 'description' => 'お気に入りのAIで、TryPostの投稿を作成・予約・分析。',+ 'connect_with' => ':clientと接続',+ 'connect_ai' => 'AIを接続',+ 'pick_ai' => 'どこでTryPostを使いますか?',+ 'connect_other' => '他のアプリを接続',+ 'composer' => '何でも聞いてください',+ 'connected' => ':clientに接続しました',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'チャットで作成・予約',+ 'hint' => 'カルーセル、スレッド、動画',+ 'ask' => 'ボードの次のアイデアをカルーセルにして、火曜日の:timeにInstagramとLinkedInで予約して。',+ 'reply' => '完了。カルーセルをInstagramとLinkedInで予約しました。',+ ],+ 'analytics' => [+ 'title' => '成長を追いかける',+ 'hint' => 'すべてのアカウントを1つのレポートに',+ 'ask' => '今月はどうだった?フォロワーは増えた?',+ 'reply' => '今月はフォロワーが1,200人増えました。最も伸びたのはLinkedInです。',+ ],+ 'queue' => [+ 'title' => 'キューを埋める',+ 'hint' => '最適な投稿時間に',+ 'ask' => '完成した下書きを、次の空き枠にキューで入れて。',+ 'reply' => '完了。3件の下書きを、明日の空き枠にキューで入れました。',+ ],+ 'ideas' => [+ 'title' => 'アイデアを整理',+ 'hint' => 'ブレストからコンテンツ計画へ',+ 'ask' => '来週の投稿アイデアを8つ出して、ボードに保存して。',+ 'reply' => '8つのアイデアをボードに保存しました。すぐ投稿にできます。',+ ],+ ],+ 'skip' => '今はスキップ',+ ],];diff --git a/lang/ko/billing.php b/lang/ko/billing.phpindex b296f68c4..13652ad25 100644--- a/lang/ko/billing.php+++ b/lang/ko/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => ':plan 선택','upgrade' => ':plan(으)로 업그레이드','downgrade' => ':plan(으)로 다운그레이드',+ 'start_first_month' => ':price에 활성화','billed_yearly_total' => '연간 결제 · :price (2개월 무료)','socials_tagline' => '크리에이터와 소규모 브랜드에 적합.','workspaces_tagline' => '에이전시와 대규모 비즈니스에 적합.','everything_included' => '모두 포함','features' => ['networks_all' => '모든 소셜 네트워크 포함',- 'networks_all_tooltip' => '이 모든 네트워크에 게시할 수 있습니다.',+ 'networks_all_tooltip' => '한 곳에서 모두에 게시하세요.','accounts_unlimited' => '소셜 계정 무제한','accounts_unlimited_tooltip' => '원하는 만큼 계정을 연결할 수 있고, 같은 네트워크 여러 개도 가능합니다. 예를 들어 인스타그램 3개.',- 'calendar' => '캘린더: 월·주 보기',- 'calendar_tooltip' => '한 달을 한눈에: 계획 중, 예약됨, 이미 게시된 게시물을 모두 볼 수 있습니다. 자세히 보려면 주 보기로 전환하세요.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => '게시물 작성과 검토를 돕는 AI 어시스턴트.',- 'mcp' => 'MCP: Claude, ChatGPT, Grok에서 게시',- 'mcp_tooltip' => 'Claude, ChatGPT, Grok을 워크스페이스에 연결하세요. 게시물 작성과 예약, 지표 조회, 성과가 좋았던 게시물 파악, 내 데이터를 바탕으로 다음 콘텐츠 계획까지 맡길 수 있습니다.',- 'repurpose' => 'Repurpose: 게시물 하나를 여러 개로',- 'repurpose_tooltip' => '원본 계정을 선택하세요. 거기에 올리는 모든 새 게시물이 다른 네트워크에 자동으로 다시 게시됩니다. TryPost를 열 필요가 없어요.',- 'analytics' => '분석',- 'analytics_tooltip' => '노출, 도달, 좋아요, 댓글 같은 지표를 모든 게시물과 계정별로 한곳에서 확인하세요.',- 'team' => '멤버 수 무제한',+ 'calendar' => '콘텐츠 캘린더',+ 'ideas' => '콘텐츠 기획',+ 'ideas_tooltip' => '아이디어를 적어 두고 한곳에서 정리한 뒤, 좋은 아이디어는 언제든 콘텐츠로 만드세요.',+ 'calendar_tooltip' => '예약된 게시물과 게시된 게시물을 한곳에서 월별 또는 주별로 확인하세요.',+ 'ai' => 'AI 글쓰기 어시스턴트',+ 'ai_tooltip' => 'AI로 게시물을 쓰고, 다시 쓰고, 톤을 조정하세요. 내 언어로요.',+ 'mcp' => 'Claude나 ChatGPT에서 TryPost 사용',+ 'mcp_tooltip' => 'Claude, ChatGPT 또는 다른 AI를 연결하세요. 게시물 작성과 예약, 대기열 채우기, 아이디어 정리, 성장 확인을 요청할 수 있어요.',+ 'repurpose' => '동영상 자동 재게시',+ 'repurpose_tooltip' => 'Instagram에 동영상을 올렸나요? TryPost가 TikTok, YouTube, Facebook 등 다른 네트워크에 자동으로 재게시해요.',+ 'analytics' => '고급 분석',+ 'analytics_tooltip' => '총 팔로워 수처럼 모든 네트워크를 한눈에 보거나, 네트워크별·게시물별로 필터링하세요. 조회수, 도달, 좋아요, 댓글 등으로 무엇이 효과적인지 알 수 있어요.',+ 'team' => '팀원 무제한','team_tooltip' => '추가 비용 없이 팀에 원하는 만큼 초대하세요. 각자가 할 수 있는 일을 정하고 게시 전에 승인할 수 있습니다.',],],diff --git a/lang/ko/common.php b/lang/ko/common.phpindex f50f71e98..fb45e5ec2 100644--- a/lang/ko/common.php+++ b/lang/ko/common.php@@ -59,6 +59,7 @@ return ['clear' => '지우기','close' => '닫기','more' => '더보기',+ 'learn_more' => '자세히 알아보기','play' => '재생','loading' => '불러오는 중...','loading_more' => '더 불러오는 중...',diff --git a/lang/ko/mcp.php b/lang/ko/mcp.phpindex 06521710f..58ea81ff4 100644--- a/lang/ko/mcp.php+++ b/lang/ko/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'AI 어시스턴트를 연결하세요.',- 'copy_step' => 'TryPost 서버 URL 복사',- 'open_step' => 'AI 어시스턴트 열기',- 'copy' => 'URL 복사',+ 'copy' => '복사','connect' => ':client 연결',- 'step_add' => '아래 이름, URL 또는 설정을 앱에 붙여넣으세요. 처음 연결할 때 브라우저에서 로그인이 열립니다.','name_label' => '이름','url_label' => '서버 URL','config_label' => '설정',- 'connected_title' => '연결된 앱',+ 'tabs' => [+ 'connected' => '연결된 앱',+ 'connect' => '앱 연결',+ ],+ 'connect_other' => '연결',+ 'other_hint' => 'MCP를 지원하는 모든 앱.',+ 'other_dialog_title' => 'TryPost를 다른 앱에 연결','connected_description' => '로그인한 어시스턴트입니다. 더 이상 쓰지 않는 연결은 해제할 수 있습니다.','connected_empty_title' => '연결된 앱이 없습니다',- 'connected_empty' => '위의 Claude, ChatGPT 또는 다른 클라이언트를 사용하세요.',+ 'connected_empty' => 'Claude, ChatGPT 또는 다른 앱을 연결하면 여기에 표시돼요.','disconnect' => '연결 해제','disconnect_title' => '앱 연결 해제','disconnect_confirm' => 'TryPost에서 앱 로그인을 해제합니다. MCP를 다시 쓰려면 다시 연결해야 합니다.',@@ -24,9 +27,6 @@ return ['copied' => '복사됨','last_used' => '최근 사용','never' => '없음',- 'documentation_title' => '문서',- 'documentation_description' => '클라이언트별 설정 가이드, 사용 가능한 도구, 문제 해결.',- 'view_docs' => '문서 보기','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => '다른 앱',- 'other_clients_description' => 'Cursor, VS Code, Claude Code 및 MCP를 지원하는 모든 앱.',- 'clients' => [- 'claude' => 'Settings → Connectors를 열고 커스텀 커넥터를 추가한 뒤 위 URL을 붙여넣으세요.',- 'chatgpt' => 'Settings → Apps & Connectors를 열고 커스텀 커넥터를 만든 뒤 위 URL을 붙여넣으세요.',- 'cursor' => 'Cursor에서 TryPost를 원격 MCP 서버로 추가하세요.',- 'cursor_name' => 'Cursor',- 'vscode' => '아래 설정을 VS Code MCP 설정에 붙여넣으세요.',- 'vscode_name' => 'VS Code',- 'claude_code' => '아래 설정을 Claude Code MCP 설정에 붙여넣으세요.',- 'claude_code_name' => 'Claude Code',- 'other' => 'mcpServers 설정을 읽는 모든 클라이언트에서 동작합니다.',- 'other_name' => '기타',+ 'dialog' => [+ 'title' => 'TryPost를 :client에 연결',+ 'description' => '1분 정도 걸려요. 연결되면 이 페이지가 바로 업데이트돼요.',+ 'open' => ':client 열기',+ 'steps' => [+ 'claude' => [+ 'paste' => '커넥터의 URL 필드에 URL을 붙여넣기',+ 'add' => '추가를 누른 뒤 연결을 누르기',+ 'login' => 'TryPost에 로그인하고 워크스페이스 선택',+ ],+ 'chatgpt' => [+ 'developer' => 'ChatGPT 설정에서 개발자 모드 켜기',+ 'create' => 'TryPost라는 앱을 만들고 URL 붙여넣기',+ 'login' => 'TryPost에 로그인하고 워크스페이스 선택',+ ],+ 'other' => [+ 'add' => '앱에 사용자 지정 MCP 서버 추가',+ 'paste' => '이름과 URL 또는 설정을 붙여넣기',+ 'login' => 'TryPost에 로그인하고 워크스페이스 선택',+ ],+ ],+ 'waiting' => 'AI 연결을 기다리는 중…',],+];diff --git a/lang/ko/settings.php b/lang/ko/settings.phpindex 30bcc2ee1..556780bbd 100644--- a/lang/ko/settings.php+++ b/lang/ko/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => '개인','workspace' => '워크스페이스',- 'features' => '기능',- 'developers' => '개발자',- 'account' => '계정',+ 'content' => '콘텐츠',+ 'integrations' => '연동',],'items' => ['profile' => '프로필',@@ -24,7 +23,7 @@ return ['signatures' => '서명','labels' => '라벨','webhooks' => '웹훅',- 'api_keys' => 'API 키',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => '결제',],diff --git a/lang/ko/welcome.php b/lang/ko/welcome.phpindex 5e2fa8f77..ad3bb921f 100644--- a/lang/ko/welcome.php+++ b/lang/ko/welcome.php@@ -16,6 +16,7 @@ return ['persona' => '나에 대해','goals' => '목표','software' => '현재 도구',+ 'plan' => '요금제',],'personas' => ['creator' => '콘텐츠 크리에이터',@@ -44,4 +45,47 @@ return ['none' => '아직 사용하지 않아요','other' => '기타',],+ 'plan_title' => '계정을 활성화하세요',+ 'plan_description' => '채널을 연결하고 오늘 첫 게시물을 예약하세요.',+ 'plan_first_month' => '첫 달 요금',+ 'plan_terms' => '이후 :price/월. 언제든지 해지 가능.',+ 'plan_per_month' => '매월',+ 'plan_cancel_anytime' => '언제든지 해지 가능.',+ 'mcp' => [+ 'title' => 'AI와 대화하며 SNS를 관리하세요',+ 'description' => '좋아하는 AI로 TryPost 게시물을 만들고, 예약하고, 분석하세요.',+ 'connect_with' => ':client 연결',+ 'connect_ai' => 'AI 연결하기',+ 'pick_ai' => '어디에서 TryPost를 사용할까요?',+ 'connect_other' => '다른 앱 연결',+ 'composer' => '무엇이든 물어보세요',+ 'connected' => ':client 연결됨',+ 'benefits' => [+ 'schedule' => [+ 'title' => '채팅으로 만들고 예약',+ 'hint' => '캐러셀, 스레드, 동영상',+ 'ask' => '내 보드의 다음 아이디어로 캐러셀을 만들어 화요일 :time에 Instagram과 LinkedIn에 예약해 줘.',+ 'reply' => '완료했어요. 캐러셀을 Instagram과 LinkedIn에 예약했어요.',+ ],+ 'analytics' => [+ 'title' => '성장 추적',+ 'hint' => '모든 계정을 하나의 리포트로',+ 'ask' => '이번 달 어땠어? 팔로워가 늘었어?',+ 'reply' => '이번 달 팔로워가 1,200명 늘었어요. LinkedIn이 가장 빠르게 성장했어요.',+ ],+ 'queue' => [+ 'title' => '대기열 채우기',+ 'hint' => '가장 좋은 게시 시간에',+ 'ask' => '완성된 초안을 다음 빈 시간대 대기열에 넣어 줘.',+ 'reply' => '완료했어요. 초안 3개를 내일의 빈 시간대 대기열에 넣었어요.',+ ],+ 'ideas' => [+ 'title' => '아이디어 정리',+ 'hint' => '브레인스토밍에서 콘텐츠 계획으로',+ 'ask' => '다음 주 게시물 아이디어 8개를 주고 내 보드에 저장해 줘.',+ 'reply' => '아이디어 8개를 보드에 저장했어요. 바로 게시물로 만들 수 있어요.',+ ],+ ],+ 'skip' => '지금은 건너뛰기',+ ],];diff --git a/lang/nl/billing.php b/lang/nl/billing.phpindex a805ab90b..313c3ece6 100644--- a/lang/nl/billing.php+++ b/lang/nl/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => 'Kies :plan','upgrade' => 'Upgrade naar :plan','downgrade' => 'Downgrade naar :plan',+ 'start_first_month' => 'Activeer voor :price','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.','everything_included' => 'Alles inbegrepen','features' => ['networks_all' => 'Alle sociale netwerken inbegrepen',- 'networks_all_tooltip' => 'Je kunt op al deze netwerken posten.',- 'accounts_unlimited' => 'Onbeperkte social accounts',+ 'networks_all_tooltip' => 'Post op allemaal vanaf één plek.',+ 'accounts_unlimited' => 'Onbeperkt sociale accounts','accounts_unlimited_tooltip' => 'Koppel zoveel accounts als je wilt, ook meerdere van hetzelfde netwerk. Drie Instagrams, bijvoorbeeld.',- 'calendar' => 'Kalender: maand- en weekweergave',- 'calendar_tooltip' => 'Zie je hele maand in één oogopslag: wat gepland, ingepland en al gepubliceerd is. Schakel naar week als je detail nodig hebt.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Je AI-assistent voor het schrijven en nakijken van posts.',- 'mcp' => 'MCP: post via Claude, ChatGPT of Grok',- 'mcp_tooltip' => 'Koppel Claude, ChatGPT of Grok aan je workspace. Laat het posts maken en inplannen, statistieken ophalen, zien wat het beste werkte en op basis van je eigen data plannen wat hierna komt.',- 'repurpose' => 'Repurpose: maak van één post er veel',- 'repurpose_tooltip' => 'Kies een bronaccount. Elke nieuwe post die je daar plaatst, wordt automatisch op je andere netwerken geplaatst. Je hoeft TryPost niet te openen.',- 'analytics' => 'Analytics',- 'analytics_tooltip' => 'Krijg statistieken zoals impressies, bereik, likes en reacties voor elke post en elk account, alles op één plek.',- 'team' => 'Onbeperkt aantal leden',+ 'calendar' => 'Contentkalender',+ 'ideas' => 'Contentplanning',+ 'ideas_tooltip' => 'Noteer je ideeën, houd ze op één plek bij elkaar en maak van de beste content wanneer je wilt.',+ 'calendar_tooltip' => 'Zie al je geplande en gepubliceerde posts op één plek, per maand of per week.',+ 'ai' => 'AI-schrijfassistent',+ 'ai_tooltip' => 'Schrijf en herschrijf je posts met AI en pas de toon aan, in jouw taal.',+ 'mcp' => 'Gebruik TryPost vanuit Claude of ChatGPT',+ 'mcp_tooltip' => 'Koppel Claude, ChatGPT of een andere AI. Laat hem posts maken en plannen, je wachtrij vullen, ideeën ordenen en je groei tonen.',+ 'repurpose' => 'Automatisch video\'s herposten',+ 'repurpose_tooltip' => 'Een video op Instagram geplaatst? TryPost plaatst hem automatisch opnieuw op TikTok, YouTube, Facebook en je andere netwerken.',+ 'analytics' => 'Geavanceerde statistieken',+ 'analytics_tooltip' => 'Zie al je netwerken samen, zoals je totale volgers, of filter per netwerk en per post. Weergaven, bereik, likes, reacties en meer, zodat je weet wat werkt.',+ 'team' => 'Onbeperkt teamleden','team_tooltip' => 'Nodig zoveel mensen uit voor je team als je wilt, zonder extra kosten. Bepaal wat iedereen mag doen en keur posts goed voordat ze live gaan.',],],diff --git a/lang/nl/common.php b/lang/nl/common.phpindex 9dda2fd26..a45ac66c5 100644--- a/lang/nl/common.php+++ b/lang/nl/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Wissen','close' => 'Sluiten','more' => 'Meer',+ 'learn_more' => 'Meer informatie','play' => 'Afspelen','loading' => 'Laden...','loading_more' => 'Meer laden...',diff --git a/lang/nl/mcp.php b/lang/nl/mcp.phpindex 8300bd52e..574018a12 100644--- a/lang/nl/mcp.php+++ b/lang/nl/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Koppel AI-assistenten aan je workspace.',- 'copy_step' => 'Kopieer je TryPost-server-URL',- 'open_step' => 'Open je AI-assistent',- 'copy' => 'URL kopiëren',+ 'copy' => 'Kopiëren','connect' => 'Verbind :client',- 'step_add' => 'Plak de naam, URL of config hieronder in je app. Inloggen opent in de browser bij de eerste verbinding.','name_label' => 'Naam','url_label' => 'Server-URL','config_label' => 'Config',- 'connected_title' => 'Gekoppelde apps',+ 'tabs' => [+ 'connected' => 'Gekoppelde apps',+ 'connect' => 'App koppelen',+ ],+ 'connect_other' => 'Koppelen',+ 'other_hint' => 'Elke app die MCP ondersteunt.',+ 'other_dialog_title' => 'Koppel TryPost aan een andere app','connected_description' => 'Assistenten waarmee je bent ingelogd. Koppel apps los die je niet meer gebruikt.','connected_empty_title' => 'Geen gekoppelde apps',- 'connected_empty' => 'Gebruik Claude, ChatGPT of een andere client hierboven.',+ 'connected_empty' => 'Koppel Claude, ChatGPT of een andere app om die hier te zien.','disconnect' => 'Ontkoppelen','disconnect_title' => 'App ontkoppelen','disconnect_confirm' => 'Dit logt de app uit bij TryPost. Hij moet opnieuw verbinden om MCP weer te gebruiken.',@@ -24,9 +27,6 @@ return ['copied' => 'Gekopieerd','last_used' => 'Laatst gebruikt','never' => 'Nooit',- 'documentation_title' => 'Documentatie',- 'documentation_description' => 'Handleidingen per client, beschikbare tools en probleemoplossing.',- 'view_docs' => 'Documentatie bekijken','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Andere apps',- 'other_clients_description' => 'Cursor, VS Code, Claude Code en alles wat MCP spreekt.',- 'clients' => [- 'claude' => 'Open Settings → Connectors, voeg een aangepaste connector toe en plak de URL hierboven.',- 'chatgpt' => 'Open Settings → Apps & Connectors, maak een aangepaste connector aan en plak de URL hierboven.',- 'cursor' => 'Voeg TryPost toe als remote MCP-server in Cursor.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Plak de config hieronder in de MCP-instellingen van VS Code.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Plak de config hieronder in de MCP-instellingen van Claude Code.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Werkt met elke client die een mcpServers-config leest.',- 'other_name' => 'Overig',+ 'dialog' => [+ 'title' => 'Koppel TryPost aan :client',+ 'description' => 'Duurt ongeveer een minuut. Deze pagina werkt bij zodra je gekoppeld bent.',+ 'open' => ':client openen',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Plak de URL in het URL-veld van de connector',+ 'add' => 'Klik op Toevoegen en daarna op Verbinden',+ 'login' => 'Log in bij TryPost en kies de workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Zet de ontwikkelaarsmodus aan in de instellingen van ChatGPT',+ 'create' => 'Maak een app met de naam TryPost en plak de URL',+ 'login' => 'Log in bij TryPost en kies de workspace',+ ],+ 'other' => [+ 'add' => 'Voeg een eigen MCP-server toe in je app',+ 'paste' => 'Plak de naam en URL, of de configuratie',+ 'login' => 'Log in bij TryPost en kies de workspace',+ ],+ ],+ 'waiting' => 'Wachten tot je AI verbindt…',],+];diff --git a/lang/nl/settings.php b/lang/nl/settings.phpindex ba95e810e..f47dae560 100644--- a/lang/nl/settings.php+++ b/lang/nl/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'Persoonlijk','workspace' => 'Workspace',- 'features' => 'Functies',- 'developers' => 'Ontwikkelaars',- 'account' => 'Account',+ 'content' => 'Content',+ 'integrations' => 'Integraties',],'items' => ['profile' => 'Profiel',@@ -24,7 +23,7 @@ return ['signatures' => 'Handtekeningen','labels' => 'Labels','webhooks' => 'Webhooks',- 'api_keys' => 'API-sleutels',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Facturatie',],diff --git a/lang/nl/welcome.php b/lang/nl/welcome.phpindex 963c5bd75..27d36ac7a 100644--- a/lang/nl/welcome.php+++ b/lang/nl/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'Over jou','goals' => 'Je doelen','software' => 'Huidige tool',+ 'plan' => 'Abonnement',],'personas' => ['creator' => 'Contentmaker',@@ -44,4 +45,47 @@ return ['none' => 'Ik gebruik er nog geen','other' => 'Andere',],+ 'plan_title' => 'Activeer je account',+ 'plan_description' => 'Koppel je kanalen en plan vandaag je eerste post.',+ 'plan_first_month' => 'voor de eerste maand',+ 'plan_terms' => 'Daarna :price/maand. Altijd opzegbaar.',+ 'plan_per_month' => 'per maand',+ 'plan_cancel_anytime' => 'Altijd opzegbaar.',+ 'mcp' => [+ 'title' => 'Beheer je socials via chat',+ 'description' => 'Maak, plan en analyseer posts in TryPost met je favoriete AI.',+ 'connect_with' => 'Koppelen met :client',+ 'connect_ai' => 'Koppel je AI',+ 'pick_ai' => 'Waar wil je TryPost gebruiken?',+ 'connect_other' => 'Andere app koppelen',+ 'composer' => 'Vraag maar raak',+ 'connected' => ':client is gekoppeld',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Maak en plan vanuit de chat',+ 'hint' => 'Carrousels, threads en video’s',+ 'ask' => 'Pak het volgende idee van mijn bord, maak er een carrousel van en plan hem voor dinsdag om :time op Instagram en LinkedIn.',+ 'reply' => 'Klaar. Je carrousel staat gepland op Instagram en LinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'Volg je groei',+ 'hint' => 'Al je accounts in één rapport',+ 'ask' => 'Hoe was mijn maand? Heb ik volgers gewonnen?',+ 'reply' => 'Je hebt deze maand 1,2k volgers gewonnen. LinkedIn groeide het snelst.',+ ],+ 'queue' => [+ 'title' => 'Vul je wachtrij',+ 'hint' => 'Op je beste tijden',+ 'ask' => 'Pak mijn klare concepten en zet ze in mijn wachtrij, op mijn volgende vrije tijden.',+ 'reply' => 'Klaar. Je 3 concepten staan in je wachtrij, op de vrije tijden van morgen.',+ ],+ 'ideas' => [+ 'title' => 'Organiseer je ideeën',+ 'hint' => 'Van brainstorm naar contentplan',+ 'ask' => 'Geef me 8 postideeën voor volgende week en zet ze op mijn bord.',+ 'reply' => 'Ik heb 8 ideeën op je bord gezet, klaar om posts te worden.',+ ],+ ],+ 'skip' => 'Nu overslaan',+ ],];diff --git a/lang/pl/billing.php b/lang/pl/billing.phpindex fa2eccaa4..d9dc0a9d0 100644--- a/lang/pl/billing.php+++ b/lang/pl/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => 'Wybierz :plan','upgrade' => 'Przejdź na :plan','downgrade' => 'Zmień na :plan',+ 'start_first_month' => 'Aktywuj za :price','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.','everything_included' => 'Wszystko w cenie','features' => ['networks_all' => 'Wszystkie sieci społecznościowe w cenie',- 'networks_all_tooltip' => 'Możesz publikować we wszystkich tych sieciach.',+ 'networks_all_tooltip' => 'Publikuj we wszystkich z jednego miejsca.','accounts_unlimited' => 'Nielimitowane konta społecznościowe','accounts_unlimited_tooltip' => 'Podłącz tyle kont, ile chcesz, także kilka z tej samej sieci. Na przykład trzy Instagramy.',- 'calendar' => 'Kalendarz: widok miesiąca i tygodnia',- 'calendar_tooltip' => 'Zobacz cały miesiąc na jednym ekranie: co zaplanowane, ustawione w kolejce i już opublikowane. Przełącz na tydzień, gdy potrzebujesz szczegółów.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Twój asystent AI do pisania i poprawiania postów.',- 'mcp' => 'MCP: publikuj z Claude, ChatGPT lub Grok',- 'mcp_tooltip' => 'Podłącz Claude, ChatGPT lub Grok do swojego workspace. Poproś o tworzenie i planowanie postów, pobieranie metryk, wskazanie najlepszych postów i planowanie kolejnych treści na podstawie Twoich danych.',- 'repurpose' => 'Repurpose: z jednego posta zrób wiele',- 'repurpose_tooltip' => 'Wybierz konto źródłowe. Każdy nowy post, który tam opublikujesz, jest automatycznie publikowany w Twoich pozostałych sieciach. Nie musisz otwierać TryPost.',- 'analytics' => 'Analytics',- 'analytics_tooltip' => 'Zbieraj metryki, takie jak wyświetlenia, zasięg, polubienia i komentarze, dla każdego posta i każdego konta, wszystko w jednym miejscu.',- 'team' => 'Nielimitowani członkowie',+ 'calendar' => 'Kalendarz treści',+ 'ideas' => 'Planowanie treści',+ 'ideas_tooltip' => 'Zapisuj pomysły, porządkuj je w jednym miejscu i zamieniaj najlepsze w treści, kiedy chcesz.',+ 'calendar_tooltip' => 'Zobacz wszystkie zaplanowane i opublikowane posty w jednym miejscu, w widoku miesiąca lub tygodnia.',+ 'ai' => 'Asystent AI do pisania',+ 'ai_tooltip' => 'Pisz, przepisuj i dopasowuj ton postów z AI, w swoim języku.',+ 'mcp' => 'Korzystaj z TryPost w Claude lub ChatGPT',+ 'mcp_tooltip' => 'Połącz Claude, ChatGPT lub inną AI. Poproś o tworzenie i planowanie postów, wypełnianie kolejki, porządkowanie pomysłów i pokazanie wzrostu.',+ 'repurpose' => 'Automatyczne ponowne publikowanie filmów',+ 'repurpose_tooltip' => 'Opublikowałeś film na Instagramie? TryPost automatycznie publikuje go ponownie na TikToku, YouTube, Facebooku i w innych twoich sieciach.',+ 'analytics' => 'Zaawansowana analityka',+ 'analytics_tooltip' => 'Zobacz wszystkie sieci razem, np. łączną liczbę obserwujących, albo filtruj po sieci i poście. Wyświetlenia, zasięg, polubienia, komentarze i więcej – wiesz, co działa.',+ 'team' => 'Nielimitowani członkowie zespołu','team_tooltip' => 'Zaproś do zespołu tyle osób, ile chcesz, bez dodatkowych opłat. Ustal, co każda może robić, i zatwierdzaj posty przed publikacją.',],],diff --git a/lang/pl/common.php b/lang/pl/common.phpindex 9e21544d0..ae935b5de 100644--- a/lang/pl/common.php+++ b/lang/pl/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Wyczyść','close' => 'Zamknij','more' => 'Więcej',+ 'learn_more' => 'Dowiedz się więcej','play' => 'Odtwórz','loading' => 'Wczytywanie...','loading_more' => 'Wczytywanie kolejnych...',diff --git a/lang/pl/mcp.php b/lang/pl/mcp.phpindex 7b30f1786..f785f0858 100644--- a/lang/pl/mcp.php+++ b/lang/pl/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Połącz asystentów AI z workspace\'em.',- 'copy_step' => 'Skopiuj URL serwera TryPost',- 'open_step' => 'Otwórz asystenta AI',- 'copy' => 'Kopiuj URL',+ 'copy' => 'Kopiuj','connect' => 'Połącz :client',- 'step_add' => 'Wklej nazwę, URL lub config poniżej do swojej aplikacji. Logowanie otworzy się w przeglądarce przy pierwszym połączeniu.','name_label' => 'Nazwa','url_label' => 'URL serwera','config_label' => 'Config',- 'connected_title' => 'Połączone aplikacje',+ 'tabs' => [+ 'connected' => 'Połączone aplikacje',+ 'connect' => 'Połącz aplikację',+ ],+ 'connect_other' => 'Połącz',+ 'other_hint' => 'Każda aplikacja obsługująca MCP.',+ 'other_dialog_title' => 'Połącz TryPost z inną aplikacją','connected_description' => 'Asystenci, z którymi się zalogowałeś. Możesz rozłączyć te, których już nie używasz.','connected_empty_title' => 'Brak połączonych aplikacji',- 'connected_empty' => 'Użyj Claude, ChatGPT lub innego klienta powyżej.',+ 'connected_empty' => 'Połącz Claude, ChatGPT lub inną aplikację, aby zobaczyć ją tutaj.','disconnect' => 'Rozłącz','disconnect_title' => 'Rozłącz aplikację','disconnect_confirm' => 'To wyloguje aplikację z TryPost. Musi połączyć się ponownie, zanim znów użyje MCP.',@@ -24,9 +27,6 @@ return ['copied' => 'Skopiowano','last_used' => 'Ostatnie użycie','never' => 'Nigdy',- 'documentation_title' => 'Dokumentacja',- 'documentation_description' => 'Przewodniki per klient, dostępne tools i rozwiązywanie problemów.',- 'view_docs' => 'Zobacz dokumentację','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Inne aplikacje',- 'other_clients_description' => 'Cursor, VS Code, Claude Code i wszystko, co mówi MCP.',- 'clients' => [- 'claude' => 'Otwórz Settings → Connectors, dodaj niestandardowy connector, a następnie wklej powyższy URL.',- 'chatgpt' => 'Otwórz Settings → Apps & Connectors, utwórz niestandardowy connector, a następnie wklej powyższy URL.',- 'cursor' => 'Dodaj TryPost jako zdalny serwer MCP w Cursorze.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Wklej poniższą konfigurację w ustawieniach MCP VS Code.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Wklej poniższą konfigurację w ustawieniach MCP Claude Code.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Działa z każdym klientem, który czyta config mcpServers.',- 'other_name' => 'Inne',+ 'dialog' => [+ 'title' => 'Połącz TryPost z :client',+ 'description' => 'Zajmuje około minuty. Ta strona odświeży się, gdy tylko się połączysz.',+ 'open' => 'Otwórz :client',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Wklej adres URL w pole URL konektora',+ 'add' => 'Kliknij Dodaj, a potem Połącz',+ 'login' => 'Zaloguj się do TryPost i wybierz workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Włącz tryb programisty w ustawieniach ChatGPT',+ 'create' => 'Utwórz aplikację o nazwie TryPost i wklej adres URL',+ 'login' => 'Zaloguj się do TryPost i wybierz workspace',+ ],+ 'other' => [+ 'add' => 'Dodaj własny serwer MCP w swojej aplikacji',+ 'paste' => 'Wklej nazwę i adres URL albo konfigurację',+ 'login' => 'Zaloguj się do TryPost i wybierz workspace',+ ],+ ],+ 'waiting' => 'Czekamy na połączenie Twojej AI…',],+];diff --git a/lang/pl/settings.php b/lang/pl/settings.phpindex be7ad0827..3a3172013 100644--- a/lang/pl/settings.php+++ b/lang/pl/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'Osobiste','workspace' => 'Przestrzeń robocza',- 'features' => 'Funkcje',- 'developers' => 'Deweloperzy',- 'account' => 'Konto',+ 'content' => 'Treści',+ 'integrations' => 'Integracje',],'items' => ['profile' => 'Profil',@@ -24,7 +23,7 @@ return ['signatures' => 'Sygnatury','labels' => 'Etykiety','webhooks' => 'Webhooki',- 'api_keys' => 'Klucze API',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Rozliczenia',],diff --git a/lang/pl/welcome.php b/lang/pl/welcome.phpindex 939f6c2ca..b9f339c47 100644--- a/lang/pl/welcome.php+++ b/lang/pl/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'O Tobie','goals' => 'Twoje cele','software' => 'Obecne narzędzie',+ 'plan' => 'Plan',],'personas' => ['creator' => 'Twórca treści',@@ -44,4 +45,47 @@ return ['none' => 'Jeszcze żadnego nie używam','other' => 'Inne',],+ 'plan_title' => 'Aktywuj swoje konto',+ 'plan_description' => 'Połącz kanały i zaplanuj pierwszy post już dziś.',+ 'plan_first_month' => 'za pierwszy miesiąc',+ 'plan_terms' => 'Potem :price/mies. Anuluj w dowolnym momencie.',+ 'plan_per_month' => 'miesięcznie',+ 'plan_cancel_anytime' => 'Anuluj w dowolnym momencie.',+ 'mcp' => [+ 'title' => 'Zarządzaj social mediami w czacie',+ 'description' => 'Twórz, planuj i analizuj posty w TryPost z ulubioną AI.',+ 'connect_with' => 'Połącz z :client',+ 'connect_ai' => 'Połącz swoją AI',+ 'pick_ai' => 'Gdzie chcesz używać TryPost?',+ 'connect_other' => 'Połącz inną aplikację',+ 'composer' => 'Zapytaj o cokolwiek',+ 'connected' => ':client jest połączony',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Twórz i planuj z czatu',+ 'hint' => 'Karuzele, wątki i filmy',+ 'ask' => 'Weź następny pomysł z mojej tablicy, zrób z niego karuzelę i zaplanuj na wtorek na :time na Instagramie i LinkedIn.',+ 'reply' => 'Gotowe. Twoja karuzela jest zaplanowana na Instagramie i LinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'Śledź swój wzrost',+ 'hint' => 'Wszystkie konta w jednym raporcie',+ 'ask' => 'Jak minął mój miesiąc? Zyskałem obserwujących?',+ 'reply' => 'W tym miesiącu zyskałeś 1,2 tys. obserwujących. Najszybciej rósł LinkedIn.',+ ],+ 'queue' => [+ 'title' => 'Wypełnij kolejkę',+ 'hint' => 'W Twoich najlepszych godzinach',+ 'ask' => 'Weź moje gotowe szkice i dodaj je do kolejki, na najbliższe wolne terminy.',+ 'reply' => 'Gotowe. Twoje 3 szkice są w kolejce, w najbliższych wolnych terminach jutro.',+ ],+ 'ideas' => [+ 'title' => 'Uporządkuj pomysły',+ 'hint' => 'Od burzy mózgów do planu treści',+ 'ask' => 'Daj mi 8 pomysłów na posty na przyszły tydzień i zapisz je na mojej tablicy.',+ 'reply' => 'Zapisałem 8 pomysłów na twojej tablicy, gotowych do zamiany w posty.',+ ],+ ],+ 'skip' => 'Pomiń na razie',+ ],];diff --git a/lang/pt-BR/billing.php b/lang/pt-BR/billing.phpindex c3a28d9e6..d40a2ec82 100644--- a/lang/pt-BR/billing.php+++ b/lang/pt-BR/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => 'Escolher :plan','upgrade' => 'Fazer upgrade para :plan','downgrade' => 'Fazer downgrade para :plan',+ 'start_first_month' => 'Ativar por :price','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.','everything_included' => 'Tudo incluído','features' => [- 'networks_all' => 'Todas as redes sociais inclusas',- 'networks_all_tooltip' => 'Você pode publicar em todas estas redes.',- 'accounts_unlimited' => 'Redes sociais ilimitadas',+ 'networks_all' => 'Todas as redes sociais incluídas',+ 'networks_all_tooltip' => 'Publique em todas elas de um só lugar.',+ 'accounts_unlimited' => 'Contas sociais ilimitadas','accounts_unlimited_tooltip' => 'Conecte quantas contas quiser, inclusive várias da mesma rede. Três Instagrams, por exemplo.',- 'calendar' => 'Calendário mensal e semanal',- 'calendar_tooltip' => 'Veja o mês inteiro de uma vez: o que está planejado, agendado e já publicado. Mude para a semana quando precisar de detalhe.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Seu assistente de IA para escrever e revisar posts.',- 'mcp' => 'MCP: poste pelo Claude, ChatGPT ou Grok',- 'mcp_tooltip' => 'Conecte o Claude, ChatGPT ou Grok ao seu workspace. Peça para criar e agendar posts, puxar métricas, ver o que performou melhor e planejar o próximo conteúdo com base nos seus dados.',- 'repurpose' => 'Repurpose: transforme um post em vários',- 'repurpose_tooltip' => 'Escolha uma conta de origem. Cada post novo que você publicar nela é republicado automaticamente nas suas outras redes. Você não precisa abrir o TryPost.',- 'analytics' => 'Analytics',- 'analytics_tooltip' => 'Obtenha métricas como impressões, alcance, likes e comentários de cada post e de cada conta, tudo num só lugar.',- 'team' => 'Membros ilimitados',+ 'calendar' => 'Calendário de conteúdo',+ 'ideas' => 'Planejamento de conteúdo',+ 'ideas_tooltip' => 'Anote suas ideias, organize tudo num só lugar e transforme as melhores em conteúdo quando quiser.',+ 'calendar_tooltip' => 'Veja todos os posts agendados e publicados num só lugar, por mês ou por semana.',+ 'ai' => 'Assistente de IA para escrever',+ 'ai_tooltip' => 'Escreva, reescreva e ajuste o tom dos seus posts com a IA, no seu idioma.',+ 'mcp' => 'Use o TryPost pelo Claude ou ChatGPT',+ 'mcp_tooltip' => 'Conecte o Claude, o ChatGPT ou outra IA. Peça para criar e agendar posts, encher a fila, organizar ideias e mostrar seu crescimento.',+ 'repurpose' => 'Republicação automática de vídeos',+ 'repurpose_tooltip' => 'Postou um vídeo no Instagram? O TryPost republica ele automaticamente no TikTok, no YouTube, no Facebook e nas suas outras redes.',+ 'analytics' => 'Análises avançadas',+ 'analytics_tooltip' => 'Veja todas as suas redes juntas, como o total de seguidores, ou filtre por rede e por post. Views, alcance, curtidas, comentários e mais, para saber o que dá resultado.',+ 'team' => 'Membros de equipe ilimitados','team_tooltip' => 'Convide quantas pessoas quiser para o seu time, sem custo extra. Defina o que cada uma pode fazer e aprove os posts antes de publicar.',],],diff --git a/lang/pt-BR/common.php b/lang/pt-BR/common.phpindex 6e1442b53..ca29ee7e0 100644--- a/lang/pt-BR/common.php+++ b/lang/pt-BR/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Limpar','close' => 'Fechar','more' => 'Mais',+ 'learn_more' => 'Saiba mais','play' => 'Reproduzir','loading' => 'Carregando...','loading_more' => 'Carregando mais...',diff --git a/lang/pt-BR/mcp.php b/lang/pt-BR/mcp.phpindex ffe74221f..63b1ac227 100644--- a/lang/pt-BR/mcp.php+++ b/lang/pt-BR/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Conecte assistentes de IA ao seu workspace.',- 'copy_step' => 'Copie a URL do servidor TryPost',- 'open_step' => 'Abra seu assistente de IA',- 'copy' => 'Copiar URL',+ 'copy' => 'Copiar','connect' => 'Conectar :client',- 'step_add' => 'Cole o nome, a URL ou o config abaixo no seu app. O login abre no navegador na primeira conexão.','name_label' => 'Nome','url_label' => 'URL do servidor','config_label' => 'Config',- 'connected_title' => 'Apps conectados',+ 'tabs' => [+ 'connected' => 'Apps conectados',+ 'connect' => 'Conectar app',+ ],+ 'connect_other' => 'Conectar',+ 'other_hint' => 'Qualquer app compatível com MCP.',+ 'other_dialog_title' => 'Conecte o TryPost a outro app','connected_description' => 'Assistentes que você conectou. Desconecte os que não quiser mais usar.','connected_empty_title' => 'Nenhum app conectado',- 'connected_empty' => 'Use Claude, ChatGPT ou outro cliente acima.',+ 'connected_empty' => 'Conecte o Claude, o ChatGPT ou outro app para vê-lo aqui.','disconnect' => 'Desconectar','disconnect_title' => 'Desconectar app','disconnect_confirm' => 'Isso desconecta o app do TryPost. Ele precisa reconectar pra usar o MCP de novo.',@@ -24,9 +27,6 @@ return ['copied' => 'Copiado','last_used' => 'Último uso','never' => 'Nunca',- 'documentation_title' => 'Documentação',- 'documentation_description' => 'Guias por cliente, tools disponíveis e solução de problemas.',- 'view_docs' => 'Ver documentação','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Outros apps',- 'other_clients_description' => 'Cursor, VS Code, Claude Code e qualquer app que fale MCP.',- 'clients' => [- 'claude' => 'Abra Settings → Connectors, adicione um connector customizado e cole a URL acima.',- 'chatgpt' => 'Abra Settings → Apps & Connectors, crie um connector customizado e cole a URL acima.',- 'cursor' => 'Adicione o TryPost como servidor MCP remoto no Cursor.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Cole o config abaixo nas configurações MCP do VS Code.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Cole o config abaixo nas configurações MCP do Claude Code.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Funciona com qualquer cliente que leia um config mcpServers.',- 'other_name' => 'Outros',+ 'dialog' => [+ 'title' => 'Conecte o TryPost ao :client',+ 'description' => 'Leva cerca de um minuto. Esta página atualiza assim que você conectar.',+ 'open' => 'Abrir o :client',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Cole a URL no campo de URL do conector',+ 'add' => 'Clique em Adicionar e depois em Conectar',+ 'login' => 'Faça login no TryPost e escolha o workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Ative o Modo desenvolvedor nas configurações do ChatGPT',+ 'create' => 'Crie um app com o nome TryPost e cole a URL',+ 'login' => 'Faça login no TryPost e escolha o workspace',+ ],+ 'other' => [+ 'add' => 'Adicione um servidor MCP personalizado no seu app',+ 'paste' => 'Cole o nome e a URL, ou a configuração',+ 'login' => 'Faça login no TryPost e escolha o workspace',+ ],+ ],+ 'waiting' => 'Aguardando sua IA conectar…',],+];diff --git a/lang/pt-BR/settings.php b/lang/pt-BR/settings.phpindex dac698015..43d0fa9dd 100644--- a/lang/pt-BR/settings.php+++ b/lang/pt-BR/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'Pessoal','workspace' => 'Workspace',- 'features' => 'Recursos',- 'developers' => 'Desenvolvedores',- 'account' => 'Conta',+ 'content' => 'Conteúdo',+ 'integrations' => 'Integrações',],'items' => ['profile' => 'Perfil',@@ -24,7 +23,7 @@ return ['signatures' => 'Assinaturas','labels' => 'Etiquetas','webhooks' => 'Webhooks',- 'api_keys' => 'API Keys',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Cobrança',],diff --git a/lang/pt-BR/welcome.php b/lang/pt-BR/welcome.phpindex 00c63e9dd..1a514fc5b 100644--- a/lang/pt-BR/welcome.php+++ b/lang/pt-BR/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'Sobre você','goals' => 'Seus objetivos','software' => 'Ferramenta atual',+ 'plan' => 'Plano',],'personas' => ['creator' => 'Criador de conteúdo',@@ -44,4 +45,47 @@ return ['none' => 'Ainda não uso nenhuma','other' => 'Outra',],+ 'plan_title' => 'Ative sua conta',+ 'plan_description' => 'Conecte suas redes e agende seu primeiro post hoje.',+ 'plan_first_month' => 'no primeiro mês',+ 'plan_terms' => 'Depois, :price/mês. Cancele quando quiser.',+ 'plan_per_month' => 'por mês',+ 'plan_cancel_anytime' => 'Cancele quando quiser.',+ 'mcp' => [+ 'title' => 'Gerencie suas redes pelo chat',+ 'description' => 'Crie, agende e analise posts no TryPost usando a sua IA favorita.',+ 'connect_with' => 'Conectar com :client',+ 'connect_ai' => 'Conectar sua IA',+ 'pick_ai' => 'Onde você quer usar o TryPost?',+ 'connect_other' => 'Conectar outro app',+ 'composer' => 'Pergunte qualquer coisa',+ 'connected' => ':client está conectado',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Crie e agende pelo chat',+ 'hint' => 'Carrosséis, threads e vídeos',+ 'ask' => 'Pegue a próxima ideia do meu quadro, transforme num carrossel e agende para terça às :time no Instagram e no LinkedIn.',+ 'reply' => 'Pronto. O carrossel está agendado no Instagram e no LinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'Acompanhe seu crescimento',+ 'hint' => 'Todas as contas em um relatório',+ 'ask' => 'Como foi meu mês? Ganhei seguidores?',+ 'reply' => 'Você ganhou 1,2 mil seguidores no mês. O LinkedIn foi o que mais cresceu.',+ ],+ 'queue' => [+ 'title' => 'Encha a fila',+ 'hint' => 'Nos seus melhores horários',+ 'ask' => 'Pegue meus rascunhos prontos e coloque na fila, nos meus próximos horários livres.',+ 'reply' => 'Feito. Coloquei seus 3 rascunhos na fila, nos próximos horários livres de amanhã.',+ ],+ 'ideas' => [+ 'title' => 'Organize suas ideias',+ 'hint' => 'Do brainstorm para a pauta',+ 'ask' => 'Me dê 8 ideias de posts para a próxima semana e salve no meu quadro.',+ 'reply' => 'Salvei 8 ideias no seu quadro, prontas para virar post.',+ ],+ ],+ 'skip' => 'Pular por agora',+ ],];diff --git a/lang/ru/billing.php b/lang/ru/billing.phpindex dc5d50faa..e71de5e79 100644--- a/lang/ru/billing.php+++ b/lang/ru/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => 'Выбрать :plan','upgrade' => 'Перейти на :plan','downgrade' => 'Понизить до :plan',+ 'start_first_month' => 'Активировать за :price','billed_yearly_total' => 'Оплата раз в год · :price (2 месяца бесплатно)','socials_tagline' => 'Для авторов и небольших брендов.','workspaces_tagline' => 'Для агентств и крупного бизнеса.','everything_included' => 'Всё включено','features' => ['networks_all' => 'Все соцсети включены',- 'networks_all_tooltip' => 'Вы можете публиковать во всех этих соцсетях.',- 'accounts_unlimited' => 'Безлимитные аккаунты',+ 'networks_all_tooltip' => 'Публикуйте во всех из одного места.',+ 'accounts_unlimited' => 'Неограниченное число аккаунтов','accounts_unlimited_tooltip' => 'Подключайте сколько угодно аккаунтов, даже несколько из одной соцсети. Например, три Instagram.',- 'calendar' => 'Календарь: месяц и неделя',- 'calendar_tooltip' => 'Весь месяц на одном экране: что запланировано, поставлено в очередь и уже опубликовано. Переключайтесь на неделю, когда нужны детали.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Ваш ИИ-ассистент для написания и редактирования постов.',- 'mcp' => 'MCP: публикуйте из Claude, ChatGPT или Grok',- 'mcp_tooltip' => 'Подключите Claude, ChatGPT или Grok к своему workspace. Попросите создавать и планировать посты, получать метрики, находить самые успешные посты и планировать следующий контент на основе ваших данных.',- 'repurpose' => 'Repurpose: из одного поста сделайте много',- 'repurpose_tooltip' => 'Выберите исходный аккаунт. Каждый новый пост, который вы там публикуете, автоматически публикуется в остальных ваших сетях. Открывать TryPost не нужно.',- 'analytics' => 'Аналитика',- 'analytics_tooltip' => 'Получайте метрики вроде показов, охвата, лайков и комментариев по каждому посту и аккаунту, всё в одном месте.',- 'team' => 'Неограниченное число участников',+ 'calendar' => 'Контент-календарь',+ 'ideas' => 'Планирование контента',+ 'ideas_tooltip' => 'Записывайте идеи, держите их в одном месте и превращайте лучшие в контент, когда захотите.',+ 'calendar_tooltip' => 'Все запланированные и опубликованные посты в одном месте — по месяцам или неделям.',+ 'ai' => 'ИИ-помощник для текстов',+ 'ai_tooltip' => 'Пишите и переписывайте посты с ИИ, меняйте тон — на своём языке.',+ 'mcp' => 'TryPost прямо в Claude или ChatGPT',+ 'mcp_tooltip' => 'Подключите Claude, ChatGPT или другой ИИ. Просите создавать и планировать посты, заполнять очередь, упорядочивать идеи и показывать рост.',+ 'repurpose' => 'Автоматическая републикация видео',+ 'repurpose_tooltip' => 'Опубликовали видео в Instagram? TryPost автоматически републикует его в TikTok, YouTube, Facebook и других ваших соцсетях.',+ 'analytics' => 'Расширенная аналитика',+ 'analytics_tooltip' => 'Смотрите все соцсети вместе, например общее число подписчиков, или фильтруйте по сети и посту. Просмотры, охват, лайки, комментарии и другое — чтобы знать, что работает.',+ 'team' => 'Неограниченная команда','team_tooltip' => 'Приглашайте в команду сколько угодно людей без доплаты. Настройте, что может делать каждый, и утверждайте посты перед публикацией.',],],diff --git a/lang/ru/common.php b/lang/ru/common.phpindex 14b1eb1fc..dd79da718 100644--- a/lang/ru/common.php+++ b/lang/ru/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Очистить','close' => 'Закрыть','more' => 'Еще',+ 'learn_more' => 'Подробнее','play' => 'Воспроизвести','loading' => 'Загрузка...','loading_more' => 'Загрузка...',diff --git a/lang/ru/mcp.php b/lang/ru/mcp.phpindex c71838c76..dd5246f22 100644--- a/lang/ru/mcp.php+++ b/lang/ru/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Подключите ИИ-ассистентов к пространству.',- 'copy_step' => 'Скопируйте URL сервера TryPost',- 'open_step' => 'Откройте ИИ-ассистента',- 'copy' => 'Копировать URL',+ 'copy' => 'Копировать','connect' => 'Подключить :client',- 'step_add' => 'Вставьте имя, URL или config ниже в своё приложение. Вход откроется в браузере при первом подключении.','name_label' => 'Имя','url_label' => 'URL сервера','config_label' => 'Config',- 'connected_title' => 'Подключённые приложения',+ 'tabs' => [+ 'connected' => 'Подключённые приложения',+ 'connect' => 'Подключить приложение',+ ],+ 'connect_other' => 'Подключить',+ 'other_hint' => 'Любое приложение с поддержкой MCP.',+ 'other_dialog_title' => 'Подключите TryPost к другому приложению','connected_description' => 'Ассистенты, в которые вы вошли. Отключите те, которыми больше не пользуетесь.','connected_empty_title' => 'Нет подключённых приложений',- 'connected_empty' => 'Используйте Claude, ChatGPT или другого клиента выше.',+ 'connected_empty' => 'Подключите Claude, ChatGPT или другое приложение, чтобы увидеть его здесь.','disconnect' => 'Отключить','disconnect_title' => 'Отключить приложение','disconnect_confirm' => 'Это выйдет из аккаунта TryPost в приложении. Нужно будет подключиться снова, чтобы снова использовать MCP.',@@ -24,9 +27,6 @@ return ['copied' => 'Скопировано','last_used' => 'Последнее использование','never' => 'Никогда',- 'documentation_title' => 'Документация',- 'documentation_description' => 'Гайды по клиентам, доступные tools и решение проблем.',- 'view_docs' => 'Открыть документацию','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Другие приложения',- 'other_clients_description' => 'Cursor, VS Code, Claude Code и всё, что говорит на MCP.',- 'clients' => [- 'claude' => 'Откройте Settings → Connectors, добавьте свой connector и вставьте URL выше.',- 'chatgpt' => 'Откройте Settings → Apps & Connectors, создайте свой connector и вставьте URL выше.',- 'cursor' => 'Добавьте TryPost как удалённый MCP-сервер в Cursor.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Вставьте конфиг ниже в настройки MCP VS Code.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Вставьте конфиг ниже в настройки MCP Claude Code.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Работает с любым клиентом, который читает config mcpServers.',- 'other_name' => 'Другие',+ 'dialog' => [+ 'title' => 'Подключите TryPost к :client',+ 'description' => 'Это займёт около минуты. Страница обновится, как только вы подключитесь.',+ 'open' => 'Открыть :client',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Вставьте URL в поле URL коннектора',+ 'add' => 'Нажмите «Добавить», затем «Подключить»',+ 'login' => 'Войдите в TryPost и выберите workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Включите режим разработчика в настройках ChatGPT',+ 'create' => 'Создайте приложение TryPost и вставьте URL',+ 'login' => 'Войдите в TryPost и выберите workspace',+ ],+ 'other' => [+ 'add' => 'Добавьте свой MCP-сервер в приложении',+ 'paste' => 'Вставьте имя и URL или конфигурацию',+ 'login' => 'Войдите в TryPost и выберите workspace',+ ],+ ],+ 'waiting' => 'Ждём подключения вашего ИИ…',],+];diff --git a/lang/ru/settings.php b/lang/ru/settings.phpindex 3503aca68..51ac2de6b 100644--- a/lang/ru/settings.php+++ b/lang/ru/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'Личное','workspace' => 'Рабочее пространство',- 'features' => 'Возможности',- 'developers' => 'Разработчикам',- 'account' => 'Аккаунт',+ 'content' => 'Контент',+ 'integrations' => 'Интеграции',],'items' => ['profile' => 'Профиль',@@ -24,7 +23,7 @@ return ['signatures' => 'Подписи','labels' => 'Метки','webhooks' => 'Вебхуки',- 'api_keys' => 'API-ключи',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Оплата',],diff --git a/lang/ru/welcome.php b/lang/ru/welcome.phpindex c2fe811ab..c7fa6a185 100644--- a/lang/ru/welcome.php+++ b/lang/ru/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'О вас','goals' => 'Ваши цели','software' => 'Текущий сервис',+ 'plan' => 'Тариф',],'personas' => ['creator' => 'Автор контента',@@ -44,4 +45,47 @@ return ['none' => 'Пока ничем не пользуюсь','other' => 'Другой',],+ 'plan_title' => 'Активируйте аккаунт',+ 'plan_description' => 'Подключите каналы и запланируйте первый пост уже сегодня.',+ 'plan_first_month' => 'за первый месяц',+ 'plan_terms' => 'Затем :price/мес. Отмена в любой момент.',+ 'plan_per_month' => 'в месяц',+ 'plan_cancel_anytime' => 'Отмена в любой момент.',+ 'mcp' => [+ 'title' => 'Ведите соцсети прямо в чате',+ 'description' => 'Создавайте, планируйте и анализируйте посты в TryPost с любимым ИИ.',+ 'connect_with' => 'Подключить :client',+ 'connect_ai' => 'Подключить ИИ',+ 'pick_ai' => 'Где вы хотите использовать TryPost?',+ 'connect_other' => 'Подключить другое приложение',+ 'composer' => 'Спросите что угодно',+ 'connected' => ':client подключён',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Создавайте и планируйте в чате',+ 'hint' => 'Карусели, треды и видео',+ 'ask' => 'Возьми следующую идею с доски, сделай карусель и запланируй на вторник на :time в Instagram и LinkedIn.',+ 'reply' => 'Готово. Карусель запланирована в Instagram и LinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'Следите за ростом',+ 'hint' => 'Все аккаунты в одном отчёте',+ 'ask' => 'Как прошёл мой месяц? Я набрал подписчиков?',+ 'reply' => 'За месяц вы получили 1,2 тыс. подписчиков. Быстрее всего рос LinkedIn.',+ ],+ 'queue' => [+ 'title' => 'Заполните очередь',+ 'hint' => 'В ваше лучшее время',+ 'ask' => 'Возьми мои готовые черновики и поставь их в очередь на ближайшие свободные слоты.',+ 'reply' => 'Готово. Твои 3 черновика в очереди, на ближайших свободных слотах завтра.',+ ],+ 'ideas' => [+ 'title' => 'Упорядочьте идеи',+ 'hint' => 'От мозгового штурма к контент-плану',+ 'ask' => 'Предложи 8 идей постов на следующую неделю и сохрани их на мою доску.',+ 'reply' => 'Я сохранил 8 идей на твоей доске — они готовы стать постами.',+ ],+ ],+ 'skip' => 'Пропустить',+ ],];diff --git a/lang/tr/billing.php b/lang/tr/billing.phpindex d9c620f3c..74b3c4e94 100644--- a/lang/tr/billing.php+++ b/lang/tr/billing.php@@ -14,6 +14,7 @@ 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'],],@@ -34,26 +35,29 @@ return ['select' => ':plan seç','upgrade' => ':plan’e yükselt','downgrade' => ':plan’e düşür',+ 'start_first_month' => ':price ile etkinleştir','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.','everything_included' => 'Her şey dahil','features' => ['networks_all' => 'Tüm sosyal ağlar dahil',- 'networks_all_tooltip' => 'Bu ağların hepsinde paylaşım yapabilirsiniz.',- 'accounts_unlimited' => 'Sınırsız sosyal hesaplar',+ 'networks_all_tooltip' => 'Hepsinde tek bir yerden paylaş.',+ 'accounts_unlimited' => 'Sınırsız sosyal hesap','accounts_unlimited_tooltip' => 'İstediğiniz kadar hesap bağlayın, aynı ağdan birkaç tane bile. Örneğin üç Instagram.',- 'calendar' => 'Takvim: aylık ve haftalık görünüm',- 'calendar_tooltip' => 'Tüm ayınızı tek bakışta görün: planlanan, zamanlanan ve yayımlanmış olanlar. Ayrıntı gerektiğinde hafta görünümüne geçin.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Gönderi yazmak ve gözden geçirmek için yapay zeka asistanınız.',- 'mcp' => 'MCP: Claude, ChatGPT veya Grok ile paylaşın',- 'mcp_tooltip' => 'Claude, ChatGPT veya Grok\'u workspace\'inize bağlayın. Gönderi oluşturup planlamasını, metrikleri çekmesini, en iyi performans göstereni bulmasını ve kendi verilerinizle sonraki içeriği planlamasını isteyin.',- 'repurpose' => 'Repurpose: bir gönderiyi çoğaltın',- 'repurpose_tooltip' => 'Bir kaynak hesap seçin. Orada yayımladığınız her yeni gönderi, diğer ağlarınızda otomatik olarak yeniden yayımlanır. TryPost\'u açmanız gerekmez.',- 'analytics' => 'Analytics',- 'analytics_tooltip' => 'Gösterim, erişim, beğeni ve yorum gibi metrikleri her gönderi ve her hesap için tek bir yerde alın.',- 'team' => 'Sınırsız üye',+ 'calendar' => 'İçerik takvimi',+ 'ideas' => 'İçerik planlama',+ 'ideas_tooltip' => 'Fikirlerini not al, hepsini tek yerde düzenle ve en iyilerini istediğin zaman içeriğe dönüştür.',+ 'calendar_tooltip' => 'Planlanan ve yayınlanan tüm gönderilerini tek yerde, aylık ya da haftalık gör.',+ 'ai' => 'Yapay zekâ yazma asistanı',+ 'ai_tooltip' => 'Gönderilerini yapay zekâyla yaz, yeniden yaz ve tonunu ayarla; kendi dilinde.',+ 'mcp' => 'TryPost’u Claude veya ChatGPT’den kullan',+ 'mcp_tooltip' => 'Claude, ChatGPT veya başka bir yapay zekâ bağla. Gönderi oluşturmasını ve planlamasını, sıranı doldurmasını, fikirleri düzenlemesini ve büyümeni göstermesini iste.',+ 'repurpose' => 'Otomatik video yeniden paylaşımı',+ 'repurpose_tooltip' => 'Instagram’da bir video mu paylaştın? TryPost onu otomatik olarak TikTok, YouTube, Facebook ve diğer ağlarında yeniden paylaşır.',+ 'analytics' => 'Gelişmiş analiz',+ 'analytics_tooltip' => 'Tüm ağlarını birlikte gör, örneğin toplam takipçini, ya da ağa ve gönderiye göre filtrele. Görüntülenme, erişim, beğeni, yorum ve dahası; neyin işe yaradığını bil.',+ 'team' => 'Sınırsız ekip üyesi','team_tooltip' => 'Ekibinize istediğiniz kadar kişi davet edin, ek ücret yok. Her kişinin ne yapabileceğini belirleyin ve gönderileri yayından önce onaylayın.',],],diff --git a/lang/tr/common.php b/lang/tr/common.phpindex 65c82b421..98a6d2c75 100644--- a/lang/tr/common.php+++ b/lang/tr/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Temizle','close' => 'Kapat','more' => 'Daha fazla',+ 'learn_more' => 'Daha fazla bilgi','play' => 'Oynat','loading' => 'Yükleniyor...','loading_more' => 'Daha fazla yükleniyor...',diff --git a/lang/tr/mcp.php b/lang/tr/mcp.phpindex b64274197..95eb07bdf 100644--- a/lang/tr/mcp.php+++ b/lang/tr/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Yapay zekâ asistanlarını bağlayın.',- 'copy_step' => 'TryPost sunucu URL’ini kopyala',- 'open_step' => 'AI asistanını aç',- 'copy' => 'URL’yi kopyala',+ 'copy' => 'Kopyala','connect' => ':client bağla',- 'step_add' => 'Adı, URL’yi veya config’i aşağıdaki gibi uygulamanıza yapıştırın. İlk bağlantıda oturum açma tarayıcıda açılır.','name_label' => 'Ad','url_label' => 'Sunucu URL’si','config_label' => 'Config',- 'connected_title' => 'Bağlı uygulamalar',+ 'tabs' => [+ 'connected' => 'Bağlı uygulamalar',+ 'connect' => 'Uygulama bağla',+ ],+ 'connect_other' => 'Bağla',+ 'other_hint' => 'MCP destekleyen her uygulama.',+ 'other_dialog_title' => 'TryPost\'u başka bir uygulamaya bağla','connected_description' => 'Giriş yaptığınız asistanlar. Artık kullanmadıklarınızın bağlantısını kesebilirsiniz.','connected_empty_title' => 'Bağlı uygulama yok',- 'connected_empty' => 'Yukarıdan Claude, ChatGPT veya başka bir istemci kullanın.',+ 'connected_empty' => 'Burada görmek için Claude, ChatGPT veya başka bir uygulama bağla.','disconnect' => 'Bağlantıyı kes','disconnect_title' => 'Uygulama bağlantısını kes','disconnect_confirm' => 'Bu, uygulamayı TryPost’tan çıkarır. MCP’yi yeniden kullanmak için tekrar bağlanması gerekir.',@@ -24,9 +27,6 @@ return ['copied' => 'Kopyalandı','last_used' => 'Son kullanım','never' => 'Hiç',- 'documentation_title' => 'Dokümantasyon',- 'documentation_description' => 'İstemci kurulum rehberleri, kullanılabilir tools ve sorun giderme.',- 'view_docs' => 'Dokümantasyonu görüntüle','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Diğer uygulamalar',- 'other_clients_description' => 'Cursor, VS Code, Claude Code ve MCP konuşan diğer her şey.',- 'clients' => [- 'claude' => 'Settings → Connectors’ı aç, özel bir connector ekle ve yukarıdaki URL’yi yapıştır.',- 'chatgpt' => 'Settings → Apps & Connectors’ı aç, özel bir connector oluştur ve yukarıdaki URL’yi yapıştır.',- 'cursor' => 'Cursor’da TryPost’u uzak MCP sunucusu olarak ekleyin.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Aşağıdaki yapılandırmayı VS Code\'un MCP ayarlarına yapıştırın.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Aşağıdaki yapılandırmayı Claude Code\'un MCP ayarlarına yapıştırın.',- 'claude_code_name' => 'Claude Code',- 'other' => 'mcpServers config okuyan her istemciyle çalışır.',- 'other_name' => 'Diğer',+ 'dialog' => [+ 'title' => ':client ile TryPost’u bağla',+ 'description' => 'Yaklaşık bir dakika sürer. Bağlandığınız anda bu sayfa güncellenir.',+ 'open' => ':client uygulamasını aç',+ 'steps' => [+ 'claude' => [+ 'paste' => 'URL’yi bağlayıcının URL alanına yapıştır',+ 'add' => 'Ekle’ye, ardından Bağlan’a tıkla',+ 'login' => 'TryPost’a giriş yap ve workspace’i seç',+ ],+ 'chatgpt' => [+ 'developer' => 'ChatGPT ayarlarında Geliştirici modunu aç',+ 'create' => 'TryPost adlı bir uygulama oluştur ve URL’yi yapıştır',+ 'login' => 'TryPost’a giriş yap ve workspace’i seç',+ ],+ 'other' => [+ 'add' => 'Uygulamana özel bir MCP sunucusu ekle',+ 'paste' => 'Adı ve URL’yi ya da yapılandırmayı yapıştır',+ 'login' => 'TryPost’a giriş yap ve workspace’i seç',+ ],+ ],+ 'waiting' => 'Yapay zekânın bağlanması bekleniyor…',],+];diff --git a/lang/tr/settings.php b/lang/tr/settings.phpindex 954f4c705..97f3c7c3d 100644--- a/lang/tr/settings.php+++ b/lang/tr/settings.php@@ -11,9 +11,8 @@ return ['groups' => ['personal' => 'Kişisel','workspace' => 'Çalışma Alanı',- 'features' => 'Özellikler',- 'developers' => 'Geliştiriciler',- 'account' => 'Hesap',+ 'content' => 'İçerik',+ 'integrations' => 'Entegrasyonlar',],'items' => ['profile' => 'Profil',@@ -26,7 +25,7 @@ return ['signatures' => 'İmzalar','labels' => 'Etiketler','webhooks' => 'Webhooklar',- 'api_keys' => 'API Anahtarları',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Faturalandırma',],diff --git a/lang/tr/welcome.php b/lang/tr/welcome.phpindex fc36b4504..968bcbcef 100644--- a/lang/tr/welcome.php+++ b/lang/tr/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'Senin hakkında','goals' => 'Hedeflerin','software' => 'Mevcut araç',+ 'plan' => 'Plan',],'personas' => ['creator' => 'İçerik üreticisi',@@ -44,4 +45,47 @@ return ['none' => 'Henüz bir araç kullanmıyorum','other' => 'Diğer',],+ 'plan_title' => 'Hesabını etkinleştir',+ 'plan_description' => 'Kanallarını bağla ve ilk gönderini bugün planla.',+ 'plan_first_month' => 'ilk ay için',+ 'plan_terms' => 'Sonra :price/ay. İstediğin zaman iptal et.',+ 'plan_per_month' => 'aylık',+ 'plan_cancel_anytime' => 'İstediğin zaman iptal et.',+ 'mcp' => [+ 'title' => 'Sosyal medyanı sohbetle yönet',+ 'description' => 'TryPost’ta gönderilerini favori yapay zekânla oluştur, planla ve analiz et.',+ 'connect_with' => ':client ile bağlan',+ 'connect_ai' => 'Yapay zekânı bağla',+ 'pick_ai' => 'TryPost’u nerede kullanmak istersin?',+ 'connect_other' => 'Başka uygulama bağla',+ 'composer' => 'Bir şey sor',+ 'connected' => ':client bağlandı',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Sohbetten oluştur ve planla',+ 'hint' => 'Karuseller, gönderi dizileri ve videolar',+ 'ask' => 'Panomdaki sıradaki fikri al, karusele dönüştür ve salı :time için Instagram ile LinkedIn’de planla.',+ 'reply' => 'Tamam. Karuselin Instagram ve LinkedIn’de planlandı.',+ ],+ 'analytics' => [+ 'title' => 'Büyümeni takip et',+ 'hint' => 'Tüm hesapların tek raporda',+ 'ask' => 'Ayım nasıl geçti? Takipçi kazandım mı?',+ 'reply' => 'Bu ay 1,2 bin takipçi kazandın. En hızlı LinkedIn büyüdü.',+ ],+ 'queue' => [+ 'title' => 'Sıranı doldur',+ 'hint' => 'En iyi paylaşım saatlerinde',+ 'ask' => 'Hazır taslaklarımı al ve bir sonraki boş saatlerime sıraya ekle.',+ 'reply' => 'Tamam. 3 taslağın sırada, yarının bir sonraki boş saatlerinde.',+ ],+ 'ideas' => [+ 'title' => 'Fikirlerini düzenle',+ 'hint' => 'Beyin fırtınasından içerik planına',+ 'ask' => 'Gelecek hafta için 8 gönderi fikri ver ve panoma kaydet.',+ 'reply' => '8 fikri panona kaydettim, gönderiye dönüşmeye hazır.',+ ],+ ],+ 'skip' => 'Şimdilik atla',+ ],];diff --git a/lang/uk/billing.php b/lang/uk/billing.phpindex 91c2b81f9..c08f1b033 100644--- a/lang/uk/billing.php+++ b/lang/uk/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => 'Обрати :plan','upgrade' => 'Перейти на :plan','downgrade' => 'Понизити до :plan',+ 'start_first_month' => 'Активувати за :price','billed_yearly_total' => 'Оплата раз на рік · :price (2 місяці безкоштовно)','socials_tagline' => 'Для авторів і невеликих брендів.','workspaces_tagline' => 'Для агентств і великого бізнесу.','everything_included' => 'Усе включено','features' => ['networks_all' => 'Усі соцмережі включено',- 'networks_all_tooltip' => 'Ви можете публікувати в усіх цих соцмережах.',- 'accounts_unlimited' => 'Необмежені акаунти',+ 'networks_all_tooltip' => 'Публікуйте в усіх з одного місця.',+ 'accounts_unlimited' => 'Необмежена кількість акаунтів','accounts_unlimited_tooltip' => 'Підключайте скільки завгодно акаунтів, навіть кілька з однієї соцмережі. Наприклад, три Instagram.',- 'calendar' => 'Календар: місяць і тиждень',- 'calendar_tooltip' => 'Весь місяць на одному екрані: що заплановано, поставлено в чергу та вже опубліковано. Перемикайтеся на тиждень, коли потрібні деталі.',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => 'Ваш ШІ-асистент для написання й редагування постів.',- 'mcp' => 'MCP: публікуйте з Claude, ChatGPT або Grok',- 'mcp_tooltip' => 'Підключіть Claude, ChatGPT або Grok до свого workspace. Попросіть створювати й планувати пости, отримувати метрики, знаходити найуспішніші пости та планувати наступний контент на основі ваших даних.',- 'repurpose' => 'Repurpose: з одного поста зробіть багато',- 'repurpose_tooltip' => 'Оберіть вихідний акаунт. Кожен новий пост, який ви там публікуєте, автоматично публікується в інших ваших мережах. Відкривати TryPost не потрібно.',- 'analytics' => 'Аналітика',- 'analytics_tooltip' => 'Отримуйте метрики, як покази, охоплення, лайки та коментарі, за кожним постом і акаунтом, усе в одному місці.',- 'team' => 'Необмежена кількість учасників',+ 'calendar' => 'Контент-календар',+ 'ideas' => 'Планування контенту',+ 'ideas_tooltip' => 'Записуйте ідеї, тримайте їх в одному місці й перетворюйте найкращі на контент, коли захочете.',+ 'calendar_tooltip' => 'Усі заплановані й опубліковані дописи в одному місці — за місяцями чи тижнями.',+ 'ai' => 'ШІ-помічник для текстів',+ 'ai_tooltip' => 'Пишіть і переписуйте дописи з ШІ, змінюйте тон — своєю мовою.',+ 'mcp' => 'TryPost просто в Claude або ChatGPT',+ 'mcp_tooltip' => 'Підключіть Claude, ChatGPT або інший ШІ. Просіть створювати й планувати дописи, заповнювати чергу, впорядковувати ідеї та показувати зростання.',+ 'repurpose' => 'Автоматична повторна публікація відео',+ 'repurpose_tooltip' => 'Опублікували відео в Instagram? TryPost автоматично повторно опублікує його в TikTok, YouTube, Facebook та інших ваших соцмережах.',+ 'analytics' => 'Розширена аналітика',+ 'analytics_tooltip' => 'Дивіться всі соцмережі разом, наприклад загальну кількість підписників, або фільтруйте за мережею й дописом. Перегляди, охоплення, вподобання, коментарі та інше — щоб знати, що працює.',+ 'team' => 'Необмежена команда','team_tooltip' => 'Запрошуйте в команду скільки завгодно людей без доплати. Налаштуйте, що може робити кожен, і затверджуйте пости перед публікацією.',],],diff --git a/lang/uk/common.php b/lang/uk/common.phpindex c5d6d262b..3cd0d7df9 100644--- a/lang/uk/common.php+++ b/lang/uk/common.php@@ -59,6 +59,7 @@ return ['clear' => 'Очистити','close' => 'Закрити','more' => 'Ще',+ 'learn_more' => 'Докладніше','play' => 'Відтворити','loading' => 'Завантаження...','loading_more' => 'Завантаження...',diff --git a/lang/uk/mcp.php b/lang/uk/mcp.phpindex 9100b001f..79303c9ca 100644--- a/lang/uk/mcp.php+++ b/lang/uk/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => 'Підключіть ШІ-асистентів до простору.',- 'copy_step' => 'Скопіюйте URL сервера TryPost',- 'open_step' => 'Відкрийте свого ІІ-асистента',- 'copy' => 'Скопіювати URL',+ 'copy' => 'Копіювати','connect' => 'Підключити :client',- 'step_add' => 'Вставте назву, URL або config нижче у свій застосунок. Вхід відкриється в браузері під час першого підключення.','name_label' => 'Назва','url_label' => 'URL сервера','config_label' => 'Config',- 'connected_title' => 'Підключені застосунки',+ 'tabs' => [+ 'connected' => 'Підключені застосунки',+ 'connect' => 'Підключити застосунок',+ ],+ 'connect_other' => 'Підключити',+ 'other_hint' => 'Будь-який застосунок із підтримкою MCP.',+ 'other_dialog_title' => 'Підключіть TryPost до іншого застосунку','connected_description' => 'Асистенти, у які ви увійшли. Від’єднайте ті, якими більше не користуєтесь.','connected_empty_title' => 'Немає підключених застосунків',- 'connected_empty' => 'Скористайтеся Claude, ChatGPT або іншим клієнтом вище.',+ 'connected_empty' => 'Підключіть Claude, ChatGPT або інший застосунок, щоб побачити його тут.','disconnect' => 'Від’єднати','disconnect_title' => 'Від’єднати застосунок','disconnect_confirm' => 'Це вийде з TryPost у застосунку. Потрібно буде підключитися знову, щоб знову використовувати MCP.',@@ -24,9 +27,6 @@ return ['copied' => 'Скопійовано','last_used' => 'Востаннє використано','never' => 'Ніколи',- 'documentation_title' => 'Документація',- 'documentation_description' => 'Гайди клієнтів, доступні tools і усунення несправностей.',- 'view_docs' => 'Відкрити документацію','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => 'Інші застосунки',- 'other_clients_description' => 'Cursor, VS Code, Claude Code і все, що підтримує MCP.',- 'clients' => [- 'claude' => 'Відкрийте Settings → Connectors, додайте власний connector і вставте URL вище.',- 'chatgpt' => 'Відкрийте Settings → Apps & Connectors, створіть власний connector і вставте URL вище.',- 'cursor' => 'Додайте TryPost як віддалений MCP-сервер у Cursor.',- 'cursor_name' => 'Cursor',- 'vscode' => 'Вставте config нижче в налаштування MCP VS Code.',- 'vscode_name' => 'VS Code',- 'claude_code' => 'Вставте config нижче в налаштування MCP Claude Code.',- 'claude_code_name' => 'Claude Code',- 'other' => 'Працює з будь-яким клієнтом, що читає config mcpServers.',- 'other_name' => 'Інше',+ 'dialog' => [+ 'title' => 'Підключіть TryPost до :client',+ 'description' => 'Це займе близько хвилини. Сторінка оновиться, щойно ви підключитеся.',+ 'open' => 'Відкрити :client',+ 'steps' => [+ 'claude' => [+ 'paste' => 'Вставте URL у поле URL конектора',+ 'add' => 'Натисніть «Додати», потім «Підключити»',+ 'login' => 'Увійдіть у TryPost і виберіть workspace',+ ],+ 'chatgpt' => [+ 'developer' => 'Увімкніть режим розробника в налаштуваннях ChatGPT',+ 'create' => 'Створіть застосунок TryPost і вставте URL',+ 'login' => 'Увійдіть у TryPost і виберіть workspace',+ ],+ 'other' => [+ 'add' => 'Додайте власний MCP-сервер у застосунку',+ 'paste' => 'Вставте назву й URL або конфігурацію',+ 'login' => 'Увійдіть у TryPost і виберіть workspace',+ ],+ ],+ 'waiting' => 'Чекаємо на підключення вашого ШІ…',],+];diff --git a/lang/uk/settings.php b/lang/uk/settings.phpindex c95fceb16..152181459 100644--- a/lang/uk/settings.php+++ b/lang/uk/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => 'Особисте','workspace' => 'Робочий простір',- 'features' => 'Функції',- 'developers' => 'Розробникам',- 'account' => 'Обліковий запис',+ 'content' => 'Контент',+ 'integrations' => 'Інтеграції',],'items' => ['profile' => 'Профіль',@@ -24,7 +23,7 @@ return ['signatures' => 'Підписи','labels' => 'Мітки','webhooks' => 'Вебхуки',- 'api_keys' => 'API-ключі',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => 'Оплата',],diff --git a/lang/uk/welcome.php b/lang/uk/welcome.phpindex 0762dc8d7..946dd661b 100644--- a/lang/uk/welcome.php+++ b/lang/uk/welcome.php@@ -16,6 +16,7 @@ return ['persona' => 'Про вас','goals' => 'Ваші цілі','software' => 'Поточний сервіс',+ 'plan' => 'Тариф',],'personas' => ['creator' => 'Автор контенту',@@ -44,4 +45,47 @@ return ['none' => 'Поки нічим не користуюся','other' => 'Інший',],+ 'plan_title' => 'Активуйте акаунт',+ 'plan_description' => 'Підключіть канали та заплануйте перший пост уже сьогодні.',+ 'plan_first_month' => 'за перший місяць',+ 'plan_terms' => 'Потім :price/міс. Скасування будь-коли.',+ 'plan_per_month' => 'на місяць',+ 'plan_cancel_anytime' => 'Скасування будь-коли.',+ 'mcp' => [+ 'title' => 'Ведіть соцмережі просто в чаті',+ 'description' => 'Створюйте, плануйте й аналізуйте дописи в TryPost з улюбленим ШІ.',+ 'connect_with' => 'Підключити :client',+ 'connect_ai' => 'Підключити ШІ',+ 'pick_ai' => 'Де ви хочете використовувати TryPost?',+ 'connect_other' => 'Підключити інший застосунок',+ 'composer' => 'Запитайте будь-що',+ 'connected' => ':client підключено',+ 'benefits' => [+ 'schedule' => [+ 'title' => 'Створюйте й плануйте в чаті',+ 'hint' => 'Каруселі, треди й відео',+ 'ask' => 'Візьми наступну ідею з дошки, зроби карусель і заплануй на вівторок на :time в Instagram і LinkedIn.',+ 'reply' => 'Готово. Карусель заплановано в Instagram і LinkedIn.',+ ],+ 'analytics' => [+ 'title' => 'Стежте за зростанням',+ 'hint' => 'Усі акаунти в одному звіті',+ 'ask' => 'Як минув мій місяць? Я набрав підписників?',+ 'reply' => 'За місяць ви отримали 1,2 тис. підписників. Найшвидше зростав LinkedIn.',+ ],+ 'queue' => [+ 'title' => 'Заповніть чергу',+ 'hint' => 'У ваш найкращий час',+ 'ask' => 'Візьми мої готові чернетки й додай їх у чергу на найближчі вільні слоти.',+ 'reply' => 'Готово. Твої 3 чернетки в черзі, на найближчих вільних слотах завтра.',+ ],+ 'ideas' => [+ 'title' => 'Упорядкуйте ідеї',+ 'hint' => 'Від мозкового штурму до контент-плану',+ 'ask' => 'Запропонуй 8 ідей дописів на наступний тиждень і збережи їх на мою дошку.',+ 'reply' => 'Я зберіг 8 ідей на твоїй дошці — вони готові стати дописами.',+ ],+ ],+ 'skip' => 'Пропустити',+ ],];diff --git a/lang/zh/billing.php b/lang/zh/billing.phpindex 0c5531ab7..0c9e8620f 100644--- a/lang/zh/billing.php+++ b/lang/zh/billing.php@@ -12,6 +12,7 @@ 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'],],@@ -32,26 +33,29 @@ return ['select' => '选择 :plan','upgrade' => '升级到 :plan','downgrade' => '降级到 :plan',+ 'start_first_month' => '以 :price 激活','billed_yearly_total' => '按年计费 · :price(免两个月)','socials_tagline' => '适合创作者和小品牌。','workspaces_tagline' => '适合代理商和大型业务。','everything_included' => '全部包含','features' => [- 'networks_all' => '包含所有社交网络',- 'networks_all_tooltip' => '你可以在所有这些平台上发布。',- 'accounts_unlimited' => '社交账号不限',+ 'networks_all' => '包含所有社交平台',+ 'networks_all_tooltip' => '在一个地方发布到所有平台。',+ 'accounts_unlimited' => '不限社交账号数量','accounts_unlimited_tooltip' => '想连接多少账号都可以,同一平台的多个账号也行。比如三个 Instagram。',- 'calendar' => '日历:月、周视图',- 'calendar_tooltip' => '一眼看清整个月:哪些在计划中、已排期、已发布。需要细节时切换到周视图。',- 'ai' => 'TryPost Copilot',- 'ai_tooltip' => '帮你撰写和检查帖子的 AI 助手。',- 'mcp' => 'MCP:用 Claude、ChatGPT 或 Grok 发布',- 'mcp_tooltip' => '把 Claude、ChatGPT 或 Grok 连接到你的工作区。让它创建和排期帖子、拉取数据、找出表现最好的内容,并根据你的数据规划下一步。',- 'repurpose' => 'Repurpose:一条内容变成多条',- 'repurpose_tooltip' => '选择一个来源账号。你在那里发布的每条新帖子都会自动转发到你的其他平台。不需要打开 TryPost。',- 'analytics' => '数据分析',- 'analytics_tooltip' => '获取每条帖子、每个账号的曝光、触达、点赞、评论等数据,全部集中在一处。',- 'team' => '成员人数不限',+ 'calendar' => '内容日历',+ 'ideas' => '内容规划',+ 'ideas_tooltip' => '随手记下点子,集中整理,好点子随时变成内容。',+ 'calendar_tooltip' => '在一个地方按月或按周查看所有已排期和已发布的帖子。',+ 'ai' => 'AI 写作助手',+ 'ai_tooltip' => '用 AI 撰写、改写帖子并调整语气,支持你的语言。',+ 'mcp' => '在 Claude 或 ChatGPT 中使用 TryPost',+ 'mcp_tooltip' => '连接 Claude、ChatGPT 或其他 AI。让它创建和排期帖子、填充队列、整理点子,并展示你的增长。',+ 'repurpose' => '视频自动转发',+ 'repurpose_tooltip' => '在 Instagram 发了视频?TryPost 会自动把它转发到 TikTok、YouTube、Facebook 和你的其他平台。',+ 'analytics' => '高级数据分析',+ 'analytics_tooltip' => '把所有平台合起来看,比如粉丝总数,也可以按平台和帖子筛选。观看、覆盖、点赞、评论等数据,帮你知道什么最有效。',+ 'team' => '不限团队成员','team_tooltip' => '想邀请多少人加入团队都可以,不收额外费用。设定每个人能做什么,发布前先审批。',],],diff --git a/lang/zh/common.php b/lang/zh/common.phpindex ca886cc1b..32975277a 100644--- a/lang/zh/common.php+++ b/lang/zh/common.php@@ -59,6 +59,7 @@ return ['clear' => '清除','close' => '关闭','more' => '更多',+ 'learn_more' => '了解更多','play' => '播放','loading' => '加载中…','loading_more' => '加载更多…',diff --git a/lang/zh/mcp.php b/lang/zh/mcp.phpindex 84b31f644..22718b28b 100644--- a/lang/zh/mcp.php+++ b/lang/zh/mcp.php@@ -5,18 +5,21 @@ declare(strict_types=1);return ['title' => 'MCP','subtitle' => '将 AI 助手连接到你的工作区。',- 'copy_step' => '复制你的 TryPost 服务器 URL',- 'open_step' => '打开你的 AI 助手',- 'copy' => '复制 URL',+ 'copy' => '复制','connect' => '连接 :client',- 'step_add' => '将下方的名称、URL 或配置粘贴到你的应用中。首次连接时会在浏览器中打开登录。','name_label' => '名称','url_label' => '服务器 URL','config_label' => '配置',- 'connected_title' => '已连接的应用',+ 'tabs' => [+ 'connected' => '已连接的应用',+ 'connect' => '连接应用',+ ],+ 'connect_other' => '连接',+ 'other_hint' => '任何支持 MCP 的应用。',+ 'other_dialog_title' => '将 TryPost 连接到其他应用','connected_description' => '你已登录的助手。可以断开不再使用的连接。','connected_empty_title' => '暂无已连接的应用',- 'connected_empty' => '请使用上方的 Claude、ChatGPT 或其他客户端。',+ 'connected_empty' => '连接 Claude、ChatGPT 或其他应用后会显示在这里。','disconnect' => '断开连接','disconnect_title' => '断开应用','disconnect_confirm' => '这将使应用退出 TryPost。再次使用 MCP 前需要重新连接。',@@ -24,9 +27,6 @@ return ['copied' => '已复制','last_used' => '最近使用','never' => '从未',- 'documentation_title' => '文档',- 'documentation_description' => '各客户端设置指南、可用工具和问题排查。',- 'view_docs' => '查看文档','connector_name' => 'TryPost','authorize' => [@@ -53,18 +53,29 @@ return [],'other_clients_title' => '其他应用',- 'other_clients_description' => 'Cursor、VS Code、Claude Code 以及任何支持 MCP 的应用。',- 'clients' => [- 'claude' => '打开 Settings → Connectors,添加自定义连接器,然后粘贴上方 URL。',- 'chatgpt' => '打开 Settings → Apps & Connectors,创建自定义连接器,然后粘贴上方 URL。',- 'cursor' => '在 Cursor 中将 TryPost 添加为远程 MCP 服务器。',- 'cursor_name' => 'Cursor',- 'vscode' => '将下方配置粘贴到 VS Code 的 MCP 设置中。',- 'vscode_name' => 'VS Code',- 'claude_code' => '将下方配置粘贴到 Claude Code 的 MCP 设置中。',- 'claude_code_name' => 'Claude Code',- 'other' => '适用于任何读取 mcpServers 配置的客户端。',- 'other_name' => '其他',+ 'dialog' => [+ 'title' => '将 TryPost 连接到 :client',+ 'description' => '大约一分钟即可完成。连接成功后此页面会自动更新。',+ 'open' => '打开 :client',+ 'steps' => [+ 'claude' => [+ 'paste' => '将 URL 粘贴到连接器的 URL 字段',+ 'add' => '点击“添加”,然后点击“连接”',+ 'login' => '登录 TryPost 并选择工作区',+ ],+ 'chatgpt' => [+ 'developer' => '在 ChatGPT 设置中开启开发者模式',+ 'create' => '创建名为 TryPost 的应用并粘贴 URL',+ 'login' => '登录 TryPost 并选择工作区',+ ],+ 'other' => [+ 'add' => '在你的应用中添加自定义 MCP 服务器',+ 'paste' => '粘贴名称和 URL,或粘贴配置',+ 'login' => '登录 TryPost 并选择工作区',+ ],+ ],+ 'waiting' => '正在等待你的 AI 连接…',],+];diff --git a/lang/zh/settings.php b/lang/zh/settings.phpindex 07cc24ae2..a6bbacf10 100644--- a/lang/zh/settings.php+++ b/lang/zh/settings.php@@ -9,9 +9,8 @@ return ['groups' => ['personal' => '个人','workspace' => '工作区',- 'features' => '功能',- 'developers' => '开发者',- 'account' => '账户',+ 'content' => '内容',+ 'integrations' => '集成',],'items' => ['profile' => '个人资料',@@ -24,7 +23,7 @@ return ['signatures' => '签名','labels' => '标签','webhooks' => 'Webhooks',- 'api_keys' => 'API 密钥',+ 'api_keys' => 'API','mcp' => 'MCP','billing' => '账单',],diff --git a/lang/zh/welcome.php b/lang/zh/welcome.phpindex 920f57f7f..ee35b79bc 100644--- a/lang/zh/welcome.php+++ b/lang/zh/welcome.php@@ -16,6 +16,7 @@ return ['persona' => '关于你','goals' => '你的目标','software' => '当前工具',+ 'plan' => '套餐',],'personas' => ['creator' => '内容创作者',@@ -44,4 +45,47 @@ return ['none' => '还没有使用任何工具','other' => '其他',],+ 'plan_title' => '激活你的账户',+ 'plan_description' => '连接你的账号,今天就排期第一条帖子。',+ 'plan_first_month' => '首月价格',+ 'plan_terms' => '之后 :price/月,随时取消。',+ 'plan_per_month' => '每月',+ 'plan_cancel_anytime' => '随时取消。',+ 'mcp' => [+ 'title' => '和 AI 聊天,轻松管理社交媒体',+ 'description' => '用你最喜欢的 AI,在 TryPost 中创建、排期和分析帖子。',+ 'connect_with' => '连接 :client',+ 'connect_ai' => '连接你的 AI',+ 'pick_ai' => '你想在哪里使用 TryPost?',+ 'connect_other' => '连接其他应用',+ 'composer' => '有问题,尽管问',+ 'connected' => ':client 已连接',+ 'benefits' => [+ 'schedule' => [+ 'title' => '在聊天中创建并排期',+ 'hint' => '轮播图、串文和视频',+ 'ask' => '从我的看板取下一个点子,做成轮播图,并排期到周二 :time 发布在 Instagram 和 LinkedIn。',+ 'reply' => '完成。轮播图已排期到 Instagram 和 LinkedIn。',+ ],+ 'analytics' => [+ 'title' => '追踪你的增长',+ 'hint' => '所有账号汇总在一份报告里',+ 'ask' => '我这个月怎么样?涨粉了吗?',+ 'reply' => '本月你新增了 1,200 位粉丝,LinkedIn 增长最快。',+ ],+ 'queue' => [+ 'title' => '填满发布队列',+ 'hint' => '安排在你的最佳时间',+ 'ask' => '把我写好的草稿加入队列,排到接下来的空闲时段。',+ 'reply' => '完成。你的 3 篇草稿已加入队列,排在明天的空闲时段。',+ ],+ 'ideas' => [+ 'title' => '整理你的想法',+ 'hint' => '从头脑风暴到内容计划',+ 'ask' => '给我下周的 8 个帖子点子,并保存到我的看板。',+ 'reply' => '我已把 8 个点子存到你的看板,随时可以变成帖子。',+ ],+ ],+ 'skip' => '暂时跳过',+ ],];diff --git a/package-lock.json b/package-lock.jsonindex 81721d1e3..8b3f40da9 100644--- a/package-lock.json+++ b/package-lock.json@@ -8,7 +8,7 @@"@atlaskit/pragmatic-drag-and-drop": "^4.0.0","@atlaskit/pragmatic-drag-and-drop-hitbox": "^3.0.0","@inertiajs/vue3": "^3.8.0",- "@tabler/icons-vue": "^3.36.1",+ "@tabler/icons-vue": "^3.49.0","@tailwindcss/typography": "^0.5.19","@unovis/ts": "^1.7.0","@unovis/vue": "^1.7.0",@@ -1556,9 +1556,9 @@}},"node_modules/@tabler/icons": {- "version": "3.36.1",- "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.36.1.tgz",- "integrity": "sha512-f4Jg3Fof/Vru5ioix/UO4GX+sdDsF9wQo47FbtvG+utIYYVQ/QVAC0QYgcBbAjQGfbdOh2CCf0BgiFOF9Ixtjw==",+ "version": "3.49.0",+ "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.49.0.tgz",+ "integrity": "sha512-l+GnSkFETx0U26icxv1VUFnxxiTqXfCcVRiRAnyMwibupM2S2L/hSaZ9gmSgz01rkrsH/93NvLsxykqdanc6lw==","license": "MIT","funding": {"type": "github",@@ -1566,12 +1566,12 @@}},"node_modules/@tabler/icons-vue": {- "version": "3.36.1",- "resolved": "https://registry.npmjs.org/@tabler/icons-vue/-/icons-vue-3.36.1.tgz",- "integrity": "sha512-ssIu0KSmGFKvvoC5PJhSYAj/J2kTEbIVIix0528zdRKfN6yohUlQt014tGnDDdJ/MyyG/xRXsKD1U6dyQY8rrg==",+ "version": "3.49.0",+ "resolved": "https://registry.npmjs.org/@tabler/icons-vue/-/icons-vue-3.49.0.tgz",+ "integrity": "sha512-p/g2/aVsUTdGaLwgV+X/E3vc+j8XkXWV2NgXAVT31/6sMf/CFAI3uvJ1r6YCi/UT8U2ctaF5fXUWr18bNVVr7g==","license": "MIT","dependencies": {- "@tabler/icons": ""+ "@tabler/icons": "3.49.0"},"funding": {"type": "github",diff --git a/package.json b/package.jsonindex 640ba10e4..99c3e3180 100644--- a/package.json+++ b/package.json@@ -40,7 +40,7 @@"@atlaskit/pragmatic-drag-and-drop": "^4.0.0","@atlaskit/pragmatic-drag-and-drop-hitbox": "^3.0.0","@inertiajs/vue3": "^3.8.0",- "@tabler/icons-vue": "^3.36.1",+ "@tabler/icons-vue": "^3.49.0","@tailwindcss/typography": "^0.5.19","@unovis/ts": "^1.7.0","@unovis/vue": "^1.7.0",diff --git a/public/images/ai/chatgpt-white.svg b/public/images/ai/chatgpt-white.svgdeleted file mode 100644index fb4d0ac4d..000000000--- a/public/images/ai/chatgpt-white.svg+++ /dev/null@@ -1 +0,0 @@-<svg fill="#ffffff" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenAI</title><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>\ No newline at end of filediff --git a/public/images/ai/claude-color.svg b/public/images/ai/claude-color.svgnew file mode 100644index 000000000..1df84178f--- /dev/null+++ b/public/images/ai/claude-color.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>Claude</title><path fill="#D97757" fill-rule="evenodd" d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"/></svg>diff --git a/public/images/ai/claude-mono.svg b/public/images/ai/claude-mono.svgnew file mode 100644index 000000000..4722aff5c--- /dev/null+++ b/public/images/ai/claude-mono.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>Claude</title><path fill="#000" fill-rule="evenodd" d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"/></svg>diff --git a/public/images/ai/claude.svg b/public/images/ai/claude.svgdeleted file mode 100644index 5d8d7461d..000000000--- a/public/images/ai/claude.svg+++ /dev/null@@ -1 +0,0 @@-<svg fill="none" height="2500" viewBox="0 -.01 39.5 39.53" width="2500" xmlns="http://www.w3.org/2000/svg"><path d="m7.75 26.27 7.77-4.36.13-.38-.13-.21h-.38l-1.3-.08-4.44-.12-3.85-.16-3.73-.2-.94-.2-.88-1.16.09-.58.79-.53 1.13.1 2.5.17 3.75.26 2.72.16 4.03.42h.64l.09-.26-.22-.16-.17-.16-3.88-2.63-4.2-2.78-2.2-1.6-1.19-.81-.6-.76-.26-1.66 1.08-1.19 1.45.1.37.1 1.47 1.13 3.14 2.43 4.1 3.02.6.5.24-.17.03-.12-.27-.45-2.23-4.03-2.38-4.1-1.06-1.7-.28-1.02c-.1-.42-.17-.77-.17-1.2l1.23-1.67.68-.22 1.64.22.69.6 1.02 2.33 1.65 3.67 2.56 4.99.75 1.48.4 1.37.15.42h.26v-.24l.21-2.81.39-3.45.38-4.44.13-1.25.62-1.5 1.23-.81.96.46.79 1.13-.11.73-.47 3.05-.92 4.78-.6 3.2h.35l.4-.4 1.62-2.15 2.72-3.4 1.2-1.35 1.4-1.49.9-.71h1.7l1.25 1.86-.56 1.92-1.75 2.22-1.45 1.88-2.08 2.8-1.3 2.24.12.18.31-.03 4.7-1 2.54-.46 3.03-.52 1.37.64.15.65-.54 1.33-3.24.8-3.8.76-5.66 1.34-.07.05.08.1 2.55.24 1.09.06h2.67l4.97.37 1.3.86.78 1.05-.13.8-2 1.02-2.7-.64-6.3-1.5-2.16-.54h-.3v.18l1.8 1.76 3.3 2.98 4.13 3.84.21.95-.53.75-.56-.08-3.63-2.73-1.4-1.23-3.17-2.67h-.21v.28l.73 1.07 3.86 5.8.2 1.78-.28.58-1 .35-1.1-.2-2.26-3.17-2.33-3.57-1.88-3.2-.23.13-1.11 11.95-.52.61-1.2.46-1-.76-.53-1.23.53-2.43.64-3.17.52-2.52.47-3.13.28-1.04-.02-.07-.23.03-2.36 3.24-3.59 4.85-2.84 3.04-.68.27-1.18-.61.11-1.09.66-.97 3.93-5 2.37-3.1 1.53-1.79-.01-.26h-.09l-10.44 6.78-1.86.24-.8-.75.1-1.23.38-.4 3.14-2.16z" fill="#d97757"/></svg>\ No newline at end of filediff --git a/public/images/ai/cursor.svg b/public/images/ai/cursor.svgdeleted file mode 100644index a1bb0420c..000000000--- a/public/images/ai/cursor.svg+++ /dev/null@@ -1,6 +0,0 @@-<svg viewBox="0 0 466.73 532.09" xmlns="http://www.w3.org/2000/svg">- <path- fill="#26251e"- d="M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z"- />-</svg>diff --git a/public/images/ai/mcp.svg b/public/images/ai/mcp.svgnew file mode 100644index 000000000..fd49dba8b--- /dev/null+++ b/public/images/ai/mcp.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000" fill-rule="evenodd"><title>ModelContextProtocol</title><path d="M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"></path><path d="M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"></path></svg>diff --git a/public/images/ai/openai.svg b/public/images/ai/openai.svgnew file mode 100644index 000000000..cd0d8ce56--- /dev/null+++ b/public/images/ai/openai.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>OpenAI</title><path fill="#000" fill-rule="evenodd" d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"/></svg>diff --git a/public/images/ai/other-clients.svg b/public/images/ai/other-clients.svgdeleted file mode 100644index c9136d9f5..000000000--- a/public/images/ai/other-clients.svg+++ /dev/null@@ -1,6 +0,0 @@-<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">- <path- fill="#737373"- d="M6.24904 5C6.24904 2.92893 7.92797 1.25 9.99904 1.25C12.0701 1.25 13.749 2.92893 13.749 5C13.749 5.08751 13.746 5.17439 13.7401 5.26052C14.4775 5.27565 15.1165 5.31322 15.6639 5.40844C16.4468 5.54462 17.1118 5.80948 17.6507 6.34835C18.1896 6.88722 18.4544 7.55227 18.5906 8.33514C18.6858 8.88251 18.7234 9.52155 18.7385 10.2589C18.8247 10.253 18.9115 10.25 18.999 10.25C21.0701 10.25 22.749 11.9289 22.749 14C22.749 16.0711 21.0701 17.75 18.999 17.75C18.9115 17.75 18.8247 17.747 18.7385 17.7411C18.7234 18.4785 18.6858 19.1175 18.5906 19.6649C18.4544 20.4477 18.1896 21.1128 17.6507 21.6517C17.1119 22.1905 16.4469 22.4553 15.6641 22.5915C14.9031 22.7239 13.9648 22.7449 12.8314 22.749C12.5875 22.7499 12.3584 22.6322 12.2172 22.4333C12.076 22.2344 12.0403 21.9793 12.1215 21.7493C12.2039 21.5159 12.249 21.264 12.249 21C12.249 19.7574 11.2417 18.75 9.99904 18.75C8.7564 18.75 7.74904 19.7574 7.74904 21C7.74904 21.264 7.79421 21.5159 7.87663 21.7493C7.95783 21.9793 7.92212 22.2344 7.7809 22.4333C7.63967 22.6322 7.41057 22.7499 7.16667 22.749C6.03327 22.7449 5.095 22.7239 4.33395 22.5915C3.55118 22.4553 2.88621 22.1905 2.34739 21.6517C1.80857 21.1128 1.54372 20.4479 1.40752 19.6651C1.2751 18.904 1.25415 17.9658 1.25001 16.8324C1.24911 16.5885 1.36688 16.3594 1.56574 16.2181C1.76459 16.0769 2.0197 16.0412 2.24969 16.1224C2.48311 16.2048 2.73499 16.25 2.99904 16.25C4.24168 16.25 5.24904 15.2426 5.24904 14C5.24904 12.7574 4.24168 11.75 2.99904 11.75C2.73499 11.75 2.48311 11.7952 2.24969 11.8776C2.0197 11.9588 1.76459 11.9231 1.56574 11.7819C1.36688 11.6406 1.24911 11.4115 1.25001 11.1676C1.25415 10.0342 1.2751 9.09595 1.40752 8.33491C1.54372 7.55214 1.80857 6.88717 2.34739 6.34835C2.88626 5.80948 3.55131 5.54462 4.33418 5.40844C4.88155 5.31322 5.52059 5.27565 6.25798 5.26052C6.25205 5.17439 6.24904 5.08751 6.24904 5Z"- />-</svg>diff --git a/public/images/ai/vscode.svg b/public/images/ai/vscode.svgdeleted file mode 100644index 73df1aefb..000000000--- a/public/images/ai/vscode.svg+++ /dev/null@@ -1,6 +0,0 @@-<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">- <path- fill="#0098FF"- d="M23.15 2.587L18.21.21a1.494 1.494 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a.999.999 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a.999.999 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.492 1.492 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352zm-5.146 14.861L10.826 12l7.178-5.448v10.896z"- />-</svg>diff --git a/resources/css/app.css b/resources/css/app.cssindex 74697a15d..6059349fa 100644--- a/resources/css/app.css+++ b/resources/css/app.css@@ -51,6 +51,7 @@--ring: #7c3aed;--primary-text: #6d28d9;--primary-text-hover: #5b21b6;+ --rating: #b45309;--chart-1: #4c1d95;--chart-2: #6d28d9;--chart-3: #7c3aed;@@ -144,6 +145,7 @@--ring: #a78bfa;--primary-text: #c4b5fd;--primary-text-hover: #ddd6fe;+ --rating: #facc15;--chart-1: #ddd6fe;--chart-2: #c4b5fd;--chart-3: #a78bfa;@@ -218,6 +220,7 @@--color-primary-selected: var(--primary-selected);--color-primary-text: var(--primary-text);--color-primary-text-hover: var(--primary-text-hover);+ --color-rating: var(--rating);--color-secondary: var(--secondary);--color-secondary-foreground: var(--secondary-foreground);--color-muted: var(--muted);diff --git a/resources/js/components/ThemeToggle.vue b/resources/js/components/ThemeToggle.vueindex d0ff52f46..96c329b9c 100644--- a/resources/js/components/ThemeToggle.vue+++ b/resources/js/components/ThemeToggle.vue@@ -9,13 +9,6 @@ import type { SharedData } from '@/types';type ResolvedTheme = Exclude<Theme, 'system'>;-const props = withDefaults(- defineProps<{- compactOnMobile?: boolean;- }>(),- { compactOnMobile: false },-);-const page = usePage<SharedData>();const resolve = (theme: Theme | undefined): ResolvedTheme => {@@ -30,11 +23,6 @@ const resolve = (theme: Theme | undefined): ResolvedTheme => {const current = ref<ResolvedTheme>(resolve(page.props.auth.user?.theme));-const themes = [- { value: 'light', icon: IconSun },- { value: 'dark', icon: IconMoon },-] as const satisfies readonly { value: ResolvedTheme; icon: unknown }[];-const currentIcon = computed(() =>current.value === 'dark' ? IconMoon : IconSun,);@@ -43,10 +31,8 @@ const nextTheme = computed<ResolvedTheme>(() =>current.value === 'dark' ? 'light' : 'dark',);-const select = (theme: ResolvedTheme): void => {- if (theme === current.value) {- return;- }+const toggleTheme = (): void => {+ const theme = nextTheme.value;current.value = theme;applyTheme(theme);@@ -56,53 +42,17 @@ const select = (theme: ResolvedTheme): void => {{ preserveScroll: true, preserveState: true },);};--const cycle = (): void => {- select(nextTheme.value);-};</script><template>- <div class="flex items-center">- <button- v-if="compactOnMobile"- type="button"- :aria-label="$t(`settings.preferences.theme.${nextTheme}`)"- :title="$t(`settings.preferences.theme.${nextTheme}`)"- data-testid="theme-toggle-cycle"- class="flex size-8 items-center justify-center rounded-lg border border-border bg-card text-foreground transition-control hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring sm:hidden"- @click="cycle"- >- <component :is="currentIcon" class="size-4" />- </button>- <div- :class="[- 'flex items-center gap-0.5 rounded-lg border border-border bg-card p-[3px]',- props.compactOnMobile && 'max-sm:hidden',- ]"- role="radiogroup"- :aria-label="$t('settings.preferences.theme.heading')"- data-testid="theme-toggle"- >- <button- v-for="theme in themes"- :key="theme.value"- type="button"- role="radio"- :aria-checked="current === theme.value"- :aria-label="$t(`settings.preferences.theme.${theme.value}`)"- :title="$t(`settings.preferences.theme.${theme.value}`)"- :data-testid="`theme-toggle-${theme.value}`"- :class="[- 'flex size-7 items-center justify-center rounded-md transition-control focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring',- current === theme.value- ? 'bg-primary-subtle text-primary-text'- : 'text-muted-foreground hover:text-foreground',- ]"- @click="select(theme.value)"- >- <component :is="theme.icon" class="size-4" />- </button>- </div>- </div>+ <button+ type="button"+ :aria-label="$t(`settings.preferences.theme.${nextTheme}`)"+ :title="$t(`settings.preferences.theme.${nextTheme}`)"+ data-testid="theme-toggle"+ class="flex size-8 items-center justify-center rounded-lg border border-border bg-card text-foreground transition-control hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring"+ @click="toggleTheme"+ >+ <component :is="currentIcon" class="size-4" />+ </button></template>diff --git a/resources/js/components/billing/PlanFeatureInfo.vue b/resources/js/components/billing/PlanFeatureInfo.vuenew file mode 100644index 000000000..bc3d90551--- /dev/null+++ b/resources/js/components/billing/PlanFeatureInfo.vue@@ -0,0 +1,45 @@+<script setup lang="ts">+import { IconInfoCircle } from '@tabler/icons-vue';++import {+ Popover,+ PopoverContent,+ PopoverTrigger,+} from '@/components/ui/popover';+import { cn } from '@/lib/utils';++withDefaults(+ defineProps<{+ label: string;+ testid: string;+ spacious?: boolean;+ contentClass?: string;+ }>(),+ { spacious: false, contentClass: '' },+);+</script>++<template>+ <Popover>+ <PopoverTrigger as-child>+ <button+ type="button"+ :class="[+ 'inline-flex size-4 shrink-0 cursor-pointer items-center justify-center text-muted-foreground transition-control hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring',+ spacious ? 'mt-0.5 sm:mt-1' : 'mt-0.5',+ ]"+ :aria-label="label"+ :data-testid="testid"+ >+ <IconInfoCircle class="size-4" />+ </button>+ </PopoverTrigger>+ <PopoverContent+ side="top"+ :side-offset="8"+ :class="cn('w-auto max-w-64 p-3 text-start text-sm', contentClass)"+ >+ <slot>{{ label }}</slot>+ </PopoverContent>+ </Popover>+</template>diff --git a/resources/js/components/billing/PlanFeatureList.vue b/resources/js/components/billing/PlanFeatureList.vueindex 3a79ddc1f..daac13b85 100644--- a/resources/js/components/billing/PlanFeatureList.vue+++ b/resources/js/components/billing/PlanFeatureList.vue@@ -1,36 +1,34 @@<script setup lang="ts">import {+ IconBulb,IconCalendarEvent,- IconChartBar,- IconInfoCircle,IconRefresh,- IconRobot,+ IconSettingsAi,IconShare,IconSparkles,+ IconTrendingUp,IconUsers,IconWorld,} from '@tabler/icons-vue';import type { Component } from 'vue';+import PlanFeatureInfo from '@/components/billing/PlanFeatureInfo.vue';import PlatformLogo from '@/components/PlatformLogo.vue';-import {- Tooltip,- TooltipContent,- TooltipProvider,- TooltipTrigger,-} from '@/components/ui/tooltip';import { getPlatformLabel } from '@/composables/usePlatformLogo';import { Platform } from '@/types/platform';interface PlanFeature {key: string;icon: Component;- hasTooltip: boolean;}-defineProps<{- scope: string;-}>();+withDefaults(+ defineProps<{+ scope: string;+ spacious?: boolean;+ }>(),+ { spacious: false },+);const PLAN_NETWORKS = [Platform.Instagram,@@ -48,34 +46,20 @@ const PLAN_NETWORKS = [Platform.GoogleBusiness,] as const;-const SHARED_FEATURES: Omit<PlanFeature, 'hasTooltip'>[] = [+/**+ * Labels stay as keys and resolve with `$t` in the template: the language JSON+ * loads asynchronously and `trans()` in a computed would cache the raw keys.+ */+const SHARED_FEATURES: PlanFeature[] = [{ key: 'accounts_unlimited', icon: IconShare },- { key: 'calendar', icon: IconCalendarEvent },+ { key: 'ideas', icon: IconBulb },{ key: 'ai', icon: IconSparkles },- { key: 'mcp', icon: IconRobot },+ { key: 'calendar', icon: IconCalendarEvent },+ { key: 'analytics', icon: IconTrendingUp },+ { key: 'mcp', icon: IconSettingsAi },{ key: 'repurpose', icon: IconRefresh },- { key: 'analytics', icon: IconChartBar },{ key: 'team', icon: IconUsers },];--const FEATURES_WITH_TOOLTIP = new Set([- 'accounts_unlimited',- 'ai',- 'analytics',- 'calendar',- 'mcp',- 'repurpose',- 'team',-]);--/**- * Labels stay as keys and resolve with `$t` in the template: the language JSON- * loads asynchronously and `trans()` in a computed would cache the raw keys.- */-const sharedFeatures: PlanFeature[] = SHARED_FEATURES.map((feature) => ({- ...feature,- hasTooltip: FEATURES_WITH_TOOLTIP.has(feature.key),-}));</script><template>@@ -87,134 +71,100 @@ const sharedFeatures: PlanFeature[] = SHARED_FEATURES.map((feature) => ({{{ $t('billing.plans.everything_included') }}</p>- <ul class="flex flex-col gap-1">+ <ul :class="['flex flex-col', spacious ? 'gap-1 sm:gap-2.5' : 'gap-1']"><li- class="flex items-center gap-2 text-sm text-foreground"+ :class="[+ 'flex items-start gap-2 text-foreground',+ spacious+ ? 'text-sm leading-5 sm:text-base sm:leading-6'+ : 'text-sm leading-5',+ ]"><IconWorld- class="size-4 shrink-0 text-muted-foreground"+ :class="[+ 'shrink-0 text-muted-foreground',+ spacious ? 'mt-0.5 size-4 sm:size-5' : 'mt-0.5 size-4',+ ]"/>- <span class="inline-flex items-center gap-1.5">+ <span class="inline-flex items-start gap-1.5"><span:data-testid="`plan-feature-label-${scope}-networks_all`">{{$t('billing.plans.features.networks_all')}}</span>- <TooltipProvider :delay-duration="200">- <Tooltip>- <TooltipTrigger as-child>- <button- type="button"- class="inline-flex size-4 shrink-0 cursor-pointer items-center justify-center text-muted-foreground transition-control hover:text-foreground"- :aria-label="- $t(- 'billing.plans.features.networks_all_tooltip',- )- "- :data-testid="`plan-networks-info-${scope}`"- >- <IconInfoCircle- class="size-4"- />- </button>- </TooltipTrigger>- <TooltipContent- side="top"- :side-offset="8"- class="w-fit max-w-none space-y-2 p-3"+ <PlanFeatureInfo+ :label="$t('billing.plans.features.networks_all_tooltip')"+ :testid="`plan-networks-info-${scope}`"+ :spacious="spacious"+ content-class="w-80 max-w-none space-y-3 p-4"+ >+ <p class="font-medium text-foreground">+ {{ $t('billing.plans.features.networks_all_tooltip') }}+ </p>+ <ul+ class="grid grid-cols-2 gap-x-4 gap-y-2.5"+ :data-testid="`plan-networks-${scope}`"+ >+ <li+ v-for="(network, index) in PLAN_NETWORKS"+ :key="network"+ :class="[+ 'flex min-w-0 items-center gap-2 text-sm text-foreground',+ index === PLAN_NETWORKS.length - 1 &&+ PLAN_NETWORKS.length % 2 === 1+ ? 'col-span-2'+ : '',+ ]">- <p class="font-medium">- {{- $t(- 'billing.plans.features.networks_all_tooltip',- )- }}- </p>- <div- class="grid grid-cols-4 gap-1"- :data-testid="`plan-networks-${scope}`"- >- <span- v-for="network in PLAN_NETWORKS"- :key="network"- class="flex w-16 flex-col items-center gap-1.5 rounded-md bg-background/10 px-1.5 py-2"- >- <PlatformLogo- :platform="network"- size="xs"- plain- :title="null"- />- <span- class="max-w-full truncate text-[10px] leading-none font-medium text-background/80"- >- {{- getPlatformLabel(- network,- )- }}- </span>- </span>- </div>- </TooltipContent>- </Tooltip>- </TooltipProvider>+ <PlatformLogo+ :platform="network"+ size="xs"+ plain+ :title="null"+ />+ <span class="truncate">+ {{ getPlatformLabel(network) }}+ </span>+ </li>+ </ul>+ </PlanFeatureInfo></span></li><li- v-for="feature in sharedFeatures"+ v-for="feature in SHARED_FEATURES":key="feature.key"- class="flex items-center gap-2 text-sm text-foreground"+ :class="[+ 'flex items-start gap-2 text-foreground',+ spacious+ ? 'text-sm leading-5 sm:text-base sm:leading-6'+ : 'text-sm leading-5',+ ]"><component:is="feature.icon"- class="size-4 shrink-0 text-muted-foreground"+ :class="[+ 'shrink-0 text-muted-foreground',+ spacious ? 'mt-0.5 size-4 sm:size-5' : 'mt-0.5 size-4',+ ]"/>- <span class="inline-flex items-center gap-1.5">+ <span class="inline-flex items-start gap-1.5"><span:data-testid="`plan-feature-label-${scope}-${feature.key}`">{{$t(`billing.plans.features.${feature.key}`)}}</span>- <TooltipProvider- v-if="feature.hasTooltip"- :delay-duration="200"- >- <Tooltip>- <TooltipTrigger as-child>- <button- type="button"- class="inline-flex size-4 shrink-0 cursor-pointer items-center justify-center text-muted-foreground transition-control hover:text-foreground"- :aria-label="- $t(- `billing.plans.features.${feature.key}_tooltip`,- )- "- :data-testid="`plan-feature-info-${scope}-${feature.key}`"- >- <IconInfoCircle- class="size-4"- />- </button>- </TooltipTrigger>- <TooltipContent- side="top"- :side-offset="8"- class="max-w-56 text-start"- >- {{- $t(- `billing.plans.features.${feature.key}_tooltip`,- )- }}- </TooltipContent>- </Tooltip>- </TooltipProvider>+ <PlanFeatureInfo+ :label="$t(`billing.plans.features.${feature.key}_tooltip`)"+ :testid="`plan-feature-info-${scope}-${feature.key}`"+ :spacious="spacious"+ /></span></li>++ <slot name="after" /></ul></div></template>diff --git a/resources/js/components/billing/PlanPicker.vue b/resources/js/components/billing/PlanPicker.vueindex 1b02bb983..6899c1ea0 100644--- a/resources/js/components/billing/PlanPicker.vue+++ b/resources/js/components/billing/PlanPicker.vue@@ -1,17 +1,12 @@<script setup lang="ts">-import { IconBuilding, IconInfoCircle } from '@tabler/icons-vue';+import { IconBuilding } from '@tabler/icons-vue';import { trans } from 'laravel-vue-i18n';import { computed } from 'vue';+import PlanFeatureInfo from '@/components/billing/PlanFeatureInfo.vue';import PlanFeatureList from '@/components/billing/PlanFeatureList.vue';import { Badge } from '@/components/ui/badge';import { Button } from '@/components/ui/button';-import {- Tooltip,- TooltipContent,- TooltipProvider,- TooltipTrigger,-} from '@/components/ui/tooltip';import {PLAN_CHANGE_LABELS,planChangeAction,@@ -210,34 +205,13 @@ const workspaceLabel = (plan: PlanOption): string =><IconBuilding class="size-4" /></span><p- class="inline-flex items-center gap-1.5 text-sm font-medium text-foreground"+ class="inline-flex items-start gap-1.5 text-sm leading-5 font-medium text-foreground"><span>{{ workspaceLabel(plan) }}</span>- <TooltipProvider :delay-duration="200">- <Tooltip>- <TooltipTrigger as-child>- <button- type="button"- class="inline-flex size-4 shrink-0 cursor-pointer items-center justify-center text-muted-foreground transition-control hover:text-foreground"- :aria-label="- $t(- 'billing.plans.workspaces_tooltip',- )- "- :data-testid="`plan-workspaces-info-${plan.slug}`"- >- <IconInfoCircle class="size-4" />- </button>- </TooltipTrigger>- <TooltipContent- side="top"- :side-offset="8"- class="max-w-64 text-start"- >- {{ $t('billing.plans.workspaces_tooltip') }}- </TooltipContent>- </Tooltip>- </TooltipProvider>+ <PlanFeatureInfo+ :label="$t('billing.plans.workspaces_tooltip')"+ :testid="`plan-workspaces-info-${plan.slug}`"+ /></p></div>diff --git a/resources/js/components/channels/PostingGoalFlow.vue b/resources/js/components/channels/PostingGoalFlow.vueindex a11013bf1..fcf29216f 100644--- a/resources/js/components/channels/PostingGoalFlow.vue+++ b/resources/js/components/channels/PostingGoalFlow.vue@@ -36,7 +36,7 @@ import type {ChannelScheduleState,PostingSchedule,} from '@/types/posting-schedule';-import { fireConfetti } from '@/utils/confetti';+import { fireCelebration } from '@/utils/confetti';const props = defineProps<{accountId: string;@@ -96,7 +96,7 @@ watch(avatar, (element) => {confettiFired = true;const frame = requestAnimationFrame(() => {- stopConfetti = fireConfetti({ origin: element });+ stopConfetti = fireCelebration(element);});stopConfetti = () => cancelAnimationFrame(frame);diff --git a/resources/js/components/channels/TelegramConnectStep.vue b/resources/js/components/channels/TelegramConnectStep.vueindex 639653f7d..462c82ad8 100644--- a/resources/js/components/channels/TelegramConnectStep.vue+++ b/resources/js/components/channels/TelegramConnectStep.vue@@ -226,6 +226,7 @@ onUnmounted(() => {><h3class="flex items-center gap-2 text-lg leading-tight font-medium text-foreground"+ data-testid="telegram-connect-steps-title"><PlatformLogoplatform="telegram"diff --git a/resources/js/components/mcp/McpAdvancedClients.vue b/resources/js/components/mcp/McpAdvancedClients.vuedeleted file mode 100644index 7f95ee625..000000000--- a/resources/js/components/mcp/McpAdvancedClients.vue+++ /dev/null@@ -1,224 +0,0 @@-<script setup lang="ts">-import { IconChevronDown, IconCopy } from '@tabler/icons-vue';-import { trans } from 'laravel-vue-i18n';-import { computed, ref } from 'vue';--import SettingsSection from '@/components/settings/SettingsSection.vue';-import { Button } from '@/components/ui/button';-import {- Collapsible,- CollapsibleContent,- CollapsibleTrigger,-} from '@/components/ui/collapsible';-import { copyToClipboard } from '@/lib/utils';--const props = defineProps<{- mcpUrl: string;-}>();--type AdvancedMcpClientKey = 'cursor' | 'vscode' | 'claude_code' | 'other';-type McpConfigRoot = 'servers' | 'mcpServers';--interface AdvancedMcpClient {- key: AdvancedMcpClientKey;- name: string;- description: string;- logo: string;- logoClass?: string;- httpType: boolean;- configRoot: McpConfigRoot;-}--const advancedClients: AdvancedMcpClient[] = [- {- key: 'cursor',- name: 'mcp.clients.cursor_name',- description: 'mcp.clients.cursor',- logo: '/images/ai/cursor.svg',- logoClass: 'dark:invert',- httpType: false,- configRoot: 'mcpServers',- },- {- key: 'vscode',- name: 'mcp.clients.vscode_name',- description: 'mcp.clients.vscode',- logo: '/images/ai/vscode.svg',- httpType: true,- configRoot: 'servers',- },- {- key: 'claude_code',- name: 'mcp.clients.claude_code_name',- description: 'mcp.clients.claude_code',- logo: '/images/ai/claude.svg',- httpType: true,- configRoot: 'mcpServers',- },- {- key: 'other',- name: 'mcp.clients.other_name',- description: 'mcp.clients.other',- logo: '/images/ai/other-clients.svg',- httpType: false,- configRoot: 'mcpServers',- },-];--const openClient = ref<AdvancedMcpClientKey | ''>('');-const connectorName = computed(() => trans('mcp.connector_name'));-const copiedMessage = computed(() => trans('mcp.copied'));--const configSnippet = (client: AdvancedMcpClient): string => {- const server = client.httpType- ? { type: 'http', url: props.mcpUrl }- : { url: props.mcpUrl };-- return JSON.stringify(- { [client.configRoot]: { [connectorName.value]: server } },- null,- 2,- );-};--const setClientOpen = (client: AdvancedMcpClientKey, open: boolean): void => {- openClient.value = open ? client : '';-};--const copy = (value: string): void => {- copyToClipboard(value, copiedMessage.value);-};-</script>--<template>- <SettingsSection- :title="$t('mcp.other_clients_title')"- :description="$t('mcp.other_clients_description')"- >- <div class="flex flex-col gap-2">- <Collapsible- v-for="client in advancedClients"- :key="client.key"- class="overflow-hidden rounded-xl border border-border bg-card"- :open="openClient === client.key"- @update:open="(open) => setClientOpen(client.key, open)"- >- <CollapsibleTrigger- class="flex w-full cursor-pointer items-center gap-3 p-4 text-start transition-control outline-none hover:bg-muted focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring"- :data-testid="`mcp-advanced-client-${client.key}`"- >- <span- class="inline-flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted"- >- <img- :src="client.logo"- :alt="$t(client.name)"- :class="['size-5 object-contain', client.logoClass]"- />- </span>- <span class="flex min-w-0 flex-1 flex-col gap-1">- <span- class="truncate text-sm leading-tight font-emphasis text-foreground"- >- {{ $t(client.name) }}- </span>- <span class="text-sm text-muted-foreground">- {{ $t(client.description) }}- </span>- </span>- <IconChevronDown- class="pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200 motion-reduce:transition-none"- :class="openClient === client.key ? 'rotate-180' : ''"- />- </CollapsibleTrigger>-- <CollapsibleContent- class="overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:data-[state=closed]:animate-none motion-reduce:data-[state=open]:animate-none"- >- <div- class="flex flex-col gap-6 border-t border-border bg-muted/40 p-4"- >- <p class="text-sm text-muted-foreground">- {{ $t('mcp.step_add') }}- </p>-- <div class="flex flex-col gap-2">- <p class="text-sm font-medium text-foreground">- {{ $t('mcp.name_label') }}- </p>- <div class="flex min-w-0 items-center gap-2">- <code- dir="ltr"- class="flex h-8 min-w-0 flex-1 items-center overflow-hidden rounded-md border border-input bg-card px-2 font-mono text-sm text-foreground dark:bg-input/30"- >- <span class="block min-w-0 truncate">{{- connectorName- }}</span>- </code>- <Button- type="button"- variant="ghost"- size="icon"- class="shrink-0 text-muted-foreground"- :aria-label="`${$t('common.actions.copy')} ${$t('mcp.name_label')}`"- @click="copy(connectorName)"- >- <IconCopy class="size-4" />- </Button>- </div>- </div>-- <div class="flex flex-col gap-2">- <p class="text-sm font-medium text-foreground">- {{ $t('mcp.url_label') }}- </p>- <div class="flex min-w-0 items-center gap-2">- <code- dir="ltr"- class="flex h-8 min-w-0 flex-1 items-center overflow-hidden rounded-md border border-input bg-card px-2 font-mono text-sm text-foreground dark:bg-input/30"- >- <span class="block min-w-0 truncate">{{- mcpUrl- }}</span>- </code>- <Button- type="button"- variant="ghost"- size="icon"- class="shrink-0 text-muted-foreground"- :aria-label="`${$t('common.actions.copy')} ${$t('mcp.url_label')}`"- @click="copy(mcpUrl)"- >- <IconCopy class="size-4" />- </Button>- </div>- </div>-- <div class="flex flex-col gap-2">- <p class="text-sm font-medium text-foreground">- {{ $t('mcp.config_label') }}- </p>- <div class="relative">- <pre- dir="ltr"- class="overflow-x-auto rounded-md border border-input bg-card px-3 py-2.5 pe-12 text-left font-mono text-xs leading-5 text-foreground dark:bg-input/30"- :data-testid="`mcp-config-${client.key}`"- ><code>{{ configSnippet(client) }}</code></pre>- <Button- type="button"- variant="ghost"- size="icon"- class="absolute inset-e-1.5 top-1.5 text-muted-foreground"- :aria-label="`${$t('common.actions.copy')} ${$t('mcp.config_label')}`"- @click="copy(configSnippet(client))"- >- <IconCopy class="size-4" />- </Button>- </div>- </div>- </div>- </CollapsibleContent>- </Collapsible>- </div>- </SettingsSection>-</template>diff --git a/resources/js/components/mcp/McpConnectDialog.vue b/resources/js/components/mcp/McpConnectDialog.vuenew file mode 100644index 000000000..90b0096fb--- /dev/null+++ b/resources/js/components/mcp/McpConnectDialog.vue@@ -0,0 +1,167 @@+<script setup lang="ts">+import { IconArrowUpRight } from '@tabler/icons-vue';+import { computed } from 'vue';++import McpCopyField from '@/components/mcp/McpCopyField.vue';+import { Button } from '@/components/ui/button';+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogFooter,+ DialogHeader,+ DialogTitle,+} from '@/components/ui/dialog';+import { Spinner } from '@/components/ui/spinner';+import type { McpClient, McpClientId } from '@/lib/mcpClients';++const props = defineProps<{+ client: McpClient;+ mcpUrl: string;+}>();++const open = defineModel<boolean>('open', { default: false });++/**+ * What to do in each client once its connector page is open. ChatGPT needs+ * developer mode before it accepts a custom MCP app.+ */+const STEPS: Record<McpClientId, string[]> = {+ claude: ['paste', 'add', 'login'],+ chatgpt: ['developer', 'create', 'login'],+ other: ['add', 'paste', 'login'],+};++const steps = computed((): string[] => STEPS[props.client.id]);++const configSnippet = (connectorName: string): string =>+ JSON.stringify(+ { mcpServers: { [connectorName]: { url: props.mcpUrl } } },+ null,+ 2,+ );++const focusDialogFrame = (event: Event): void => {+ event.preventDefault();+ (event.target as HTMLElement | null)?.focus({ preventScroll: true });+};+</script>++<template>+ <Dialog v-model:open="open">+ <DialogContent+ class="outline-none sm:max-w-xl"+ data-testid="mcp-dialog"+ @open-auto-focus="focusDialogFrame"+ >+ <DialogHeader class="flex-row items-start gap-4 pe-8 text-start">+ <span+ class="inline-flex size-11 shrink-0 items-center justify-center rounded-xl border border-border bg-card"+ aria-hidden="true"+ >+ <img+ :src="client.logo"+ alt=""+ :class="['size-6', client.logoClass]"+ />+ </span>+ <div class="flex min-w-0 flex-col gap-1">+ <DialogTitle>+ {{+ client.labelKey+ ? $t('mcp.other_dialog_title')+ : $t('mcp.dialog.title', {+ client: client.label,+ })+ }}+ </DialogTitle>+ <DialogDescription>+ {{ $t('mcp.dialog.description') }}+ </DialogDescription>+ </div>+ </DialogHeader>++ <ol class="flex flex-col gap-2.5">+ <li+ v-for="(step, index) in steps"+ :key="step"+ class="flex items-start gap-2.5 text-sm text-foreground"+ :data-testid="`mcp-dialog-step-${step}`"+ >+ <span+ class="inline-flex size-5 shrink-0 items-center justify-center rounded-full bg-secondary text-xs font-semibold tabular-nums"+ aria-hidden="true"+ >+ {{ index + 1 }}+ </span>+ {{ $t(`mcp.dialog.steps.${client.id}.${step}`) }}+ </li>+ </ol>++ <div+ class="overflow-hidden rounded-xl border border-border-strong bg-card"+ >+ <div+ class="relative flex h-8 items-center gap-1.5 border-b border-border bg-muted px-3"+ aria-hidden="true"+ >+ <span class="size-2.5 rounded-full bg-[#ff5f57]" />+ <span class="size-2.5 rounded-full bg-[#febc2e]" />+ <span class="size-2.5 rounded-full bg-[#28c840]" />+ <span+ class="absolute inset-x-0 flex items-center justify-center gap-1.5 text-xs font-medium text-muted-foreground"+ >+ <img+ :src="client.logo"+ alt=""+ :class="['size-3.5', client.logoClass]"+ />+ {{ client.labelKey ? $t(client.label) : client.label }}+ </span>+ </div>+ <div class="flex flex-col gap-3 p-4">+ <McpCopyField+ :label="$t('mcp.name_label')"+ :value="$t('mcp.connector_name')"+ testid="mcp-dialog-name"+ />+ <McpCopyField+ :label="$t('mcp.url_label')"+ :value="mcpUrl"+ testid="mcp-dialog-url"+ ltr+ />+ <McpCopyField+ v-if="!client.settingsUrl"+ :label="$t('mcp.config_label')"+ :value="configSnippet($t('mcp.connector_name'))"+ testid="mcp-dialog-config"+ multiline+ />+ </div>+ </div>++ <DialogFooter>+ <p+ class="flex items-center gap-1.5 text-sm text-muted-foreground max-sm:w-full max-sm:justify-center sm:me-auto"+ aria-live="polite"+ data-testid="mcp-dialog-waiting"+ >+ <Spinner class="size-3.5 shrink-0 text-primary-text" />+ {{ $t('mcp.dialog.waiting') }}+ </p>+ <Button+ v-if="client.settingsUrl"+ as="a"+ :href="client.settingsUrl"+ target="_blank"+ rel="noopener noreferrer"+ data-testid="mcp-dialog-open"+ >+ {{ $t('mcp.dialog.open', { client: client.label }) }}+ <IconArrowUpRight class="size-4 rtl:-scale-x-100" />+ </Button>+ </DialogFooter>+ </DialogContent>+ </Dialog>+</template>diff --git a/resources/js/components/mcp/McpCopyField.vue b/resources/js/components/mcp/McpCopyField.vuenew file mode 100644index 000000000..8d1d179c1--- /dev/null+++ b/resources/js/components/mcp/McpCopyField.vue@@ -0,0 +1,86 @@+<script setup lang="ts">+import { IconCheck, IconCopy } from '@tabler/icons-vue';+import { onBeforeUnmount, ref } from 'vue';++import { Button } from '@/components/ui/button';+import { copyToClipboard } from '@/lib/utils';++const props = defineProps<{+ label: string;+ value: string;+ testid: string;+ /** Keeps the value left-to-right (URLs) in right-to-left locales. */+ ltr?: boolean;+ /** Shows a multi-line value, such as a config file, in a code block. */+ multiline?: boolean;+}>();++const copied = ref(false);+let copiedTimeout: ReturnType<typeof setTimeout> | null = null;++const copyValue = async (): Promise<void> => {+ const didCopy = await copyToClipboard(props.value, undefined, {+ showSuccessToast: false,+ });++ if (!didCopy) {+ return;+ }++ copied.value = true;++ if (copiedTimeout) {+ clearTimeout(copiedTimeout);+ }++ copiedTimeout = setTimeout(() => {+ copied.value = false;+ }, 2000);+};++onBeforeUnmount(() => {+ if (copiedTimeout) {+ clearTimeout(copiedTimeout);+ }+});+</script>++<template>+ <div class="flex flex-col gap-1.5">+ <span class="text-xs font-medium text-muted-foreground">+ {{ label }}+ </span>+ <div+ :class="[+ 'flex min-w-0 gap-2 rounded-md border border-input bg-card ps-3 pe-1',+ multiline ? 'items-start py-1' : 'h-9 items-center',+ ]"+ >+ <pre+ v-if="multiline"+ dir="ltr"+ class="min-w-0 flex-1 overflow-x-auto py-1.5 text-start font-mono text-xs leading-5 text-foreground"+ :data-testid="testid"+ ><code>{{ value }}</code></pre>+ <span+ v-else+ :dir="ltr ? 'ltr' : undefined"+ class="min-w-0 flex-1 truncate text-sm text-foreground"+ :data-testid="testid"+ >{{ value }}</span+ >+ <Button+ type="button"+ variant="secondary"+ size="sm"+ class="h-7 shrink-0"+ :data-testid="`${testid}-copy`"+ @click="copyValue"+ >+ <IconCheck v-if="copied" class="size-3.5 text-green-500" />+ <IconCopy v-else class="size-3.5" />+ {{ copied ? $t('mcp.copied') : $t('mcp.copy') }}+ </Button>+ </div>+ </div>+</template>diff --git a/resources/js/components/mcp/McpEmptyIllustration.vue b/resources/js/components/mcp/McpEmptyIllustration.vuenew file mode 100644index 000000000..db2d52853--- /dev/null+++ b/resources/js/components/mcp/McpEmptyIllustration.vue@@ -0,0 +1,77 @@+<template>+ <svg+ viewBox="0 0 420 260"+ class="h-auto w-full max-w-md text-border-strong"+ fill="none"+ aria-hidden="true"+ data-testid="mcp-empty-illustration"+ >+ <path+ d="M152 130 H188 M232 130 C 250 130 252 74 272 74 M232 130 H272 M232 130 C 250 130 252 186 272 186"+ stroke="currentColor"+ stroke-dasharray="4 4"+ />++ <g transform="translate(18 46)">+ <rect width="134" height="168" rx="12" class="fill-card" stroke="currentColor" />+ <path d="M0 26 H134" stroke="currentColor" />+ <circle cx="14" cy="13" r="3" class="fill-border-strong" />+ <circle cx="24" cy="13" r="3" class="fill-border-strong" />+ <circle cx="34" cy="13" r="3" class="fill-border-strong" />+ <rect x="46" y="40" width="76" height="24" rx="10" class="fill-primary/20" />+ <rect x="56" y="49" width="52" height="6" rx="3" class="fill-primary/50" />+ <path+ d="M20 82 q0 8 8 8 q-8 0 -8 8 q0 -8 -8 -8 q8 0 8 -8 Z"+ class="fill-primary/70"+ />+ <rect x="36" y="80" width="80" height="6" rx="3" class="fill-muted" />+ <rect x="36" y="93" width="62" height="6" rx="3" class="fill-muted" />+ <rect x="36" y="106" width="70" height="6" rx="3" class="fill-muted" />+ <rect x="12" y="136" width="110" height="20" rx="10" class="fill-card" stroke="currentColor" />+ <circle cx="111" cy="146" r="5" class="fill-muted" />+ </g>++ <g transform="translate(188 108)">+ <rect width="44" height="44" rx="14" class="fill-primary-subtle" />+ <path+ d="M17 13 v7 M27 13 v7 M13 20 h18 v5 a9 9 0 0 1 -18 0 Z M22 34 v4"+ class="stroke-primary-text"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+ </g>++ <g transform="translate(272 54) rotate(-3 64 20)">+ <rect width="128" height="40" rx="10" class="fill-card" stroke="currentColor" />+ <rect x="10" y="9" width="22" height="22" rx="6" class="fill-primary/15" />+ <rect x="15" y="15" width="12" height="11" rx="2" class="stroke-primary/70" stroke-width="1.5" />+ <path d="M15 19 H27" class="stroke-primary/70" stroke-width="1.5" />+ <rect x="42" y="12" width="56" height="6" rx="3" class="fill-muted" />+ <rect x="42" y="23" width="36" height="5" rx="2.5" class="fill-muted" />+ </g>++ <g transform="translate(272 110)">+ <rect width="128" height="40" rx="10" class="fill-card" stroke="currentColor" />+ <rect x="10" y="9" width="22" height="22" rx="6" class="fill-success/15" />+ <path+ d="M15 25 l4 -5 l4 3 l5 -7"+ class="stroke-success/80"+ stroke-width="1.5"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+ <rect x="42" y="12" width="48" height="6" rx="3" class="fill-muted" />+ <rect x="42" y="23" width="62" height="5" rx="2.5" class="fill-muted" />+ </g>++ <g transform="translate(272 166) rotate(3 64 20)">+ <rect width="128" height="40" rx="10" class="fill-card" stroke="currentColor" />+ <rect x="10" y="9" width="22" height="22" rx="6" class="fill-warning/20" />+ <circle cx="21" cy="18" r="4.5" class="stroke-warning" stroke-width="1.5" />+ <path d="M19 25 H23" class="stroke-warning" stroke-width="1.5" stroke-linecap="round" />+ <rect x="42" y="12" width="60" height="6" rx="3" class="fill-muted" />+ <rect x="42" y="23" width="40" height="5" rx="2.5" class="fill-muted" />+ </g>+ </svg>+</template>diff --git a/resources/js/components/mcp/McpPrimarySetup.vue b/resources/js/components/mcp/McpPrimarySetup.vuedeleted file mode 100644index a6c680b18..000000000--- a/resources/js/components/mcp/McpPrimarySetup.vue+++ /dev/null@@ -1,92 +0,0 @@-<script setup lang="ts">-import { IconCopy } from '@tabler/icons-vue';--import SettingsListRow from '@/components/settings/SettingsListRow.vue';-import SettingsSection from '@/components/settings/SettingsSection.vue';-import { Button } from '@/components/ui/button';-import { mcpClients } from '@/lib/mcpClients';-import { copyToClipboard } from '@/lib/utils';--const props = defineProps<{- mcpUrl: string;- copiedMessage: string;-}>();--const copyMcpUrl = (): void => {- copyToClipboard(props.mcpUrl, props.copiedMessage);-};-</script>--<template>- <div class="flex flex-col gap-10">- <SettingsSection :title="$t('mcp.copy_step')">- <div class="flex min-w-0 items-center gap-2">- <code- dir="ltr"- class="flex h-8 min-w-0 flex-1 items-center overflow-hidden rounded-md border border-input bg-card px-2 font-mono text-sm text-foreground dark:bg-input/30"- >- <span class="block min-w-0 truncate">{{ mcpUrl }}</span>- </code>- <Button- type="button"- variant="outline"- class="shrink-0"- data-testid="copy-mcp-url"- @click="copyMcpUrl"- >- <IconCopy class="size-4" />- {{ $t('mcp.copy') }}- </Button>- </div>- </SettingsSection>-- <SettingsSection :title="$t('mcp.open_step')">- <ul class="flex flex-col gap-2">- <SettingsListRow- v-for="client in mcpClients"- :key="client.id"- class="flex-wrap sm:flex-nowrap"- :data-testid="`mcp-primary-client-${client.id}`"- >- <template #media>- <span- class="inline-flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted"- >- <img- :src="client.logo"- :alt="client.label"- :class="['size-5 object-contain', client.logoClass]"- />- </span>- </template>- <p- class="truncate text-sm leading-tight font-emphasis text-foreground"- >- {{ client.label }}- </p>- <p class="text-sm text-muted-foreground">- {{ $t(`mcp.clients.${client.id}`) }}- </p>- <template #actions>- <Button- as-child- variant="outline"- class="w-full shrink-0 sm:w-auto"- >- <a- :href="client.settingsUrl"- target="_blank"- rel="noopener noreferrer"- :data-testid="`mcp-client-${client.id}`"- >- {{- $t('mcp.connect', { client: client.label })- }}- </a>- </Button>- </template>- </SettingsListRow>- </ul>- </SettingsSection>- </div>-</template>diff --git a/resources/js/components/reviews/G2ReviewsLink.vue b/resources/js/components/reviews/G2ReviewsLink.vuenew file mode 100644index 000000000..baaea7f55--- /dev/null+++ b/resources/js/components/reviews/G2ReviewsLink.vue@@ -0,0 +1,23 @@+<script setup lang="ts">+import { IconStarFilled } from '@tabler/icons-vue';++import { G2_REVIEWS_URL } from '@/lib/reviews';+</script>++<template>+ <a+ :href="G2_REVIEWS_URL"+ target="_blank"+ rel="noopener noreferrer"+ class="inline-flex shrink-0 items-center gap-2 rounded-full border border-border bg-card px-3.5 py-1.5 text-sm font-medium text-foreground shadow-xs transition-control hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"+ >+ <span class="flex gap-0.5">+ <IconStarFilled+ v-for="star in 5"+ :key="star"+ class="size-3.5 text-rating"+ />+ </span>+ {{ $t('auth.reviews.eyebrow') }}+ </a>+</template>diff --git a/resources/js/components/reviews/ReviewCard.vue b/resources/js/components/reviews/ReviewCard.vuenew file mode 100644index 000000000..8e2dcc10e--- /dev/null+++ b/resources/js/components/reviews/ReviewCard.vue@@ -0,0 +1,50 @@+<script setup lang="ts">+import { IconStarFilled } from '@tabler/icons-vue';++import type { Review } from '@/lib/reviews';++defineProps<{+ review: Review;+}>();+</script>++<template>+ <figure class="shrink-0 rounded-xl border border-border bg-card p-5">+ <div+ class="flex gap-0.5"+ role="img"+ :aria-label="$t('auth.reviews.eyebrow')"+ >+ <IconStarFilled+ v-for="star in 5"+ :key="star"+ class="size-3.5 text-rating"+ />+ </div>++ <blockquote class="mt-3 text-sm text-foreground">+ “{{ $t(`auth.reviews.${review.key}.quote`) }}”+ </blockquote>++ <figcaption class="mt-4 flex items-center gap-3">+ <img+ :src="review.photo"+ :alt="review.name"+ width="96"+ height="96"+ loading="lazy"+ class="size-10 shrink-0 rounded-lg object-cover"+ />+ <span class="min-w-0">+ <span+ class="block truncate text-sm leading-tight font-emphasis text-foreground"+ >{{ review.name }}</span+ >+ <span+ class="mt-1 block truncate text-sm text-muted-foreground"+ >{{ $t(`auth.reviews.${review.key}.role`) }}</span+ >+ </span>+ </figcaption>+ </figure>+</template>diff --git a/resources/js/components/reviews/ReviewQuote.vue b/resources/js/components/reviews/ReviewQuote.vuenew file mode 100644index 000000000..eb35b7b86--- /dev/null+++ b/resources/js/components/reviews/ReviewQuote.vue@@ -0,0 +1,34 @@+<script setup lang="ts">+import { IconStarFilled } from '@tabler/icons-vue';++import type { Review } from '@/lib/reviews';++defineProps<{+ review: Review;+}>();+</script>++<template>+ <figure class="flex flex-col gap-2">+ <span+ class="flex gap-0.5"+ role="img"+ :aria-label="$t('auth.reviews.eyebrow')"+ >+ <IconStarFilled+ v-for="star in 5"+ :key="star"+ class="size-3.5 text-rating"+ />+ </span>+ <blockquote class="text-sm text-foreground">+ “{{ $t(`auth.reviews.${review.key}.quote`) }}”+ </blockquote>+ <figcaption class="text-xs text-muted-foreground">+ <span class="font-medium text-foreground">{{ review.name }}</span>+ <span class="block">{{+ $t(`auth.reviews.${review.key}.role`)+ }}</span>+ </figcaption>+ </figure>+</template>diff --git a/resources/js/components/ui/button/index.ts b/resources/js/components/ui/button/index.tsindex a0d35e773..a7400daa3 100644--- a/resources/js/components/ui/button/index.ts+++ b/resources/js/components/ui/button/index.ts@@ -9,7 +9,7 @@ export const buttonVariants = cva(variants: {variant: {default:- "bg-primary text-primary-foreground hover:bg-primary-hover active:translate-y-px disabled:bg-border-strong disabled:text-subtle-foreground disabled:opacity-100",+ "bg-primary-strong text-primary-strong-foreground hover:bg-primary-text-hover dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary-hover active:translate-y-px disabled:bg-border-strong disabled:text-subtle-foreground disabled:opacity-100",destructive:"bg-critical text-foreground hover:bg-critical-hover active:translate-y-px disabled:bg-border-strong disabled:text-subtle-foreground disabled:opacity-100",outline:diff --git a/resources/js/components/welcome/WelcomeContinueButton.vue b/resources/js/components/welcome/WelcomeContinueButton.vueindex 8c80422ea..389d7cc57 100644--- a/resources/js/components/welcome/WelcomeContinueButton.vue+++ b/resources/js/components/welcome/WelcomeContinueButton.vue@@ -2,10 +2,13 @@import { IconArrowRight } from '@tabler/icons-vue';import { Button } from '@/components/ui/button';+import { Spinner } from '@/components/ui/spinner';defineProps<{disabled: boolean;testid: string;+ label?: string;+ processing?: boolean;}>();const emit = defineEmits<{@@ -26,7 +29,8 @@ const proceed = (): void => {:data-testid="testid"@click="proceed">- {{ $t('welcome.continue') }}- <IconArrowRight class="size-4 rtl:rotate-180" />+ {{ label ?? $t('welcome.continue') }}+ <Spinner v-if="processing" />+ <IconArrowRight v-else class="size-4 rtl:rotate-180" /></Button></template>diff --git a/resources/js/components/welcome/mcp/McpChatExample.vue b/resources/js/components/welcome/mcp/McpChatExample.vuenew file mode 100644index 000000000..2c00d57d7--- /dev/null+++ b/resources/js/components/welcome/mcp/McpChatExample.vue@@ -0,0 +1,48 @@+<script setup lang="ts">+import { IconCheck } from '@tabler/icons-vue';+import { computed, type Component } from 'vue';++import AppLogo from '@/components/AppLogo.vue';+import McpFollowersMockup from '@/components/welcome/mcp/McpFollowersMockup.vue';+import McpIdeasMockup from '@/components/welcome/mcp/McpIdeasMockup.vue';+import McpQueueMockup from '@/components/welcome/mcp/McpQueueMockup.vue';+import McpScheduleMockup from '@/components/welcome/mcp/McpScheduleMockup.vue';+import date from '@/date';++defineProps<{+ benefit: string;+}>();++const mockups: Record<string, Component> = {+ schedule: McpScheduleMockup,+ analytics: McpFollowersMockup,+ queue: McpQueueMockup,+ ideas: McpIdeasMockup,+};++/** The schedule example's time, in the user's clock format like its card. */+const scheduledTime = computed((): string => date.formatClockTime('10:00'));+</script>++<template>+ <div class="flex flex-col gap-4">+ <p+ class="ms-12 self-end rounded-2xl rounded-ee-sm bg-muted px-3.5 py-2.5 text-sm text-foreground"+ >+ {{ $t(`welcome.mcp.benefits.${benefit}.ask`, { time: scheduledTime }) }}+ </p>+ <div class="flex flex-col gap-2">+ <span+ class="inline-flex items-center gap-1.5 self-start rounded-md border border-border bg-card px-2 py-1 text-xs font-medium text-foreground"+ >+ <AppLogo variant="mark" class="text-[12px]" />+ TryPost+ <IconCheck class="size-3.5 text-green-500" />+ </span>+ <p class="text-sm text-foreground">+ {{ $t(`welcome.mcp.benefits.${benefit}.reply`, { time: scheduledTime }) }}+ </p>+ <component :is="mockups[benefit]" class="mt-1" aria-hidden="true" />+ </div>+ </div>+</template>diff --git a/resources/js/components/welcome/mcp/McpFollowersMockup.vue b/resources/js/components/welcome/mcp/McpFollowersMockup.vuenew file mode 100644index 000000000..c9f5bc61b--- /dev/null+++ b/resources/js/components/welcome/mcp/McpFollowersMockup.vue@@ -0,0 +1,250 @@+<script setup lang="ts">+import { usePage } from '@inertiajs/vue3';+import { ref } from 'vue';++import PlatformLogo from '@/components/PlatformLogo.vue';+import type { ChartConfig } from '@/components/ui/chart';+import ChartTooltipContent from '@/components/ui/chart/ChartTooltipContent.vue';+import { getPlatformLabel } from '@/composables/usePlatformLogo';+import date from '@/date';+import dayjs from '@/dayjs';+import { accountColor } from '@/lib/analyticsColors';+import type { SharedData } from '@/types';++const WIDTH = 300;+const HEIGHT = 100;++/**+ * Illustrative follower history over the last six months, one curve per+ * network, so the example reads like the Insights followers chart. The last+ * month adds up to the 12.4k total and each network gains what the legend says.+ */+const accounts = [+ {+ platform: 'linkedin',+ start: 5200,+ growth: 640,+ values: [6, 24, 16, 48, 70, 100],+ },+ {+ platform: 'instagram',+ start: 4800,+ growth: 420,+ values: [22, 30, 52, 36, 58, 76],+ },+ {+ platform: 'x',+ start: 1200,+ growth: 140,+ values: [4, 12, 8, 18, 14, 30],+ },+].map((account, index) => ({ ...account, color: accountColor(index) }));++const months = Array.from({ length: 6 }, (_, index) =>+ date.userNow().subtract(5 - index, 'month'),+);++const hovered = ref<number | null>(null);++const owner = usePage<SharedData>().props.auth.user;++const tooltipConfig: ChartConfig = Object.fromEntries(+ accounts.map((account) => [+ account.platform,+ {+ label: getPlatformLabel(account.platform),+ color: account.color,+ avatar: {+ platform: account.platform,+ name: owner.name,+ src: owner.has_photo ? owner.photo_url : null,+ },+ },+ ]),+);++const pointY = (value: number): number => HEIGHT - 5 - value * 0.9;++const pointX = (index: number): number => (index * WIDTH) / (months.length - 1);++const followersAt = (+ account: (typeof accounts)[number],+ index: number,+): number => {+ const first = account.values[0];+ const last = account.values[account.values.length - 1];++ return Math.round(+ account.start ++ ((account.values[index] - first) / (last - first)) * account.growth,+ );+};++/** A smooth Catmull-Rom curve through the points, as cubic Béziers. */+const toCurve = (values: number[]): string => {+ const points = values.map(+ (value, index): [number, number] => [pointX(index), pointY(value)],+ );++ return points.reduce((path, [x, y], index) => {+ if (index === 0) {+ return `M${x},${y}`;+ }++ const [x0, y0] = points[Math.max(index - 2, 0)];+ const [x1, y1] = points[index - 1];+ const [x3, y3] = points[Math.min(index + 1, points.length - 1)];++ return `${path} C${x1 + (x - x0) / 6},${y1 + (y - y0) / 6} ${x - (x3 - x1) / 6},${y - (y3 - y1) / 6} ${x},${y}`;+ }, '');+};++const toArea = (values: number[]): string =>+ `${toCurve(values)} L${WIDTH},${HEIGHT} L0,${HEIGHT} Z`;++/** Beside the guide line, on the side with room, so it never hides the points. */+const tooltipPosition = (index: number): Record<string, string> => ({+ left: `${(index / (months.length - 1)) * 100}%`,+ transform:+ index < months.length / 2+ ? 'translateX(12px)'+ : 'translateX(calc(-100% - 12px))',+});++const tooltipPayload = (index: number): Record<string, number> =>+ Object.fromEntries(+ accounts.map((account) => [+ account.platform,+ followersAt(account, index),+ ]),+ );++const formatMonth = (value: number | Date): string => {+ const month = dayjs(value);++ return date.formatMonthYear(month.month() + 1, month.year());+};++const showMonth = (index: number): void => {+ hovered.value = index;+};++const hideMonth = (): void => {+ hovered.value = null;+};+</script>++<template>+ <article+ class="flex flex-col gap-3 rounded-lg border border-border bg-card p-4"+ >+ <div class="flex flex-col gap-0.5">+ <span+ class="font-heading text-xl leading-tight font-medium tabular-nums"+ >+ 12.4k+ </span>+ <span class="text-xs text-muted-foreground">+ {{ $t('analytics.dashboard.total_followers') }}+ </span>+ </div>+ <div class="flex flex-col gap-1.5 border-t border-border pt-3">+ <div class="relative" dir="ltr" @mouseleave="hideMonth">+ <svg+ :viewBox="`0 0 ${WIDTH} ${HEIGHT}`"+ preserveAspectRatio="none"+ class="h-28 w-full overflow-visible"+ >+ <path+ :d="toArea(accounts[0].values)"+ :fill="accounts[0].color"+ fill-opacity="0.08"+ />+ <line+ v-if="hovered !== null"+ :x1="pointX(hovered)"+ :x2="pointX(hovered)"+ y1="0"+ :y2="HEIGHT"+ class="stroke-border-strong"+ vector-effect="non-scaling-stroke"+ />+ <path+ v-for="account in accounts"+ :key="account.platform"+ :d="toCurve(account.values)"+ fill="none"+ :stroke="account.color"+ stroke-width="1.25"+ stroke-linecap="round"+ vector-effect="non-scaling-stroke"+ />+ </svg>++ <template v-if="hovered !== null">+ <span+ v-for="account in accounts"+ :key="account.platform"+ class="pointer-events-none absolute size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-card"+ :style="{+ left: `${(hovered / (months.length - 1)) * 100}%`,+ top: `${(pointY(account.values[hovered]) / HEIGHT) * 100}%`,+ backgroundColor: account.color,+ }"+ />+ <div+ class="pointer-events-none absolute -top-2 z-10"+ :style="tooltipPosition(hovered)"+ data-testid="welcome-mcp-followers-tooltip"+ >+ <ChartTooltipContent+ :config="tooltipConfig"+ :payload="tooltipPayload(hovered)"+ :x="months[hovered].toDate()"+ :label-formatter="formatMonth"+ />+ </div>+ </template>++ <div class="absolute inset-0 flex">+ <span+ v-for="(month, index) in months"+ :key="month.format('YYYY-MM')"+ class="h-full flex-1 cursor-crosshair"+ :data-testid="`welcome-mcp-followers-month-${index}`"+ @mouseenter="showMonth(index)"+ />+ </div>+ </div>+ <div+ class="flex justify-between text-[11px] text-muted-foreground"+ dir="ltr"+ >+ <span+ v-for="month in months"+ :key="month.format('YYYY-MM')"+ >+ {{ date.formatShortMonth(month.month() + 1) }}+ </span>+ </div>+ </div>+ <ul+ class="flex flex-wrap gap-x-5 gap-y-2 border-t border-border pt-3"+ >+ <li+ v-for="account in accounts"+ :key="account.platform"+ class="flex items-center gap-1.5 text-xs"+ >+ <span+ class="size-2.5 shrink-0 rounded-[3px]"+ :style="{ backgroundColor: account.color }"+ />+ <PlatformLogo :platform="account.platform" :size="16" />+ <span class="text-muted-foreground tabular-nums">+ +{{ account.growth }}+ </span>+ </li>+ </ul>+ </article>+</template>diff --git a/resources/js/components/welcome/mcp/McpIdeasMockup.vue b/resources/js/components/welcome/mcp/McpIdeasMockup.vuenew file mode 100644index 000000000..4761a3e0c--- /dev/null+++ b/resources/js/components/welcome/mcp/McpIdeasMockup.vue@@ -0,0 +1,55 @@+<script setup lang="ts">+import { IconPlus } from '@tabler/icons-vue';++/** The board's default stages: the 8 new ideas land in To do. */+const columns = [+ { stage: 'todo', count: 8, cards: ['#6D43CC', '#159B92'] },+ { stage: 'in_progress', count: 2, cards: ['#E9833D', '#347AB7'] },+];+</script>++<template>+ <div class="grid grid-cols-2 gap-3">+ <section+ v-for="column in columns"+ :key="column.stage"+ :data-testid="`welcome-mcp-ideas-stage-${column.stage}`"+ class="flex flex-col gap-2 rounded-lg bg-secondary p-2"+ >+ <header class="flex h-7 items-center gap-1.5 px-1">+ <span class="truncate text-xs font-medium text-foreground">+ {{ $t(`create.ideas.default_stages.${column.stage}`) }}+ </span>+ <span+ class="inline-flex h-4.5 min-w-4.5 items-center justify-center rounded-full bg-card px-1 text-xs font-medium text-muted-foreground"+ >+ {{ column.count }}+ </span>+ </header>+ <article+ v-for="color in column.cards"+ :key="color"+ class="flex flex-col gap-2 rounded-lg border border-border bg-card p-3"+ >+ <span class="h-2 w-3/4 rounded-full bg-border-strong" />+ <span class="h-2 w-full rounded-full bg-muted" />+ <span class="h-2 w-2/3 rounded-full bg-muted" />+ <span+ class="inline-flex items-center gap-1.5 self-start rounded-full border border-border bg-card px-2 py-0.5 shadow-2xs"+ >+ <span+ class="size-2 rounded-full"+ :style="{ backgroundColor: color }"+ />+ <span class="h-1.5 w-8 rounded-full bg-muted" />+ </span>+ </article>+ <span+ class="flex h-7 items-center justify-center gap-1 text-xs font-medium text-muted-foreground"+ >+ <IconPlus class="size-3.5" />+ {{ $t('create.ideas.new') }}+ </span>+ </section>+ </div>+</template>diff --git a/resources/js/components/welcome/mcp/McpQueueMockup.vue b/resources/js/components/welcome/mcp/McpQueueMockup.vuenew file mode 100644index 000000000..2f7e511ed--- /dev/null+++ b/resources/js/components/welcome/mcp/McpQueueMockup.vue@@ -0,0 +1,62 @@+<script setup lang="ts">+import { usePage } from '@inertiajs/vue3';+import { IconPlus } from '@tabler/icons-vue';++import ChannelAvatar from '@/components/ChannelAvatar.vue';+import PlatformBrandIcon from '@/components/PlatformBrandIcon.vue';+import date from '@/date';+import type { SharedData } from '@/types';++const posts = [+ { time: '09:00', platform: 'linkedin' },+ { time: '12:30', platform: 'instagram' },+ { time: '15:00', platform: 'facebook' },+];++const owner = usePage<SharedData>().props.auth.user;+const ownerPhoto = owner.has_photo ? owner.photo_url : null;+</script>++<template>+ <section class="flex flex-col gap-2.5">+ <h3 class="text-sm font-emphasis text-foreground">+ {{ $t('posts.publish.tomorrow') }}+ </h3>+ <div+ v-for="post in posts"+ :key="post.time"+ class="grid grid-cols-[4.5rem_minmax(0,1fr)] items-center gap-x-4"+ >+ <time class="text-sm font-medium text-foreground">+ {{ date.formatClockTime(post.time) }}+ </time>+ <article+ class="flex items-center gap-3 rounded-xl border border-border-strong bg-card p-3"+ >+ <ChannelAvatar+ :platform="post.platform"+ :name="owner.name"+ :src="ownerPhoto"+ :size="28"+ ring="card"+ />+ <div class="flex min-w-0 flex-1 flex-col gap-1.5">+ <span class="h-2 w-4/5 rounded-full bg-muted" />+ <span class="h-2 w-1/2 rounded-full bg-muted" />+ </div>+ </article>+ </div>+ <div class="grid grid-cols-[4.5rem_minmax(0,1fr)] items-center gap-x-4">+ <time class="text-sm font-medium text-foreground">+ {{ date.formatClockTime('18:00') }}+ </time>+ <span+ class="flex h-12 items-center gap-1 rounded-xl border border-border-strong bg-card px-2 text-sm font-medium text-foreground"+ >+ <PlatformBrandIcon platform="x" colored />+ <IconPlus class="size-4" />+ {{ $t('posts.publish.new_in_slot') }}+ </span>+ </div>+ </section>+</template>diff --git a/resources/js/components/welcome/mcp/McpScheduleMockup.vue b/resources/js/components/welcome/mcp/McpScheduleMockup.vuenew file mode 100644index 000000000..c433c4e36--- /dev/null+++ b/resources/js/components/welcome/mcp/McpScheduleMockup.vue@@ -0,0 +1,69 @@+<script setup lang="ts">+import { usePage } from '@inertiajs/vue3';+import { IconClock, IconPhoto } from '@tabler/icons-vue';++import ChannelAvatar from '@/components/ChannelAvatar.vue';+import { Badge } from '@/components/ui/badge';+import date from '@/date';+import type { SharedData } from '@/types';++const slideCount = 4;++/** The reply schedules the carousel on both networks: one post each. */+const platforms = ['instagram', 'linkedin'] as const;++const owner = usePage<SharedData>().props.auth.user;+const ownerPhoto = owner.has_photo ? owner.photo_url : null;+</script>++<template>+ <div+ class="grid gap-y-2 sm:grid-cols-[4.5rem_minmax(0,1fr)] sm:gap-x-4"+ >+ <time class="text-sm font-medium text-foreground sm:pt-4">+ {{ date.formatClockTime('10:00') }}+ </time>+ <div class="flex flex-col gap-1.5">+ <article+ v-for="platform in platforms"+ :key="platform"+ class="rounded-xl border border-border-strong bg-card"+ :data-testid="`welcome-mcp-schedule-post-${platform}`"+ >+ <div class="flex flex-col gap-4 p-4 sm:flex-row">+ <div class="flex min-w-0 flex-1 flex-col gap-2.5">+ <div class="flex items-center gap-3">+ <ChannelAvatar+ :platform="platform"+ :name="owner.name"+ :src="ownerPhoto"+ :size="32"+ ring="card"+ />+ <span class="truncate text-sm font-emphasis">{{+ owner.name+ }}</span>+ </div>+ <div class="flex flex-col gap-2">+ <span class="h-2 w-full rounded-full bg-muted" />+ <span class="h-2 w-5/6 rounded-full bg-muted" />+ </div>+ <Badge class="h-6 gap-1 self-start px-2 [&>svg]:size-4">+ <IconClock />+ {{ $t('posts.status.scheduled') }}+ </Badge>+ </div>+ <div class="grid shrink-0 grid-cols-4 content-start gap-1.5 sm:w-24 sm:grid-cols-2">+ <span+ v-for="slide in slideCount"+ :key="slide"+ class="flex aspect-square items-center justify-center rounded-md border border-border-strong bg-secondary"+ >+ <IconPhoto class="size-4 text-muted-foreground" />+ </span>+ </div>+ </div>+ </article>+ </div>+ </div>+</template>diff --git a/resources/js/composables/useAutoRotate.ts b/resources/js/composables/useAutoRotate.tsnew file mode 100644index 000000000..513db4224--- /dev/null+++ b/resources/js/composables/useAutoRotate.ts@@ -0,0 +1,63 @@+import { useIntervalFn, useMediaQuery } from '@vueuse/core';+import { ref, watch, type Ref } from 'vue';++/**+ * Cycles an index through `count` items every `intervalMs`, pausing while the+ * pointer is over the carousel and never moving for reduced-motion users.+ * `stop()` ends the rotation for good, for when the user picks an item.+ */+export const useAutoRotate = (+ count: number,+ intervalMs: number,+): {+ active: Ref<number>;+ select: (index: number) => void;+ pause: () => void;+ resume: () => void;+ stop: () => void;+} => {+ const active = ref(0);+ const stopped = ref(false);+ const prefersReducedMotion = useMediaQuery(+ '(prefers-reduced-motion: reduce)',+ );++ const showNext = (): void => {+ active.value = (active.value + 1) % count;+ };++ const interval = useIntervalFn(showNext, intervalMs, { immediate: false });++ const select = (index: number): void => {+ active.value = index;+ };++ const pause = (): void => {+ interval.pause();+ };++ const resume = (): void => {+ if (!prefersReducedMotion.value && !stopped.value) {+ interval.resume();+ }+ };++ const stop = (): void => {+ stopped.value = true;+ interval.pause();+ };++ watch(+ prefersReducedMotion,+ (reduced) => {+ if (reduced || stopped.value) {+ interval.pause();+ } else {+ interval.resume();+ }+ },+ { immediate: true },+ );++ return { active, select, pause, resume, stop };+};diff --git a/resources/js/composables/useSettingsNavigation.ts b/resources/js/composables/useSettingsNavigation.tsindex 6394e4037..ddb992866 100644--- a/resources/js/composables/useSettingsNavigation.ts+++ b/resources/js/composables/useSettingsNavigation.ts@@ -3,11 +3,11 @@ import {IconLayoutGrid,IconBell,IconCoin,+ IconCode,IconSignature,- IconKey,- IconLock,- IconPlugConnected,- IconSettings,+ IconFingerprint,+ IconPlug,+ IconBuilding,IconAdjustmentsHorizontal,IconTag,IconUser,@@ -92,7 +92,7 @@ export const useSettingsNavigation = () => {...item('authentication',authenticationEdit.url(),- IconLock,+ IconFingerprint,true,),...item(@@ -110,7 +110,7 @@ export const useSettingsNavigation = () => {...item('general',workspaceSettings.url(),- IconSettings,+ IconBuilding,workspace && canManageWorkspace.value,),...item(@@ -126,11 +126,17 @@ export const useSettingsNavigation = () => {IconUsers,workspace && canManageWorkspace.value,),+ ...item(+ 'billing',+ billing.url(),+ IconCoin,+ canManageBilling.value && !selfHosted.value,+ ),],},{- key: 'features',- label: trans('settings.sidebar.groups.features'),+ key: 'content',+ label: trans('settings.sidebar.groups.content'),items: [...item('signatures',@@ -144,36 +150,24 @@ export const useSettingsNavigation = () => {IconTag,workspace && canCreatePost.value,),- ...item(- 'webhooks',- webhooks.url(),- IconWebhook,- workspace && canManageWebhooks.value,- ),],},{- key: 'developers',- label: trans('settings.sidebar.groups.developers'),+ key: 'integrations',+ label: trans('settings.sidebar.groups.integrations'),items: [...item('api_keys',apiKeys.url(),- IconKey,+ IconCode,workspace && canManageWorkspace.value,),- ...item('mcp', mcp.url(), IconPlugConnected, workspace),- ],- },- {- key: 'account',- label: trans('settings.sidebar.groups.account'),- items: [+ ...item('mcp', mcp.url(), IconPlug, workspace),...item(- 'billing',- billing.url(),- IconCoin,- canManageBilling.value && !selfHosted.value,+ 'webhooks',+ webhooks.url(),+ IconWebhook,+ workspace && canManageWebhooks.value,),],},diff --git a/resources/js/date.ts b/resources/js/date.tsindex 10b440172..f0b95cc65 100644--- a/resources/js/date.ts+++ b/resources/js/date.ts@@ -354,6 +354,9 @@ export default {/** The signed-in user's time zone (`users.timezone`), never the browser's. */getUserTimezone,+ /** Now as a wall clock in the user's zone, never the browser clock. */+ userNow,+/*** Formata uma data para o formato YYYY-MM-DD (usado em DatePicker)* Evita problemas de timezone ao não criar objeto Datediff --git a/resources/js/layouts/SettingsLayout.vue b/resources/js/layouts/SettingsLayout.vueindex d6e606685..91d1d1213 100644--- a/resources/js/layouts/SettingsLayout.vue+++ b/resources/js/layouts/SettingsLayout.vue@@ -1,4 +1,6 @@<script setup lang="ts">+import { IconExternalLink } from '@tabler/icons-vue';+import SettingsSidebar from '@/components/settings/SettingsSidebar.vue';import AppSidebarLayout from '@/layouts/app/AppSidebarLayout.vue';@@ -7,6 +9,8 @@ type Props = {centered?: boolean;title?: string;description?: string;+ /** Docs page linked as "Learn more" at the end of the description. */+ learnMoreUrl?: string;};withDefaults(defineProps<Props>(), {@@ -14,6 +18,7 @@ withDefaults(defineProps<Props>(), {centered: false,title: undefined,description: undefined,+ learnMoreUrl: undefined,});</script>@@ -58,6 +63,17 @@ withDefaults(defineProps<Props>(), {data-testid="settings-page-description">{{ description }}+ <a+ v-if="learnMoreUrl"+ :href="learnMoreUrl"+ target="_blank"+ rel="noopener noreferrer"+ class="inline-flex items-center gap-1 text-primary-text underline underline-offset-2 hover:text-primary-text-hover"+ data-testid="settings-page-learn-more"+ >+ {{ $t('common.learn_more') }}+ <IconExternalLink class="size-3.5" />+ </a></p></div><divdiff --git a/resources/js/layouts/WelcomeLayout.vue b/resources/js/layouts/WelcomeLayout.vueindex 0eca5e959..0ce1ebfc1 100644--- a/resources/js/layouts/WelcomeLayout.vue+++ b/resources/js/layouts/WelcomeLayout.vue@@ -12,11 +12,13 @@ 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';const maxWidthClass = {+ sm: 'max-w-sm',lg: 'max-w-lg','3xl': 'max-w-3xl','4xl': 'max-w-4xl',@@ -31,12 +33,14 @@ const props = withDefaults(description?: string;step?: WelcomeStep;size?: MaxWidthSize;+ actionsSize?: MaxWidthSize;}>(),{title: undefined,description: undefined,step: undefined,size: '3xl',+ actionsSize: 'sm',},);@@ -58,6 +62,7 @@ const steps = [{ key: 'persona', route: personaRoute() },{ key: 'goals', route: goalsRoute() },{ key: 'software', route: softwareRoute() },+ { key: 'plan', route: planRoute() },] as const;const currentIndex = computed(() =>@@ -140,13 +145,13 @@ const previousStep = computed(() =>trigger-class="bg-card max-sm:px-2 max-sm:[&>span]:sr-only"@update:model-value="changeLanguage"/>- <ThemeToggle compact-on-mobile />+ <ThemeToggle /></div></header><main:class="[- 'flex flex-1 flex-col px-4 py-12 sm:px-8 lg:px-12',+ 'flex flex-1 flex-col px-4 pt-6 pb-12 sm:px-8 sm:pt-12 lg:px-12',$slots.actions &&'max-sm:pb-[calc(7rem+env(safe-area-inset-bottom))]',]"@@ -168,7 +173,8 @@ const previousStep = computed(() =>/><h1v-if="title"- class="motion-auth-reveal mx-auto max-w-xl font-heading text-[28px] leading-9 font-medium text-balance text-foreground sm:text-[32px] sm:leading-10"+ class="motion-auth-reveal mx-auto max-w-xl font-heading text-[22px] leading-7 font-medium text-balance text-foreground sm:text-[32px] sm:leading-10"+ data-testid="welcome-title">{{ title }}</h1>@@ -186,7 +192,10 @@ const previousStep = computed(() =><divv-if="$slots.actions"- class="flex w-full max-w-sm flex-col items-center gap-3 max-sm:fixed max-sm:inset-x-0 max-sm:bottom-0 max-sm:z-10 max-sm:max-w-none max-sm:border-t max-sm:border-border max-sm:bg-card max-sm:px-4 max-sm:pt-3 max-sm:pb-[max(0.75rem,env(safe-area-inset-bottom))]"+ :class="[+ 'flex w-full flex-col items-center gap-3 max-sm:fixed max-sm:inset-x-0 max-sm:bottom-0 max-sm:z-10 max-sm:max-w-none max-sm:border-t max-sm:border-border max-sm:bg-card max-sm:px-4 max-sm:pt-3 max-sm:pb-[max(0.75rem,env(safe-area-inset-bottom))]',+ maxWidthClass[actionsSize],+ ]"data-testid="welcome-actions"><slot name="actions" />diff --git a/resources/js/layouts/auth/AuthSplitLayout.vue b/resources/js/layouts/auth/AuthSplitLayout.vueindex 175cb3385..0b0405e64 100644--- a/resources/js/layouts/auth/AuthSplitLayout.vue+++ b/resources/js/layouts/auth/AuthSplitLayout.vue@@ -1,12 +1,15 @@<script setup lang="ts">import { usePage } from '@inertiajs/vue3';-import { IconCircleCheck, IconStarFilled } from '@tabler/icons-vue';+import { IconCircleCheck } from '@tabler/icons-vue';import { computed } from 'vue';import AppLogo from '@/components/AppLogo.vue';import LanguageSelect from '@/components/LanguageSelect.vue';+import G2ReviewsLink from '@/components/reviews/G2ReviewsLink.vue';+import ReviewCard from '@/components/reviews/ReviewCard.vue';import { Alert, AlertDescription } from '@/components/ui/alert';import { useGuestLocale } from '@/composables/useGuestLocale';+import { REVIEWS } from '@/lib/reviews';import type { Auth } from '@/types';const widthClass = {@@ -36,35 +39,7 @@ const page = usePage();const isGuest = computed(() => !(page.props.auth as Auth).user);const { locale, languages } = useGuestLocale();-const g2ReviewsUrl = 'https://www.g2.com/products/trypost/reviews';--const reviews = [- {- key: 'paulo_dantas',- name: 'Paulo Dantas',- photo: '/images/reviews/paulo-dantas.jpg',- },- {- key: 'diego',- name: 'Diego Sampaio',- photo: '/images/reviews/diego-sampaio.jpg',- },- {- key: 'luiz',- name: 'Luiz Mazini',- photo: '/images/reviews/luiz-mazini.jpg',- },- {- key: 'pedro',- name: 'Pedro Campos',- photo: '/images/reviews/pedro-campos.jpg',- },- {- key: 'paulo_castellano',- name: 'Paulo Castellano',- photo: '/images/reviews/paulo-castellano.jpg',- },-].map((review, index) => ({+const reviews = REVIEWS.map((review, index) => ({...review,rotation: index % 2 === 0 ? '-rotate-1' : 'rotate-1',}));@@ -171,68 +146,19 @@ const loopedReviews = [class="marquee mx-auto flex w-full max-w-md flex-col gap-4 text-start"data-testid="auth-reviews">- <figure+ <ReviewCardv-for="(review, index) in loopedReviews":key="`${review.key}-${index}`"- class="shrink-0 rounded-xl border border-border bg-card p-5"+ :review="review":class="review.rotation":aria-hidden="review.duplicate"- >- <div class="flex gap-0.5">- <IconStarFilled- v-for="star in 5"- :key="star"- class="size-3.5 text-amber-500"- />- </div>-- <blockquote- class="mt-3 text-sm text-foreground"- >- “{{ $t(`auth.reviews.${review.key}.quote`) }}”- </blockquote>-- <figcaption class="mt-4 flex items-center gap-3">- <img- :src="review.photo"- :alt="review.name"- width="96"- height="96"- loading="lazy"- class="size-10 shrink-0 rounded-lg object-cover"- />- <span class="min-w-0">- <span- class="block truncate text-sm leading-tight font-emphasis text-foreground"- >{{ review.name }}</span- >- <span- class="mt-1 block truncate text-sm text-muted-foreground"- >{{- $t(`auth.reviews.${review.key}.role`)- }}</span- >- </span>- </figcaption>- </figure>+ /></div></div>- <a- :href="g2ReviewsUrl"- target="_blank"- rel="noopener noreferrer"- class="motion-auth-fade my-6 inline-flex shrink-0 items-center gap-2 rounded-full border border-border bg-card px-3.5 py-1.5 text-sm font-medium text-foreground shadow-xs transition-control hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"+ <G2ReviewsLink+ class="motion-auth-fade my-6"data-testid="auth-reviews-g2-link"- >- <span class="flex gap-0.5">- <IconStarFilled- v-for="star in 5"- :key="star"- class="size-3.5 text-amber-500"- />- </span>- {{ $t('auth.reviews.eyebrow') }}- </a>+ /></div></div></div>diff --git a/resources/js/lib/mcpClients.ts b/resources/js/lib/mcpClients.tsindex 004d06808..10cd19b72 100644--- a/resources/js/lib/mcpClients.ts+++ b/resources/js/lib/mcpClients.ts@@ -1,30 +1,51 @@-export type PrimaryMcpClientId = 'claude' | 'chatgpt';+export type McpClientId = 'claude' | 'chatgpt' | 'other';export interface McpClient {- id: PrimaryMcpClientId;+ id: McpClientId;+ /** A brand name, or a lang key to resolve with `$t` when `labelKey` is set. */label: string;+ labelKey?: boolean;+ /** The mark on neutral surfaces, with `logoClass` for the theme. */logo: string;- settingsUrl: string;logoClass?: string;+ /** A black mark for primary buttons, inverted to white in light mode. */+ monoLogo: string;+ /** Where the user adds a connector in that client; none for a generic app. */+ settingsUrl?: string;}+/** Opens Claude straight on the "Add custom connector" dialog. */+const CLAUDE_ADD_CONNECTOR_URL =+ 'https://claude.ai/new?modal=add-custom-connector#customize/connectors/yours';+/**- * First-class MCP clients surfaced on workspace MCP settings.- * `settingsUrl` is the client's connector-management entry point (per the- * official OpenAI/Anthropic docs), not a deep link into a specific form.+ * First-class MCP clients surfaced on workspace MCP settings and the Welcome+ * MCP step. `settingsUrl` is where the user adds a connector in that client.*/export const mcpClients: McpClient[] = [{id: 'claude',label: 'Claude',- logo: '/images/ai/claude.svg',- settingsUrl: 'https://claude.ai/customize/connectors',+ logo: '/images/ai/claude-color.svg',+ monoLogo: '/images/ai/claude-mono.svg',+ settingsUrl: CLAUDE_ADD_CONNECTOR_URL,},{id: 'chatgpt',label: 'ChatGPT',- logo: '/images/ai/chatgpt-white.svg',+ logo: '/images/ai/openai.svg',+ logoClass: 'dark:invert',+ monoLogo: '/images/ai/openai.svg',settingsUrl: 'https://chatgpt.com/plugins',- logoClass: 'invert dark:invert-0',},];++/** Any other MCP-capable app: it gets the name, URL and config to paste. */+export const otherMcpClient: McpClient = {+ id: 'other',+ label: 'mcp.other_clients_title',+ labelKey: true,+ logo: '/images/ai/mcp.svg',+ logoClass: 'dark:invert',+ monoLogo: '/images/ai/mcp.svg',+};diff --git a/resources/js/lib/reviews.ts b/resources/js/lib/reviews.tsnew file mode 100644index 000000000..56f975832--- /dev/null+++ b/resources/js/lib/reviews.ts@@ -0,0 +1,36 @@+/** G2 reviews of TryPost, shown on the auth screens and the Welcome plan step. */+export interface Review {+ key: string;+ name: string;+ photo: string;+}++export const G2_REVIEWS_URL = 'https://www.g2.com/products/trypost/reviews';++export const REVIEWS: Review[] = [+ {+ key: 'paulo_dantas',+ name: 'Paulo Dantas',+ photo: '/images/reviews/paulo-dantas.jpg',+ },+ {+ key: 'diego',+ name: 'Diego Sampaio',+ photo: '/images/reviews/diego-sampaio.jpg',+ },+ {+ key: 'luiz',+ name: 'Luiz Mazini',+ photo: '/images/reviews/luiz-mazini.jpg',+ },+ {+ key: 'pedro',+ name: 'Pedro Campos',+ photo: '/images/reviews/pedro-campos.jpg',+ },+ {+ key: 'paulo_castellano',+ name: 'Paulo Castellano',+ photo: '/images/reviews/paulo-castellano.jpg',+ },+];diff --git a/resources/js/pages/billing/Processing.vue b/resources/js/pages/billing/Processing.vueindex 5596423f7..7dae680f7 100644--- a/resources/js/pages/billing/Processing.vue+++ b/resources/js/pages/billing/Processing.vue@@ -3,8 +3,10 @@ import { Head, router, usePage, usePoll } from '@inertiajs/vue3';import { IconLoader2 } from '@tabler/icons-vue';import { computed, onMounted, ref, watch } from 'vue';-import AppLogo from '@/components/AppLogo.vue';+import { useBelowBreakpoint } from '@/composables/useBreakpoint';+import AuthSplitLayout from '@/layouts/auth/AuthSplitLayout.vue';import { index as postsIndex } from '@/routes/app/posts';+import { mcp } from '@/routes/app/welcome';import type { SharedData } from '@/types';const props = defineProps<{@@ -24,8 +26,11 @@ const purchaseReady = computed((): boolean => props.subscriptionActive && page.props.auth.plan !== null,);+const isPhone = useBelowBreakpoint('sm');++/** Connecting an AI is a desktop task, so phones go straight to the schedule. */const goNext = (): void => {- router.visit(postsIndex.url());+ router.visit(isPhone.value ? postsIndex.url() : mcp.url());};// Card-required trials are already `subscribed()` (`trialing`) on first paint.@@ -54,28 +59,15 @@ onMounted(() => {<template><Head :title="$t('billing.processing.page_title')" />- <section- class="flex min-h-svh flex-col items-center bg-muted px-4 pt-13 pb-8 sm:justify-center sm:px-8"+ <AuthSplitLayout+ :title="$t('billing.processing.title')"+ :description="$t('billing.processing.description')">- <div- class="flex w-full max-w-[360px] flex-col items-center gap-6 text-center"- data-testid="billing-processing"- >- <AppLogo variant="mark" class="motion-auth-logo text-[38px]" />- <div class="flex flex-col gap-4">- <h1- class="font-heading text-xl leading-tight font-medium text-balance text-foreground"- >- {{ $t('billing.processing.title') }}- </h1>- <p class="text-base text-balance text-foreground">- {{ $t('billing.processing.description') }}- </p>- </div>+ <div class="flex justify-center" data-testid="billing-processing"><IconLoader2class="size-6 animate-spin text-primary-strong motion-reduce:animate-none"aria-hidden="true"/></div>- </section>+ </AuthSplitLayout></template>diff --git a/resources/js/pages/settings/workspace/Mcp.vue b/resources/js/pages/settings/workspace/Mcp.vueindex 575420b07..c05816fa6 100644--- a/resources/js/pages/settings/workspace/Mcp.vue+++ b/resources/js/pages/settings/workspace/Mcp.vue@@ -2,19 +2,17 @@import { Head, usePoll } from '@inertiajs/vue3';import {IconDotsVertical,- IconExternalLink,IconPlugConnected,+ IconPlus,IconTrash,} from '@tabler/icons-vue';-import { ref } from 'vue';+import { computed, onBeforeUnmount, ref, watch } from 'vue';import ConfirmDeleteModal from '@/components/ConfirmDeleteModal.vue';import EmptyState from '@/components/EmptyState.vue';-import McpAdvancedClients from '@/components/mcp/McpAdvancedClients.vue';-import McpPrimarySetup from '@/components/mcp/McpPrimarySetup.vue';+import McpConnectDialog from '@/components/mcp/McpConnectDialog.vue';+import McpEmptyIllustration from '@/components/mcp/McpEmptyIllustration.vue';import SettingsListRow from '@/components/settings/SettingsListRow.vue';-import SettingsRow from '@/components/settings/SettingsRow.vue';-import SettingsSection from '@/components/settings/SettingsSection.vue';import { Button } from '@/components/ui/button';import {DropdownMenu,@@ -22,10 +20,13 @@ import {DropdownMenuItem,DropdownMenuTrigger,} from '@/components/ui/dropdown-menu';-import { Separator } from '@/components/ui/separator';+import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';import date from '@/date';import SettingsLayout from '@/layouts/SettingsLayout.vue';+import { DOCS_URL } from '@/lib/docs';+import { mcpClients, otherMcpClient, type McpClient } from '@/lib/mcpClients';import { disconnect as mcpDisconnect } from '@/routes/app/mcp';+import { fireCelebration } from '@/utils/confetti';interface ConnectedClient {client_id: string;@@ -34,24 +35,76 @@ interface ConnectedClient {last_used_at: string | null;}-defineProps<{+const props = defineProps<{mcpUrl: string;connectedClients: ConnectedClient[];}>();-const docsUrl = 'https://docs.trypost.it/ai/introduction';+const docsUrl = `${DOCS_URL}/ai/introduction`;++/** Shows the Claude or ChatGPT mark when the connected app is one of them. */+const connectedRows = computed(() =>+ props.connectedClients.map((client) => ({+ ...client,+ app:+ mcpClients.find((app) =>+ client.name.toLowerCase().includes(app.label.toLowerCase()),+ ) ?? null,+ })),+);const deleteModal = ref<InstanceType<typeof ConfirmDeleteModal> | null>(null);usePoll(1000, {only: ['connectedClients'],});-const confirmDisconnect = (client: ConnectedClient): void => {+const confirmDisconnect = (client: ConnectedClient, keyword: string): void => {deleteModal.value?.open({url: mcpDisconnect.url({ client: client.client_id }),- confirmText: client.name,+ confirmText: keyword,});};++const connectableClients: McpClient[] = [...mcpClients, otherMcpClient];++const activeClient = ref<McpClient>(mcpClients[0]);+const dialogOpen = ref(false);++const connectWith = (client: McpClient): void => {+ activeClient.value = client;+ dialogOpen.value = true;+};++type McpTab = 'connected' | 'connect';++const tab = ref<McpTab>('connected');++const showConnectTab = (): void => {+ tab.value = 'connect';+};++const connectedCount = computed((): number => props.connectedClients.length);++let stopConfetti = (): void => {};++/**+ * The poll notices the new connection while the user is in the other browser+ * tab: close the steps, show it in the connected list and celebrate.+ */+const showNewConnection = (count: number, previous: number): void => {+ if (count > previous) {+ dialogOpen.value = false;+ tab.value = 'connected';+ stopConfetti();+ stopConfetti = fireCelebration();+ }+};++watch(connectedCount, showNewConnection);++onBeforeUnmount(() => {+ stopConfetti();+});</script><template>@@ -60,33 +113,47 @@ const confirmDisconnect = (client: ConnectedClient): void => {<SettingsLayout:title="$t('mcp.title')":description="$t('mcp.subtitle')"+ :learn-more-url="docsUrl">- <div class="flex flex-col gap-10">- <McpPrimarySetup- :mcp-url="mcpUrl"- :copied-message="$t('mcp.copied')"- />+ <Tabs v-model="tab" class="flex flex-col gap-6">+ <TabsList variant="line">+ <TabsTrigger value="connected" data-testid="mcp-tab-connected">+ {{ $t('mcp.tabs.connected') }}+ </TabsTrigger>+ <TabsTrigger value="connect" data-testid="mcp-tab-connect">+ {{ $t('mcp.tabs.connect') }}+ </TabsTrigger>+ </TabsList>- <Separator />-- <McpAdvancedClients :mcp-url="mcpUrl" />-- <Separator />-- <SettingsSection- :title="$t('mcp.connected_title')"- :description="$t('mcp.connected_description')"- >+ <TabsContent value="connected" class="flex flex-col gap-4">+ <p+ v-if="connectedClients.length > 0"+ class="text-sm text-muted-foreground"+ >+ {{ $t('mcp.connected_description') }}+ </p><ulv-if="connectedClients.length > 0"class="flex flex-col gap-2"><SettingsListRow- v-for="client in connectedClients"+ v-for="client in connectedRows":key="client.client_id"- :icon="IconPlugConnected"+ :icon="client.app ? undefined : IconPlugConnected":data-testid="`mcp-connected-client-${client.client_id}`">+ <template v-if="client.app" #media>+ <span+ class="inline-flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted"+ >+ <img+ :src="client.app.logo"+ alt=""+ :class="['size-5 object-contain', client.app.logoClass]"+ :data-testid="`mcp-connected-logo-${client.app.id}`"+ />+ </span>+ </template><pclass="truncate text-sm leading-tight font-emphasis text-foreground">@@ -117,7 +184,12 @@ const confirmDisconnect = (client: ConnectedClient): void => {<DropdownMenuItemvariant="destructive":data-testid="`mcp-disconnect-${client.client_id}`"- @click="confirmDisconnect(client)"+ @click="+ confirmDisconnect(+ client,+ $t('channels.disconnect_modal.keyword'),+ )+ "><IconTrash class="size-4" />{{ $t('mcp.disconnect') }}@@ -128,31 +200,85 @@ const confirmDisconnect = (client: ConnectedClient): void => {</SettingsListRow></ul>- <div+ <EmptyStatev-else- class="rounded-xl border border-dashed border-border-strong"+ class="py-6"+ :title="$t('mcp.connected_empty_title')"+ :description="$t('mcp.connected_empty')"data-testid="mcp-connected-empty">- <EmptyState- :icon="IconPlugConnected"- :title="$t('mcp.connected_empty_title')"- :description="$t('mcp.connected_empty')"- />- </div>- </SettingsSection>-- <Separator />-- <SettingsRow- :title="$t('mcp.documentation_title')"- :description="$t('mcp.documentation_description')"- >- <Button as="a" variant="outline" target="_blank" :href="docsUrl">- <IconExternalLink class="size-4" />- {{ $t('mcp.view_docs') }}- </Button>- </SettingsRow>- </div>+ <template #illustration>+ <McpEmptyIllustration />+ </template>+ <template #action>+ <Button+ type="button"+ data-testid="mcp-connected-empty-connect"+ @click="showConnectTab"+ >+ <IconPlus class="size-4" />+ {{ $t('mcp.tabs.connect') }}+ </Button>+ </template>+ </EmptyState>+ </TabsContent>++ <TabsContent value="connect" class="flex flex-col gap-4">+ <ul class="flex flex-col gap-2">+ <SettingsListRow+ v-for="client in connectableClients"+ :key="client.id"+ :data-testid="`mcp-primary-client-${client.id}`"+ >+ <template #media>+ <span+ class="inline-flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted"+ >+ <img+ :src="client.logo"+ alt=""+ :class="['size-5 object-contain', client.logoClass]"+ />+ </span>+ </template>+ <p+ class="truncate text-sm leading-tight font-emphasis text-foreground"+ >+ {{ client.labelKey ? $t(client.label) : client.label }}+ </p>+ <p+ v-if="client.labelKey"+ class="text-sm text-muted-foreground"+ >+ {{ $t('mcp.other_hint') }}+ </p>+ <template #actions>+ <Button+ type="button"+ variant="outline"+ class="shrink-0"+ :data-testid="`mcp-connect-${client.id}`"+ @click="connectWith(client)"+ >+ {{+ client.labelKey+ ? $t('mcp.connect_other')+ : $t('mcp.connect', { client: client.label })+ }}+ </Button>+ </template>+ </SettingsListRow>++ </ul>++ </TabsContent>+ </Tabs>++ <McpConnectDialog+ v-model:open="dialogOpen"+ :client="activeClient"+ :mcp-url="mcpUrl"+ /><ConfirmDeleteModalref="deleteModal"diff --git a/resources/js/pages/welcome/Goals.vue b/resources/js/pages/welcome/Goals.vueindex 85806b4df..3b0883ce9 100644--- a/resources/js/pages/welcome/Goals.vue+++ b/resources/js/pages/welcome/Goals.vue@@ -58,6 +58,7 @@ const submit = (): void => {<template #actions><WelcomeContinueButton+ :processing="form.processing":disabled="form.goals.length === 0 || form.processing"testid="welcome-goals-continue"@continue="submit"diff --git a/resources/js/pages/welcome/Mcp.vue b/resources/js/pages/welcome/Mcp.vuenew file mode 100644index 000000000..6a18b92cc--- /dev/null+++ b/resources/js/pages/welcome/Mcp.vue@@ -0,0 +1,475 @@+<script setup lang="ts">+import { Head, Link, router, useHttp, usePoll } from '@inertiajs/vue3';+import {+ IconArrowRight,+ IconArrowUp,+ IconBulb,+ IconCalendarPlus,+ IconChevronRight,+ IconCircleCheckFilled,+ IconListDetails,+ IconMicrophone,+ IconPlus,+ IconSparkles,+ IconTrendingUp,+} from '@tabler/icons-vue';+import {+ computed,+ nextTick,+ onBeforeUnmount,+ ref,+ useTemplateRef,+ watch,+ type Component,+} from 'vue';++import BottomSheet from '@/components/BottomSheet.vue';+import McpConnectDialog from '@/components/mcp/McpConnectDialog.vue';+import { Button } from '@/components/ui/button';+import McpChatExample from '@/components/welcome/mcp/McpChatExample.vue';+import WelcomeContinueButton from '@/components/welcome/WelcomeContinueButton.vue';+import { useAutoRotate } from '@/composables/useAutoRotate';+import WelcomeLayout from '@/layouts/WelcomeLayout.vue';+import {+ mcpClients,+ otherMcpClient,+ type McpClient,+ type McpClientId,+} from '@/lib/mcpClients';+import { index as postsIndex } from '@/routes/app/posts';+import {+ connectClick,+ skip as skipMcp,+} from '@/routes/app/welcome/mcp';+import { fireCelebration } from '@/utils/confetti';++interface ConnectedClient {+ client_id: string;+ name: string;+}++const props = defineProps<{+ mcpUrl: string;+ connectedClients: ConnectedClient[];+}>();++const { stop: stopPolling } = usePoll(+ 2000,+ { only: ['connectedClients'] },+ { autoStart: props.connectedClients.length === 0 },+);++const benefits: { key: string; icon: Component }[] = [+ { key: 'ideas', icon: IconBulb },+ { key: 'schedule', icon: IconCalendarPlus },+ { key: 'queue', icon: IconListDetails },+ { key: 'analytics', icon: IconTrendingUp },+];++const {+ active: activeBenefit,+ select: selectBenefit,+ pause: pauseBenefits,+ resume: resumeBenefits,+ stop: stopBenefits,+} = useAutoRotate(benefits.length, 8000);++/** Picking a tab means the user wants to read it: the rotation stops for good. */+const chooseBenefit = (index: number): void => {+ selectBenefit(index);+ stopBenefits();+};++const activeKey = computed((): string => benefits[activeBenefit.value].key);++const pills = useTemplateRef<HTMLElement>('pills');++const revealActivePill = async (): Promise<void> => {+ await nextTick();++ const row = pills.value;+ const pill = row?.children[activeBenefit.value];++ if (!row || !pill || row.clientWidth === 0) {+ return;+ }++ const rowBox = row.getBoundingClientRect();+ const pillBox = pill.getBoundingClientRect();++ row.scrollBy({+ left:+ pillBox.left + pillBox.width / 2 - (rowBox.left + rowBox.width / 2),+ behavior: 'smooth',+ });+};++watch(activeBenefit, revealActivePill);++const connectedClient = computed(+ (): ConnectedClient | null => props.connectedClients[0] ?? null,+);++const connectableClients: McpClient[] = [...mcpClients, otherMcpClient];++const activeClient = ref<McpClient>(mcpClients[0]);+const dialogOpen = ref(false);+const connectClickHttp = useHttp<{ client: McpClientId }>({ client: 'claude' });++const trackConnectClick = (client: McpClient): void => {+ connectClickHttp.client = client.id;+ connectClickHttp.post(connectClick.url()).catch(() => {});+};++const connectWith = (client: McpClient): void => {+ activeClient.value = client;+ dialogOpen.value = true;+ trackConnectClick(client);+};++const aiPickerOpen = ref(false);++const openAiPicker = (): void => {+ aiPickerOpen.value = true;+};++/** Phones pick the app in a sheet first; the steps open once it has closed. */+const pickAi = async (client: McpClient): Promise<void> => {+ aiPickerOpen.value = false;+ await nextTick();+ connectWith(client);+};++const connectedStatus = useTemplateRef<HTMLElement>('connectedStatus');+let stopConfetti = (): void => {};++/**+ * The poll notices the connection while the user is still in the other tab:+ * close the steps and celebrate on the page's own connected state.+ */+const celebrateConnection = async (+ client: ConnectedClient | null,+ previous: ConnectedClient | null,+): Promise<void> => {+ if (!client || previous) {+ return;+ }++ stopPolling();+ dialogOpen.value = false;+ await nextTick();++ stopConfetti = fireCelebration(connectedStatus.value ?? undefined);+};++watch(connectedClient, celebrateConnection);++onBeforeUnmount(() => {+ stopConfetti();+});++const goToSchedule = (): void => {+ router.visit(postsIndex.url());+};+</script>++<template>+ <Head :title="$t('welcome.mcp.title')" />++ <WelcomeLayout+ :title="$t('welcome.mcp.title')"+ :description="$t('welcome.mcp.description')"+ size="4xl"+ actions-size="4xl"+ >+ <article class="text-start">+ <p+ class="sr-only"+ aria-live="polite"+ data-testid="welcome-mcp-announcement"+ >+ {{+ connectedClient+ ? $t('welcome.mcp.connected', {+ client: connectedClient.name,+ })+ : ''+ }}+ </p>+ <div+ class="flex flex-col overflow-hidden rounded-xl border border-border-strong bg-card"+ data-testid="welcome-mcp-window"+ @mouseenter="pauseBenefits"+ @mouseleave="resumeBenefits"+ @focusin="pauseBenefits"+ @focusout="resumeBenefits"+ >+ <div+ class="flex h-9 shrink-0 items-center gap-1.5 border-b border-border bg-muted px-3.5"+ aria-hidden="true"+ >+ <span class="size-3 rounded-full bg-[#ff5f57]" />+ <span class="size-3 rounded-full bg-[#febc2e]" />+ <span class="size-3 rounded-full bg-[#28c840]" />+ </div>++ <div+ class="grid flex-1 lg:grid-cols-[18rem_minmax(0,1fr)]"+ >+ <div+ class="flex flex-col gap-1 border-border bg-muted/40 p-2 max-md:hidden max-lg:border-b lg:border-e"+ role="group"+ :aria-label="$t('welcome.mcp.title')"+ >+ <button+ v-for="(benefit, index) in benefits"+ :key="benefit.key"+ type="button"+ :aria-pressed="index === activeBenefit"+ :class="[+ 'flex w-full cursor-pointer items-start gap-3 rounded-lg p-2.5 text-start sm:p-3 transition-control focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring',+ index === activeBenefit+ ? 'bg-primary-subtle dark:bg-primary-selected'+ : 'hover:bg-muted',+ ]"+ :data-testid="`welcome-mcp-benefit-${benefit.key}`"+ @click="chooseBenefit(index)"+ >+ <span+ :class="[+ 'inline-flex size-8 shrink-0 items-center justify-center rounded-lg border transition-control',+ index === activeBenefit+ ? 'border-transparent bg-primary-strong text-primary-strong-foreground dark:bg-primary dark:text-primary-foreground'+ : 'border-border bg-card text-primary-text',+ ]"+ aria-hidden="true"+ :data-testid="`welcome-mcp-benefit-icon-${benefit.key}`"+ >+ <component :is="benefit.icon" class="size-4" />+ </span>+ <span class="flex min-w-0 flex-col gap-0.5">+ <span class="text-sm font-medium text-foreground">+ {{+ $t(`welcome.mcp.benefits.${benefit.key}.title`)+ }}+ </span>+ <span+ class="text-xs text-muted-foreground"+ >+ {{+ $t(`welcome.mcp.benefits.${benefit.key}.hint`)+ }}+ </span>+ </span>+ </button>+ </div>++ <div+ ref="pills"+ class="flex gap-2 overflow-x-auto border-b border-border bg-muted/40 p-3 [mask-image:linear-gradient(to_right,black_85%,transparent)] md:hidden rtl:[mask-image:linear-gradient(to_left,black_85%,transparent)]"+ role="group"+ :aria-label="$t('welcome.mcp.title')"+ >+ <button+ v-for="(benefit, index) in benefits"+ :key="benefit.key"+ type="button"+ :aria-pressed="index === activeBenefit"+ :class="[+ 'inline-flex h-8 shrink-0 cursor-pointer items-center gap-1.5 rounded-full border px-3 text-sm font-medium whitespace-nowrap transition-control focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring',+ index === activeBenefit+ ? 'border-primary-strong bg-primary-subtle text-primary-text dark:bg-primary-selected'+ : 'border-border bg-card text-muted-foreground',+ ]"+ :data-testid="`welcome-mcp-pill-${benefit.key}`"+ @click="chooseBenefit(index)"+ >+ <component :is="benefit.icon" class="size-4" />+ {{ $t(`welcome.mcp.benefits.${benefit.key}.title`) }}+ </button>+ </div>++ <div class="flex flex-col">+ <div class="grid flex-1 px-4 pt-4 pb-3">+ <McpChatExample+ v-for="benefit in benefits"+ :key="benefit.key"+ :benefit="benefit.key"+ class="invisible [grid-area:1/1]"+ aria-hidden="true"+ />+ <Transition+ mode="out-in"+ enter-active-class="transition-opacity duration-300"+ leave-active-class="transition-opacity duration-300"+ enter-from-class="opacity-0"+ leave-to-class="opacity-0"+ >+ <McpChatExample+ :key="activeKey"+ :benefit="activeKey"+ class="[grid-area:1/1]"+ :data-testid="`welcome-mcp-chat-${activeKey}`"+ />+ </Transition>+ </div>+ <div class="px-4 pb-4 max-sm:hidden" aria-hidden="true">+ <div+ class="flex h-10 items-center gap-2.5 rounded-full border border-border bg-card ps-3 pe-1.5"+ data-testid="welcome-mcp-composer"+ >+ <IconPlus class="size-5 shrink-0 text-foreground" stroke-width="1.5" />+ <span+ class="min-w-0 flex-1 truncate text-sm text-muted-foreground"+ >+ {{ $t('welcome.mcp.composer') }}+ </span>+ <IconMicrophone+ class="size-4 shrink-0 text-muted-foreground"+ />+ <span+ class="inline-flex size-7 shrink-0 items-center justify-center rounded-full bg-secondary text-muted-foreground"+ >+ <IconArrowUp class="size-4" />+ </span>+ </div>+ </div>+ </div>+ </div>+ </div>+ </article>++ <template #actions>+ <template v-if="connectedClient">+ <WelcomeContinueButton+ :disabled="false"+ testid="welcome-mcp-continue"+ @continue="goToSchedule"+ />+ <p+ ref="connectedStatus"+ class="flex items-center gap-1.5 text-sm font-medium text-foreground"+ data-testid="welcome-mcp-status"+ aria-hidden="true"+ >+ <IconCircleCheckFilled class="size-4 shrink-0 text-green-500" />+ {{+ $t('welcome.mcp.connected', {+ client: connectedClient.name,+ })+ }}+ </p>+ </template>+ <template v-else>+ <div class="flex gap-2 max-sm:hidden">+ <Button+ v-for="client in connectableClients"+ :key="client.id"+ type="button"+ size="lg"+ :data-testid="`welcome-mcp-connect-${client.id}`"+ @click="connectWith(client)"+ >+ <img+ :src="client.monoLogo"+ alt=""+ class="size-4 invert dark:invert-0"+ />+ {{+ client.labelKey+ ? $t('welcome.mcp.connect_other')+ : $t('welcome.mcp.connect_with', {+ client: client.label,+ })+ }}+ </Button>+ </div>+ <div class="grid w-full grid-cols-2 gap-2 sm:hidden">+ <Button+ type="button"+ size="lg"+ data-testid="welcome-mcp-connect-ai"+ @click="openAiPicker"+ >+ <IconSparkles class="size-4" />+ {{ $t('welcome.mcp.connect_ai') }}+ </Button>+ <Button+ as-child+ variant="secondary"+ size="lg"+ >+ <Link+ :href="skipMcp.url()"+ data-testid="welcome-mcp-skip-link"+ >+ {{ $t('welcome.mcp.skip') }}+ <IconArrowRight class="size-4 rtl:rotate-180" />+ </Link>+ </Button>+ </div>+ <Button+ as-child+ variant="secondary"+ size="lg"+ class="max-sm:hidden sm:fixed sm:end-8 sm:bottom-8 lg:end-12"+ >+ <Link+ :href="skipMcp.url()"+ data-testid="welcome-mcp-skip"+ >+ {{ $t('welcome.mcp.skip') }}+ <IconArrowRight class="size-4 rtl:rotate-180" />+ </Link>+ </Button>+ </template>+ </template>++ <BottomSheet+ v-model:open="aiPickerOpen"+ :title="$t('welcome.mcp.pick_ai')"+ test-id="welcome-mcp-ai-picker"+ >+ <ul class="flex flex-col gap-2 px-4 pb-4">+ <li v-for="client in connectableClients" :key="client.id">+ <button+ type="button"+ class="flex w-full cursor-pointer items-center gap-3 rounded-xl border border-border bg-card p-3 text-start transition-control hover:bg-muted"+ :data-testid="`welcome-mcp-pick-${client.id}`"+ @click="pickAi(client)"+ >+ <span+ class="inline-flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted"+ >+ <img+ :src="client.logo"+ alt=""+ :class="['size-5 object-contain', client.logoClass]"+ />+ </span>+ <span class="flex min-w-0 flex-1 flex-col gap-0.5">+ <span class="text-sm font-medium text-foreground">+ {{ client.labelKey ? $t(client.label) : client.label }}+ </span>+ <span+ v-if="client.labelKey"+ class="text-sm text-muted-foreground"+ >+ {{ $t('mcp.other_hint') }}+ </span>+ </span>+ <IconChevronRight+ class="size-4 shrink-0 text-muted-foreground rtl:rotate-180"+ />+ </button>+ </li>+ </ul>+ </BottomSheet>++ <McpConnectDialog+ v-model:open="dialogOpen"+ :client="activeClient"+ :mcp-url="mcpUrl"+ />+ </WelcomeLayout>+</template>diff --git a/resources/js/pages/welcome/Persona.vue b/resources/js/pages/welcome/Persona.vueindex 1a7d9281d..3ad0f1b8d 100644--- a/resources/js/pages/welcome/Persona.vue+++ b/resources/js/pages/welcome/Persona.vue@@ -49,6 +49,7 @@ const submit = (): void => {<template #actions><WelcomeContinueButton+ :processing="form.processing":disabled="!form.persona || form.processing"testid="welcome-persona-continue"@continue="submit"diff --git a/resources/js/pages/welcome/Plan.vue b/resources/js/pages/welcome/Plan.vuenew file mode 100644index 000000000..85645848f--- /dev/null+++ b/resources/js/pages/welcome/Plan.vue@@ -0,0 +1,187 @@+<script setup lang="ts">+import { Head, useForm } from '@inertiajs/vue3';+import { IconStarFilled } from '@tabler/icons-vue';+import { computed } from 'vue';++import PlanFeatureList from '@/components/billing/PlanFeatureList.vue';+import ReviewQuote from '@/components/reviews/ReviewQuote.vue';+import WelcomeContinueButton from '@/components/welcome/WelcomeContinueButton.vue';+import { useAutoRotate } from '@/composables/useAutoRotate';+import WelcomeLayout from '@/layouts/WelcomeLayout.vue';+import { REVIEWS } from '@/lib/reviews';+import { store } from '@/routes/app/welcome/plan';+import type { PlanOption } from '@/types/plan';++const props = defineProps<{+ plan: PlanOption;+ firstMonthOffer: boolean;+}>();++const checkoutPriceKey = computed((): string =>+ props.firstMonthOffer+ ? 'billing.subscribe.prices.first_month'+ : 'billing.subscribe.prices.socials.monthly',+);++const form = useForm({});++const {+ active: activeReview,+ select: selectReview,+ pause: pauseReviews,+ resume: resumeReviews,+ stop: stopReviews,+} = useAutoRotate(REVIEWS.length, 6000);++const pickReview = (index: number): void => {+ selectReview(index);+ stopReviews();+};++const submit = (): void => {+ if (form.processing) {+ return;+ }++ form.submit(store());+};+</script>++<template>+ <Head :title="$t('welcome.plan_title')" />++ <WelcomeLayout+ :title="$t('welcome.plan_title')"+ :description="$t('welcome.plan_description')"+ step="plan"+ >+ <article+ class="grid overflow-hidden rounded-xl text-start sm:grid-cols-[2fr_3fr]"+ :data-testid="`plan-card-${plan.slug}`"+ >+ <div+ class="flex flex-row-reverse items-center justify-between gap-4 bg-primary-subtle p-5 sm:flex-col sm:items-start sm:gap-8 sm:p-6 dark:bg-primary-selected"+ >+ <div+ class="flex flex-col items-end gap-2 sm:w-full sm:items-stretch sm:gap-6"+ data-testid="welcome-plan-reviews"+ @mouseenter="pauseReviews"+ @mouseleave="resumeReviews"+ @focusin="pauseReviews"+ @focusout="resumeReviews"+ >+ <div class="flex -space-x-2 rtl:space-x-reverse">+ <button+ v-for="(review, index) in REVIEWS"+ :key="review.key"+ type="button"+ :aria-label="review.name"+ :aria-pressed="index === activeReview"+ :class="[+ 'relative cursor-pointer rounded-full transition-[transform,opacity] duration-300 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',+ index === activeReview+ ? 'z-10 scale-115 shadow-md'+ : 'opacity-50 hover:z-10 hover:opacity-100',+ ]"+ :data-testid="`welcome-plan-reviewer-${review.key}`"+ @click="pickReview(index)"+ >+ <img+ :src="review.photo"+ alt=""+ width="72"+ height="72"+ class="size-9 rounded-full border border-card object-cover"+ />+ </button>+ </div>++ <span+ class="flex gap-0.5 sm:hidden"+ role="img"+ :aria-label="$t('auth.reviews.eyebrow')"+ >+ <IconStarFilled+ v-for="star in 5"+ :key="star"+ class="size-3.5 text-rating"+ />+ </span>++ <div class="grid max-sm:hidden">+ <ReviewQuote+ v-for="review in REVIEWS"+ :key="review.key"+ :review="review"+ class="invisible [grid-area:1/1]"+ aria-hidden="true"+ />+ <Transition+ mode="out-in"+ enter-active-class="transition-opacity duration-300"+ leave-active-class="transition-opacity duration-300"+ enter-from-class="opacity-0"+ leave-to-class="opacity-0"+ >+ <ReviewQuote+ :key="REVIEWS[activeReview].key"+ :review="REVIEWS[activeReview]"+ class="[grid-area:1/1]"+ :data-testid="`welcome-plan-review-${REVIEWS[activeReview].key}`"+ />+ </Transition>+ </div>+ </div>++ <p class="flex flex-col gap-1">+ <span+ class="text-5xl leading-none font-strong tabular-nums"+ :data-testid="`plan-price-${plan.slug}`"+ >{{ $t(checkoutPriceKey) }}</span+ >+ <span+ class="text-base text-foreground"+ :data-testid="`plan-price-suffix-${plan.slug}`"+ >{{+ firstMonthOffer+ ? $t('welcome.plan_first_month')+ : $t('welcome.plan_per_month')+ }}</span+ >+ </p>+ </div>++ <PlanFeatureList+ :scope="plan.slug"+ spacious+ class="rounded-b-xl border border-border bg-card p-5 max-sm:border-t-0 sm:rounded-e-xl sm:rounded-es-none sm:border-s-0 sm:p-6"+ />+ </article>++ <template #actions>+ <WelcomeContinueButton+ :processing="form.processing"+ :disabled="form.processing"+ :label="+ $t('billing.plans.start_first_month', {+ price: $t(checkoutPriceKey),+ })+ "+ testid="welcome-plan-continue"+ @continue="submit"+ />+ <p+ class="text-center text-sm text-muted-foreground"+ data-testid="welcome-plan-terms"+ >+ {{+ firstMonthOffer+ ? $t('welcome.plan_terms', {+ price: $t('billing.subscribe.prices.socials.monthly'),+ })+ : $t('welcome.plan_cancel_anytime')+ }}+ </p>+ </template>+ </WelcomeLayout>+</template>diff --git a/resources/js/pages/welcome/Software.vue b/resources/js/pages/welcome/Software.vueindex 364f6b8ec..b2e15be6e 100644--- a/resources/js/pages/welcome/Software.vue+++ b/resources/js/pages/welcome/Software.vue@@ -49,6 +49,7 @@ const submit = (): void => {<template #actions><WelcomeContinueButton+ :processing="form.processing":disabled="!form.previous_software || form.processing"testid="welcome-software-continue"@continue="submit"diff --git a/resources/js/types/welcome.ts b/resources/js/types/welcome.tsindex b8862f20d..a6eca9ef4 100644--- a/resources/js/types/welcome.ts+++ b/resources/js/types/welcome.ts@@ -1,4 +1,5 @@export type WelcomeStep =| 'persona'| 'goals'- | 'software';+ | 'software'+ | 'plan';diff --git a/resources/js/utils/confetti.ts b/resources/js/utils/confetti.tsindex b604d0c3b..d7e70558d 100644--- a/resources/js/utils/confetti.ts+++ b/resources/js/utils/confetti.ts@@ -9,8 +9,10 @@ export interface ConfettiOptions {/** Where the burst starts: a viewport point, or the center of an element. */origin?: ConfettiPoint | HTMLElement;particleCount?: number;- /** Angle of the burst in degrees, centered on straight up. 360 is a full ring. */+ /** Angle of the burst in degrees, centered on `angle`. 360 is a full ring. */spread?: number;+ /** Direction of the burst in degrees: 90 is straight up, 45 up and right, 135 up and left. */+ angle?: number;/** Initial speed in CSS pixels per frame. */startVelocity?: number;/** CSS colors. Defaults to the brand tokens of the current theme. */@@ -229,12 +231,13 @@ const createParticles = (origin: { x: number; y: number },count: number,spread: number,+ direction: number,velocity: number,colors: string[],): Particle[] =>Array.from({ length: count }, () => {const angle =- ((-90 + random(-spread / 2, spread / 2)) * Math.PI) / 180;+ ((-direction + random(-spread / 2, spread / 2)) * Math.PI) / 180;const speed = velocity * random(0.45, 1);return {@@ -268,6 +271,7 @@ export const fireConfetti = (options: ConfettiOptions = {}): (() => void) => {resolveOrigin(options.origin),options.particleCount ?? 40,options.spread ?? 360,+ options.angle ?? 90,options.startVelocity ?? 9,options.colors?.length ? options.colors : themeColors(),),@@ -297,3 +301,44 @@ export const fireConfetti = (options: ConfettiOptions = {}): (() => void) => {}};};++/**+ * The full celebration: a burst from `origin` plus cannons from both bottom+ * corners, fired again twice in quick succession. Returns a function that+ * stops all of it, including the salvos still waiting to fire.+ */+export const fireCelebration = (+ origin: ConfettiPoint | HTMLElement = { x: 0.5, y: 0.8 },+): (() => void) => {+ const cannon = (x: number, angle: number): (() => void) =>+ fireConfetti({+ origin: { x, y: 1 },+ angle,+ spread: 55,+ particleCount: 160,+ startVelocity: 48,+ duration: 4200,+ });++ const stops = [+ fireConfetti({+ origin,+ particleCount: 200,+ spread: 120,+ startVelocity: 26,+ duration: 3600,+ }),+ cannon(0, 60),+ cannon(1, 120),+ ];+ const timeouts = [250, 500].map((delay) =>+ setTimeout(() => {+ stops.push(cannon(0, 65), cannon(1, 115));+ }, delay),+ );++ return () => {+ timeouts.forEach(clearTimeout);+ stops.forEach((stop) => stop());+ };+};diff --git a/routes/app.php b/routes/app.phpindex 8f01dfdd9..005bbbee0 100644--- a/routes/app.php+++ b/routes/app.php@@ -88,9 +88,16 @@ Route::middleware(['auth'])->group(function () {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/software', [WelcomeController::class, 'software'])->name('app.welcome.software');- Route::post('welcome/software', [WelcomeController::class, 'storeSoftware'])+ Route::post('welcome/software', [WelcomeController::class, 'storeSoftware'])->name('app.welcome.software.store');+ Route::get('welcome/plan', [WelcomeController::class, 'plan'])->name('app.welcome.plan');+ Route::post('welcome/plan', [WelcomeController::class, 'storePlan'])->middleware('throttle:6,1')- ->name('app.welcome.software.store');+ ->name('app.welcome.plan.store');+ Route::get('welcome/mcp', [WelcomeController::class, 'mcp'])->name('app.welcome.mcp');+ Route::post('welcome/mcp/connect-click', [WelcomeController::class, 'storeMcpConnectClick'])+ ->middleware('throttle:30,1')+ ->name('app.welcome.mcp.connect-click');+ Route::get('welcome/mcp/skip', [WelcomeController::class, 'skipMcp'])->name('app.welcome.mcp.skip');Route::post('referral-source', [ReferralSourceController::class, 'store'])->middleware('throttle:6,1')->name('app.referral-source.store');diff --git a/tests/Browser/BillingProcessingTest.php b/tests/Browser/BillingProcessingTest.phpindex c9701525b..d284bd94c 100644--- a/tests/Browser/BillingProcessingTest.php+++ b/tests/Browser/BillingProcessingTest.php@@ -6,9 +6,32 @@ use App\Models\Plan;use App\Models\User;use App\Models\Workspace;-test('once the subscription and plan are ready the processing page sends the user to the schedule', function () {- config(['trypost.self_hosted' => false]);+function waitForBillingProcessingTestId(mixed $page, string $testId): void+{+ $page->script(<<<JS+ (async () => {+ for (let attempt = 0; attempt < 100; attempt++) {+ if (document.querySelector('[data-testid="{$testId}"]')) return;+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ })();+ JS);+}+function waitForBillingProcessingPath(mixed $page, string $path): void+{+ $page->script(<<<JS+ (async () => {+ for (let attempt = 0; attempt < 200; attempt++) {+ if (window.location.pathname === '{$path}') return;+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ })();+ JS);+}++function billingProcessingSubscriber(): User+{$user = User::factory()->create();$workspace = Workspace::factory()->create(['account_id' => $user->account_id,@@ -19,20 +42,57 @@ test('once the subscription and plan are ready the processing page sends the usesubscribeAccount($user->account);$user->account->update(['plan_id' => Plan::query()->value('id') ?? Plan::factory()->create()->id]);- $this->actingAs($user);+ return $user;+}- $schedulePath = parse_url(route('app.posts.index'), PHP_URL_PATH);+test('once the subscription and plan are ready the processing page sends the user to the MCP step', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(billingProcessingSubscriber());++ $mcpPath = parse_url(route('app.welcome.mcp'), PHP_URL_PATH);$page = visit(route('app.billing.processing'));- $page->script(<<<JS- (async () => {- for (let attempt = 0; attempt < 200; attempt++) {- if (window.location.pathname === '{$schedulePath}') return;- await new Promise((resolve) => setTimeout(resolve, 50));- }- })();- JS);+ waitForBillingProcessingPath($page, $mcpPath);++ $page->assertPathIs($mcpPath)+ ->assertNoJavaScriptErrors();+});++test('on a phone the processing page skips the MCP step and opens the schedule', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(billingProcessingSubscriber());++ $schedulePath = parse_url(route('app.posts.index'), PHP_URL_PATH);++ $page = visit(route('app.billing.processing'))->on()->mobile();+ waitForBillingProcessingPath($page, $schedulePath);$page->assertPathIs($schedulePath)->assertNoJavaScriptErrors();});++test('while checkout settles the processing page uses the neutral auth layout, not the welcome one', function () {+ config(['trypost.self_hosted' => false]);++ $user = User::factory()->create();+ $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]);++ $this->actingAs($user);++ $page = visit(route('app.billing.processing'));+ waitForBillingProcessingTestId($page, 'billing-processing');++ $page->assertSee('Processing your subscription')+ ->assertVisible('@billing-processing')+ ->assertVisible('@auth-logo')+ ->assertMissing('@welcome-back')+ ->assertMissing('@welcome-step-plan')+ ->assertNoJavaScriptErrors();+});diff --git a/tests/Browser/CalendarPageTest.php b/tests/Browser/CalendarPageTest.phpindex 4cf4b38cf..8cd5f01cb 100644--- a/tests/Browser/CalendarPageTest.php+++ b/tests/Browser/CalendarPageTest.php@@ -649,7 +649,9 @@ test('on a phone the period picker opens from the bottom, switches the view in p[$user] = calendarPageSetup();$this->actingAs($user);- $page = visit(route('app.calendar', ['view' => 'week', 'week' => '2027-03-01']))->resize(390, 844);+ $shownWeek = now()->addYear()->setDate(now()->addYear()->year, 3, 1)->toDateString();+ $pickedDay = now()->addYear()->setDate(now()->addYear()->year, 3, 17);+ $page = visit(route('app.calendar', ['view' => 'week', 'week' => $shownWeek]))->resize(390, 844);waitForCalendarTestId($page, 'calendar-period-trigger');expect($page->script('Boolean(document.querySelector(\'[data-testid="calendar-previous"]\'))'))->toBeFalse();@@ -659,11 +661,11 @@ test('on a phone the period picker opens from the bottom, switches the view in pwaitForCalendarCondition($page, 'Math.abs(window.innerHeight - document.querySelector(\'[data-testid="calendar-period-picker"]\').getBoundingClientRect().bottom) <= 1');$page->assertVisible('@calendar-view-days')- ->click('[data-testid="calendar-period-calendar"] [data-testid="calendar-date-2027-03-17"]');- waitForCalendarCondition($page, 'new URLSearchParams(location.search).get("week") !== "2027-03-01"');+ ->click("[data-testid=\"calendar-period-calendar\"] [data-testid=\"calendar-date-{$pickedDay->toDateString()}\"]");+ waitForCalendarCondition($page, "new URLSearchParams(location.search).get(\"week\") !== \"{$shownWeek}\"");$week = $page->script('new URLSearchParams(location.search).get("week")');- expect($week >= '2027-03-11' && $week <= '2027-03-17')->toBeTrue();+ expect($week >= $pickedDay->subDays(6)->toDateString() && $week <= $pickedDay->toDateString())->toBeTrue();waitForCalendarCondition($page, '!document.querySelector(\'[data-testid="calendar-period-picker"]\')');$page->assertMissing('@calendar-period-picker');diff --git a/tests/Browser/ChannelGridTest.php b/tests/Browser/ChannelGridTest.phpindex b776f5e91..d9b9f3f4a 100644--- a/tests/Browser/ChannelGridTest.php+++ b/tests/Browser/ChannelGridTest.php@@ -9,6 +9,7 @@ use App\Models\Post;use App\Models\SocialAccount;use App\Models\User;use App\Models\Workspace;+use Carbon\CarbonInterface;const CHANNEL_GRID_PIXEL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==';@@ -40,7 +41,7 @@ function channelGridBrowserUser(): User/*** @param list<array<string, mixed>> $media*/-function channelGridBrowserPost(SocialAccount $account, string $publishedAt, ContentType $contentType, array $media): Post+function channelGridBrowserPost(SocialAccount $account, CarbonInterface $publishedAt, ContentType $contentType, array $media): Post{return Post::factory()->forAccount($account, $contentType)->published()->create(['published_at' => $publishedAt,@@ -65,12 +66,12 @@ beforeEach(function () {});test('an instagram channel offers the grid view and the grid lays posts out in three columns', function () {- $reel = channelGridBrowserPost($this->instagram, '2026-09-20 10:00:00', ContentType::InstagramReel, [+ $reel = channelGridBrowserPost($this->instagram, now()->subDays(10)->setTime(10, 0), ContentType::InstagramReel, [['id' => (string) str()->uuid(), 'path' => 'media/reel.mp4', 'url' => 'https://cdn.test/reel.mp4', 'type' => 'video', 'mime_type' => 'video/mp4'],]);- $carousel = channelGridBrowserPost($this->instagram, '2026-09-10 10:00:00', ContentType::InstagramFeed, [channelGridImage(), channelGridImage()]);- $single = channelGridBrowserPost($this->instagram, '2026-09-01 10:00:00', ContentType::InstagramFeed, [channelGridImage()]);- $story = channelGridBrowserPost($this->instagram, '2026-09-25 10:00:00', ContentType::InstagramStory, [channelGridImage()]);+ $carousel = channelGridBrowserPost($this->instagram, now()->subDays(20)->setTime(10, 0), ContentType::InstagramFeed, [channelGridImage(), channelGridImage()]);+ $single = channelGridBrowserPost($this->instagram, now()->subDays(29)->setTime(10, 0), ContentType::InstagramFeed, [channelGridImage()]);+ $story = channelGridBrowserPost($this->instagram, now()->subDays(5)->setTime(10, 0), ContentType::InstagramStory, [channelGridImage()]);$this->actingAs($this->user);@@ -107,14 +108,14 @@ test('an instagram channel offers the grid view and the grid lays posts out in twaitForChannelGridTestId($page, "grid-tile-tooltip-{$reel->id}");expect(trim((string) $page->script("document.querySelector('[data-testid=\"grid-tile-tooltip-{$reel->id}\"] [role=\"tooltip\"]').textContent")))- ->toBe('This post was sent September 20, 2026 at 10:00 AM');+ ->toBe("This post was sent {$reel->published_at->format('F j, Y \\a\\t g:i A')}");$page->assertNoJavaScriptErrors();});test('the grid sits under the shared channel header, which stays put while the grid scrolls', function () {foreach (range(1, 9) as $day) {- channelGridBrowserPost($this->instagram, "2026-09-0{$day} 10:00:00", ContentType::InstagramFeed, [channelGridImage()]);+ channelGridBrowserPost($this->instagram, now()->subDays($day)->setTime(10, 0), ContentType::InstagramFeed, [channelGridImage()]);}$this->actingAs($this->user);@@ -150,7 +151,7 @@ test('the grid sits under the shared channel header, which stays put while the g});test('the grid keeps the schedule view switch and the new post button', function () {- channelGridBrowserPost($this->instagram, '2026-09-01 10:00:00', ContentType::InstagramFeed, [channelGridImage()]);+ channelGridBrowserPost($this->instagram, now()->subDays(29)->setTime(10, 0), ContentType::InstagramFeed, [channelGridImage()]);$this->actingAs($this->user);@@ -180,7 +181,7 @@ test('the grid keeps the schedule view switch and the new post button', function});test('clicking a carousel tile opens its media in the lightbox', function () {- $carousel = channelGridBrowserPost($this->instagram, '2026-09-10 10:00:00', ContentType::InstagramFeed, [channelGridImage(), channelGridImage()]);+ $carousel = channelGridBrowserPost($this->instagram, now()->subDays(20)->setTime(10, 0), ContentType::InstagramFeed, [channelGridImage(), channelGridImage()]);$this->actingAs($this->user);@@ -200,7 +201,7 @@ test('clicking a carousel tile opens its media in the lightbox', function () {test('the grid tooltip shows the sent time in the user zone, not the browser zone', function () {$this->user->update(['timezone' => 'Asia/Tokyo']);- $reel = channelGridBrowserPost($this->instagram, '2026-09-20 10:00:00', ContentType::InstagramReel, [+ $reel = channelGridBrowserPost($this->instagram, now()->subDays(10)->setTime(10, 0), ContentType::InstagramReel, [['id' => (string) str()->uuid(), 'path' => 'media/reel.mp4', 'url' => 'https://cdn.test/reel.mp4', 'type' => 'video', 'mime_type' => 'video/mp4'],]);$this->actingAs($this->user);@@ -211,6 +212,6 @@ test('the grid tooltip shows the sent time in the user zone, not the browser zonwaitForChannelGridTestId($page, "grid-tile-tooltip-{$reel->id}");expect(trim((string) $page->script("document.querySelector('[data-testid=\"grid-tile-tooltip-{$reel->id}\"] [role=\"tooltip\"]').textContent")))- ->toBe('This post was sent September 20, 2026 at 7:00 PM');+ ->toBe("This post was sent {$reel->published_at->setTimezone('Asia/Tokyo')->format('F j, Y \\a\\t g:i A')}");$page->assertNoJavaScriptErrors();});diff --git a/tests/Browser/ChannelPostingGoalTest.php b/tests/Browser/ChannelPostingGoalTest.phpindex 92210a075..e5d1fae8f 100644--- a/tests/Browser/ChannelPostingGoalTest.php+++ b/tests/Browser/ChannelPostingGoalTest.php@@ -24,6 +24,107 @@ function waitForPostingGoalTestId(mixed $page, string $testId): voidwaitForWebFonts($page);}+function postingGoalPollFor(mixed $page, string $condition, int $attempts = 120): bool+{+ return (bool) $page->script(<<<JS+ (async () => {+ for (let i = 0; i < {$attempts}; i++) {+ if ({$condition}) return true;+ await new Promise((r) => setTimeout(r, 50));+ }+ return false;+ })();+ JS);+}++function postingGoalTestIdSelector(string $testId, ?string $within = null): string+{+ $selector = "[data-testid=\"{$testId}\"]";++ return $within === null ? $selector : "[data-testid=\"{$within}\"] {$selector}";+}++function postingGoalTestIdAppearsWithin(mixed $page, string $testId, int $attempts = 120): bool+{+ $selector = json_encode(postingGoalTestIdSelector($testId));++ return postingGoalPollFor($page, "document.querySelector({$selector}) !== null", $attempts);+}++function waitForPostingGoalTestIdGone(mixed $page, string $testId, int $attempts = 120): void+{+ $selector = json_encode(postingGoalTestIdSelector($testId));++ postingGoalPollFor($page, "document.querySelector({$selector}) === null", $attempts);+}++function waitForPostingGoalViewportSettled(mixed $page, int $width, string $testId): bool+{+ $selector = json_encode(postingGoalTestIdSelector($testId));++ return postingGoalPollFor($page, "window.innerWidth === {$width} && document.querySelector({$selector}).getAnimations().length === 0");+}++/**+ * @return array{left: float, right: float, top: float, bottom: float, width: float, height: float}+ */+function postingGoalRect(mixed $page, string $testId, ?string $within = null): array+{+ $selector = json_encode(postingGoalTestIdSelector($testId, $within));++ return $page->script(<<<JS+ (() => {+ const { left, right, top, bottom, width, height } = document.querySelector({$selector}).getBoundingClientRect();++ return { left, right, top, bottom, width, height };+ })();+ JS);+}++function postingGoalStyle(mixed $page, string $testId, string $property): string+{+ $selector = json_encode(postingGoalTestIdSelector($testId));+ $property = json_encode($property);++ return $page->script("getComputedStyle(document.querySelector({$selector}))[{$property}]");+}++function postingGoalOffsetWidth(mixed $page, string $testId): int+{+ $selector = json_encode(postingGoalTestIdSelector($testId));++ return $page->script("document.querySelector({$selector}).offsetWidth");+}++function postingGoalInnerText(mixed $page, string $testId): string+{+ $selector = json_encode(postingGoalTestIdSelector($testId));++ return $page->script("document.querySelector({$selector}).innerText.replace(/\\s+/g, ' ').trim()");+}++/**+ * @return list<int>+ */+function postingGoalPerWeekLineCounts(mixed $page): array+{+ return $page->script(<<<'JS'+ [...document.querySelectorAll('[data-testid="goal-option-label"] > span:nth-child(2)')]+ .map((el) => Math.round(el.getBoundingClientRect().height / parseFloat(getComputedStyle(el).lineHeight)));+ JS);+}++/**+ * @return list<list<string>>+ */+function postingGoalRecommendedTimesPerRow(mixed $page): array+{+ return $page->script(<<<'JS'+ [...document.querySelectorAll('[data-testid="goal-recommended-row"]')]+ .map((row) => [...row.querySelectorAll('strong')].map((el) => el.textContent.trim()));+ JS);+}+function postingGoalSetup(): array{$user = User::factory()->create();@@ -78,7 +179,7 @@ test('a newly created channel opens the goal flow and saves the chosen goal', fu$page->click('@goal-option-5')->click('@goal-next');waitForPostingGoalTestId($page, 'goal-recommended');- expect($page->script('document.querySelectorAll(\'[data-testid="goal-recommended-row"]\').length'))->toBe(5);+ $page->assertCount('@goal-recommended-row', 5);expect($channel->fresh()->posting_goal)->toBe(5)->and($channel->fresh()->posting_schedule->slotCount())->toBe(5);@@ -115,19 +216,6 @@ test('customize goes to the channel settings page', function () {$page->assertVisible('@channel-settings-page')->assertNoJavaScriptErrors();});-function postingGoalPollFor(mixed $page, string $condition, int $attempts = 120): bool-{- return (bool) $page->script(<<<JS- (async () => {- for (let i = 0; i < {$attempts}; i++) {- if ({$condition}) return true;- await new Promise((r) => setTimeout(r, 50));- }- return false;- })();- JS);-}-test('the goal step matches the wide card layout with right-side radios', function () {[$user, $channel] = postingGoalSetup();$this->actingAs($user);@@ -135,41 +223,21 @@ test('the goal step matches the wide card layout with right-side radios', functi[$page, $channel] = connectPostingGoalChannel();waitForPostingGoalTestId($page, 'goal-option-3');- $layout = $page->script(<<<'JS'- (() => {- const rect = (el) => el.getBoundingClientRect();- const dialog = document.querySelector('[data-testid="connect-channel-dialog"]');- const row = document.querySelector('[data-testid="goal-option-3"]');- const other = document.querySelector('[data-testid="goal-option-1"]');- const badge = row.querySelector('[data-testid="goal-option-badge"]');- const radio = row.querySelector('[data-testid="goal-option-radio"]');- const footer = document.querySelector('[data-testid="goal-footer"]');- const help = rect(document.querySelector('[data-testid="goal-help"]'));- const next = rect(document.querySelector('[data-testid="goal-next"]'));-- return {- dialogWidth: dialog.offsetWidth,- rowHeight: Math.round(rect(row).height),- radioRightOfBadge: rect(radio).left > rect(badge).right,- radioNearRightEdge: rect(row).right - rect(radio).right < 40,- selectedBackground: getComputedStyle(row).backgroundColor,- selectedBorderDiffers: getComputedStyle(row).borderColor !== getComputedStyle(other).borderColor,- footerHasTopBorder: getComputedStyle(footer).borderTopWidth === '1px',- helpBeforeNext: help.right < next.left,- labelText: row.innerText.replace(/\s+/g, ' ').trim(),- };- })();- JS);-- expect($layout['dialogWidth'])->toBe(800)- ->and($layout['rowHeight'])->toBeGreaterThanOrEqual(62)- ->and($layout['radioRightOfBadge'])->toBeTrue()- ->and($layout['radioNearRightEdge'])->toBeTrue()- ->and($layout['selectedBackground'])->toBe('rgba(0, 0, 0, 0)')- ->and($layout['selectedBorderDiffers'])->toBeTrue()- ->and($layout['footerHasTopBorder'])->toBeTrue()- ->and($layout['helpBeforeNext'])->toBeTrue()- ->and($layout['labelText'])->toBe('3x Build a presence · 3 times/week');+ $row = postingGoalRect($page, 'goal-option-3');+ $badge = postingGoalRect($page, 'goal-option-badge', within: 'goal-option-3');+ $radio = postingGoalRect($page, 'goal-option-radio', within: 'goal-option-3');+ $help = postingGoalRect($page, 'goal-help');+ $next = postingGoalRect($page, 'goal-next');++ expect(postingGoalOffsetWidth($page, 'connect-channel-dialog'))->toBe(800)+ ->and((int) round($row['height']))->toBeGreaterThanOrEqual(62)+ ->and($radio['left'])->toBeGreaterThan($badge['right'])+ ->and($row['right'] - $radio['right'])->toBeLessThan(40)+ ->and(postingGoalStyle($page, 'goal-option-3', 'backgroundColor'))->toBe('rgba(0, 0, 0, 0)')+ ->and(postingGoalStyle($page, 'goal-option-3', 'borderColor'))->not->toBe(postingGoalStyle($page, 'goal-option-1', 'borderColor'))+ ->and(postingGoalStyle($page, 'goal-footer', 'borderTopWidth'))->toBe('1px')+ ->and($help['right'])->toBeLessThan($next['left'])+ ->and(postingGoalInnerText($page, 'goal-option-3'))->toBe('3x Build a presence · 3 times/week');$page->assertNoJavaScriptErrors();});@@ -182,28 +250,21 @@ test('on a phone the goal step shows a full-width Next above the help', function$page->resize(390, 844);waitForPostingGoalTestId($page, 'goal-next');- expect(postingGoalPollFor($page, 'window.innerWidth === 390 && document.querySelector(\'[data-testid="connect-channel-dialog"]\').getAnimations().length === 0'))->toBeTrue();+ expect(waitForPostingGoalViewportSettled($page, 390, 'connect-channel-dialog'))->toBeTrue();- $layout = $page->script(<<<'JS'- (() => {- const rect = (id) => document.querySelector(`[data-testid="${id}"]`).getBoundingClientRect();- const footer = rect('goal-footer');- const help = rect('goal-help');- const next = rect('goal-next');- const perWeekLines = [...document.querySelectorAll('[data-testid="goal-option-label"] > span:nth-child(2)')]- .map((el) => Math.round(el.getBoundingClientRect().height / parseFloat(getComputedStyle(el).lineHeight)));-- return {- nextAlignedWithOptions: (() => { const option = rect('goal-option-custom'); return Math.abs(next.left - option.left) <= 1 && Math.abs(next.right - option.right) <= 1 && Math.round(next.top - option.bottom) === 24; })(),- nextAboveHelp: next.bottom <= help.top,- helpInside: help.left >= footer.left && help.right <= footer.right,- footerBorder: getComputedStyle(document.querySelector('[data-testid="goal-footer"]')).borderTopWidth,- perWeekOnOneLine: perWeekLines.every((lines) => lines === 1),- };- })();- JS);+ $footer = postingGoalRect($page, 'goal-footer');+ $help = postingGoalRect($page, 'goal-help');+ $next = postingGoalRect($page, 'goal-next');+ $option = postingGoalRect($page, 'goal-option-custom');- expect($layout)->toBe(['nextAlignedWithOptions' => true, 'nextAboveHelp' => true, 'helpInside' => true, 'footerBorder' => '0px', 'perWeekOnOneLine' => true]);+ expect(abs($next['left'] - $option['left']))->toBeLessThanOrEqual(1)+ ->and(abs($next['right'] - $option['right']))->toBeLessThanOrEqual(1)+ ->and((int) round($next['top'] - $option['bottom']))->toBe(24)+ ->and($next['bottom'])->toBeLessThanOrEqual($help['top'])+ ->and($help['left'])->toBeGreaterThanOrEqual($footer['left'])+ ->and($help['right'])->toBeLessThanOrEqual($footer['right'])+ ->and(postingGoalStyle($page, 'goal-footer', 'borderTopWidth'))->toBe('0px')+ ->and(postingGoalPerWeekLineCounts($page))->each->toBe(1);$page->assertNoJavaScriptErrors();});@@ -219,25 +280,18 @@ test('on a phone the recommended step stacks Done, Customize and Change goal in$page->click('@goal-next');waitForPostingGoalTestId($page, 'goal-recommended');- $layout = $page->script(<<<'JS'- (() => {- const rect = (id) => document.querySelector(`[data-testid="${id}"]`).getBoundingClientRect();- const row = rect('goal-recommended-row');- const done = rect('goal-done');- const customize = rect('goal-customize');- const change = rect('goal-change');- const sameWidth = (box) => Math.abs(box.left - row.left) <= 1 && Math.abs(box.right - row.right) <= 1;-- return {- doneFullWidth: sameWidth(done),- customizeFullWidth: sameWidth(customize),- order: done.bottom <= customize.top && customize.bottom <= change.top,- changeOnOneLine: Math.round(change.height) <= 40,- };- })();- JS);-- expect($layout)->toBe(['doneFullWidth' => true, 'customizeFullWidth' => true, 'order' => true, 'changeOnOneLine' => true]);+ $row = postingGoalRect($page, 'goal-recommended-row');+ $done = postingGoalRect($page, 'goal-done');+ $customize = postingGoalRect($page, 'goal-customize');+ $change = postingGoalRect($page, 'goal-change');++ expect(abs($done['left'] - $row['left']))->toBeLessThanOrEqual(1)+ ->and(abs($done['right'] - $row['right']))->toBeLessThanOrEqual(1)+ ->and(abs($customize['left'] - $row['left']))->toBeLessThanOrEqual(1)+ ->and(abs($customize['right'] - $row['right']))->toBeLessThanOrEqual(1)+ ->and($done['bottom'])->toBeLessThanOrEqual($customize['top'])+ ->and($customize['bottom'])->toBeLessThanOrEqual($change['top'])+ ->and((int) round($change['height']))->toBeLessThanOrEqual(40);$page->assertNoJavaScriptErrors();});@@ -250,32 +304,20 @@ test('the recommended-time help opens above its trigger and links to the docs',$page->click('@goal-help');waitForPostingGoalTestId($page, 'goal-help-popover');- $popover = $page->script(<<<'JS'- (() => {- const trigger = document.querySelector('[data-testid="goal-help"]').getBoundingClientRect();- const card = document.querySelector('[data-testid="goal-help-popover"]').getBoundingClientRect();- const link = document.querySelector('[data-testid="goal-help-learn-more"]');-- return {- above: card.bottom <= trigger.top,- href: link.getAttribute('href'),- target: link.getAttribute('target'),- rel: link.getAttribute('rel'),- actionsOrder: link.getBoundingClientRect().right- < document.querySelector('[data-testid="goal-help-close"]').getBoundingClientRect().left,- };- })();- JS);+ $trigger = postingGoalRect($page, 'goal-help');+ $card = postingGoalRect($page, 'goal-help-popover');- expect($popover['above'])->toBeTrue()- ->and($popover['href'])->toBe('https://docs.trypost.it')- ->and($popover['target'])->toBe('_blank')- ->and($popover['rel'])->toContain('noopener')- ->and($popover['actionsOrder'])->toBeTrue();+ expect($card['bottom'])->toBeLessThanOrEqual($trigger['top'])+ ->and(postingGoalRect($page, 'goal-help-learn-more')['right'])->toBeLessThan(postingGoalRect($page, 'goal-help-close')['left']);++ $page->assertAttribute('@goal-help-learn-more', 'href', 'https://docs.trypost.it')+ ->assertAttribute('@goal-help-learn-more', 'target', '_blank')+ ->assertAttributeContains('@goal-help-learn-more', 'rel', 'noopener');$page->click('@goal-help-close');+ waitForPostingGoalTestIdGone($page, 'goal-help-popover');- expect(postingGoalPollFor($page, '!document.querySelector(\'[data-testid="goal-help-popover"]\')'))->toBeTrue();+ $page->assertNotPresent('@goal-help-popover');$page->assertVisible('@goal-flow')->assertNoJavaScriptErrors();});@@ -289,26 +331,15 @@ test('the recommended step bolds the times, orders its footer and shows no succe$page->click('@goal-next');waitForPostingGoalTestId($page, 'goal-recommended');- $state = $page->script(<<<'JS'- (() => {- const rows = [...document.querySelectorAll('[data-testid="goal-recommended-row"]')];- const left = (id) => document.querySelector(`[data-testid="${id}"]`).getBoundingClientRect().left;-- return {- strongPerRow: rows.map((row) => row.querySelectorAll('strong').length),- strongTimes: rows.flatMap((row) => [...row.querySelectorAll('strong')].map((el) => el.textContent.trim())),- footerOrder: left('goal-change') < left('goal-customize') && left('goal-customize') < left('goal-done'),- learnMore: document.querySelector('[data-testid="goal-learn-more"]').getAttribute('href'),- toasts: [...document.querySelectorAll('[data-sonner-toast]')].map((toast) => toast.innerText.trim()),- };- })();- JS);+ $timesPerRow = postingGoalRecommendedTimesPerRow($page);++ expect(array_map('count', $timesPerRow))->toBe([2, 2, 2])+ ->and(array_merge(...$timesPerRow))->each->toMatch('/^\d{2}:00$/')+ ->and(postingGoalRect($page, 'goal-change')['left'])->toBeLessThan(postingGoalRect($page, 'goal-customize')['left'])+ ->and(postingGoalRect($page, 'goal-customize')['left'])->toBeLessThan(postingGoalRect($page, 'goal-done')['left']);- expect($state['strongPerRow'])->toBe([2, 2, 2])- ->and($state['strongTimes'])->each->toMatch('/^\d{2}:00$/')- ->and($state['footerOrder'])->toBeTrue()- ->and($state['learnMore'])->toBe('https://docs.trypost.it')- ->and($state['toasts'])->toBe([]);+ $page->assertAttribute('@goal-learn-more', 'href', 'https://docs.trypost.it')+ ->assertNotPresent('[data-sonner-toast]');$page->click('@goal-change');waitForPostingGoalTestId($page, 'goal-flow');@@ -321,8 +352,11 @@ test('connecting a channel fires a confetti burst that cleans up after itself',[$page, $channel] = connectPostingGoalChannel();- expect(postingGoalPollFor($page, 'document.querySelector(\'[data-testid="confetti-canvas"]\')'))->toBeTrue()- ->and(postingGoalPollFor($page, '!document.querySelector(\'[data-testid="confetti-canvas"]\')'))->toBeTrue();+ waitForPostingGoalTestId($page, 'confetti-canvas');+ $page->assertPresent('@confetti-canvas');++ waitForPostingGoalTestIdGone($page, 'confetti-canvas', 200);+ $page->assertNotPresent('@confetti-canvas');$page->assertVisible('@goal-flow')->assertNoJavaScriptErrors();});@@ -341,7 +375,8 @@ test('confetti stays off when the user prefers reduced motion', function () {JS));waitForPostingGoalTestId($page, 'goal-flow');- expect(postingGoalPollFor($page, 'document.querySelector(\'[data-testid="confetti-canvas"]\')', 20))->toBeFalse();+ expect(postingGoalTestIdAppearsWithin($page, 'confetti-canvas', 20))->toBeFalse();+ $page->assertNotPresent('@confetti-canvas');$page->assertNoJavaScriptErrors();});diff --git a/tests/Browser/ComposerChannelSettingsTest.php b/tests/Browser/ComposerChannelSettingsTest.phpindex 0a68637d4..2eb436945 100644--- a/tests/Browser/ComposerChannelSettingsTest.php+++ b/tests/Browser/ComposerChannelSettingsTest.php@@ -67,6 +67,11 @@ function waitForChannelSettingsTestId(mixed $page, string $testId): void);}+function channelSettingsEventDay(int $daysAfterStart): string+{+ return now()->addYear()->startOfDay()->addDays($daysAfterStart)->toDateString();+}+function waitForChannelSettingsClosedMenu(mixed $page): void{waitForChannelSettingsCondition($page, "!document.querySelector('[role=\"listbox\"]')");@@ -335,7 +340,7 @@ test('the google business panel shows a server validation error under its field'test('the google business event shows start and end time fields beside the dates when add time is on', function () {fakeChannelSettingsApis();$post = seedChannelSettingsPost(Platform::GoogleBusiness, ContentType::GoogleBusinessPost);- $post->update(['meta' => ['topic_type' => 'EVENT', 'event' => ['title' => 'Launch night', 'start_date' => '2037-03-10', 'end_date' => '2037-03-12']]]);+ $post->update(['meta' => ['topic_type' => 'EVENT', 'event' => ['title' => 'Launch night', 'start_date' => channelSettingsEventDay(0), 'end_date' => channelSettingsEventDay(2)]]]);$page = visit(route('app.posts.edit', $post))->resize(1280, 900);waitForChannelSettingsTestId($page, 'google-business-add-time');@@ -366,8 +371,8 @@ test('the google business event shows start and end time fields beside the datesexpect(data_get($post->fresh()->meta, 'event'))->toEqual(['title' => 'Launch night',- 'start_date' => '2037-03-10',- 'end_date' => '2037-03-12',+ 'start_date' => channelSettingsEventDay(0),+ 'end_date' => channelSettingsEventDay(2),'start_time' => '18:30','end_time' => '21:00',]);@@ -1055,7 +1060,7 @@ test('the google business event times follow the user clock and pick from a listfakeChannelSettingsApis();$post = seedChannelSettingsPost(Platform::GoogleBusiness, ContentType::GoogleBusinessPost);auth()->user()->update(['time_format' => $format]);- $post->update(['meta' => ['topic_type' => 'EVENT', 'event' => ['title' => 'Launch night', 'start_date' => '2037-03-10', 'end_date' => '2037-03-12', 'start_time' => '09:00']]]);+ $post->update(['meta' => ['topic_type' => 'EVENT', 'event' => ['title' => 'Launch night', 'start_date' => channelSettingsEventDay(0), 'end_date' => channelSettingsEventDay(2), 'start_time' => '09:00']]]);$page = visit(route('app.posts.edit', $post))->resize(1280, 900);waitForChannelSettingsTestId($page, 'google-business-start-time');diff --git a/tests/Browser/ConnectChannelDialogTest.php b/tests/Browser/ConnectChannelDialogTest.phpindex a8ff903e5..ed3323f89 100644--- a/tests/Browser/ConnectChannelDialogTest.php+++ b/tests/Browser/ConnectChannelDialogTest.php@@ -349,7 +349,7 @@ test('the telegram step shows its instructions, copies and regenerates the comma$page->assertMissing('@connect-channel-logos')->assertSee(trans('accounts.telegram.title'))->assertSee(trans('accounts.telegram.description'))- ->assertSeeIn('@telegram-connect-steps', trans('accounts.telegram.steps'))+ ->assertSeeIn('@telegram-connect-steps-title', trans('accounts.telegram.steps'))->assertSeeIn('@telegram-connect-bot', '@TryPost_Bot')->assertSeeIn('@telegram-connect-waiting', trans('accounts.telegram.waiting'))->assertVisible('@telegram-connect-regenerate')diff --git a/tests/Browser/McpSettingsTest.php b/tests/Browser/McpSettingsTest.phpnew file mode 100644index 000000000..d9846938e--- /dev/null+++ b/tests/Browser/McpSettingsTest.php@@ -0,0 +1,171 @@+<?php++declare(strict_types=1);++use App\Models\AccessToken;+use App\Models\User;+use App\Models\Workspace;++function waitForMcpSettingsTestId(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((r) => setTimeout(r, 50));+ }+ })();+ JS);+}++function waitForMcpSettingsTestIdGone(mixed $page, string $testId): void+{+ $page->script(<<<JS+ (async () => {+ for (let i = 0; i < 50; i++) {+ if (!document.querySelector('[data-testid="{$testId}"]')) return;+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ })()+ JS);+}++/**+ * @return list<string>+ */+function mcpSettingsTestIds(mixed $page, string $selector): array+{+ $encodedSelector = json_encode($selector);++ return $page->script("[...document.querySelectorAll({$encodedSelector})].map((element) => element.dataset.testid)");+}++test('disconnecting an MCP app asks for the translated disconnect keyword, not the app name', function () {+ $user = User::factory()->create();+ $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]);+ subscribeAccount($user->account);++ $clientId = mcpOauthClient('Claude');+ mcpAccessToken($user, $clientId, $workspace);++ $this->actingAs($user->fresh());++ $keyword = __('channels.disconnect_modal.keyword');++ $page = visit(route('app.mcp.index'));+ waitForMcpSettingsTestId($page, "mcp-connected-menu-{$clientId}");++ $page->assertAttribute('@mcp-tab-connected', 'aria-selected', 'true')+ ->assertVisible('@mcp-connected-logo-claude');++ $page->click("@mcp-connected-menu-{$clientId}");+ waitForMcpSettingsTestId($page, "mcp-disconnect-{$clientId}");++ $page->click("@mcp-disconnect-{$clientId}")+ ->assertVisible('@confirm-delete-modal');++ expect(trim($page->text('[data-testid="confirm-delete-modal"] code')))->toBe($keyword);++ $page->assertDontSeeIn('@confirm-delete-modal', 'Claude')+ ->fill('@confirm-delete-input', 'Claude')+ ->assertAttribute('@confirm-delete-action', 'disabled', '')+ ->fill('@confirm-delete-input', mb_strtoupper($keyword))+ ->assertAttribute('@confirm-delete-action', 'disabled', '')+ ->fill('@confirm-delete-input', $keyword)+ ->click('@confirm-delete-action')+ ->assertMissing('@confirm-delete-modal')+ ->assertNoJavaScriptErrors();++ expect(AccessToken::query()->where('client_id', $clientId)->where('revoked', false)->exists())->toBeFalse();+});++test('the MCP settings open on the connected tab, whose empty state leads to the connect tab', function () {+ $user = User::factory()->create();+ $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]);+ subscribeAccount($user->account);++ $this->actingAs($user->fresh());++ $page = visit(route('app.mcp.index'));+ waitForMcpSettingsTestId($page, 'mcp-connected-empty');++ $page->assertAttribute('@mcp-tab-connected', 'aria-selected', 'true')+ ->assertVisible('@mcp-empty-illustration')+ ->assertSeeIn('@mcp-connected-empty', __('mcp.connected_empty_title'))+ ->assertSeeIn('@mcp-connected-empty-connect', __('mcp.tabs.connect'))+ ->click('@mcp-connected-empty-connect');+ waitForMcpSettingsTestId($page, 'mcp-connect-claude');++ expect(mcpSettingsTestIds($page, '[data-testid^=mcp-primary-client-]'))->toBe(['mcp-primary-client-claude', 'mcp-primary-client-chatgpt', 'mcp-primary-client-other']);++ $page->assertAttribute('@mcp-tab-connect', 'aria-selected', 'true')+ ->assertSeeIn('@settings-page-learn-more', __('common.learn_more'))+ ->assertAttribute('@settings-page-learn-more', 'href', 'https://docs.trypost.it/ai/introduction');++ $page->click('@mcp-connect-claude');+ waitForMcpSettingsTestId($page, 'mcp-dialog-waiting');++ $page->assertSeeIn('@mcp-dialog', 'Connect TryPost to Claude')+ ->assertSeeIn('@mcp-dialog-url', route('mcp.trypost'))+ ->keys('@mcp-dialog', 'Escape');++ waitForMcpSettingsTestIdGone($page, 'mcp-dialog');++ $page->click('@mcp-connect-other');+ waitForMcpSettingsTestId($page, 'mcp-dialog-config');++ $page->assertSeeIn('@mcp-dialog', __('mcp.other_dialog_title'))+ ->assertVisible('@mcp-dialog-step-add')+ ->assertSeeIn('@mcp-dialog-name', 'TryPost')+ ->assertSeeIn('@mcp-dialog-config', '"mcpServers"')+ ->assertSeeIn('@mcp-dialog-config', route('mcp.trypost'))+ ->assertMissing('@mcp-dialog-open')+ ->assertNoJavaScriptErrors();+});++test('a new connection closes the connect dialog and shows the connected tab', function () {+ $user = User::factory()->create();+ $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]);+ subscribeAccount($user->account);++ $this->actingAs($user->fresh());++ $page = visit(route('app.mcp.index'));+ waitForMcpSettingsTestId($page, 'mcp-connected-empty-connect');++ $page->click('@mcp-connected-empty-connect');+ waitForMcpSettingsTestId($page, 'mcp-connect-chatgpt');++ $page->click('@mcp-connect-chatgpt');+ waitForMcpSettingsTestId($page, 'mcp-dialog-waiting');++ $clientId = mcpOauthClient('ChatGPT');+ mcpAccessToken($user, $clientId, $workspace);++ waitForMcpSettingsTestId($page, 'confetti-canvas');+ $page->assertPresent('@confetti-canvas');+ waitForMcpSettingsTestId($page, "mcp-connected-client-{$clientId}");+ waitForMcpSettingsTestIdGone($page, 'mcp-dialog');++ $page->assertVisible("@mcp-connected-client-{$clientId}")+ ->assertNotPresent('@mcp-dialog')+ ->assertAttribute('@mcp-tab-connected', 'aria-selected', 'true')+ ->assertNoJavaScriptErrors();+});diff --git a/tests/Browser/MobileOverflowTest.php b/tests/Browser/MobileOverflowTest.phpindex 6d60e903a..652591c90 100644--- a/tests/Browser/MobileOverflowTest.php+++ b/tests/Browser/MobileOverflowTest.php@@ -105,6 +105,7 @@ test('auth and welcome pages do not overflow horizontally on a phone', function$welcomePages = ['welcome software' => route('app.welcome.software'),+ 'welcome plan' => route('app.welcome.plan'),];foreach ($welcomePages as $label => $url) {diff --git a/tests/Browser/PostNotesTest.php b/tests/Browser/PostNotesTest.phpindex 190b13212..0f44ef00c 100644--- a/tests/Browser/PostNotesTest.php+++ b/tests/Browser/PostNotesTest.php@@ -127,11 +127,12 @@ test('a note timestamp follows the display zone of the list', function () {$workspace->members()->attach($user->id, membershipPivot('admin'));$user->update(['current_workspace_id' => $workspace->id]);$post = Post::factory()->create(['workspace_id' => $workspace->id, 'user_id' => $user->id, 'content' => 'zone check']);+ $createdAt = now()->subMonth()->setTime(10, 0);PostNote::factory()->create(['post_id' => $post->id,'user_id' => $user->id,- 'created_at' => '2026-09-20 10:00:00',- 'updated_at' => '2026-09-20 10:00:00',+ 'created_at' => $createdAt,+ 'updated_at' => $createdAt,]);$this->actingAs($user);@@ -141,7 +142,7 @@ test('a note timestamp follows the display zone of the list', function () {waitForPostNotesTestId($page, 'note-created-at');expect($page->script('document.querySelector(\'[data-testid="note-created-at"]\').getAttribute("title")'))- ->toBe('September 20, 2026 7:00 AM');+ ->toBe($createdAt->setTimezone('America/Sao_Paulo')->format('F j, Y g:i A'));$page->assertNoJavaScriptErrors();});diff --git a/tests/Browser/PostRecurrenceTest.php b/tests/Browser/PostRecurrenceTest.phpindex 89587d911..903635f51 100644--- a/tests/Browser/PostRecurrenceTest.php+++ b/tests/Browser/PostRecurrenceTest.php@@ -178,12 +178,13 @@ test('a recurrence is edited and stopped', function () {test('the banner of a later occurrence counts from the series origin', function () {[$user, $post] = recurrenceSetup();+ $year = now()->addYear()->year;$post->update([- 'scheduled_at' => CarbonImmutable::parse('2027-02-28 09:00', 'UTC'),+ 'scheduled_at' => CarbonImmutable::parse("{$year}-02-28 09:00", 'UTC'),'recurrence_interval' => 1,'recurrence_frequency' => RecurrenceFrequency::Month,'recurrence_remaining' => 2,- 'recurrence_origin_at' => CarbonImmutable::parse('2027-01-31 09:00', 'UTC'),+ 'recurrence_origin_at' => CarbonImmutable::parse("{$year}-01-31 09:00", 'UTC'),]);$this->actingAs($user);@@ -191,12 +192,14 @@ test('the banner of a later occurrence counts from the series origin', functionwaitForRecurrenceTestId($page, "post-recurrence-banner-{$post->id}");expect(recurrenceText($page, "post-recurrence-banner-{$post->id}"))- ->toBe('This post will be shared every month on the 31st at 9:00 AM, until Apr 30, 2027 (2 posts left).');+ ->toBe("This post will be shared every month on the 31st at 9:00 AM, until Apr 30, {$year} (2 posts left).");$page->assertNoJavaScriptErrors();});test('the end date of a recurrence follows the channel time zone', function () {- [$user, $post] = recurrenceSetup('America/New_York', CarbonImmutable::parse('2027-06-01 02:00', 'UTC'));+ $scheduledAt = CarbonImmutable::parse(now()->addYear()->year.'-06-01 02:00', 'UTC');+ $localDay = $scheduledAt->setTimezone('America/New_York');+ [$user, $post] = recurrenceSetup('America/New_York', $scheduledAt);$this->actingAs($user);$page = visit(route('app.posts.index'));@@ -204,13 +207,13 @@ test('the end date of a recurrence follows the channel time zone', function () {openRecurrenceDialog($page, $post->id);expect(recurrenceText($page, "post-recurrence-summary-{$post->id}"))- ->toBe('This post will be shared every Monday at 10:00 PM, until Jun 7, 2027.');+ ->toBe("This post will be shared every {$localDay->format('l')} at 10:00 PM, until {$localDay->addWeek()->format('M j, Y')}.");chooseRecurrenceFrequency($page, $post->id, 'month');$page->fill("@post-recurrence-times-{$post->id}", '6');waitForRecurrenceCondition($page, "document.querySelector('[data-testid=\"post-recurrence-summary-{$post->id}\"]')?.textContent.includes('month')");expect(recurrenceText($page, "post-recurrence-summary-{$post->id}"))- ->toBe('This post will be shared every month on the 31st at 10:00 PM, until Nov 30, 2027.');+ ->toBe("This post will be shared every month on the 31st at 10:00 PM, until {$localDay->addMonthsNoOverflow(6)->format('M j, Y')}.");$page->assertNoJavaScriptErrors();});diff --git a/tests/Browser/ReferralSourceSurveyTest.php b/tests/Browser/ReferralSourceSurveyTest.phpindex 4fdfd79d9..b1234f828 100644--- a/tests/Browser/ReferralSourceSurveyTest.php+++ b/tests/Browser/ReferralSourceSurveyTest.php@@ -18,10 +18,40 @@ function waitForReferralSurveyCondition(mixed $page, string $condition): voidJS);}+function waitForReferralSurveyTestIdPresent(mixed $page, string $testId): void+{+ waitForReferralSurveyCondition($page, "document.querySelector('[data-testid=\"{$testId}\"]')");+}++function waitForReferralSurveyTestIdGone(mixed $page, string $testId): void+{+ waitForReferralSurveyCondition($page, "!document.querySelector('[data-testid=\"{$testId}\"]')");+}++function waitForReferralSurveySheetAtBottom(mixed $page): void+{+ waitForReferralSurveyCondition($page, "(() => { const sheet = document.querySelector('[data-testid=\"referral-source-survey\"]'); return sheet && Math.abs(window.innerHeight - sheet.getBoundingClientRect().bottom) < 1; })()");+}++/**+ * @return array{left: int, right: int, bottom: int, fullWidthSubmit: bool}+ */+function referralSurveySheetLayout(mixed $page): array+{+ return $page->script(<<<'JS'+ (() => {+ const sheet = document.querySelector('[data-testid="referral-source-survey"]').getBoundingClientRect();+ const submit = document.querySelector('[data-testid="referral-source-submit"]').getBoundingClientRect();+ const body = document.querySelector('[data-testid="referral-source-option-google"]').closest('[role="radiogroup"]').getBoundingClientRect();+ return { left: Math.round(sheet.left), right: Math.round(window.innerWidth - sheet.right), bottom: Math.abs(window.innerHeight - sheet.bottom) <= 1 ? 0 : Math.round(window.innerHeight - sheet.bottom), fullWidthSubmit: Math.abs(submit.width - (body.width - 8)) <= 1 };+ })()+ JS);+}+test('a user who has not said where they found us answers from the in-app card', function () {config(['trypost.self_hosted' => false]);- $user = User::factory()->create(['referral_source' => null]);+ $user = User::factory()->create(['referral_source' => null, 'created_at' => now()->subDays(2)]);$workspace = Workspace::factory()->create(['account_id' => $user->account_id,'user_id' => $user->id,@@ -33,13 +63,13 @@ test('a user who has not said where they found us answers from the in-app card',$this->actingAs($user->fresh());$page = visit(route('app.calendar'))->resize(1280, 900);- waitForReferralSurveyCondition($page, "document.querySelector('[data-testid=\"referral-source-survey\"]')");+ waitForReferralSurveyTestIdPresent($page, 'referral-source-survey');- expect($page->script("document.querySelector('[data-testid=\"referral-source-submit\"]').disabled"))->toBeTrue();+ $page->assertButtonDisabled('@referral-source-submit');$page->click('@referral-source-option-'.ReferralSource::ProductHunt->value)->click('@referral-source-submit');- waitForReferralSurveyCondition($page, "!document.querySelector('[data-testid=\"referral-source-survey\"]')");+ waitForReferralSurveyTestIdGone($page, 'referral-source-survey');$page->assertMissing('@referral-source-survey')->assertNoJavaScriptErrors();@@ -50,7 +80,7 @@ test('a user who has not said where they found us answers from the in-app card',test('on a phone the survey slides up as a bottom sheet and can be answered', function () {config(['trypost.self_hosted' => false]);- $user = User::factory()->create(['referral_source' => null]);+ $user = User::factory()->create(['referral_source' => null, 'created_at' => now()->subDays(2)]);$workspace = Workspace::factory()->create(['account_id' => $user->account_id,'user_id' => $user->id,@@ -62,22 +92,13 @@ test('on a phone the survey slides up as a bottom sheet and can be answered', fu$this->actingAs($user);$page = visit(route('app.calendar'))->resize(390, 844);- waitForReferralSurveyCondition($page, "(() => { const sheet = document.querySelector('[data-testid=\"referral-source-survey\"]'); return sheet && Math.abs(window.innerHeight - sheet.getBoundingClientRect().bottom) < 1; })()");-- $layout = $page->script(<<<'JS'- (() => {- const sheet = document.querySelector('[data-testid="referral-source-survey"]').getBoundingClientRect();- const submit = document.querySelector('[data-testid="referral-source-submit"]').getBoundingClientRect();- const body = document.querySelector('[data-testid="referral-source-option-google"]').closest('[role="radiogroup"]').getBoundingClientRect();- return { left: Math.round(sheet.left), right: Math.round(window.innerWidth - sheet.right), bottom: Math.abs(window.innerHeight - sheet.bottom) <= 1 ? 0 : Math.round(window.innerHeight - sheet.bottom), fullWidthSubmit: Math.abs(submit.width - (body.width - 8)) <= 1 };- })()- JS);+ waitForReferralSurveySheetAtBottom($page);- expect($layout)->toBe(['left' => 0, 'right' => 0, 'bottom' => 0, 'fullWidthSubmit' => true]);+ expect(referralSurveySheetLayout($page))->toBe(['left' => 0, 'right' => 0, 'bottom' => 0, 'fullWidthSubmit' => true]);$page->click('@referral-source-option-google')->click('@referral-source-submit');- waitForReferralSurveyCondition($page, "!document.querySelector('[data-testid=\"referral-source-survey\"]')");+ waitForReferralSurveyTestIdGone($page, 'referral-source-survey');expect($user->fresh()->referral_source)->toBe(ReferralSource::Google);$page->assertNoJavaScriptErrors();diff --git a/tests/Browser/SettingsSidebarTest.php b/tests/Browser/SettingsSidebarTest.phpindex ec3bc1bc5..810ffa263 100644--- a/tests/Browser/SettingsSidebarTest.php+++ b/tests/Browser/SettingsSidebarTest.php@@ -19,6 +19,54 @@ function waitForSettingsSidebarTestId(mixed $page, string $testId): voidJS);}+function waitForSettingsSidebarScript(mixed $page, string $condition): void+{+ $page->script(<<<JS+ (async () => {+ for (let i = 0; i < 100; i++) {+ if ({$condition}) return;+ await new Promise((r) => setTimeout(r, 50));+ }+ })();+ JS);+}++function waitForSettingsSidebarState(mixed $page, string $state): void+{+ waitForSettingsSidebarScript($page, "document.querySelector('[data-slot=\"sidebar\"][data-state]')?.dataset.state === '{$state}'");+}++/**+ * @return list<string>+ */+function settingsSidebarNavTestIds(mixed $page): array+{+ return $page->script(<<<'JS'+ [...document.querySelectorAll('[data-testid^="settings-nav-"]')].map((item) => item.dataset.testid)+ JS);+}++/**+ * @return array{state: string, width: int, active: string, icon: bool, back: bool, trigger: bool}+ */+function settingsSidebarProfileLayout(mixed $page): array+{+ return $page->script(<<<'JS'+ (() => {+ const profile = document.querySelector('[data-testid="settings-nav-profile"]');+ const box = profile.getBoundingClientRect();+ return {+ state: document.querySelector('[data-slot="sidebar"][data-state]').dataset.state,+ width: Math.round(box.width),+ active: profile.dataset.active,+ icon: profile.querySelector('svg').getBoundingClientRect().width > 0,+ back: document.querySelector('[data-testid="settings-back"]').getBoundingClientRect().width > 0,+ trigger: (document.querySelector('[data-testid="app-sidebar-trigger"]')?.getBoundingClientRect().width ?? 0) > 0,+ };+ })()+ JS);+}+function settingsSidebarUser(string $role): User{$owner = User::factory()->create();@@ -41,6 +89,7 @@ function settingsSidebarUser(string $role): User}test('settings pages swap the app sidebar for the settings sidebar', function () {+ config(['trypost.self_hosted' => false]);$this->actingAs(settingsSidebarUser('admin'));$page = visit(route('app.profile.edit'));@@ -53,12 +102,28 @@ test('settings pages swap the app sidebar for the settings sidebar', function ()->assertPresent('[data-testid="settings-nav-channels"] svg.tabler-icon-layout-grid')->assertVisible('@settings-nav-signatures')->assertVisible('@settings-nav-webhooks')+ ->assertSeeIn('@settings-nav-api-keys', 'API')+ ->assertDontSeeIn('@settings-nav-api-keys', 'Keys')+ ->assertPresent('[data-testid="settings-nav-api-keys"] svg.tabler-icon-code')+ ->assertPresent('[data-testid="settings-nav-authentication"] svg.tabler-icon-fingerprint')+ ->assertPresent('[data-testid="settings-nav-general"] svg.tabler-icon-building')+ ->assertPresent('[data-testid="settings-nav-mcp"] svg.tabler-icon-plug')+ ->assertSeeIn('@settings-sidebar', 'Content')+ ->assertDontSeeIn('@settings-sidebar', 'Features')+ ->assertSeeIn('@settings-sidebar', 'Integrations')+ ->assertDontSeeIn('@settings-sidebar', 'Developers')+ ->assertDontSeeIn('@settings-sidebar', 'Account')->assertMissing('@sidebar-new')->assertMissing('@settings-tab-profile')->assertNoJavaScriptErrors();++ $grouped = ['settings-nav-api-keys', 'settings-nav-mcp', 'settings-nav-webhooks', 'settings-nav-labels', 'settings-nav-members', 'settings-nav-billing'];++ expect(array_values(array_intersect(settingsSidebarNavTestIds($page), $grouped)))->toBe(['settings-nav-members', 'settings-nav-billing', 'settings-nav-labels', 'settings-nav-api-keys', 'settings-nav-mcp', 'settings-nav-webhooks']);});test('members only see the settings they may use', function () {+ config(['trypost.self_hosted' => false]);$this->actingAs(settingsSidebarUser('member'));$page = visit(route('app.profile.edit'));@@ -70,6 +135,7 @@ test('members only see the settings they may use', function () {->assertMissing('@settings-nav-channels')->assertMissing('@settings-nav-general')->assertMissing('@settings-nav-webhooks')+ ->assertNotPresent('@settings-nav-billing')->assertNoJavaScriptErrors();});@@ -87,29 +153,13 @@ test('the back link returns to the app', function () {test('with the sidebar collapsed the settings nav stays as icons and the footer toggle expands it', function () {$this->actingAs(settingsSidebarUser('admin'));- $state = "document.querySelector('[data-slot=\"sidebar\"][data-state]')?.dataset.state";- $layout = <<<'JS'- (() => {- const profile = document.querySelector('[data-testid="settings-nav-profile"]');- const box = profile.getBoundingClientRect();- return {- state: document.querySelector('[data-slot="sidebar"][data-state]').dataset.state,- width: Math.round(box.width),- active: profile.dataset.active,- icon: profile.querySelector('svg').getBoundingClientRect().width > 0,- back: document.querySelector('[data-testid="settings-back"]').getBoundingClientRect().width > 0,- trigger: (document.querySelector('[data-testid="app-sidebar-trigger"]')?.getBoundingClientRect().width ?? 0) > 0,- };- })()- JS;-$page = visit(route('app.profile.edit'))->resize(1280, 900);waitForSettingsSidebarTestId($page, 'sidebar-footer-toggle');$page->click('@sidebar-footer-toggle');- waitForSettingsSidebarScript($page, "{$state} === 'collapsed'");+ waitForSettingsSidebarState($page, 'collapsed');$page->script('new Promise((resolve) => setTimeout(resolve, 400))');- expect($page->script($layout))->toBe([+ expect(settingsSidebarProfileLayout($page))->toBe(['state' => 'collapsed','width' => 32,'active' => 'true',@@ -121,14 +171,14 @@ test('with the sidebar collapsed the settings nav stays as icons and the footer$page->script('location.reload()');waitForSettingsSidebarTestId($page, 'settings-nav-profile');- waitForSettingsSidebarScript($page, "{$state} === 'collapsed'");+ waitForSettingsSidebarState($page, 'collapsed');$page->assertVisible('@settings-nav-profile');$page->click('@sidebar-footer-toggle');- waitForSettingsSidebarScript($page, "{$state} === 'expanded'");+ waitForSettingsSidebarState($page, 'expanded');$page->script('new Promise((resolve) => setTimeout(resolve, 400))');- $expanded = $page->script($layout);+ $expanded = settingsSidebarProfileLayout($page);expect($expanded['state'])->toBe('expanded')->and($expanded['width'])->toBeGreaterThan(150)@@ -138,15 +188,3 @@ test('with the sidebar collapsed the settings nav stays as icons and the footer$page->assertSeeIn('@settings-nav-profile', 'Profile')->assertNoJavaScriptErrors();});--function waitForSettingsSidebarScript(mixed $page, string $condition): void-{- $page->script(<<<JS- (async () => {- for (let i = 0; i < 100; i++) {- if ({$condition}) return;- await new Promise((r) => setTimeout(r, 50));- }- })();- JS);-}diff --git a/tests/Browser/SidebarLanguageSwitchTest.php b/tests/Browser/SidebarLanguageSwitchTest.phpindex 3245930f5..6d7f278ee 100644--- a/tests/Browser/SidebarLanguageSwitchTest.php+++ b/tests/Browser/SidebarLanguageSwitchTest.php@@ -77,7 +77,8 @@ test('the calendar header follows the language, not the previous one', function$this->actingAs($user);- $page = visit(route('app.calendar', ['view' => 'week', 'week' => '2026-09-14']));+ $week = now()->startOfMonth()->addDays(10)->startOfWeek();+ $page = visit(route('app.calendar', ['view' => 'week', 'week' => $week->toDateString()]));waitForSidebarLanguageTestId($page, 'sidebar-workspace-menu');$page->script(<<<'JS'@@ -99,8 +100,8 @@ test('the calendar header follows the language, not the previous one', function// The month name comes from dayjs on the client, so it is the piece that used// to lag one switch behind the interface strings.- $page->assertScript('/setembro/i.test(window.__header)', true)- ->assertScript('/September/.test(window.__header)', false);+ $page->assertScript("/{$week->locale('pt_BR')->translatedFormat('F')}/i.test(window.__header)", true)+ ->assertScript("/{$week->format('F')}/.test(window.__header)", false);});test('switching theme in the sidebar applies it in place and saves it', function () {diff --git a/tests/Browser/WelcomeHeaderTest.php b/tests/Browser/WelcomeHeaderTest.phpindex 282c47846..00014cec0 100644--- a/tests/Browser/WelcomeHeaderTest.php+++ b/tests/Browser/WelcomeHeaderTest.php@@ -28,6 +28,30 @@ function waitForWelcomeTestId(mixed $page, string $testId): voidJS);}+function waitForWelcomeHeaderTextIn(mixed $page, string $testId, string $text): void+{+ $page->script(<<<JS+ (async () => {+ for (let i = 0; i < 100; i++) {+ if (document.querySelector('[data-testid="{$testId}"]')?.textContent.includes('{$text}')) return;+ await new Promise((r) => setTimeout(r, 50));+ }+ })();+ JS);+}++function waitForWelcomeHeaderDarkTheme(mixed $page): void+{+ $page->script(<<<'JS'+ (async () => {+ for (let i = 0; i < 100; i++) {+ if (document.documentElement.classList.contains('dark')) return;+ await new Promise((r) => setTimeout(r, 50));+ }+ })();+ JS);+}+function welcomeHeaderOwner(): User{$user = User::factory()->create();@@ -55,7 +79,7 @@ test('the software step goes back to goals, the step right before it', function$page = visit(route('app.welcome.software'));waitForWelcomeTestId($page, 'welcome-back');- $page->assertMissing('@welcome-step-plan')+ $page->assertVisible('@welcome-step-plan')->click('@welcome-back');waitForWelcomeTestId($page, 'welcome-goals-continue');@@ -63,6 +87,21 @@ test('the software step goes back to goals, the step right before it', function->assertNoJavaScriptErrors();});+test('the plan step goes back to software, the step right before it', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeHeaderOwner());++ $page = visit(route('app.welcome.plan'));+ waitForWelcomeTestId($page, 'welcome-back');++ $page->click('@welcome-back');+ waitForWelcomeTestId($page, 'welcome-software-continue');++ $page->assertRoute('app.welcome.software')+ ->assertNoJavaScriptErrors();+});+test('the welcome header switches language through the shared language select and theme through the toggle', function () {config(['trypost.self_hosted' => false]);@@ -81,26 +120,12 @@ test('the welcome header switches language through the shared language select an$page->fill('@welcome-language-search', 'Português')->click('@welcome-language-option-pt-BR');- $page->script(<<<'JS'- (async () => {- for (let i = 0; i < 100; i++) {- if (document.querySelector('[data-testid="welcome-language-value"]')?.textContent.includes('Portugu')) return;- await new Promise((r) => setTimeout(r, 50));- }- })();- JS);+ waitForWelcomeHeaderTextIn($page, 'welcome-language-value', 'Portugu');expect($user->fresh()->locale)->toBe(Locale::PortugueseBrazil);- $page->click('@theme-toggle-dark');- $page->script(<<<'JS'- (async () => {- for (let i = 0; i < 100; i++) {- if (document.documentElement.classList.contains('dark')) return;- await new Promise((r) => setTimeout(r, 50));- }- })();- JS);+ $page->click('@theme-toggle');+ waitForWelcomeHeaderDarkTheme($page);$page->assertNoJavaScriptErrors();expect($user->fresh()->theme)->toBe(Theme::Dark);diff --git a/tests/Browser/WelcomeMcpTest.php b/tests/Browser/WelcomeMcpTest.phpnew file mode 100644index 000000000..71fdcad4d--- /dev/null+++ b/tests/Browser/WelcomeMcpTest.php@@ -0,0 +1,592 @@+<?php++declare(strict_types=1);++use App\Models\Media;+use App\Models\User;+use App\Models\Workspace;+use Illuminate\Support\Facades\Storage;+use Illuminate\Support\Str;++function waitForWelcomeMcpTestId(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);+}++function waitForWelcomeMcpChat(mixed $page, string $benefit): void+{+ $page->script(<<<JS+ (async () => {+ for (let i = 0; i < 100; i++) {+ const chat = document.querySelector('[data-testid="welcome-mcp-chat-{$benefit}"]');+ if (chat && getComputedStyle(chat).opacity === '1' && !chat.className.includes('-active')) return;+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ })();+ JS);+}++function welcomeMcpSubscriber(): User+{+ $user = User::factory()->create();+ $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]);+ subscribeAccount($user->account);++ return $user->fresh();+}++function stubWelcomeMcpConnectTab(mixed $page): void+{+ $page->script(<<<'JS'+ window.__copied = [];+ navigator.clipboard.writeText = async (text) => { window.__copied.push(text); };+ document.addEventListener('click', (event) => {+ if (event.target.closest('a[target="_blank"]')) event.preventDefault();+ }, true);+ true;+ JS);+}++function waitForWelcomeMcpTestIdGone(mixed $page, string $testId): void+{+ $page->script(<<<JS+ (async () => {+ for (let i = 0; i < 50; i++) {+ if (!document.querySelector('[data-testid="{$testId}"]')) return;+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ })()+ JS);+}++function waitForWelcomeMcpPath(mixed $page, string $path): void+{+ $page->script(<<<JS+ (async () => {+ for (let attempt = 0; attempt < 100; attempt++) {+ if (window.location.pathname === '{$path}') return;+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ })()+ JS);+}++function waitForWelcomeMcpCopied(mixed $page, int $count): void+{+ $page->script(<<<JS+ (async () => {+ for (let i = 0; i < 50; i++) {+ if (window.__copied.length >= {$count}) return;+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ })()+ JS);+}++function waitForWelcomeMcpRequest(mixed $page, string $path, int $status): bool+{+ return $page->script(<<<JS+ (async () => {+ for (let i = 0; i < 60; i++) {+ if (performance.getEntriesByType('resource').some((entry) => new URL(entry.name).pathname === '{$path}' && entry.responseStatus === {$status})) return true;+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ return false;+ })()+ JS);+}++function waitForWelcomeMcpCelebration(mixed $page): mixed+{+ return $page->script(<<<'JS'+ (async () => {+ let confetti = false;+ for (let i = 0; i < 120; i++) {+ confetti ||= document.querySelector('[data-testid="confetti-canvas"]') !== null;+ if (confetti && document.querySelector('[data-testid="welcome-mcp-status"]') && !document.querySelector('[data-testid="mcp-dialog"]')) {+ return 'celebrated';+ }+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ return { confetti };+ })()+ JS);+}++function waitForWelcomeMcpBenefitChange(mixed $page, string $from): ?string+{+ return $page->script(<<<JS+ (async () => {+ const selected = () => document.querySelector('[data-testid^="welcome-mcp-benefit-"][aria-pressed="true"]')?.dataset.testid;+ for (let i = 0; i < 240; i++) {+ if (selected() !== '{$from}') return selected();+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ })()+ JS);+}++function welcomeMcpPause(mixed $page, int $milliseconds): void+{+ $page->script(<<<JS+ (async () => {+ await new Promise((resolve) => setTimeout(resolve, {$milliseconds}));+ })()+ JS);+}++function welcomeMcpSelectedBenefit(mixed $page): ?string+{+ return $page->script('document.querySelector(\'[data-testid^="welcome-mcp-benefit-"][aria-pressed="true"]\')?.dataset.testid');+}++function welcomeMcpFocus(mixed $page, string $testId): void+{+ $page->script("document.querySelector('[data-testid=\"{$testId}\"]').focus(); true;");+}++/**+ * @return list<string>+ */+function welcomeMcpTestIds(mixed $page, string $selector): array+{+ $encodedSelector = json_encode($selector);++ return $page->script("[...document.querySelectorAll({$encodedSelector})].map((element) => element.dataset.testid)");+}++/**+ * @return list<string>+ */+function welcomeMcpLines(mixed $page, string $testId): array+{+ return $page->script("document.querySelector('[data-testid=\"{$testId}\"]').innerText.split('\\n')");+}++function welcomeMcpStyle(mixed $page, string $testId, string $property): string+{+ return $page->script("getComputedStyle(document.querySelector('[data-testid=\"{$testId}\"]')).{$property}");+}++/**+ * @return array{top: float|int, bottom: float|int, left: float|int, right: float|int, width: float|int, height: float|int}+ */+function welcomeMcpRect(mixed $page, string $testId): array+{+ return $page->script(<<<JS+ (() => {+ const rect = document.querySelector('[data-testid="{$testId}"]').getBoundingClientRect();+ return { top: rect.top, bottom: rect.bottom, left: rect.left, right: rect.right, width: rect.width, height: rect.height };+ })()+ JS);+}++/**+ * @return list<float|int>+ */+function welcomeMcpTops(mixed $page, string $selector): array+{+ $encodedSelector = json_encode($selector);++ return $page->script("[...document.querySelectorAll({$encodedSelector})].map((element) => element.getBoundingClientRect().top)");+}++/**+ * @return array{width: int, height: int, viewportWidth: int, viewportHeight: int}+ */+function welcomeMcpScrollSize(mixed $page): array+{+ return $page->script('({ width: document.documentElement.scrollWidth, height: document.documentElement.scrollHeight, viewportWidth: window.innerWidth, viewportHeight: window.innerHeight })');+}++function welcomeMcpScrollToBottom(mixed $page): void+{+ $page->script('window.scrollTo(0, document.documentElement.scrollHeight); true;');+}++function welcomeMcpActiveTestId(mixed $page): ?string+{+ return $page->script('document.activeElement.dataset.testid');+}++function welcomeMcpActiveStyle(mixed $page, string $property): string+{+ return $page->script("getComputedStyle(document.activeElement).{$property}");+}++/**+ * @return list<string>+ */+function welcomeMcpCopied(mixed $page): array+{+ return $page->script('window.__copied');+}++function welcomeMcpChatAvatar(mixed $page, string $benefit): string+{+ return $page->script(<<<JS+ (async () => {+ const chat = document.querySelector('[data-testid="welcome-mcp-chat-{$benefit}"]');+ for (let i = 0; i < 50; i++) {+ const image = chat.querySelector('img[src*="avatars/"]');+ if (image && image.complete) return 'photo';+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ return chat.innerText.includes('AL') ? 'initials' : 'none';+ })()+ JS);+}++test('the MCP step opens a dialog with the steps and the app link, and can be skipped', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeMcpSubscriber());++ $page = visit(route('app.welcome.mcp'))->resize(1440, 900);+ waitForWelcomeMcpTestId($page, 'welcome-mcp-connect-claude');++ $scrollSize = welcomeMcpScrollSize($page);++ expect($scrollSize['height'])->toBeLessThanOrEqual($scrollSize['viewportHeight']);++ expect(welcomeMcpTestIds($page, '[data-testid^=welcome-mcp-benefit-]:not([data-testid*=-icon-])'))->toBe(['welcome-mcp-benefit-ideas', 'welcome-mcp-benefit-schedule', 'welcome-mcp-benefit-queue', 'welcome-mcp-benefit-analytics']);++ $page->assertSee('Run your social media from a chat')+ ->assertSeeIn('@welcome-mcp-composer', 'Ask anything')+ ->assertVisible('@welcome-mcp-benefit-schedule')+ ->assertVisible('@welcome-mcp-benefit-ideas')+ ->click('@welcome-mcp-benefit-schedule');+ waitForWelcomeMcpChat($page, 'schedule');++ $page->assertSeeIn('@welcome-mcp-chat-schedule', 'Take the next idea on my board')+ ->assertSeeIn('@welcome-mcp-chat-schedule', 'schedule it for Tuesday at 10:00 AM');++ expect(welcomeMcpLines($page, 'welcome-mcp-chat-schedule'))->toContain('Scheduled')+ ->and(welcomeMcpTestIds($page, '[data-testid=welcome-mcp-chat-schedule] [data-testid^=welcome-mcp-schedule-post-]'))->toBe(['welcome-mcp-schedule-post-instagram', 'welcome-mcp-schedule-post-linkedin']);++ $page->click('@welcome-mcp-benefit-analytics');+ waitForWelcomeMcpChat($page, 'analytics');++ expect(welcomeMcpStyle($page, 'welcome-mcp-benefit-icon-analytics', 'backgroundColor'))->not->toBe(welcomeMcpStyle($page, 'welcome-mcp-benefit-icon-queue', 'backgroundColor'));++ $page->assertSeeIn('@welcome-mcp-chat-analytics', 'How was my month')+ ->assertSeeIn('@welcome-mcp-chat-analytics', 'Total Followers')+ ->click('@welcome-mcp-benefit-queue');+ waitForWelcomeMcpChat($page, 'queue');++ expect(welcomeMcpLines($page, 'welcome-mcp-chat-queue'))->toContain('Tomorrow');++ $page->assertSeeIn('@welcome-mcp-chat-queue', 'New')+ ->click('@welcome-mcp-benefit-ideas');+ waitForWelcomeMcpChat($page, 'ideas');++ expect(array_count_values(welcomeMcpLines($page, 'welcome-mcp-chat-ideas'))['New idea'] ?? 0)->toBe(2);++ $page->assertSeeIn('@welcome-mcp-chat-ideas', 'To Do')+ ->assertSeeIn('@welcome-mcp-chat-ideas', 'In Progress')+ ->assertAttributeMissing('@welcome-mcp-connect-claude', 'href');++ expect(collect(welcomeMcpTops($page, '[data-testid^=welcome-mcp-connect-]:not([data-testid=welcome-mcp-connect-ai])'))->map(fn (float|int $top): float => round($top))->unique()->count())->toBe(1);++ $page->assertSeeIn('@welcome-mcp-connect-claude', 'Connect with Claude')+ ->assertMissing('@welcome-mcp-copy')+ ->assertMissing('@mcp-dialog')+ ->assertMissing('@welcome-mcp-continue');++ stubWelcomeMcpConnectTab($page);+ $page->click('@welcome-mcp-connect-claude');+ waitForWelcomeMcpTestId($page, 'mcp-dialog-step-paste');++ $connectClickPath = parse_url(route('app.welcome.mcp.connect-click'), PHP_URL_PATH);++ expect(waitForWelcomeMcpRequest($page, $connectClickPath, 204))->toBeTrue()+ ->and(welcomeMcpCopied($page))->toBe([])+ ->and(welcomeMcpActiveTestId($page))->toBe('mcp-dialog')+ ->and(welcomeMcpActiveStyle($page, 'outlineStyle'))->toBe('none');++ $page->assertSeeIn('@mcp-dialog-name-copy', 'Copy')+ ->assertSeeIn('@mcp-dialog-url-copy', 'Copy')+ ->click('@mcp-dialog-name-copy');+ waitForWelcomeMcpCopied($page, 1);++ $page->assertSeeIn('@mcp-dialog-name-copy', 'Copied')+ ->assertDontSeeIn('@mcp-dialog-url-copy', 'Copied');++ $page->click('@mcp-dialog-url-copy');+ waitForWelcomeMcpCopied($page, 2);++ $page->assertSeeIn('@mcp-dialog', 'Connect TryPost to Claude')+ ->assertSeeIn('@mcp-dialog-url', route('mcp.trypost'))+ ->assertSeeIn('@mcp-dialog-step-paste', "Paste the URL into the connector's URL field")+ ->assertVisible('@mcp-dialog-step-add')+ ->assertVisible('@mcp-dialog-step-login')+ ->assertSeeIn('@mcp-dialog-waiting', 'Waiting for your AI to connect')+ ->assertCount('[data-sonner-toast]', 0)+ ->assertAttribute('@mcp-dialog-open', 'target', '_blank');++ expect(welcomeMcpCopied($page))->toBe(['TryPost', route('mcp.trypost')])+ ->and($page->attribute('@mcp-dialog-open', 'href'))->toStartWith('https://claude.ai/');++ $page->assertSeeIn('@mcp-dialog-open', 'Open Claude')+ ->click('@mcp-dialog-open')+ ->assertPresent('@mcp-dialog');++ $page->keys('@mcp-dialog', 'Escape');+ waitForWelcomeMcpTestIdGone($page, 'mcp-dialog');++ $page->click('@welcome-mcp-connect-chatgpt');+ waitForWelcomeMcpTestId($page, 'mcp-dialog-step-developer');++ $page->assertSeeIn('@mcp-dialog', 'Connect TryPost to ChatGPT')+ ->assertSeeIn('@mcp-dialog-step-developer', 'Turn on Developer mode')+ ->assertVisible('@mcp-dialog-step-create')+ ->assertMissing('@mcp-dialog-step-paste')+ ->assertAttribute('@mcp-dialog-open', 'href', 'https://chatgpt.com/plugins');++ $page->keys('@mcp-dialog', 'Escape');+ waitForWelcomeMcpTestIdGone($page, 'mcp-dialog');++ $page->assertSeeIn('@welcome-mcp-connect-other', 'Connect another app')+ ->click('@welcome-mcp-connect-other');+ waitForWelcomeMcpTestId($page, 'mcp-dialog-config');++ $page->assertSeeIn('@mcp-dialog', 'Connect TryPost to another app')+ ->assertVisible('@mcp-dialog-step-add')+ ->assertSeeIn('@mcp-dialog-config', route('mcp.trypost'))+ ->assertMissing('@mcp-dialog-open')+ ->keys('@mcp-dialog', 'Escape');+ waitForWelcomeMcpTestIdGone($page, 'mcp-dialog');++ $page->click('@welcome-mcp-skip');++ $schedulePath = parse_url(route('app.posts.index'), PHP_URL_PATH);+ waitForWelcomeMcpPath($page, $schedulePath);++ $page->assertPathIs($schedulePath)+ ->assertNoJavaScriptErrors();+});++test('on a phone the MCP step keeps the example and connects through an AI picker sheet', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeMcpSubscriber());++ $page = visit(route('app.welcome.mcp'))->resize(390, 844);+ waitForWelcomeMcpTestId($page, 'welcome-mcp-pill-schedule');++ $page->assertVisible('@welcome-mcp-pill-schedule')+ ->assertMissing('@welcome-mcp-benefit-schedule')+ ->click('@welcome-mcp-pill-ideas');+ waitForWelcomeMcpChat($page, 'ideas');++ $page->assertVisible('@welcome-mcp-chat-ideas')+ ->assertAttribute('@welcome-mcp-pill-ideas', 'aria-pressed', 'true');++ $scrollSize = welcomeMcpScrollSize($page);++ expect($scrollSize['width'])->toBeLessThanOrEqual($scrollSize['viewportWidth']);++ welcomeMcpScrollToBottom($page);+ welcomeMcpPause($page, 300);++ $skip = welcomeMcpRect($page, 'welcome-mcp-skip-link');+ $connect = welcomeMcpRect($page, 'welcome-mcp-connect-ai');+ $actions = welcomeMcpRect($page, 'welcome-actions');++ expect([+ 'compact' => $actions['height'] < 120,+ 'windowAboveFooter' => welcomeMcpRect($page, 'welcome-mcp-window')['bottom'] <= $actions['top'],+ 'composerHidden' => (float) welcomeMcpRect($page, 'welcome-mcp-composer')['height'] === 0.0,+ 'connectBeforeSkip' => round($skip['top']) === round($connect['top']) && $connect['left'] < $skip['left'],+ ])->toBe(['compact' => true, 'windowAboveFooter' => true, 'composerHidden' => true, 'connectBeforeSkip' => true]);++ $page->assertSeeIn('@welcome-mcp-connect-ai', 'Connect your AI')+ ->assertVisible('@welcome-mcp-skip-link')+ ->assertMissing('@welcome-mcp-connect-claude')+ ->assertMissing('@welcome-mcp-connect-other')+ ->assertMissing('@welcome-mcp-skip');++ stubWelcomeMcpConnectTab($page);+ $page->click('@welcome-mcp-connect-ai');+ waitForWelcomeMcpTestId($page, 'welcome-mcp-pick-other');++ $page->assertSeeIn('@welcome-mcp-ai-picker', 'Where do you want to use TryPost?')+ ->assertVisible('@welcome-mcp-pick-claude')+ ->assertVisible('@welcome-mcp-pick-chatgpt')+ ->click('@welcome-mcp-pick-other');+ waitForWelcomeMcpTestId($page, 'mcp-dialog-config');++ $page->assertSeeIn('@mcp-dialog', 'Connect TryPost to another app')+ ->assertMissing('@welcome-mcp-ai-picker')+ ->keys('@mcp-dialog', 'Escape');+ waitForWelcomeMcpTestIdGone($page, 'mcp-dialog');++ $page->click('@welcome-mcp-connect-ai');+ waitForWelcomeMcpTestId($page, 'welcome-mcp-pick-claude');++ $page->click('@welcome-mcp-pick-claude');+ waitForWelcomeMcpTestId($page, 'mcp-dialog-step-paste');+ welcomeMcpPause($page, 600);++ $dialog = welcomeMcpRect($page, 'mcp-dialog');++ expect(['bottom' => (int) round($dialog['bottom']), 'width' => (int) round($dialog['width'])])->toBe(['bottom' => 844, 'width' => 390]);++ $page->assertVisible('@mcp-dialog-open')+ ->assertNoJavaScriptErrors();+});++test('the schedule and queue examples show the owner photo, or their initials without one', function (bool $withPhoto) {+ config(['trypost.self_hosted' => false]);++ $owner = welcomeMcpSubscriber();+ $owner->update(['name' => 'Ada Lovelace']);++ if ($withPhoto) {+ $path = 'avatars/'.Str::uuid().'.png';+ Storage::put($path, base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=='));+ Media::factory()->avatar()->create([+ 'mediable_type' => $owner->getMorphClass(),+ 'mediable_id' => $owner->id,+ 'path' => $path,+ 'mime_type' => 'image/png',+ ]);+ }++ $this->actingAs($owner->fresh());++ $page = visit(route('app.welcome.mcp'))->resize(1440, 900);+ waitForWelcomeMcpTestId($page, 'welcome-mcp-connect-claude');++ foreach (['schedule', 'queue'] as $benefit) {+ $page->click("@welcome-mcp-benefit-{$benefit}");+ waitForWelcomeMcpChat($page, $benefit);++ expect(welcomeMcpChatAvatar($page, $benefit))->toBe($withPhoto ? 'photo' : 'initials');+ }++ expect(welcomeMcpLines($page, 'welcome-mcp-chat-queue'))->toContain('Tomorrow');++ $page->assertNoJavaScriptErrors();+})->with([+ 'with a photo' => [true],+ 'without a photo' => [false],+]);++test('hovering a month of the follower example shows each network that month', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeMcpSubscriber());++ $page = visit(route('app.welcome.mcp'))->resize(1440, 900);+ waitForWelcomeMcpTestId($page, 'welcome-mcp-connect-claude');++ $page->click('@welcome-mcp-benefit-analytics');+ waitForWelcomeMcpChat($page, 'analytics');++ $page->assertMissing('@welcome-mcp-followers-tooltip')+ ->hover('[data-testid="welcome-mcp-chat-analytics"] [data-testid="welcome-mcp-followers-month-5"]');+ waitForWelcomeMcpTestId($page, 'welcome-mcp-followers-tooltip');++ $page->assertSeeIn('@welcome-mcp-followers-tooltip', now()->format('M Y'))+ ->assertSeeIn('@welcome-mcp-followers-tooltip', '5,840')+ ->assertSeeIn('@welcome-mcp-followers-tooltip', '5,220')+ ->assertSeeIn('@welcome-mcp-followers-tooltip', '1,340')+ ->assertNoJavaScriptErrors();+});++test('once the AI connects the dialog closes, confetti flies and the page offers to continue', function () {+ config(['trypost.self_hosted' => false]);++ $owner = welcomeMcpSubscriber();+ $this->actingAs($owner);++ $page = visit(route('app.welcome.mcp'))->resize(1440, 900);+ waitForWelcomeMcpTestId($page, 'welcome-mcp-connect-claude');++ $page->click('@welcome-mcp-connect-claude');+ waitForWelcomeMcpTestId($page, 'mcp-dialog-waiting');++ mcpAccessToken($owner, mcpOauthClient('Claude'), $owner->currentWorkspace);++ expect(waitForWelcomeMcpCelebration($page))->toBe('celebrated');++ expect(trim($page->text('@welcome-mcp-announcement')))->toBe('Claude is connected');++ $page->assertSeeIn('@welcome-mcp-status', 'Claude is connected')+ ->assertVisible('@welcome-mcp-continue')+ ->assertMissing('@welcome-mcp-connect-claude')+ ->assertMissing('@welcome-mcp-skip');++ expect(welcomeMcpRect($page, 'welcome-mcp-continue')['top'])->toBeLessThan(welcomeMcpRect($page, 'welcome-mcp-status')['top']);++ $page->assertNoJavaScriptErrors();+});++test('the MCP examples rotate on their own until the user picks a tab', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeMcpSubscriber());++ $page = visit(route('app.welcome.mcp'))->resize(1440, 900);+ waitForWelcomeMcpTestId($page, 'welcome-mcp-benefit-ideas');++ expect(waitForWelcomeMcpBenefitChange($page, 'welcome-mcp-benefit-ideas'))->toBe('welcome-mcp-benefit-schedule');++ $page->click('@welcome-mcp-benefit-queue')+ ->hover('@welcome-title');+ welcomeMcpPause($page, 9000);++ expect(welcomeMcpSelectedBenefit($page))->toBe('welcome-mcp-benefit-queue');++ $page->assertNoJavaScriptErrors();+});++test('an owner who already connected an AI sees the connected state without confetti', function () {+ config(['trypost.self_hosted' => false]);++ $owner = welcomeMcpSubscriber();+ mcpAccessToken($owner, mcpOauthClient('Claude'), $owner->currentWorkspace);+ $this->actingAs($owner);++ $page = visit(route('app.welcome.mcp'))->resize(1440, 900);+ waitForWelcomeMcpTestId($page, 'welcome-mcp-status');+ welcomeMcpPause($page, 1500);++ $page->assertNotPresent('@confetti-canvas')+ ->assertSeeIn('@welcome-mcp-status', 'Claude is connected')+ ->assertVisible('@welcome-mcp-continue')+ ->assertMissing('@mcp-dialog')+ ->assertMissing('@welcome-mcp-connect-claude')+ ->assertNoJavaScriptErrors();+});++test('keyboard focus on the examples pauses the rotation', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeMcpSubscriber());++ $page = visit(route('app.welcome.mcp'))->resize(1440, 900);+ waitForWelcomeMcpTestId($page, 'welcome-mcp-benefit-ideas');++ welcomeMcpFocus($page, 'welcome-mcp-benefit-ideas');+ welcomeMcpPause($page, 9000);++ expect(welcomeMcpSelectedBenefit($page))->toBe('welcome-mcp-benefit-ideas');++ $page->assertNoJavaScriptErrors();+});diff --git a/tests/Browser/WelcomeMobileTest.php b/tests/Browser/WelcomeMobileTest.phpindex 5d218eecf..503ee185d 100644--- a/tests/Browser/WelcomeMobileTest.php+++ b/tests/Browser/WelcomeMobileTest.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\Models\SocialAccount;use App\Models\User;use App\Models\Workspace;@@ -50,7 +51,7 @@ function welcomeMobileHeaderProblems(mixed $page): arrayreturn $page->script(<<<'JS'(() => {const header = document.querySelector('header');- const items = [...header.querySelectorAll('[data-testid="welcome-back"], [data-testid="app-logo"], [data-testid="welcome-language-trigger"], [data-testid="theme-toggle-cycle"]')]+ const items = [...header.querySelectorAll('[data-testid="welcome-back"], [data-testid="app-logo"], [data-testid="welcome-language-trigger"], [data-testid="theme-toggle"]')].filter((element) => element.getClientRects().length > 0).map((element) => ({ id: element.dataset.testid, rect: element.getBoundingClientRect() }));const problems = [];@@ -72,7 +73,7 @@ function welcomeMobileHeaderProblems(mixed $page): array}}}- if (!['app-logo', 'welcome-language-trigger', 'theme-toggle-cycle'].every((id) => items.some((item) => item.id === id))) {+ if (!['app-logo', 'welcome-language-trigger', 'theme-toggle'].every((id) => items.some((item) => item.id === id))) {problems.push('missing header items: ' + items.map((item) => item.id).join(','));}if (header.querySelector('[data-testid^="welcome-step-"]')) {@@ -118,7 +119,7 @@ test('the welcome header fits a phone and the continue button stays on screen',$this->actingAs(welcomeMobileOwner($attributes));$page = visit(route($route))->resize(390, 844);- waitForWelcomeMobileTestId($page, 'theme-toggle-cycle');+ waitForWelcomeMobileTestId($page, 'theme-toggle');waitForWelcomeMobileTestId($page, $hasBack ? 'welcome-back' : 'welcome-step-persona');$result = welcomeMobileHeaderProblems($page);@@ -137,7 +138,7 @@ test('the welcome header fits a phone and the continue button stays on screen',$page->assertVisible('@welcome-back');}- $page->assertMissing('@theme-toggle')+ $page->assertVisible('@theme-toggle')->assertNoJavaScriptErrors();})->with(['persona' => ['app.welcome.persona', [], 'welcome-persona-continue', 'welcome-persona-', false],@@ -146,4 +147,9 @@ test('the welcome header fits a phone and the continue button stays on screen','persona' => Persona::Agency->value,'goals' => [Goal::SaveTime->value],], 'welcome-software-continue', 'welcome-software-', true],+ 'plan' => ['app.welcome.plan', [+ 'persona' => Persona::Agency->value,+ 'goals' => [Goal::SaveTime->value],+ 'previous_software' => PreviousSoftware::Buffer->value,+ ], 'welcome-plan-continue', 'plan-card-', true],]);diff --git a/tests/Browser/WelcomePlanTest.php b/tests/Browser/WelcomePlanTest.phpnew file mode 100644index 000000000..72675a111--- /dev/null+++ b/tests/Browser/WelcomePlanTest.php@@ -0,0 +1,386 @@+<?php++declare(strict_types=1);++use App\Enums\User\Goal;+use App\Enums\User\Persona;+use App\Enums\User\PreviousSoftware;+use App\Models\User;+use App\Models\Workspace;+use Illuminate\Support\Str;++/**+ * 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 welcomePlanVisibleReview(mixed $page): ?string+{+ return $page->script(<<<'JS'+ document.querySelector('[data-testid^="welcome-plan-review-"]:not([aria-hidden="true"])')?.dataset.testid+ JS);+}++function waitForWelcomePlanReviewOtherThan(mixed $page, string $testId): ?string+{+ return $page->script(<<<JS+ (async () => {+ for (let i = 0; i < 100; i++) {+ const visible = document.querySelector('[data-testid^="welcome-plan-review-"]:not([aria-hidden="true"])')?.dataset.testid;+ if (visible !== '{$testId}') return visible;+ await new Promise((resolve) => setTimeout(resolve, 100));+ }+ })()+ JS);+}++function welcomePlanVisibleReviewAfter(mixed $page, int $milliseconds): ?string+{+ return $page->script(<<<JS+ (async () => {+ await new Promise((resolve) => setTimeout(resolve, {$milliseconds}));+ return document.querySelector('[data-testid^="welcome-plan-review-"]:not([aria-hidden="true"])')?.dataset.testid;+ })()+ JS);+}++/**+ * @return array{active: list<float|int>, inactive: list<float|int>}|string+ */+function waitForWelcomePlanReviewerOpacities(mixed $page): array|string+{+ return $page->script(<<<'JS'+ (async () => {+ const opacityOf = (button) => Number(getComputedStyle(button).opacity);+ for (let i = 0; i < 40; i++) {+ const buttons = [...document.querySelectorAll('[data-testid^="welcome-plan-reviewer-"]')];+ const active = buttons.filter((button) => button.getAttribute('aria-pressed') === 'true').map(opacityOf);+ const inactive = buttons.filter((button) => button.getAttribute('aria-pressed') !== 'true').map(opacityOf);+ if (active[0] === 1 && inactive.every((value) => value === 0.5)) {+ return { active, inactive: [...new Set(inactive)] };+ }+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ return 'not settled';+ })()+ JS);+}++/**+ * @return list<string>+ */+function welcomePlanTestIdsStartingWith(mixed $page, string $prefix): array+{+ return $page->script(<<<JS+ [...document.querySelectorAll('[data-testid^="{$prefix}"]')].map((element) => element.dataset.testid)+ JS);+}++/**+ * @return list<string>+ */+function welcomePlanFeatureIconClasses(mixed $page, string $labelTestId): array+{+ return $page->script(<<<JS+ [...(document.querySelector('[data-testid="{$labelTestId}"]')?.closest('li')?.querySelector('svg')?.classList ?? [])]+ JS);+}++/**+ * @return list<int>+ */+function welcomePlanFeatureIconWidths(mixed $page, string $listTestId): array+{+ return $page->script(<<<JS+ [...document.querySelectorAll('[data-testid="{$listTestId}"] ul > li > svg')].map((icon) => Math.round(icon.getBoundingClientRect().width))+ JS);+}++function welcomePlanLastFeatureLabelTestId(mixed $page, string $listTestId): ?string+{+ return $page->script(<<<JS+ [...document.querySelectorAll('[data-testid="{$listTestId}"] ul > li')].at(-1)?.querySelector('[data-testid^="plan-feature-label-"]')?.dataset.testid+ JS);+}++/**+ * @return array{scrolls: bool, quoteVisible: bool}+ */+function welcomePlanPhoneLayout(mixed $page): array+{+ return $page->script(<<<'JS'+ ({+ scrolls: document.documentElement.scrollHeight > window.innerHeight,+ quoteVisible: document.querySelector('[data-testid^="welcome-plan-review-"]:not([aria-hidden="true"])')?.getClientRects().length > 0,+ })+ JS);+}++function waitForWelcomePlanPopoverOpen(mixed $page): bool+{+ return $page->script(<<<'JS'+ (async () => {+ for (let i = 0; i < 50; i++) {+ if (document.querySelector('[data-slot="popover-content"]')) return true;+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ return false;+ })()+ JS);+}++function waitForWelcomePlanPopoverClosed(mixed $page): bool+{+ return $page->script(<<<'JS'+ (async () => {+ for (let i = 0; i < 50; i++) {+ if (!document.querySelector('[data-slot="popover-content"]')) return true;+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ return false;+ })()+ JS);+}++function welcomePlanFocus(mixed $page, string $testId): void+{+ $page->script(<<<JS+ document.querySelector('[data-testid="{$testId}"]').focus()+ JS);+}++function welcomePlanStallRequests(mixed $page): void+{+ $page->script(<<<'JS'+ XMLHttpRequest.prototype.send = function () {};+ JS);+}++/**+ * @return array{spinner: bool, disabled: bool}+ */+function waitForWelcomePlanButtonSpinner(mixed $page, string $testId): array+{+ return $page->script(<<<JS+ (async () => {+ const button = document.querySelector('[data-testid="{$testId}"]');+ for (let i = 0; i < 50; i++) {+ if (button.querySelector('[role="status"]')) return { spinner: true, disabled: button.disabled };+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ return { spinner: false, disabled: button.disabled };+ })()+ JS);+}++function welcomeOwnerOnPlanStep(): User+{+ $user = User::factory()->create();+ $user->update([+ 'persona' => Persona::Agency->value,+ 'goals' => [Goal::SaveTime->value],+ 'previous_software' => PreviousSoftware::Buffer->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]);++ return $user->fresh();+}++test('the plan step shows the offer, what is included and the G2 rating', function () {+ config(['trypost.self_hosted' => false, 'cashier.first_month_coupon_ids.socials' => 'coupon_socials']);++ $this->actingAs(welcomeOwnerOnPlanStep());++ $page = visit(route('app.welcome.plan'));++ waitForWelcomePlanTestId($page, 'plan-card-socials');+ waitForWelcomePlanTestId($page, 'welcome-plan-reviews');+ waitForWelcomePlanTestId($page, 'welcome-plan-continue');++ $page->assertRoute('app.welcome.plan')+ ->assertSee('Activate your account')+ ->assertSee('Connect your channels and schedule your first post today.')+ ->assertMissing('@plan-card-workspaces')+ ->assertSeeIn('@plan-price-socials', '$1')+ ->assertSeeIn('@plan-price-suffix-socials', 'for your first month')+ ->assertVisible('@plan-networks-info-socials')+ ->assertSeeIn('@welcome-plan-continue', 'Activate for $1')+ ->assertSeeIn('@welcome-plan-terms', 'Then $19/month. Cancel anytime.')+ ->assertVisible('@welcome-step-plan')+ ->assertNoJavaScriptErrors();++ $page->assertCount('[data-testid^="welcome-plan-reviewer-"]', 5);++ $features = array_map(+ fn (string $testId): string => Str::after($testId, 'plan-feature-label-socials-'),+ welcomePlanTestIdsStartingWith($page, 'plan-feature-label-socials-'),+ );++ expect(welcomePlanFeatureIconClasses($page, 'plan-feature-label-socials-analytics'))->toContain('tabler-icon-trending-up')+ ->and(welcomePlanFeatureIconClasses($page, 'plan-feature-label-socials-mcp'))->toContain('tabler-icon-settings-ai')+ ->and(welcomePlanFeatureIconWidths($page, 'plan-feature-list-socials'))->each->toBe(20)+ ->and($features)->toBe(['networks_all', 'accounts_unlimited', 'ideas', 'ai', 'calendar', 'analytics', 'mcp', 'repurpose', 'team']);++ $page->assertSeeIn('@plan-feature-label-socials-team', 'Unlimited team members')+ ->assertSeeIn('@plan-feature-label-socials-networks_all', 'All social networks included')+ ->assertSeeIn('@plan-feature-label-socials-analytics', 'Advanced analytics')+ ->assertSeeIn('@plan-feature-label-socials-ideas', 'Content planning')+ ->assertVisible('@plan-feature-info-socials-ideas');+});++test('the plan step shows the full price when checkout will not apply the first-month coupon', function () {+ config(['trypost.self_hosted' => false, 'cashier.first_month_coupon_ids.socials' => '']);++ $this->actingAs(welcomeOwnerOnPlanStep());++ $page = visit(route('app.welcome.plan'));+ waitForWelcomePlanTestId($page, 'welcome-plan-continue');++ $page->assertSeeIn('@plan-price-socials', '$19')+ ->assertSeeIn('@plan-price-suffix-socials', 'per month')+ ->assertSeeIn('@welcome-plan-continue', 'Activate for $19')+ ->assertSeeIn('@welcome-plan-terms', 'Cancel anytime.')+ ->assertDontSee('first month')+ ->assertNoJavaScriptErrors();++ expect(trim((string) $page->text('@plan-price-socials')))->toBe('$19');+});++test('the plan step does not list the workspace limit, so team members close the list', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeOwnerOnPlanStep());++ $page = visit(route('app.welcome.plan'));+ waitForWelcomePlanTestId($page, 'plan-feature-list-socials');++ expect(welcomePlanLastFeatureLabelTestId($page, 'plan-feature-list-socials'))->toBe('plan-feature-label-socials-team');++ $page->assertMissing('@plan-highlight-socials')+ ->assertMissing('@plan-workspaces-info-socials')+ ->assertNoJavaScriptErrors();+});++test('the review quotes rotate on their own', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeOwnerOnPlanStep());++ $page = visit(route('app.welcome.plan'));+ waitForWelcomePlanTestId($page, 'welcome-plan-review-paulo_dantas');++ expect(welcomePlanVisibleReview($page))->toBe('welcome-plan-review-paulo_dantas')+ ->and(waitForWelcomePlanReviewOtherThan($page, 'welcome-plan-review-paulo_dantas'))->toBe('welcome-plan-review-diego');+});++test('clicking a reviewer photo shows their quote', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeOwnerOnPlanStep());++ $page = visit(route('app.welcome.plan'));+ waitForWelcomePlanTestId($page, 'welcome-plan-reviewer-pedro');++ $page->click('@welcome-plan-reviewer-pedro');+ waitForWelcomePlanTestId($page, 'welcome-plan-review-pedro');++ $page->assertVisible('@welcome-plan-review-pedro')+ ->assertAttribute('@welcome-plan-reviewer-pedro', 'aria-pressed', 'true')+ ->assertNoJavaScriptErrors();++ expect(welcomePlanVisibleReviewAfter($page, 7000))->toBe('welcome-plan-review-pedro')+ ->and(waitForWelcomePlanReviewerOpacities($page))->toBe(['active' => [1], 'inactive' => [0.5]]);+});++test('the plan step fits a phone without scrolling and hides the quotes there', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeOwnerOnPlanStep());++ $page = visit(route('app.welcome.plan'))->resize(390, 844);+ waitForWelcomePlanTestId($page, 'plan-card-socials');++ expect(welcomePlanPhoneLayout($page))->toBe(['scrolls' => false, 'quoteVisible' => false]);++ $page->assertVisible('@welcome-plan-continue')+ ->assertNoJavaScriptErrors();+});++test('the feature info opens on a tap or click', function (int $width, int $height) {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeOwnerOnPlanStep());++ $page = visit(route('app.welcome.plan'))->resize($width, $height);+ waitForWelcomePlanTestId($page, 'plan-feature-info-socials-team');++ $page->click('@plan-feature-info-socials-team');+ waitForWelcomePlanTestId($page, 'plan-feature-info-socials-team');++ expect(waitForWelcomePlanPopoverOpen($page))->toBeTrue()+ ->and(trim((string) $page->text('[data-slot="popover-content"]')))->toStartWith('Invite as many people as you want');++ $page->click('@plan-networks-info-socials');+ waitForWelcomePlanTestId($page, 'plan-networks-socials');++ $page->assertVisible('@plan-networks-socials')+ ->assertNoJavaScriptErrors();+})->with([+ 'desktop' => [1440, 900],+ 'phone' => [390, 844],+]);++test('the feature info opens from the keyboard and closes with Escape', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeOwnerOnPlanStep());++ $page = visit(route('app.welcome.plan'))->resize(1440, 900);+ waitForWelcomePlanTestId($page, 'plan-feature-info-socials-team');++ welcomePlanFocus($page, 'plan-feature-info-socials-team');+ $page->keys('@plan-feature-info-socials-team', 'Enter');++ expect(waitForWelcomePlanPopoverOpen($page))->toBeTrue();++ $page->keys('@plan-feature-info-socials-team', 'Escape');++ expect(waitForWelcomePlanPopoverClosed($page))->toBeTrue();++ $page->assertNoJavaScriptErrors();+});++test('the activate button shows a spinner while checkout opens', function () {+ config(['trypost.self_hosted' => false]);++ $this->actingAs(welcomeOwnerOnPlanStep());++ $page = visit(route('app.welcome.plan'));+ waitForWelcomePlanTestId($page, 'welcome-plan-continue');++ welcomePlanStallRequests($page);+ $page->click('@welcome-plan-continue');++ expect(waitForWelcomePlanButtonSpinner($page, 'welcome-plan-continue'))->toBe(['spinner' => true, 'disabled' => true]);+});diff --git a/tests/Browser/WorkspaceInsightsTest.php b/tests/Browser/WorkspaceInsightsTest.phpindex 758b0ba96..93fd3e20e 100644--- a/tests/Browser/WorkspaceInsightsTest.php+++ b/tests/Browser/WorkspaceInsightsTest.php@@ -31,6 +31,158 @@ function waitForWorkspaceInsightsTestId(mixed $page, string $testId): voidJS);}+function workspaceInsightsTestIdSelector(string $testId): string+{+ return json_encode("[data-testid=\"{$testId}\"]");+}++function waitForWorkspaceInsightsTestIdGone(mixed $page, string $testId): void+{+ $selector = workspaceInsightsTestIdSelector($testId);++ $page->script(<<<JS+ (async () => {+ for (let attempt = 0; attempt < 100; attempt++) {+ if (!document.querySelector({$selector})) return;+ await new Promise((resolve) => setTimeout(resolve, 100));+ }+ })();+ JS);+}++function waitForWorkspaceInsightsQueryParameter(mixed $page, string $name, string $value): void+{+ $name = json_encode($name);+ $value = json_encode($value);++ $page->script(<<<JS+ (async () => {+ for (let attempt = 0; attempt < 100; attempt++) {+ if (new URLSearchParams(location.search).get({$name}) === {$value}) return;+ await new Promise((resolve) => setTimeout(resolve, 100));+ }+ })();+ JS);+}++function clickWorkspaceInsightsTestIdUntilDialogOpens(mixed $page, string $testId): void+{+ $selector = workspaceInsightsTestIdSelector($testId);++ $page->script(<<<JS+ (async () => {+ for (let attempt = 0; attempt < 100; attempt++) {+ if (document.querySelector('[role="dialog"]')) return;+ if (attempt % 10 === 0) document.querySelector({$selector}).click();+ await new Promise((resolve) => setTimeout(resolve, 50));+ }+ })();+ JS);+}++/**+ * @return list<string>+ */+function workspaceInsightsSectionTitles(mixed $page, ?string $withinTestId = null): array+{+ $scope = $withinTestId === null ? '' : "[data-testid=\"{$withinTestId}\"] ";+ $selector = json_encode("{$scope}[data-testid=\"analytics-section-title\"]");++ return $page->script("Array.from(document.querySelectorAll({$selector})).map((heading) => heading.textContent.trim())");+}++function workspaceInsightsInnerText(mixed $page, string $testId): ?string+{+ $selector = workspaceInsightsTestIdSelector($testId);++ return $page->script("document.querySelector({$selector})?.innerText ?? null");+}++/**+ * @return array{left: float, right: float, top: float, bottom: float, width: float, height: float}|null+ */+function workspaceInsightsRect(mixed $page, string $testId): ?array+{+ $selector = workspaceInsightsTestIdSelector($testId);++ return $page->script(<<<JS+ (() => {+ const element = document.querySelector({$selector});+ if (!element) return null;+ const { left, right, top, bottom, width, height } = element.getBoundingClientRect();++ return { left, right, top, bottom, width, height };+ })();+ JS);+}++function workspaceInsightsHasNoHorizontalOverflow(mixed $page): bool+{+ return $page->script('document.documentElement.scrollWidth <= window.innerWidth + 2');+}++function workspaceInsightsScrollerScrolls(mixed $page): bool+{+ return $page->script(<<<'JS'+ (() => {+ const scroller = document.querySelector('[data-testid="app-layout-scroller"]');++ return ['auto', 'scroll'].includes(getComputedStyle(scroller).overflowY) && scroller.scrollHeight > scroller.clientHeight;+ })();+ JS);+}++function workspaceInsightsSpaceBelowLastSection(mixed $page): float+{+ return $page->script(<<<'JS'+ (() => {+ const scroller = document.querySelector('[data-testid="app-layout-scroller"]');+ const lastSection = Array.from(document.querySelectorAll('[data-testid="analytics-section"]')).at(-1);++ return scroller.scrollHeight - (lastSection.getBoundingClientRect().bottom - scroller.getBoundingClientRect().top + scroller.scrollTop);+ })();+ JS);+}++function workspaceInsightsHeaderSticksWhenScrolled(mixed $page): bool+{+ return $page->script(<<<'JS'+ (() => {+ const scroller = document.querySelector('[data-testid="app-layout-scroller"]');+ scroller.scrollTop = scroller.scrollHeight;+ const header = document.querySelector('[data-testid="analytics-page-header"]');+ const toolbar = document.querySelector('[data-testid="analytics-toolbar"]');+ const top = scroller.getBoundingClientRect().top;+ const stuck = scroller.scrollTop > 0 && Math.abs(header.getBoundingClientRect().top - top) <= 1 && toolbar.getBoundingClientRect().bottom > top;+ scroller.scrollTop = 0;++ return stuck;+ })();+ JS);+}++/**+ * @return array{before: int, during: list<int>, after: int}+ */+function workspaceInsightsChartWidthsAroundSidebarToggle(mixed $page): array+{+ return $page->script(<<<'JS'+ (async () => {+ const chart = () => document.querySelector('[data-testid="accounts-unovis-bar-chart"] [data-vis-xy-container]');+ const before = chart().getBoundingClientRect().width;+ document.querySelector('[data-testid="sidebar-footer-toggle"]').click();+ const during = [];+ const started = performance.now();+ while (performance.now() - started < 180) {+ await new Promise((resolve) => requestAnimationFrame(resolve));+ during.push(Math.round(chart().getBoundingClientRect().width));+ }+ await new Promise((resolve) => setTimeout(resolve, 600));+ return { before: Math.round(before), during, after: Math.round(chart().getBoundingClientRect().width) };+ })();+ JS);+}+test('workspace dashboard separates accounts and switches follower and post chart modes', function () {Queue::fake([BootstrapAccountAnalytics::class, CollectAccountDailySnapshot::class]);$user = User::factory()->create();@@ -53,7 +205,7 @@ test('workspace dashboard separates accounts and switches follower and post char'network' => Platform::Instagram->network(),'platform_user_id' => $account->platform_user_id,'account_username' => $username,- 'date' => '2026-09-23',+ 'date' => now()->subDay()->toDateString(),'followers_count' => $followers,]);$publication = AnalyticsPublication::factory()->create([@@ -63,7 +215,7 @@ test('workspace dashboard separates accounts and switches follower and post char'platform' => Platform::Instagram,'network' => Platform::Instagram->network(),'account_username' => $username,- 'provider_published_at' => '2026-09-12 10:00:00',+ 'provider_published_at' => now()->subDays(10)->setTime(10, 0),]);AnalyticsPublicationDailySnapshot::factory()->create(['publication_id' => $publication->id,@@ -76,9 +228,11 @@ test('workspace dashboard separates accounts and switches follower and post char$page = visit(route('app.insights'));waitForWorkspaceInsightsTestId($page, 'analytics-summary-followers');- $page->assertVisible('@analytics-summary-followers')- ->assertScript('Array.from(document.querySelectorAll("[data-testid=analytics-section-title]")).map((heading) => heading.textContent.trim()).join("|")', 'Summary|Top 5 Posts|Performance|Followers|Posts')- ->assertSee('@first')+ $page->assertVisible('@analytics-summary-followers');++ expect(workspaceInsightsSectionTitles($page))->toBe(['Summary', 'Top 5 Posts', 'Performance', 'Followers', 'Posts']);++ $page->assertSee('@first')->assertSee('@second')->assertSee('Top 5 Posts')->assertPresent('@analytics-top-post')@@ -92,21 +246,25 @@ test('workspace dashboard separates accounts and switches follower and post char->assertVisible('@followers-unovis-chart')->click('@followers-growth')->assertPresent('@accounts-unovis-bar-chart')- ->assertScript('document.querySelector("[data-testid=posts-bar]")?.getAttribute("aria-pressed")', 'true')- ->assertScript('document.querySelector("[data-testid=posts-stacked]")?.getAttribute("aria-pressed")', 'false')+ ->assertAttribute('@posts-bar', 'aria-pressed', 'true')+ ->assertAttribute('@posts-stacked', 'aria-pressed', 'false')->assertPresent('@accounts-unovis-bar-chart')->click('@posts-stacked')->assertVisible('@posts-unovis-chart')->hover('[data-testid="analytics-post-bar"] >> nth=0')->assertPresent('@analytics-tooltip-avatar')- ->click('@top-comments')- ->assertScript('(() => { const scroller = document.querySelector("[data-testid=app-layout-scroller]"); return ["auto", "scroll"].includes(getComputedStyle(scroller).overflowY) && scroller.scrollHeight > scroller.clientHeight; })()', true)- ->assertScript('(() => { const scroller = document.querySelector("[data-testid=app-layout-scroller]"); const lastSection = Array.from(document.querySelectorAll("[data-testid=analytics-section]")).at(-1); return scroller.scrollHeight - (lastSection.getBoundingClientRect().bottom - scroller.getBoundingClientRect().top + scroller.scrollTop) >= 24; })()', true)- ->assertScript('(() => { const scroller = document.querySelector("[data-testid=app-layout-scroller]"); scroller.scrollTop = scroller.scrollHeight; const header = document.querySelector("[data-testid=analytics-page-header]"); const toolbar = document.querySelector("[data-testid=analytics-toolbar]"); const top = scroller.getBoundingClientRect().top; const stuck = scroller.scrollTop > 0 && Math.abs(header.getBoundingClientRect().top - top) <= 1 && toolbar.getBoundingClientRect().bottom > top; scroller.scrollTop = 0; return stuck; })()', true)- ->resize(375, 812)- ->assertScript('document.querySelector("[data-testid=analytics-page-header]")?.getBoundingClientRect().top > document.querySelector("[data-testid=app-sidebar-trigger]")?.getBoundingClientRect().bottom', true)- ->assertScript('document.documentElement.scrollWidth <= window.innerWidth + 2', true)- ->assertNoJavaScriptErrors()+ ->click('@top-comments');++ expect(workspaceInsightsScrollerScrolls($page))->toBeTrue()+ ->and(workspaceInsightsSpaceBelowLastSection($page))->toBeGreaterThanOrEqual(24)+ ->and(workspaceInsightsHeaderSticksWhenScrolled($page))->toBeTrue();++ $page->resize(375, 812);++ expect(workspaceInsightsRect($page, 'analytics-page-header')['top'] ?? null)->toBeGreaterThan(workspaceInsightsRect($page, 'app-sidebar-trigger')['bottom'] ?? null)+ ->and(workspaceInsightsHasNoHorizontalOverflow($page))->toBeTrue();++ $page->assertNoJavaScriptErrors()->assertNoConsoleLogs();});@@ -127,21 +285,25 @@ test('workspace dashboard explains the empty state without inventing follower to->assertMissing('@analytics-summary')->assertSee('Turn your posts into insights')->assertSee('Understand your performance and spot opportunities without the guesswork.')- ->assertScript('document.querySelectorAll("[data-testid=analytics-empty-tile]").length', 7)+ ->assertCount('@analytics-empty-tile', 7)->assertPresent('@analytics-empty-summary')->assertPresent('@analytics-empty-top-posts')->assertPresent('@analytics-empty-metrics')- ->assertScript('Array.from(document.querySelectorAll("[data-testid=analytics-empty-preview] [data-testid=analytics-section-title]")).map((heading) => heading.textContent.trim()).join("|")', 'Summary|Top 5 Posts|Metrics')- ->assertScript('document.querySelector("[data-testid=analytics-empty-summary]").innerText.replace(/\\s+/g, " ").trim()', 'Likes Comments Impressions Engagement rate')- ->assertScript('document.querySelector("[data-testid=analytics-empty-top-posts]").children.length', 5)- ->click('@analytics-empty-connect');+ ->assertCount('[data-testid="analytics-empty-top-posts"] > *', 5);++ expect(workspaceInsightsSectionTitles($page, 'analytics-empty-preview'))->toBe(['Summary', 'Top 5 Posts', 'Metrics'])+ ->and(trim(preg_replace('/\s+/u', ' ', (string) workspaceInsightsInnerText($page, 'analytics-empty-summary'))))->toBe('Likes Comments Impressions Engagement rate');++ $page->click('@analytics-empty-connect');waitForWorkspaceInsightsTestId($page, 'connect-channel-dialog');$page->assertVisible('@connect-channel-dialog')- ->resize(375, 812)- ->assertScript('document.documentElement.scrollWidth <= window.innerWidth + 2', true)- ->assertNoJavaScriptErrors()+ ->resize(375, 812);++ expect(workspaceInsightsHasNoHorizontalOverflow($page))->toBeTrue();++ $page->assertNoJavaScriptErrors()->assertNoConsoleLogs();});@@ -176,7 +338,10 @@ test('the custom preset opens the calendar with quick ranges that apply a customsubscribeAccount($user->account);$account = SocialAccount::factory()->instagram()->create(['workspace_id' => $workspace->id]);- foreach (['2026-01-01', '2026-07-01'] as $date) {+ $latestDay = now()->subMonths(3)->startOfDay();+ $firstDay = $latestDay->subMonths(6);++ foreach ([$firstDay, $latestDay] as $date) {AnalyticsAccountDailySnapshot::factory()->create(['workspace_id' => $workspace->id,'social_account_id' => $account->id,@@ -184,42 +349,29 @@ test('the custom preset opens the calendar with quick ranges that apply a custom'platform' => $account->platform,'network' => $account->platform->network(),'platform_user_id' => $account->platform_user_id,- 'date' => $date,+ 'date' => $date->toDateString(),'followers_count' => 100,]);}$this->actingAs($user);- $page = visit(route('app.insights', ['start' => '2026-01-01', 'end' => '2026-02-01']));+ $page = visit(route('app.insights', ['start' => $firstDay->toDateString(), 'end' => $firstDay->addMonth()->toDateString()]));waitForWorkspaceInsightsTestId($page, 'insights-range-custom');$page->assertMissing('@date-range-picker-trigger')- ->assertScript('document.querySelector("[data-testid=insights-range-custom]")?.getAttribute("aria-pressed")', 'true')- ->assertScript('document.querySelector("[data-testid=insights-range-presets] [role=group]")?.getAttribute("aria-label")', 'Período')+ ->assertAttribute('@insights-range-custom', 'aria-pressed', 'true')+ ->assertAttribute('[data-testid="insights-range-presets"] [role=group]', 'aria-label', 'Período')->assertPresent('@insights-range-custom');- $page->script(<<<'JS'- (async () => {- for (let attempt = 0; attempt < 100; attempt++) {- if (document.querySelector('[role="dialog"]')) return;- if (attempt % 10 === 0) document.querySelector('[data-testid="insights-range-custom"]').click();- await new Promise((resolve) => setTimeout(resolve, 50));- }- })();- JS);+ clickWorkspaceInsightsTestIdUntilDialogOpens($page, 'insights-range-custom');- $page->assertScript('document.querySelector("[role=dialog]") !== null', true)+ $page->assertPresent('[role=dialog]')->assertSeeIn('@date-range-preset-last_7_days', __('common.date_range_picker.last_7_days', [], 'pt-BR'))->click('@date-range-preset-last_7_days');- $page->script(<<<'JS'- (async () => {- for (let attempt = 0; attempt < 100; attempt++) {- if (location.search.includes('start=2026-06-25')) return;- await new Promise((resolve) => setTimeout(resolve, 50));- }- })();- JS);+ waitForWorkspaceInsightsQueryParameter($page, 'start', $latestDay->subDays(6)->toDateString());- $page->assertScript('location.search.includes("range=custom") && location.search.includes("start=2026-06-25") && location.search.includes("end=2026-07-01")', true)+ $page->assertQueryStringHas('range', 'custom')+ ->assertQueryStringHas('start', $latestDay->subDays(6)->toDateString())+ ->assertQueryStringHas('end', $latestDay->toDateString())->assertNoJavaScriptErrors()->assertNoConsoleLogs();});@@ -248,17 +400,10 @@ test('a range preset on the workspace dashboard reloads with that range', functiwaitForWorkspaceInsightsTestId($page, 'insights-range-7d');$page->click('@insights-range-7d');- $page->script(<<<'JS'- (async () => {- for (let attempt = 0; attempt < 100; attempt++) {- if (new URLSearchParams(location.search).get('range') === '7d') return;- await new Promise((resolve) => setTimeout(resolve, 100));- }- })();- JS);+ waitForWorkspaceInsightsQueryParameter($page, 'range', '7d');- $page->assertScript('new URLSearchParams(location.search).get("range")', '7d')- ->assertScript('document.querySelector("[data-testid=insights-range-7d]")?.getAttribute("aria-pressed")', 'true')+ $page->assertQueryStringHas('range', '7d')+ ->assertAttribute('@insights-range-7d', 'aria-pressed', 'true')->assertNoJavaScriptErrors()->assertNoConsoleLogs();});@@ -316,14 +461,7 @@ test('import progress disappears after the queued backfill finishes without navi$page->assertVisible('@analytics-import-coverage');$state->update(['status' => SyncStatus::Complete]);- $page->script(<<<'JS'- (async () => {- for (let attempt = 0; attempt < 100; attempt++) {- if (!document.querySelector('[data-testid="analytics-import-coverage"]')) return;- await new Promise((resolve) => setTimeout(resolve, 100));- }- })();- JS);+ waitForWorkspaceInsightsTestIdGone($page, 'analytics-import-coverage');$page->assertMissing('@analytics-import-coverage')->assertNoJavaScriptErrors()@@ -363,9 +501,11 @@ test('follower chart localizes tooltip values and names accounts without usernam$page->assertPresent('@accounts-unovis-bar-chart')->assertSee('Instagram')->assertDontSee('instagram-facebook')- ->hover('[data-testid="analytics-account-bar"] >> nth=0')- ->assertScript('document.querySelector("[data-testid=analytics-chart-tooltip]")?.innerText.includes("1.234")', true)- ->assertNoJavaScriptErrors()+ ->hover('[data-testid="analytics-account-bar"] >> nth=0');++ expect(workspaceInsightsInnerText($page, 'analytics-chart-tooltip'))->toContain('1.234');++ $page->assertNoJavaScriptErrors()->assertNoConsoleLogs();});@@ -381,7 +521,10 @@ test('workspace dashboard abbreviates large percentage changes in the user local'platform' => Platform::Instagram,]);- foreach ([['2026-09-01 10:00:00', 1], ['2026-09-23 10:00:00', 1866]] as [$publishedAt, $reactions]) {+ $rangeEnd = now()->subDays(20)->startOfDay();+ $rangeStart = $rangeEnd->subDays(11);++ foreach ([[$rangeStart->subDays(11)->setTime(10, 0), 1], [$rangeEnd->setTime(10, 0), 1866]] as [$publishedAt, $reactions]) {$publication = AnalyticsPublication::factory()->create(['workspace_id' => $workspace->id,'social_account_id' => $account->id,@@ -397,10 +540,12 @@ test('workspace dashboard abbreviates large percentage changes in the user local}$this->actingAs($user);- $page = visit(route('app.insights', ['start' => '2026-09-12', 'end' => '2026-09-23']));+ $page = visit(route('app.insights', ['start' => $rangeStart->toDateString(), 'end' => $rangeEnd->toDateString()]));+ waitForWorkspaceInsightsTestId($page, 'analytics-summary-reactions-change');++ expect(workspaceInsightsInnerText($page, 'analytics-summary-reactions-change'))->toContain($expectedChange);- $page->assertScript('document.querySelector("[data-testid=analytics-summary-reactions-change]")?.innerText.includes('.json_encode($expectedChange).')', true)- ->assertDontSee('+186500%')+ $page->assertDontSee('+186500%')->assertNoJavaScriptErrors()->assertNoConsoleLogs();})->with([@@ -451,24 +596,18 @@ test('on a phone the workspace insights range presets collapse into a dropdown',$page = visit(route('app.insights'))->resize(390, 844);waitForWorkspaceInsightsTestId($page, 'insights-range-mobile-trigger');- $page->assertScript('document.querySelector("[data-testid=insights-range-7d]").getBoundingClientRect().height', 0)- ->assertSeeIn('@insights-range-mobile-trigger', '30 Days')+ expect(workspaceInsightsRect($page, 'insights-range-7d')['height'] ?? null)->toBe(0);++ $page->assertSeeIn('@insights-range-mobile-trigger', '30 Days')->click('@insights-range-mobile-trigger');waitForWorkspaceInsightsTestId($page, 'insights-range-mobile-30d-check');$page->assertPresent('@insights-range-mobile-30d-check')->assertMissing('@insights-range-mobile-7d-check')->click('@insights-range-mobile-7d');- $page->script(<<<'JS'- (async () => {- for (let attempt = 0; attempt < 100; attempt++) {- if (new URLSearchParams(location.search).get('range') === '7d') return;- await new Promise((resolve) => setTimeout(resolve, 100));- }- })();- JS);+ waitForWorkspaceInsightsQueryParameter($page, 'range', '7d');- $page->assertScript('new URLSearchParams(location.search).get("range")', '7d')+ $page->assertQueryStringHas('range', '7d')->assertSeeIn('@insights-range-mobile-trigger', '7 Days')->assertNoJavaScriptErrors();});@@ -494,7 +633,7 @@ test('charts keep their width while the sidebar animates and resize once it sett'network' => Platform::Instagram->network(),'platform_user_id' => $account->platform_user_id,'account_username' => 'first',- 'date' => '2026-09-23',+ 'date' => now()->subDay()->toDateString(),'followers_count' => 120,]);@@ -503,21 +642,7 @@ test('charts keep their width while the sidebar animates and resize once it settwaitForWorkspaceInsightsTestId($page, 'accounts-unovis-bar-chart');waitForWorkspaceInsightsTestId($page, 'sidebar-footer-toggle');- $widths = $page->script(<<<'JS'- (async () => {- const chart = () => document.querySelector('[data-testid="accounts-unovis-bar-chart"] [data-vis-xy-container]');- const before = chart().getBoundingClientRect().width;- document.querySelector('[data-testid="sidebar-footer-toggle"]').click();- const during = [];- const started = performance.now();- while (performance.now() - started < 180) {- await new Promise((resolve) => requestAnimationFrame(resolve));- during.push(Math.round(chart().getBoundingClientRect().width));- }- await new Promise((resolve) => setTimeout(resolve, 600));- return { before: Math.round(before), during, after: Math.round(chart().getBoundingClientRect().width) };- })();- JS);+ $widths = workspaceInsightsChartWidthsAroundSidebarToggle($page);expect(array_unique($widths['during']))->toBe([$widths['before']])->and($widths['after'])->toBeGreaterThan($widths['before']);diff --git a/tests/Feature/Billing/StripeCustomerSyncTest.php b/tests/Feature/Billing/StripeCustomerSyncTest.phpnew file mode 100644index 000000000..c28fd847f--- /dev/null+++ b/tests/Feature/Billing/StripeCustomerSyncTest.php@@ -0,0 +1,175 @@+<?php++declare(strict_types=1);++use App\Enums\User\ReferralSource;+use App\Jobs\Billing\SyncStripeCustomer;+use App\Models\Account;+use App\Models\User;+use Illuminate\Support\Facades\Bus;+use Illuminate\Support\Str;+use Stripe\ApiRequestor;+use Stripe\HttpClient\ClientInterface;++function fakeStripeCustomerSyncClient(): ClientInterface+{+ $client = new class implements ClientInterface+ {+ /** @var array<int, array{method: string, url: string, params: array<string, mixed>}> */+ public array $requests = [];++ public function request($method, $absUrl, $headers, $params, $hasFile, $apiMode = 'v1', $maxNetworkRetries = null): array+ {+ $this->requests[] = ['method' => $method, 'url' => $absUrl, 'params' => $params];++ return [json_encode(['id' => 'cus_existing', 'object' => 'customer']), 200, []];+ }+ };++ ApiRequestor::setHttpClient($client);++ return $client;+}++/**+ * @return array{0: Account, 1: User}+ */+function stripeCustomerOwner(?string $stripeId): array+{+ $account = Account::factory()->create(['stripe_id' => $stripeId]);+ $owner = User::factory()->create([+ 'account_id' => $account->id,+ 'name' => 'Ada Lovelace',+ 'email' => '[email protected]',+ 'referral_source' => null,+ ]);+ $account->update(['owner_id' => $owner->id]);++ return [$account, $owner->fresh()];+}++beforeEach(function () {+ config(['cashier.secret' => 'sk_test_fake']);+});++afterEach(function () {+ ApiRequestor::setHttpClient(null);+});++test('the owner answering where they found us syncs the stripe customer', function () {+ [, $owner] = stripeCustomerOwner('cus_existing');+ $client = fakeStripeCustomerSyncClient();++ $owner->update(['referral_source' => ReferralSource::ProductHunt]);++ expect($client->requests)->toHaveCount(1)+ ->and($client->requests[0]['method'])->toBe('post')+ ->and($client->requests[0]['url'])->toEndWith('/v1/customers/cus_existing')+ ->and($client->requests[0]['params'])->toMatchArray([+ 'name' => 'Ada Lovelace',+ 'email' => '[email protected]',+ ])+ ->and($client->requests[0]['params']['metadata'])->toMatchArray([+ 'referral_source' => 'product_hunt',+ 'persona' => '',+ 'utm_source' => '',+ ]);+});++test('the sync only sends what TryPost owns on the stripe customer', function () {+ [, $owner] = stripeCustomerOwner('cus_existing');+ $client = fakeStripeCustomerSyncClient();++ $owner->update(['referral_source' => ReferralSource::Google]);++ expect(array_keys($client->requests[0]['params']))->toEqualCanonicalizing(['name', 'email', 'metadata']);+});++test('the owner changing their email syncs the stripe customer email', function () {+ [, $owner] = stripeCustomerOwner('cus_existing');+ $client = fakeStripeCustomerSyncClient();++ $owner->update(['email' => '[email protected]']);++ expect($client->requests)->toHaveCount(1)+ ->and($client->requests[0]['params'])->toMatchArray(['email' => '[email protected]']);+});++test('a cleared answer removes its key from the stripe customer', function () {+ [, $owner] = stripeCustomerOwner('cus_existing');+ $client = fakeStripeCustomerSyncClient();+ $owner->update(['utm_source' => 'newsletter']);+ $client->requests = [];++ $owner->update(['utm_source' => null]);++ expect($client->requests)->toHaveCount(1)+ ->and($client->requests[0]['params']['metadata'])->toMatchArray(['utm_source' => '']);+});++test('the sync runs on the queue as its own job', function () {+ [, $owner] = stripeCustomerOwner('cus_existing');+ Bus::fake();++ $owner->update(['name' => 'Ada King']);++ Bus::assertDispatched(SyncStripeCustomer::class, fn (SyncStripeCustomer $job): bool => $job->userId === $owner->id);+});++test('the job skips a user who is gone or has no account', function (Closure $userId) {+ $client = fakeStripeCustomerSyncClient();++ (new SyncStripeCustomer($userId()))->handle();++ expect($client->requests)->toBe([]);+})->with([+ 'deleted user' => [fn (): string => (string) Str::uuid()],+ 'user without an account' => [fn (): string => User::factory()->create(['account_id' => null])->id],+]);++test('the owner renaming themselves syncs the stripe customer name', function () {+ [, $owner] = stripeCustomerOwner('cus_existing');+ $client = fakeStripeCustomerSyncClient();++ $owner->update(['name' => 'Ada King']);++ expect($client->requests)->toHaveCount(1)+ ->and($client->requests[0]['params'])->toMatchArray(['name' => 'Ada King']);+});++test('the stripe customer is not touched', function (Closure $update) {+ $client = fakeStripeCustomerSyncClient();++ $update();++ expect($client->requests)->toBe([]);+})->with([+ 'an attribute stripe does not hold changes' => [function () {+ [, $owner] = stripeCustomerOwner('cus_existing');+ $owner->update(['timezone' => 'America/Sao_Paulo']);+ }],+ 'the account has no stripe customer yet' => [function () {+ [, $owner] = stripeCustomerOwner(null);+ $owner->update(['referral_source' => ReferralSource::Google]);+ }],+ 'a member who is not the owner changes' => [function () {+ [$account] = stripeCustomerOwner('cus_existing');+ $member = User::factory()->create(['account_id' => $account->id, 'referral_source' => null]);+ $member->update(['referral_source' => ReferralSource::Google]);+ }],+]);++test('a customer deleted in Stripe is reported instead of failing the job', function () {+ [, $owner] = stripeCustomerOwner('cus_deleted');+ Bus::fake();+ $client = new class implements ClientInterface+ {+ public function request($method, $absUrl, $headers, $params, $hasFile, $apiMode = 'v1', $maxNetworkRetries = null): array+ {+ return [json_encode(['error' => ['code' => 'resource_missing', 'type' => 'invalid_request_error', 'message' => 'No such customer']]), 404, []];+ }+ };+ ApiRequestor::setHttpClient($client);++ expect(fn () => (new SyncStripeCustomer($owner->id))->handle())->not->toThrow(Throwable::class);+});diff --git a/tests/Feature/DesignSystemTest.php b/tests/Feature/DesignSystemTest.phpindex 75469d7c4..d40e1517a 100644--- a/tests/Feature/DesignSystemTest.php+++ b/tests/Feature/DesignSystemTest.php@@ -33,7 +33,10 @@ test('the shared tokens match the design system', function () {->toContain("'Outfit', ui-sans-serif")->toContain('--font-heading: var(--font-heading);')->toContain('--radius: 0.5rem;')- ->toContain('--text-sm: 14px;');+ ->toContain('--text-sm: 14px;')+ ->toContain('--rating: #b45309;')+ ->toContain('--rating: #facc15;')+ ->toContain('--color-rating: var(--rating);');expect($styles)->not->toContain('#fa5d19');@@ -52,7 +55,8 @@ test('the shared tokens match the design system', function () {->not->toContain('success');expect($buttons)- ->toContain('bg-primary text-primary-foreground hover:bg-primary-hover')+ ->toContain('bg-primary-strong text-primary-strong-foreground hover:bg-primary-text-hover')+ ->toContain('dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary-hover')->toContain('bg-critical text-foreground hover:bg-critical-hover')->toContain('"default": "h-8 px-3"')->toContain('"lg": "h-10 gap-2 px-4"');diff --git a/tests/Feature/Listeners/PostHog/TrackMcpConnectionTest.php b/tests/Feature/Listeners/PostHog/TrackMcpConnectionTest.phpnew file mode 100644index 000000000..0d9ba0b45--- /dev/null+++ b/tests/Feature/Listeners/PostHog/TrackMcpConnectionTest.php@@ -0,0 +1,135 @@+<?php++declare(strict_types=1);++use App\Enums\PostHog\McpEvent;+use App\Jobs\PostHog\SendEvent;+use App\Models\User;+use App\Models\Workspace;+use App\Passport\AccessTokenRepository;+use App\Passport\AuthCode;+use App\Passport\OAuthPayloadDecryptor;+use App\Services\PostHogService;+use Illuminate\Support\Facades\Bus;+use Illuminate\Support\Str;+use Laravel\Passport\Bridge\Scope;+use Laravel\Passport\Events\AccessTokenCreated;+use League\OAuth2\Server\Entities\AccessTokenEntityInterface;+use League\OAuth2\Server\Entities\ClientEntityInterface;++beforeEach(function () {+ config(['services.posthog.enabled' => true, 'services.posthog.api_key' => 'phc_test']);+ Bus::fake();++ $this->user = User::factory()->create();+ $this->workspace = Workspace::factory()->create([+ 'account_id' => $this->user->account_id,+ 'user_id' => $this->user->id,+ ]);+ $this->workspace->members()->attach($this->user->id, membershipPivot('admin'));+});++function issueMcpToken(object $test, string $grantType, string $clientName = 'Claude', array $scopes = ['mcp:use']): void+{+ $clientId = mcpOauthClient($clientName);+ $token = mcpAccessToken($test->user, $clientId, $test->workspace, $scopes);++ request()->merge(['grant_type' => $grantType]);+ event(new AccessTokenCreated($token->id, $test->user->id, $clientId));+}++function mcpConnectedEvents(): array+{+ return collect(Bus::dispatched(SendEvent::class))+ ->filter(fn (SendEvent $event): bool => $event->method === 'capture'+ && data_get($event->payload, 'event') === McpEvent::Connected->value)+ ->values()+ ->all();+}++test('an AI app finishing the OAuth authorization records an MCP connection', function (string $clientName, string $client) {+ issueMcpToken($this, 'authorization_code', $clientName);++ $events = mcpConnectedEvents();++ expect($events)->toHaveCount(1)+ ->and(data_get($events[0]->payload, 'distinctId'))->toBe($this->user->id)+ ->and(data_get($events[0]->payload, 'properties'))->toMatchArray([+ 'client' => $client,+ 'client_name' => $clientName,+ 'workspace_id' => $this->workspace->id,+ 'account_id' => $this->user->account_id,+ ]);+})->with([+ 'Claude' => ['Claude', 'claude'],+ 'ChatGPT' => ['ChatGPT', 'chatgpt'],+ 'another app' => ['Cursor', 'other'],+]);++test('no MCP connection is recorded', function (Closure $issue) {+ $issue($this);++ expect(mcpConnectedEvents())->toBe([]);+})->with([+ 'a refreshed token' => [fn (object $test) => issueMcpToken($test, 'refresh_token')],+ 'a token without the MCP scope' => [fn (object $test) => issueMcpToken($test, 'authorization_code', scopes: [])],+ 'PostHog is off' => [function (object $test) {+ config(['services.posthog.enabled' => false]);+ issueMcpToken($test, 'authorization_code');+ }],+]);++test('the token repository records the connection when it stores an authorization code token', function () {+ $clientId = mcpOauthClient('Claude');+ $authCodeId = Str::random(80);+ $tokenId = Str::random(80);++ AuthCode::query()->forceCreate([+ 'id' => $authCodeId,+ 'user_id' => $this->user->id,+ 'client_id' => $clientId,+ 'workspace_id' => $this->workspace->id,+ 'scopes' => '[]',+ 'revoked' => true,+ 'expires_at' => now()->addMinutes(10),+ ]);++ request()->merge([+ 'grant_type' => 'authorization_code',+ 'code' => app(OAuthPayloadDecryptor::class)->encrypt([+ 'client_id' => $clientId,+ 'auth_code_id' => $authCodeId,+ 'user_id' => (string) $this->user->id,+ 'scopes' => ['mcp:use'],+ 'expire_time' => now()->addMinutes(10)->timestamp,+ ]),+ ]);++ $client = Mockery::mock(ClientEntityInterface::class);+ $client->shouldReceive('getIdentifier')->andReturn($clientId);++ $entity = Mockery::mock(AccessTokenEntityInterface::class);+ $entity->shouldReceive('getIdentifier')->andReturn($tokenId);+ $entity->shouldReceive('getUserIdentifier')->andReturn((string) $this->user->id);+ $entity->shouldReceive('getClient')->andReturn($client);+ $entity->shouldReceive('getScopes')->andReturn([new Scope('mcp:use')]);+ $entity->shouldReceive('getExpiryDateTime')->andReturn(now()->addHour()->toDateTimeImmutable());++ app(AccessTokenRepository::class)->persistNewAccessToken($entity);++ $events = mcpConnectedEvents();++ expect($events)->toHaveCount(1)+ ->and(data_get($events[0]->payload, 'properties.client'))->toBe('claude')+ ->and(data_get($events[0]->payload, 'properties.workspace_id'))->toBe($this->workspace->id);+});++test('a failure while recording the connection never breaks the token request', function () {+ $clientId = mcpOauthClient('Claude');+ $token = mcpAccessToken($this->user, $clientId, $this->workspace);+ $this->mock(PostHogService::class)->shouldReceive('capture')->once()->andThrow(new RuntimeException('PostHog is down'));++ request()->merge(['grant_type' => 'authorization_code']);++ expect(fn () => event(new AccessTokenCreated($token->id, $this->user->id, $clientId)))->not->toThrow(Throwable::class);+});diff --git a/tests/Feature/ReferralSourceTest.php b/tests/Feature/ReferralSourceTest.phpindex c924df773..2de2bc620 100644--- a/tests/Feature/ReferralSourceTest.php+++ b/tests/Feature/ReferralSourceTest.php@@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Bus;beforeEach(function () {config(['trypost.self_hosted' => false]);- $this->user = User::factory()->create(['referral_source' => null]);+ $this->user = User::factory()->create(['referral_source' => null, 'created_at' => now()->subDays(2)]);$workspace = Workspace::factory()->create(['account_id' => $this->user->account_id,'user_id' => $this->user->id,@@ -32,7 +32,7 @@ test('a user inside the app who has not answered is asked where they found us',));});-test('the question is not shared once answered, on self-hosted or before app access', function (Closure $setup) {+test('the question is not shared once answered, on self-hosted, before app access or in the first hour', function (Closure $setup) {$setup($this->user);$this->actingAs($this->user->fresh())@@ -44,12 +44,37 @@ test('the question is not shared once answered, on self-hosted or before app acc'answered' => [fn (User $user) => $user->update(['referral_source' => ReferralSource::Google->value])],'self-hosted' => [fn () => config(['trypost.self_hosted' => true])],'no app access' => [fn (User $user) => $user->account->subscriptions()->delete()],+ 'signed up less than an hour ago' => [fn (User $user) => $user->forceFill(['created_at' => now()->subMinutes(59)])->save()],]);+test('whether to ask is cached for five minutes', function () {+ $this->user->forceFill(['created_at' => now()->subMinutes(58)])->save();++ $this->actingAs($this->user->fresh())+ ->get(route('app.calendar'))+ ->assertInertia(fn ($page) => $page->where('referralSources', null));++ $this->travel(4)->minutes();++ $this->actingAs($this->user->fresh())+ ->get(route('app.calendar'))+ ->assertInertia(fn ($page) => $page->where('referralSources', null));++ $this->travel(2)->minutes();++ $this->actingAs($this->user->fresh())+ ->get(route('app.calendar'))+ ->assertInertia(fn ($page) => $page->whereNotNull('referralSources'));+});+test('answering stores the source, mirrors it to PostHog and goes back', function () {config(['services.posthog.enabled' => true, 'services.posthog.api_key' => 'phc_test']);Bus::fake();+ $this->actingAs($this->user->fresh())+ ->get(route('app.calendar'))+ ->assertInertia(fn ($page) => $page->whereNotNull('referralSources'));+$this->actingAs($this->user->fresh())->from(route('app.calendar'))->post(route('app.referral-source.store'), ['referral_source' => ReferralSource::ProductHunt->value])diff --git a/tests/Feature/Repurpose/PollingTest.php b/tests/Feature/Repurpose/PollingTest.phpindex 4b3323d3b..147e199a7 100644--- a/tests/Feature/Repurpose/PollingTest.php+++ b/tests/Feature/Repurpose/PollingTest.php@@ -17,7 +17,6 @@ use App\Models\RepurposeItem;use App\Models\SocialAccount;use App\Models\Workspace;use App\Services\Repurpose\SourceFetcherFactory;-use Carbon\CarbonImmutable;use GuzzleHttp\Promise\PromiseInterface;use Illuminate\Http\Client\ResponseSequence;use Illuminate\Support\Facades\Bus;@@ -42,7 +41,7 @@ function mediaRow(string $id = 'm1', string $productType = 'REELS', ?string $url'media_url' => $url,'caption' => 'Hi','permalink' => 'https://instagram.com/p/1',- 'timestamp' => '2026-09-04T10:00:00+0000',+ 'timestamp' => now()->subDay()->format('Y-m-d\\TH:i:sO'),], fn ($value) => $value !== null);}@@ -372,7 +371,7 @@ test('polling the same video twice queues it only once', function () {Repurpose::factory()->active()->create(['workspace_id' => $workspace->id,'source_social_account_id' => $source->id,- 'activated_at' => CarbonImmutable::parse('2026-09-01 00:00:00', 'UTC'),+ 'activated_at' => now()->subMonth(),]);(new PollRepurposeSource($source))->handle(app(SourceFetcherFactory::class));@@ -402,7 +401,7 @@ function fakeFacebookStory(PromiseInterface|ResponseSequence $source): void{Http::fake([config('trypost.platforms.facebook.graph_api').'/*/stories*' => Http::response(['data' => [- ['post_id' => 's1', 'status' => 'PUBLISHED', 'media_type' => 'video', 'media_id' => 'vid-1', 'url' => 'https://facebook.com/stories/1', 'creation_time' => '2026-09-03T10:00:00+0000'],+ ['post_id' => 's1', 'status' => 'PUBLISHED', 'media_type' => 'video', 'media_id' => 'vid-1', 'url' => 'https://facebook.com/stories/1', 'creation_time' => now()->subDay()->format('Y-m-d\\TH:i:sO')],]]),config('trypost.platforms.facebook.graph_api').'/vid-1*' => $source,]);diff --git a/tests/Feature/Welcome/WelcomeControllerTest.php b/tests/Feature/Welcome/WelcomeControllerTest.phpindex 89ad3bbcb..d601a26f5 100644--- a/tests/Feature/Welcome/WelcomeControllerTest.php+++ b/tests/Feature/Welcome/WelcomeControllerTest.php@@ -4,6 +4,7 @@ declare(strict_types=1);use App\Actions\Billing\StartSubscriptionCheckout;use App\Enums\Plan\Slug;+use App\Enums\PostHog\CheckoutEvent;use App\Enums\PostHog\WelcomeEvent;use App\Enums\User\Goal;use App\Enums\User\Locale;@@ -149,19 +150,15 @@ test('software requires a valid selection', function (array $payload) {'invalid' => [['previous_software' => 'not-a-tool']],]);-test('software store saves the selection and mirrors it to PostHog', function (PreviousSoftware $software) {+test('software store saves the selection, mirrors it to PostHog and advances to plan', 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->mock(StartSubscriptionCheckout::class)->shouldNotReceive('redirect');$this->actingAs($this->user->fresh())->post(route('app.welcome.software.store'), ['previous_software' => $software->value])- ->assertRedirect('https://checkout.stripe.test/session');+ ->assertRedirect(route('app.welcome.plan'));expect($this->user->fresh()->previous_software)->toBe($software);Bus::assertDispatched(SendEvent::class, fn (SendEvent $event): bool => $event->method === 'identify'@@ -174,8 +171,62 @@ test('software store saves the selection and mirrors it to PostHog', function (P'no tool yet' => [PreviousSoftware::None],]);-test('software store sends the owner to Stripe checkout on the Socials monthly price', function () {+test('plan redirects to software until a tool is selected', function () {completeWelcomeThroughGoals($this->user);++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.plan'))+ ->assertRedirect(route('app.welcome.software'));++ $this->actingAs($this->user->fresh())+ ->post(route('app.welcome.plan.store'))+ ->assertRedirect(route('app.welcome.software'));+});++test('plan shows the Socials plan', function () {+ completeWelcomeThroughSoftware($this->user);++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.plan'))+ ->assertOk()+ ->assertInertia(fn ($page) => $page+ ->component('welcome/Plan', false)+ ->where('plan.slug', Slug::Socials->value)+ ->where('plan.workspace_limit', 1)+ );+});++test('plan offers the first month only when checkout will apply the coupon', function (Closure $setup, bool $offered) {+ config(['cashier.first_month_coupon_ids.socials' => 'coupon_socials']);+ completeWelcomeThroughSoftware($this->user);+ $setup($this->user);++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.plan'))+ ->assertOk()+ ->assertInertia(fn ($page) => $page->where('firstMonthOffer', $offered));+})->with([+ 'first-time subscriber' => [fn () => null, true],+ 'retrying an incomplete checkout' => [fn (User $user) => $user->account->subscriptions()->create([+ 'type' => Account::SUBSCRIPTION_NAME,+ 'stripe_id' => 'sub_incomplete',+ 'stripe_status' => 'incomplete',+ 'stripe_price' => 'price_monthly_test',+ 'quantity' => 1,+ ]), true],+ 'former subscriber' => [fn (User $user) => $user->account->subscriptions()->create([+ 'type' => Account::SUBSCRIPTION_NAME,+ 'stripe_id' => 'sub_canceled',+ 'stripe_status' => 'canceled',+ 'stripe_price' => 'price_monthly_test',+ 'quantity' => 1,+ 'ends_at' => now()->subDay(),+ ]), false],+ 'no coupon configured' => [fn () => config(['cashier.first_month_coupon_ids.socials' => '']), false],+]);++test('plan store sends the owner to Stripe checkout on the Socials monthly price', function () {+ completeWelcomeThroughSoftware($this->user);$socials = Plan::where('slug', Slug::Socials)->firstOrFail();$socials->update(['stripe_monthly_price_id' => 'price_socials_monthly',@@ -187,23 +238,175 @@ test('software store sends the owner to Stripe checkout on the Socials monthly p->once()->withArgs(fn ($account, $priceId, $cancelUrl, $plan): bool => $account->is($this->user->account)&& $priceId === 'price_socials_monthly'- && $cancelUrl === route('app.welcome.software')+ && $cancelUrl === route('app.welcome.plan')&& $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])+ ->post(route('app.welcome.plan.store'))->assertRedirect('https://checkout.stripe.test/session');});-test('software store fails loudly when the Socials price is not configured', function () {- completeWelcomeThroughGoals($this->user);+test('checkout.started records whether the first-month offer was shown', function (string $couponId, bool $offered) {+ config([+ 'services.posthog.enabled' => true,+ 'services.posthog.api_key' => 'phc_test',+ 'cashier.first_month_coupon_ids.socials' => $couponId,+ ]);+ Bus::fake();+ completeWelcomeThroughSoftware($this->user);+ Plan::where('slug', Slug::Socials)->update(['stripe_monthly_price_id' => 'price_socials_monthly']);++ $this->mock(StartSubscriptionCheckout::class)+ ->shouldReceive('redirect')+ ->once()+ ->andReturn(redirect('https://checkout.stripe.test/session'));++ $this->actingAs($this->user->fresh())+ ->post(route('app.welcome.plan.store'))+ ->assertRedirect('https://checkout.stripe.test/session');++ Bus::assertDispatched(SendEvent::class, fn (SendEvent $event): bool => $event->method === 'capture'+ && data_get($event->payload, 'event') === CheckoutEvent::Started->value+ && data_get($event->payload, 'properties.is_first_month_offer') === $offered);+})->with([+ 'with the coupon' => ['coupon_socials', true],+ 'without the coupon' => ['', false],+]);++test('picking an AI app on the MCP step records which one', function (string $client) {+ config(['services.posthog.enabled' => true, 'services.posthog.api_key' => 'phc_test']);+ Bus::fake();+ attachCurrentWorkspace($this->user);+ subscribeAccount($this->user->account);++ $this->actingAs($this->user->fresh())+ ->postJson(route('app.welcome.mcp.connect-click'), ['client' => $client])+ ->assertNoContent();++ Bus::assertDispatched(SendEvent::class, fn (SendEvent $event): bool => $event->method === 'capture'+ && data_get($event->payload, 'event') === WelcomeEvent::McpConnectClicked->value+ && data_get($event->payload, 'properties.client') === $client+ && data_get($event->payload, 'properties.account_id') === $this->user->account_id);+})->with(['claude', 'chatgpt', 'other']);++test('picking an AI app requires a known app', function (array $payload) {+ Bus::fake();++ $this->actingAs($this->user)+ ->postJson(route('app.welcome.mcp.connect-click'), $payload)+ ->assertUnprocessable()+ ->assertJsonValidationErrors('client');++ Bus::assertNotDispatched(SendEvent::class);+})->with([+ 'missing' => [[]],+ 'unknown' => [['client' => 'gemini']],+]);++test('skipping the MCP step records it and goes to the schedule', function () {+ config(['services.posthog.enabled' => true, 'services.posthog.api_key' => 'phc_test']);+ Bus::fake();+ attachCurrentWorkspace($this->user);+ subscribeAccount($this->user->account);++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.mcp.skip'))+ ->assertRedirect(route('app.posts.index'));++ Bus::assertDispatched(SendEvent::class, fn (SendEvent $event): bool => $event->method === 'capture'+ && data_get($event->payload, 'event') === WelcomeEvent::McpSkipped->value);+});++test('skipping the MCP step without app access goes back to Welcome and records nothing', function () {+ config(['services.posthog.enabled' => true, 'services.posthog.api_key' => 'phc_test']);+ Bus::fake();++ $this->actingAs($this->user)+ ->get(route('app.welcome.mcp.skip'))+ ->assertRedirect(route('app.welcome.persona'));++ Bus::assertNotDispatched(SendEvent::class);+});++test('the MCP step gives the TryPost MCP URL and the owner connections', function () {+ attachCurrentWorkspace($this->user);+ subscribeAccount($this->user->account);++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.mcp'))+ ->assertOk()+ ->assertInertia(fn ($page) => $page+ ->component('welcome/Mcp', false)+ ->where('mcpUrl', route('mcp.trypost'))+ ->where('connectedClients', [])+ ->missing('prompt')+ );+});++test('the MCP step lists the MCP apps the owner already connected', function () {+ $workspace = attachCurrentWorkspace($this->user);+ subscribeAccount($this->user->account);+ $clientId = mcpOauthClient('Claude');+ mcpAccessToken($this->user, $clientId, $workspace);++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.mcp'))+ ->assertOk()+ ->assertInertia(fn ($page) => $page+ ->has('connectedClients', 1)+ ->where('connectedClients.0.client_id', $clientId)+ ->where('connectedClients.0.name', 'Claude')+ );+});++test('the MCP step sends a user without a current workspace to create one', function () {+ subscribeAccount($this->user->account);++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.mcp'))+ ->assertRedirect(route('app.workspaces.create'));+});++test('the MCP step works for a member and on self-hosted', function (Closure $actor) {+ $this->actingAs($actor($this->user))+ ->get(route('app.welcome.mcp'))+ ->assertOk()+ ->assertInertia(fn ($page) => $page->component('welcome/Mcp', false));+})->with([+ 'member' => [function (User $owner): User {+ $workspace = attachCurrentWorkspace($owner);+ subscribeAccount($owner->account);+ $member = User::factory()->create(['account_id' => $owner->account_id]);+ $workspace->members()->attach($member->id, membershipPivot('member'));+ $member->update(['current_workspace_id' => $workspace->id]);++ return $member->fresh();+ }],+ 'self-hosted' => [function (User $owner): User {+ config(['trypost.self_hosted' => true]);+ attachCurrentWorkspace($owner);++ return $owner->fresh();+ }],+]);++test('the MCP step sends an account without app access back to Welcome', function () {+ attachCurrentWorkspace($this->user);++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.mcp'))+ ->assertRedirect(route('app.welcome.persona'));+});++test('plan store fails loudly when the Socials price is not configured', function () {+ completeWelcomeThroughSoftware($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])+ ->post(route('app.welcome.plan.store'))->assertStatus(500);});@@ -241,6 +444,11 @@ test('completed welcome steps remain reachable when going back', function () {->get(route('app.welcome.software'))->assertOk()->assertInertia(fn ($page) => $page->component('welcome/Software', false)->where('selected', PreviousSoftware::Buffer->value));++ $this->actingAs($this->user->fresh())+ ->get(route('app.welcome.plan'))+ ->assertOk()+ ->assertInertia(fn ($page) => $page->component('welcome/Plan', false));});test('welcome funnel captures every step before checkout.started', function () {@@ -269,6 +477,10 @@ test('welcome funnel captures every step before checkout.started', function () {$this->actingAs($this->user->fresh())->post(route('app.welcome.software.store'), ['previous_software' => PreviousSoftware::None->value])+ ->assertRedirect(route('app.welcome.plan'));++ $this->actingAs($this->user->fresh())+ ->post(route('app.welcome.plan.store'))->assertRedirect('https://checkout.stripe.test/session');$funnel = WelcomeEvent::funnel();@@ -309,6 +521,8 @@ test('welcome steps redirect to calendar for subscribed accounts', function (str'goals store' => ['app.welcome.goals.store', 'post', ['goals' => [Goal::SaveTime->value]]],'software' => ['app.welcome.software', 'get'],'software store' => ['app.welcome.software.store', 'post', ['previous_software' => PreviousSoftware::Buffer->value]],+ 'plan' => ['app.welcome.plan', 'get'],+ 'plan store' => ['app.welcome.plan.store', 'post'],]);test('welcome redirects generic-trial accounts with app access to calendar', function () {@@ -343,6 +557,8 @@ test('welcome steps redirect to calendar in self hosted mode', function (string'goals store' => ['app.welcome.goals.store', 'post', ['goals' => [Goal::SaveTime->value]]],'software' => ['app.welcome.software', 'get'],'software store' => ['app.welcome.software.store', 'post', ['previous_software' => PreviousSoftware::Buffer->value]],+ 'plan' => ['app.welcome.plan', 'get'],+ 'plan store' => ['app.welcome.plan.store', 'post'],]);test('old onboarding routes are not registered', function (string $routeName) {@@ -358,8 +574,6 @@ 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',]);@@ -398,6 +612,8 @@ test('members without app access are held on the subscription required screen','goals store' => ['app.welcome.goals.store', 'post', ['goals' => [Goal::SaveTime->value]]],'software' => ['app.welcome.software', 'get'],'software store' => ['app.welcome.software.store', 'post', ['previous_software' => PreviousSoftware::Buffer->value]],+ 'plan' => ['app.welcome.plan', 'get'],+ 'plan store' => ['app.welcome.plan.store', 'post'],]);test('subscription required screen renders for members without app access', function () {@@ -462,6 +678,12 @@ function completeWelcomeThroughGoals(User $user): void]);}+function completeWelcomeThroughSoftware(User $user): void+{+ completeWelcomeThroughGoals($user);+ $user->update(['previous_software' => PreviousSoftware::Buffer->value]);+}+function attachCurrentWorkspace(User $user): Workspace{$workspace = Workspace::factory()->create([diff --git a/tests/Feature/WorkspaceBillingTest.php b/tests/Feature/WorkspaceBillingTest.phpindex f16622325..bd31dd04b 100644--- a/tests/Feature/WorkspaceBillingTest.php+++ b/tests/Feature/WorkspaceBillingTest.php@@ -107,8 +107,8 @@ test('stripe email returns account owner email', function () {expect($this->account->stripeEmail())->toBe($this->user->email);});-test('stripe name returns account name', function () {- expect($this->account->stripeName())->toBe($this->account->name);+test('stripe name returns account owner name', function () {+ expect($this->account->stripeName())->toBe($this->user->name);});test('creating an additional workspace redirects to billing without an active subscription', function () {diff --git a/tests/Unit/Actions/Billing/StartSubscriptionCheckoutTest.php b/tests/Unit/Actions/Billing/StartSubscriptionCheckoutTest.phpindex 37096b839..37b6fc8b9 100644--- a/tests/Unit/Actions/Billing/StartSubscriptionCheckoutTest.php+++ b/tests/Unit/Actions/Billing/StartSubscriptionCheckoutTest.php@@ -56,7 +56,7 @@ afterEach(function () {ApiRequestor::setHttpClient(null);});-test('redirect applies checkout configuration and attribution metadata before opening the stripe session', function () {+test('redirect keeps the attribution metadata on the stripe customer, not on the subscription', function () {config(['trypost.billing.require_card_for_trial' => true,'cashier.trial_days' => 8,@@ -92,26 +92,7 @@ test('redirect applies checkout configuration and attribution metadata before op$cancelUrl = route('app.welcome');$builder = Mockery::mock(SubscriptionBuilder::class);- $builder->shouldReceive('withMetadata')- ->once()- ->with([- 'utm_source' => 'google',- 'utm_medium' => 'cpc',- 'utm_campaign' => 'launch',- 'utm_term' => 'social scheduler',- 'utm_content' => 'headline-b',- 'gclid' => 'Cj0KCQgclid',- 'fbclid' => 'IwAR0fbclid',- 'li_fat_id' => '9f2li-fat-id',- 'ttclid' => 'E.C.Pttclid',- 'rdt_cid' => 'rdt-cid-value',- 'epik' => 'dj0yepik',- 'persona' => 'agency',- 'goals' => 'grow_audience,save_time',- 'previous_software' => 'metricool',- 'referral_source' => 'product_hunt',- ])- ->andReturnSelf();+ $builder->shouldReceive('withMetadata')->once()->with([])->andReturnSelf();$builder->shouldReceive('trialDays')->once()->with(8)->andReturnSelf();$builder->shouldReceive('withCoupon')->never();$builder->shouldReceive('allowPromotionCodes')->never();@@ -125,7 +106,25 @@ test('redirect applies checkout configuration and attribution metadata before op/** @var Account&MockInterface $accountMock */$accountMock = Mockery::mock($account)->makePartial();- $accountMock->shouldReceive('createOrGetStripeCustomer')->once()->andReturnNull();+ $accountMock->shouldReceive('syncOrCreateStripeCustomer')->once()->andReturnNull();++ expect($account->stripeMetadata())->toBe([+ 'utm_source' => 'google',+ 'utm_medium' => 'cpc',+ 'utm_campaign' => 'launch',+ 'utm_term' => 'social scheduler',+ 'utm_content' => 'headline-b',+ 'gclid' => 'Cj0KCQgclid',+ 'fbclid' => 'IwAR0fbclid',+ 'li_fat_id' => '9f2li-fat-id',+ 'ttclid' => 'E.C.Pttclid',+ 'rdt_cid' => 'rdt-cid-value',+ 'epik' => 'dj0yepik',+ 'persona' => 'agency',+ 'goals' => 'grow_audience,save_time',+ 'previous_software' => 'metricool',+ 'referral_source' => 'product_hunt',+ ]);$accountMock->shouldReceive('newSubscription')->once()->with(Account::SUBSCRIPTION_NAME, 'price_monthly_test')@@ -168,7 +167,9 @@ test('redirect sends no metadata for an account whose owner left every field emp/** @var Account&MockInterface $accountMock */$accountMock = Mockery::mock($account)->makePartial();- $accountMock->shouldReceive('createOrGetStripeCustomer')->once()->andReturnNull();+ $accountMock->shouldReceive('syncOrCreateStripeCustomer')->once()->andReturnNull();++ expect($account->stripeMetadata())->toBe([]);$accountMock->shouldReceive('newSubscription')->once()->andReturn($builder);app(StartSubscriptionCheckout::class)->redirect($accountMock, 'price_monthly_test', $cancelUrl);@@ -194,20 +195,12 @@ test('redirect cuts an oversized click id to the stripe metadata limit', functio]);$account->refresh();- $builder = Mockery::mock(SubscriptionBuilder::class);- $builder->shouldReceive('withMetadata')- ->once()- ->with(['fbclid' => str_repeat('a', 500)])- ->andReturnSelf();- $builder->shouldReceive('trialDays')->once()->andReturnSelf();- $builder->shouldReceive('checkout')- ->once()- ->andReturn((object) ['url' => 'https://checkout.stripe.test/session']);-/** @var Account&MockInterface $accountMock */$accountMock = Mockery::mock($account)->makePartial();- $accountMock->shouldReceive('createOrGetStripeCustomer')->once()->andReturnNull();- $accountMock->shouldReceive('newSubscription')->once()->andReturn($builder);+ $accountMock->shouldReceive('syncOrCreateStripeCustomer')->once()->andReturnNull();++ expect($account->stripeMetadata())->toBe(['fbclid' => str_repeat('a', 500)]);+ $accountMock->shouldReceive('newSubscription')->once()->andReturn(checkoutCustomerBuilder());app(StartSubscriptionCheckout::class)->redirect($accountMock, 'price_monthly_test', route('app.welcome'));});@@ -250,7 +243,7 @@ test('redirect applies the plan first-month coupon on a monthly price', function/** @var Account&MockInterface $accountMock */$accountMock = Mockery::mock($account)->makePartial();- $accountMock->shouldReceive('createOrGetStripeCustomer')->once()->andReturnNull();+ $accountMock->shouldReceive('syncOrCreateStripeCustomer')->once()->andReturnNull();$accountMock->shouldReceive('newSubscription')->once()->andReturn($builder);app(StartSubscriptionCheckout::class)->redirect(@@ -290,7 +283,7 @@ test('redirect skips the first-month coupon on a yearly price', function () {/** @var Account&MockInterface $accountMock */$accountMock = Mockery::mock($account)->makePartial();- $accountMock->shouldReceive('createOrGetStripeCustomer')->once()->andReturnNull();+ $accountMock->shouldReceive('syncOrCreateStripeCustomer')->once()->andReturnNull();$accountMock->shouldReceive('newSubscription')->once()->andReturn($builder);app(StartSubscriptionCheckout::class)->redirect(@@ -327,7 +320,7 @@ test('redirect clears a leftover plan_id before opening checkout', function () {/** @var Account&MockInterface $accountMock */$accountMock = Mockery::mock($account)->makePartial();- $accountMock->shouldReceive('createOrGetStripeCustomer')->once()->andReturnNull();+ $accountMock->shouldReceive('syncOrCreateStripeCustomer')->once()->andReturnNull();$accountMock->shouldReceive('newSubscription')->once()->andReturn($builder);app(StartSubscriptionCheckout::class)->redirect($accountMock, 'price_monthly_test', route('app.welcome.software'));@@ -335,7 +328,7 @@ test('redirect clears a leftover plan_id before opening checkout', function () {expect($account->fresh()->plan_id)->toBeNull();});-test('redirect creates a new stripe customer with the owner email and the account name', function () {+test('redirect creates a new stripe customer with the owner email, the owner name and the metadata', function () {config(['cashier.secret' => 'sk_test_fake','trypost.billing.require_card_for_trial' => true,@@ -346,7 +339,14 @@ test('redirect creates a new stripe customer with the owner email and the accoun$client = fakeStripeCustomerClient();$account = Account::factory()->create(['name' => "Ada's Account"]);- $owner = User::factory()->create(['account_id' => $account->id, 'email' => '[email protected]', 'referral_source' => null]);+ $owner = User::factory()->create([+ 'account_id' => $account->id,+ 'name' => 'Ada Lovelace',+ 'email' => '[email protected]',+ 'utm_source' => 'google',+ 'previous_software' => PreviousSoftware::Metricool,+ 'referral_source' => null,+ ]);$account->update(['owner_id' => $owner->id]);$account->refresh();@@ -359,11 +359,15 @@ test('redirect creates a new stripe customer with the owner email and the accounexpect($client->requests)->toHaveCount(1)->and($client->requests[0]['method'])->toBe('post')->and($client->requests[0]['url'])->toEndWith('/v1/customers')- ->and($client->requests[0]['params'])->toMatchArray(['email' => '[email protected]', 'name' => "Ada's Account"])+ ->and($client->requests[0]['params'])->toMatchArray([+ 'email' => '[email protected]',+ 'name' => 'Ada Lovelace',+ 'metadata' => ['utm_source' => 'google', 'previous_software' => 'metricool'],+ ])->and($account->fresh()->stripe_id)->toBe('cus_new');});-test('redirect leaves an existing stripe customer untouched', function () {+test('redirect updates an existing stripe customer with the current details and metadata', function () {config(['cashier.secret' => 'sk_test_fake','trypost.billing.require_card_for_trial' => true,@@ -373,8 +377,14 @@ test('redirect leaves an existing stripe customer untouched', function () {]);$client = fakeStripeCustomerClient();- $account = Account::factory()->create(['stripe_id' => 'cus_existing']);- $owner = User::factory()->create(['account_id' => $account->id, 'email' => '[email protected]', 'referral_source' => null]);+ $account = Account::factory()->create(['name' => "Ada's Account", 'stripe_id' => 'cus_existing']);+ $owner = User::factory()->create([+ 'account_id' => $account->id,+ 'name' => 'New Owner',+ 'email' => '[email protected]',+ 'persona' => Persona::Agency,+ 'referral_source' => null,+ ]);$account->update(['owner_id' => $owner->id]);$account->refresh();@@ -384,7 +394,13 @@ test('redirect leaves an existing stripe customer untouched', function () {app(StartSubscriptionCheckout::class)->redirect($accountMock, 'price_monthly_test', route('app.welcome.software'));- expect(collect($client->requests)->pluck('method')->all())->toBe(['get'])+ expect($client->requests)->toHaveCount(1)+ ->and($client->requests[0]['method'])->toBe('post')->and($client->requests[0]['url'])->toEndWith('/v1/customers/cus_existing')+ ->and($client->requests[0]['params'])->toMatchArray([+ 'email' => '[email protected]',+ 'name' => 'New Owner',+ ])+ ->and($client->requests[0]['params']['metadata'])->toMatchArray(['persona' => 'agency', 'referral_source' => ''])->and($account->fresh()->stripe_id)->toBe('cus_existing');});diff --git a/tests/fixtures/single-line-copy.php b/tests/fixtures/single-line-copy.phpindex 7f502ebc6..e945ecbef 100644--- a/tests/fixtures/single-line-copy.php+++ b/tests/fixtures/single-line-copy.php@@ -38,13 +38,15 @@ return ['auth.register.password_requirements.symbol' => 26,'auth.register.title' => 30,'billing.plans.features.accounts_unlimited' => 35,- 'billing.plans.features.ai' => 15,- 'billing.plans.features.analytics' => 9,- 'billing.plans.features.calendar' => 36,- 'billing.plans.features.mcp' => 44,+ 'billing.plans.features.ai' => 30,+ 'billing.plans.features.analytics' => 25,+ 'billing.plans.features.calendar' => 24,+ 'billing.plans.features.ideas' => 28,+ 'billing.plans.features.mcp' => 46,'billing.plans.features.networks_all' => 39,- 'billing.plans.features.repurpose' => 46,- 'billing.plans.features.team' => 31,+ 'billing.plans.features.repurpose' => 40,+ 'billing.plans.features.team' => 32,+ 'billing.plans.start_first_month' => 18,'calendar.title' => 10,'channels.description' => 43,'channels.goal_dialog.description' => 57,@@ -146,6 +148,23 @@ return ['welcome.goals.save_time' => 35,'welcome.goals.stay_on_brand' => 31,'welcome.goals.use_mcp' => 36,+ 'mcp.connect_other' => 10,+ 'mcp.tabs.connected' => 23,+ 'mcp.tabs.connect' => 21,+ 'welcome.mcp.pick_ai' => 41,+ 'welcome.mcp.skip' => 21,+ 'welcome.mcp.connect_ai' => 20,+ 'welcome.mcp.connect_other' => 28,+ 'welcome.mcp.connect_with' => 16,+ 'welcome.plan_per_month' => 11,+ 'mcp.connect' => 13,+ 'mcp.copy' => 10,+ 'mcp.copied' => 11,+ 'mcp.dialog.open' => 18,+ 'common.learn_more' => 18,+ 'settings.sidebar.groups.integrations' => 14,+ 'settings.sidebar.groups.content' => 11,+ 'settings.sidebar.items.api_keys' => 3,'welcome.personas.agency' => 10,'welcome.personas.creator' => 23,'welcome.personas.developer' => 15,