feat(frontend): show that paid-only AI video generators are unavailable during the trial - #2062
Open
giladresisi wants to merge 1 commit into
Open
giladresisi wants to merge 1 commit into
giladresisi wants to merge 1 commit into
Conversation
…le during the trial Label trial-excluded generators in the AI Video picker and form, and add a caveat under the AI Videos plan bullet while a trial is relevant to the viewer. Driven by each generator's trial flag and user.isTrailing; server gate unchanged.
Strix Security ReviewNo security issues found. Updated for Reviewed by Strix |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
5 tasks
Collaborator
Author
|
Docs follow-up: gitroomhq/postiz-docs#249 (merge after this is deployed). |
Open
18 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Feature (frontend only, composer AI Video picker and the billing plan cards). Three disclosure points were added, all driven by the
trialflag each video generator already returns fromGET /media/video-optionsand byuser.isTrailing/user.allowTrialfrom the user context:apps/frontend/src/components/launches/ai.video.tsx: inAiVideoModal, every generator whosetrialisfalsegets a muted "Paid plans only, not available during the trial" line under its button while the organisation is trialing. The same line is rendered above the Generate button inside the per-type form, so a user auto-selected into a single generator sees it too.apps/frontend/src/components/billing/main.billing.component.tsx: theFeatureslist of each plan card gets a muted "Some AI video generators are available after the trial ends" line under the bullets, only when the plan includes video credits and the viewer either can still start a trial or is on one.video_paid_plans_only,ai_videos_paid_only_note) in the English source, translated into the other locales with lingo.dev.Deliberately unchanged: the server-side 406 gate in
MediaService, the/allowedpre-check, the global finish-trial dialog, credit accounting and the generators themselves. Trial-excluded generators stay visible and clickable, so the existing "finish the trial, charge me now" flow still handles the click. There is no generator-specific logic; a future generator withtrial: falseis covered automatically. On self-hosted installsisTrailingis alwaysfalse, so nothing new renders there.Why was this change needed?
A Cloud user on the 7-day trial only learns that a generator is unavailable after clicking Generate, through the global 406 dialog. Nothing on the plans page, the billing feature list or the video type picker says so up front. A customer bought Standard early because of that and complained about misleading advertising. The generator that carries a real per-generation cost (currently Seedance 2.0) is held back during the trial; Image Text Slides works during the trial, which is why the billing wording says "some".
Other information:
Testing done: frontend type-check and eslint on the two changed files show no new findings (the one remaining tsc error, on
subscription.provider, is pre-existing and on an untouched line). The UI was not exercised in a browser; the QA steps below are the intended manual check.Docs follow-up: gitroomhq/postiz-docs PR (linked in a comment once opened) documents the trial restriction and renames the leftover Veo3 mentions; merge it only after this change is deployed.
QA
isTrailingis honoured) and mark a test organisation as trialing, e.g. setOrganization.isTrailing = truein the local DB, then log in as a member of that organisation.allowTrialtrue,isTrailingfalse). Expected: the same billing line is shown; the picker labels from step 2 are not, since the organisation is not trialing.isTrailing = falsewith an active subscription (allowTrialfalse). Expected: no label in the picker, no line on the billing cards.STRIPE_PUBLISHABLE_KEY(self-hosted mode). Expected: nothing new renders anywhere.Checklist:
Put a "X" in the boxes below to indicate you have followed the checklist;
🤖 Generated with Claude Code
https://claude.ai/code/session_01JYKE228pePE6YjDq31Vv7j