trypost/app
Paulo Castellano aadfe7d6e8 fix: do not set plan_id on checkout creation; drop redundant guards
Two issues from review:

1. BillingController::checkout was setting plan_id immediately after
   creating the Stripe Checkout session, before the user actually paid.
   If the user abandoned checkout, the account ended up with a plan it
   never paid for. Plan activation is now driven exclusively by the
   customer.subscription.created webhook, which fires only after a
   successful payment.

2. The 'if (\$account->wasChanged('plan_id')) { ... }' guards around
   forgetPlanFeatureCache() were tautological — Eloquent's update()
   already short-circuits when nothing changed, and Pennant forget()
   is idempotent, so an extra cache clear when the plan didn't move
   is harmless. Removing the guards keeps the listener and swap path
   readable.
2026-05-07 11:08:30 -03:00
..
Actions refactor: namespace PostHog jobs + extract billing tracking, add tests 2026-05-07 09:41:36 -03:00
Ai feat: transition AI usage from feature-based limits to a centralized monthly credit system with token tracking. 2026-05-03 19:36:26 -03:00
Broadcasting feat: replace legacy AI assistant with modular post content generation, review, and template management system 2026-05-03 09:36:50 -03:00
Concerns refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00
Console/Commands feat: transition AI usage from feature-based limits to a centralized monthly credit system with token tracking. 2026-05-03 19:36:26 -03:00
DataTransferObjects feat: add PostCommentCreated broadcast event 2026-04-15 20:11:36 -03:00
Enums refactor: PostHog review polish 2026-05-07 10:41:53 -03:00
Events feat: add image title and body fields to AI post creation and register PostTemplateSeeder in local environments 2026-05-03 10:06:02 -03:00
Exceptions feat: @mentions in comments, AI Action layer + MCP tools, settings tabs 2026-05-01 20:59:03 -03:00
Features feat: transition AI usage from feature-based limits to a centralized monthly credit system with token tracking. 2026-05-03 19:36:26 -03:00
Helpers fix: correct Upload.php filename case for Linux CI 2026-03-31 12:01:48 -03:00
Http fix: do not set plan_id on checkout creation; drop redundant guards 2026-05-07 11:08:30 -03:00
Jobs refactor: PostHog review polish 2026-05-07 10:41:53 -03:00
Listeners fix: do not set plan_id on checkout creation; drop redundant guards 2026-05-07 11:08:30 -03:00
Mail feat: @mentions in comments, AI Action layer + MCP tools, settings tabs 2026-05-01 20:59:03 -03:00
Mcp refactor: move URL validation to the request layer with active_url 2026-05-04 14:35:28 -03:00
Models refactor: explicit Pennant cache reset on plan_id change 2026-05-07 10:59:48 -03:00
Policies refactor: move workspace tenancy check on Post into PostPolicy 2026-05-04 13:20:52 -03:00
Providers refactor: collapse media-attach helpers back into MediaAttacher 2026-05-04 14:02:50 -03:00
Rules refactor: derive sibling key in content-type rules without regex 2026-05-04 13:06:13 -03:00
Services refactor: PostHog review polish 2026-05-07 10:41:53 -03:00
Socialite refactor: centralize social API base URLs into the configuration file to improve maintainability and environment flexibility 2026-05-02 13:49:20 -03:00
Support feat: @mentions in comments, AI Action layer + MCP tools, settings tabs 2026-05-01 20:59:03 -03:00