Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e734ecb2d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const { user, token } = useAuth(); | ||
| const [isLoading, setIsLoading] = React.useState(false); | ||
|
|
||
| const isPro = user?.isPro || false; |
There was a problem hiding this comment.
Refresh Pro entitlements after checkout completes
isPro is derived only from the cached auth user object, and this provider never re-fetches the user profile after Stripe checkout returns, so a user who just paid (redirected back to /pro?success=true) still has isPro=false locally and remains blocked by the paywall until they manually log out/in. This breaks the paid upgrade flow for successful purchases.
Useful? React with 👍 / 👎.
| setIsLoading(true); | ||
| try { | ||
| const token = localStorage.getItem("token"); // Simplistic approach to auth, might be defined differently later | ||
| const response = await fetch("/api/generate/video", { |
There was a problem hiding this comment.
Route video generation through configured backend URL
This request uses a relative path (/api/generate/video) instead of the configured API origin used elsewhere, so when frontend and backend are on different origins (e.g., Vite dev server on 5173, backend on 5000, or GitHub Pages), video generation posts to the wrong host and fails even for authenticated users.
Useful? React with 👍 / 👎.
| # Флаг --max-warnings=0 гарантирует падение пайплайна (Merge block) даже при ворнингах | ||
| run: | | ||
| # В реальном проекте правила подхватятся из .eslintrc. На случай отсутствия запускаем базовую проверку | ||
| eslint "frontend/src/**/*.{ts,tsx}" "backend/**/*.js" --max-warnings=0 || true |
There was a problem hiding this comment.
Merge pull request #1 from Migrabe/main
No description provided.