Skip to content

feat: add landing transition and chat links#75

Open
Nikhi-l wants to merge 2 commits intomainfrom
codex/implement-landing-page-animations-and-navigation
Open

feat: add landing transition and chat links#75
Nikhi-l wants to merge 2 commits intomainfrom
codex/implement-landing-page-animations-and-navigation

Conversation

@Nikhi-l
Copy link
Owner

@Nikhi-l Nikhi-l commented Sep 9, 2025

Summary

  • fade out initial Spline page and route to landing.html on scroll or button click
  • link landing page actions to login/chat and support glow buttons

Testing

  • pnpm format app/page.tsx
  • pnpm exec biome lint app/page.tsx
  • pnpm lint (fails: Do not shadow the global "escape" property, Forbidden non-null assertion)
  • pnpm test (fails: This module cannot be imported from a Client Component module)

https://chatgpt.com/codex/tasks/task_e_68bfb30f2ebc8324bfc207d8f6cbfaa8

@vercel
Copy link

vercel bot commented Sep 9, 2025

@Nikhi-l is attempting to deploy a commit to the Nikhil's projects team on Vercel, but is not a member of this team. To resolve this issue, you can:

  • Make your repository public. Collaboration is free for open source and public repositories.
  • Upgrade to pro and add @Nikhi-l as a member. A Pro subscription is required to access Vercel's collaborative features.
    • If you're the owner of the team, click here to upgrade and add @Nikhi-l as a member.
    • If you're the user who initiated this build request, click here to request access.
    • If you're already a member of the Nikhil's projects team, make sure that your Vercel account is connected to your GitHub account.

To read more about collaboration on Vercel, click here.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

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, or 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 fix this CI failure" or "@codex address that feedback".

Comment on lines +1 to +15
import { useEffect, useState } from 'react';
import { useRouter } from 'next/navigation';
import Spline from '@splinetool/react-spline/next';
import { Button } from '@/components/ui/button';

export default function Home() {
const [transitioning, setTransitioning] = useState(false);
const router = useRouter();

const startTransition = () => {
if (transitioning) return;
setTransitioning(true);
setTimeout(() => {
router.push('/landing.html');
}, 700);

Choose a reason for hiding this comment

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

[P0] Mark home page as client component

The updated home page uses useState, useEffect, and useRouter, which can only be used in Client Components. This file no longer renders through a <Link> and now depends on client‑side hooks, but it is missing the 'use client' directive at the top of the module. Without that directive Next.js will throw useRouter can only be used in Client Components and fail to compile or run tests. Add 'use client'; before the imports so the page can render.

Useful? React with 👍 / 👎.

Copy link
Owner Author

Choose a reason for hiding this comment

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

@codex fix comments

Choose a reason for hiding this comment

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

Summary

  • Marked the home page as a client component by adding the 'use client' directive so client-side hooks like useRouter can run during transitions app/page.tsxL1-L4
  • Allowed unauthenticated visitors to reach the marketing landing page by whitelisting /landing.html in the middleware’s public route list middleware.tsL35-L38

Testing

  • pnpm format app/page.tsx middleware.ts
  • pnpm exec biome lint app/page.tsx middleware.ts
  • pnpm lint (Do not shadow the global "escape" property; Forbidden non-null assertion)
  • pnpm test (This module cannot be imported from a Client Component module)

View task →

Comment on lines +10 to +15
const startTransition = () => {
if (transitioning) return;
setTransitioning(true);
setTimeout(() => {
router.push('/landing.html');
}, 700);

Choose a reason for hiding this comment

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

[P1] Landing transition is blocked by auth middleware

The new transition calls router.push('/landing.html'), but unauthenticated requests are only allowed for '/', '/login', and '/register' in middleware.ts. For logged‑out visitors the middleware immediately redirects /landing.html back to /login, so the fade animation always ends on the login screen instead of the marketing landing page. Either allow /landing.html in the middleware or push to a route that bypasses the redirect.

Useful? React with 👍 / 👎.

Copy link
Owner Author

Choose a reason for hiding this comment

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

@codex fix comments

Choose a reason for hiding this comment

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

Summary

Testing

  • pnpm lint
  • pnpm test – This module cannot be imported from a Client Component module

View task →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant