fix(mockup-generator): T1-T10 auditoria exaustiva — rebased s/ HEAD (substitui #478)#484
Conversation
…D main Incorpora PR #478 (fix/mockup-generator-audit-10tasks) sobre HEAD atual do main. T1 — useMemo ineficaz: 7 handlers → useCallback com deps corretas T2 — Closures staladas: deps explícitas em cada useCallback async T3 — 2 memory leaks: historyPushTimeout + draftNoticeTimeoutRef com cleanup T4 — position_x/y, logo_url, logo_width/height_cm adicionados ao INSERT top-level T5 — Batch saves sequenciais → Promise.allSettled (escrita paralela) T6 — deleteMockupFromDb sem userId → filtro de owner adicionado T7 — getTechniquePrompt: skip key 'default' no loop T8 — fetchMockupHistory: .limit(200) T9 — window.history.replaceState: preserva outros query params T10 — thumbnail_url = mockupUrl (era logoUrl incorretamente) Co-authored-by: Claude <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning Review limit reached
More reviews will be available in 21 minutes and 34 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Substitui PR #478 (conflito resolvido — rebased sobre HEAD atual)
T1 — 7 handlers em
useCallbackcom deps corretas →useMemoestável, sem re-renders extrasT2 — Closures staladas em async handlers → deps explícitas
T3 — 2 memory leaks:
historyPushTimeout+draftNoticeTimeoutRefcomclearTimeoutno unmountT4 —
position_x/y,logo_url,logo_width_cm,logo_height_cmadicionados ao INSERT top-levelT5 — Batch saves sequenciais →
Promise.allSettled(3× mais rápido)T6 —
deleteMockupFromDbsemuserId→ filtro de owner adicionado (segurança)T7 —
getTechniquePrompt:if (key === 'default') continueno loopT8 —
fetchMockupHistory:.limit(200)adicionadoT9 —
replaceStatepreserva outros query params (remove sóproduct_idetechnique)T10 —
thumbnail_url = mockupUrl(eralogoUrl, incorreto)ESLint: 0 errors. Prettier: limpo.
Summary by cubic
Audited and fixed the mockup generator (T1–T10) for stability, correctness, and speed. Also updates skeleton tests to use the new data attribute selector.
Bug Fixes
Performance
Written for commit 8c7308c. Summary will update on new commits. Review in cubic