Skip to content

Conversation

vcapretz
Copy link
Contributor

@vcapretz vcapretz commented Sep 23, 2025

  • remove forwardRef now that we are in React 19
  • add next-env.d.ts file to .gitignore as it's recommended by new Next.js apps
  • move next.config file to TS

Summary by cubic

Modernized the web app for React 19 and current Next.js guidance. Simplified components, converted Next config to TypeScript/ESM, and removed Next’s generated env types.

  • Refactors
    • Replaced React.FC/forwardRef with function components and named exports across UI (Button, Heading, Text, TooltipContent, etc.).
    • Switched PageTransition to a named export and updated imports in pages.
    • Migrated next.config to TypeScript with typed NextConfig and ESM default export; updated tsconfig includes.
    • Removed next-env.d.ts and added it to .gitignore per Next.js recommendation.
    • Dropped dynamic = 'force-dynamic' from API routes.
    • Misc cleanups: standardized default function exports in pages, metadata tweaks, and updated license year to 2025.

@vcapretz vcapretz self-assigned this Sep 23, 2025
Copy link

changeset-bot bot commented Sep 23, 2025

⚠️ No Changeset found

Latest commit: 0b0875b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Sep 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
react-email Ready Ready Preview Comment Sep 24, 2025 0:48am
react-email-demo Ready Ready Preview Comment Sep 24, 2025 0:48am

Copy link

alwaysmeticulous bot commented Sep 23, 2025

🤖 Meticulous was unable to start a test run because no sessions have been recorded yet. Click here to setup session recording.

Last updated for commit 0b0875b. This comment will update as new commits are pushed.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 issues found across 34 files

Prompt for AI agents (all 7 issues)

Understand the root cause of the following 7 issues and fix them.


<file name="apps/web/src/app/templates/page.tsx">

<violation number="1" location="apps/web/src/app/templates/page.tsx:109">
Function component does not return JSX; missing return leads to an empty page/component rendering.</violation>
</file>

<file name="apps/web/src/app/not-found.tsx">

<violation number="1" location="apps/web/src/app/not-found.tsx:10">
Function NotFound does not return JSX; missing return statement causes the page to render nothing.</violation>
</file>

<file name="apps/web/src/components/tooltip.tsx">

<violation number="1" location="apps/web/src/components/tooltip.tsx:9">
Aliasing the library component means Object.assign will mutate the third‑party export (TooltipPrimitive.Root), introducing global side effects and potential conflicts. Prefer a local wrapper to keep mutations on your own function object.</violation>
</file>

<file name="apps/web/src/components/footer.tsx">

<violation number="1" location="apps/web/src/components/footer.tsx:13">
Add rel=&quot;noopener noreferrer&quot; to links that use target=&quot;_blank&quot; to prevent reverse tabnabbing and ensure security.</violation>
</file>

<file name="apps/web/src/app/components/page.tsx">

<violation number="1" location="apps/web/src/app/components/page.tsx:31">
`key` is a special React prop and won&#39;t be received by PageTransition; using it here won&#39;t key the inner MotionComponent. Use a dedicated prop (e.g., transitionKey) and consume it inside PageTransition; keep outer key only if you intend to remount PageTransition itself.</violation>
</file>

<file name="apps/web/src/components/topbar.tsx">

<violation number="1" location="apps/web/src/components/topbar.tsx:10">
Props type includes ref and children, but the component neither forwards refs nor renders children. Narrow the props to exclude ref and children to reflect actual behavior.</violation>
</file>

<file name="apps/web/src/components/button.tsx">

<violation number="1" location="apps/web/src/components/button.tsx:20">
ref is destructured from props and used, but function components do not receive ref without forwardRef; this breaks ref forwarding.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@gabrielmfern gabrielmfern merged commit 2607189 into canary Sep 24, 2025
12 checks passed
@gabrielmfern gabrielmfern deleted the chore-web branch September 24, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants