Skip to content

Fix navbar navigation links on non-homepage routes#107

Open
deepsikha-dash wants to merge 2 commits into
vishnukothakapu:mainfrom
deepsikha-dash:fix-navbar-links
Open

Fix navbar navigation links on non-homepage routes#107
deepsikha-dash wants to merge 2 commits into
vishnukothakapu:mainfrom
deepsikha-dash:fix-navbar-links

Conversation

@deepsikha-dash

@deepsikha-dash deepsikha-dash commented May 16, 2026

Copy link
Copy Markdown

Description

Fixed navbar navigation links on non-homepage routes.

Changes Made

  • Updated navbar links to redirect to homepage sections correctly
  • Fixed section scrolling from routes like /login and /register

Issue

Closes #41

Summary by CodeRabbit

  • Style

    • Updated navigation with rounded pill-shaped active indicator and sticky header with blur effect
    • Enhanced hover animations on profile cards and improved theme toggle styling
    • Refined background gradients across light and dark modes
  • New Features

    • Redesigned home page marketing layout with hero section, statistics, features showcase, and interactive demo preview

Review Change Stack

@vercel

vercel Bot commented May 16, 2026

Copy link
Copy Markdown

@deepsikha-dash is attempting to deploy a commit to the vishnukothakapu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Navigation links and global styling are updated to use Next.js Link with hash destinations for cross-page navigation; theme toggle and profile cards receive styling refinements; the home page is redesigned with a new marketing layout including hero, stats, features, demo, and footer sections; and background styling is normalized across several pages.

Changes

UI and Navigation Updates

Layer / File(s) Summary
Global CSS — body gradients and styling foundation
app/globals.css
Base body styling now uses explicit light and dark gradient backgrounds with background-attachment: fixed and min-height: 100vh, removing prior bg-background utility reliance.
ThemeToggle — wrapper and button styling with accessibility
app/components/ThemeToggle.tsx
Wrapper container updated to violet/blur/dark-mode design; each theme button (light, dark, system) gains an aria-label and expanded active-state conditional classes with theme-specific color styling.
Navbar — navigation links and visual updates
app/components/Navbar.tsx
Imports updated to include Link2 icon; logo wrapped with gradient styling; center nav links converted from anchors to Next.js Link components with hash hrefs and conditional aria-current="page" based on activeSection; active/hover states changed to rounded violet pill design; Get Started button receives updated classes and responsive visibility.
Home page — marketing layout and components
app/page.tsx
Complete redesign with new Tailwind-styled sections (hero with proof items, stats grid, features grid, demo preview, CTA, and footer); introduces local presentation components (SparkDot, ProofItem, StatCard, SectionWash, SectionHeader, PreviewLink); refactors FeatureCard and DemoRow styling and interactions while preserving prop contracts; adds CheckCircle2 icon import.
Background and transition cleanup
app/[username]/ProfileCard.tsx, app/[username]/not-found.tsx, app/[username]/page.tsx, app/not-found.tsx
bg-muted/40 background removed from main containers across profile and not-found pages; ProfileCard shadow styling changed to transition-driven hover effects with transition-all duration-300 hover:-translate-y-2 hover:shadow-xl.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • vishnukothakapu/linkid#99: Landing-page UI updates (navbar pill styling, Link2 icon, theme toggle aria-labels, global gradient backgrounds, and profile card transitions) closely parallel the code-level changes in this PR.

Suggested labels

enhancement, level1

Poem

🐰 A rabbit hops through styles anew,
Links now hash to sections true,
Pills of violet grace the way,
Gradients dance in light and gray,
From nav to home, the page takes flight!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR contains significant out-of-scope changes: the homepage (app/page.tsx) was substantially redesigned with new marketing layout, components, and styling (+390/-276 lines), which exceeds the navbar fix objective. Separate the navbar fix from the homepage redesign into distinct PRs. The navbar fix (Navbar.tsx, ThemeToggle, globals.css, not-found pages) should be merged independently from the homepage marketing redesign (app/page.tsx rewrite).
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective of the PR: fixing navbar navigation links on non-homepage routes, which aligns directly with issue #41.
Linked Issues check ✅ Passed The PR addresses the core requirement from issue #41 by updating Navbar.tsx to use Next.js Link components with full paths (e.g., /#features) instead of hash-only hrefs, ensuring navigation works from any page.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
app/components/Navbar.tsx (1)

44-50: ⚡ Quick win

Use next/link for internal hash routes instead of raw anchors.

Lines 44, 47, and 50 use raw <a> tags for navigation, while Link from next/link is already imported at the top of the file. Using <Link href="/#..."> prevents full page reloads and keeps routing behavior consistent with Next.js conventions.

♻️ Proposed refactor
-                    <a href="/#features" className={activeSection === "features" ? "text-foreground font-medium border-b-2 border-primary pb-0.5" : "text-muted-foreground hover:text-foreground hover:border-b-2 hover:border-primary hover:pb-0.5"}>
+                    <Link href="/#features" className={activeSection === "features" ? "text-foreground font-medium border-b-2 border-primary pb-0.5" : "text-muted-foreground hover:text-foreground hover:border-b-2 hover:border-primary hover:pb-0.5"}>
                         Features
-                    </a>
+                    </Link>
-                    <a href="/#how" className={activeSection === "how" ? "text-foreground font-medium border-b-2 border-primary pb-0.5" : "text-muted-foreground hover:text-foreground hover:border-b-2 hover:border-primary hover:pb-0.5"}>
+                    <Link href="/#how" className={activeSection === "how" ? "text-foreground font-medium border-b-2 border-primary pb-0.5" : "text-muted-foreground hover:text-foreground hover:border-b-2 hover:border-primary hover:pb-0.5"}>
                         How it works
-                    </a>
+                    </Link>
-                    <a href="/#demo" className={activeSection === "demo" ? "text-foreground font-medium border-b-2 border-primary pb-0.5" : "text-muted-foreground hover:text-foreground hover:border-b-2 hover:border-primary hover:pb-0.5"}>
+                    <Link href="/#demo" className={activeSection === "demo" ? "text-foreground font-medium border-b-2 border-primary pb-0.5" : "text-muted-foreground hover:text-foreground hover:border-b-2 hover:border-primary hover:pb-0.5"}>
                         Demo
-                    </a>
+                    </Link>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/components/Navbar.tsx` around lines 44 - 50, Replace the raw <a> anchors
used for internal hash navigation with Next.js Link components to avoid full
page reloads: where you currently render the three anchors (the ones checking
activeSection === "features"/"how"/"demo"), use the imported Link component
(Link href="/#features", Link href="/#how", Link href="/#demo") and move the
className/activeSection logic onto the Link (or its child anchor) so styling and
active-state checks remain identical; ensure the Link usage preserves the
existing className strings and activeSection comparisons in the Navbar
component.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@app/components/Navbar.tsx`:
- Around line 44-50: Replace the raw <a> anchors used for internal hash
navigation with Next.js Link components to avoid full page reloads: where you
currently render the three anchors (the ones checking activeSection ===
"features"/"how"/"demo"), use the imported Link component (Link
href="/#features", Link href="/#how", Link href="/#demo") and move the
className/activeSection logic onto the Link (or its child anchor) so styling and
active-state checks remain identical; ensure the Link usage preserves the
existing className strings and activeSection comparisons in the Navbar
component.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2960562c-f19a-49f0-aec6-5dcaffbc6b53

📥 Commits

Reviewing files that changed from the base of the PR and between 20bf70d and d4f9d02.

📒 Files selected for processing (1)
  • app/components/Navbar.tsx

@vercel

vercel Bot commented May 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
linkid Ready Ready Preview, Comment May 17, 2026 7:00am

@Anushreebasics Anushreebasics left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

changes

Comment thread app/components/Navbar.tsx Outdated

@Anushreebasics Anushreebasics left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Add aria-current="page" to the active link for screen-reader clarity.

@Anushreebasics

Copy link
Copy Markdown
Collaborator

@deepsikha-dash squash commits to just 1 and make the CI green

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/components/Navbar.tsx`:
- Line 45: In Navbar.tsx update the aria-current attribute used for in-page
section navigation: when activeSection === "features" (and likewise for the
other two nav links that check activeSection) set aria-current="location"
instead of "page" (or remove the attribute when not active); locate the
attribute usage inside the Navbar component where aria-current={activeSection
=== "..."} is set and change the value to "location" for all three in-page
anchor links.
- Around line 44-58: The hash-only hrefs in Navbar.tsx (the Link elements for
"Features", "How it works", and "Demo") cause navigation to preserve the current
path (e.g., /login#features); update each href to include the root path (change
"`#features`", "`#how`", "`#demo`" to "/#features", "/#how", "/#demo") so clicks
always navigate to the homepage before scrolling to the section; keep the
existing aria-current and className logic unchanged and apply the same fix to
any other hash-only Link usages in this component.

In `@app/page.tsx`:
- Around line 437-453: Replace the Next.js Link usage for the external URL with
a regular anchor element: change the JSX block that renders Link (the element
using href={`https://${url}`} and target="_blank") to an <a> tag, keep the same
classes/children (the container div, icon, label, URL span and ArrowUpRight),
and add rel="noopener noreferrer" to the anchor for security; ensure
props/variables referenced (url, label, icon, ArrowUpRight) are still used
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c0569811-e9c5-4ec1-846e-417394957eb2

📥 Commits

Reviewing files that changed from the base of the PR and between dd59b3c and d3d526c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • app/[username]/ProfileCard.tsx
  • app/[username]/not-found.tsx
  • app/[username]/page.tsx
  • app/components/Navbar.tsx
  • app/components/ThemeToggle.tsx
  • app/globals.css
  • app/not-found.tsx
  • app/page.tsx
  • package.json
💤 Files with no reviewable changes (1)
  • package.json
✅ Files skipped from review due to trivial changes (4)
  • app/[username]/page.tsx
  • app/[username]/ProfileCard.tsx
  • app/[username]/not-found.tsx
  • app/not-found.tsx

Comment thread app/components/Navbar.tsx Outdated
Comment thread app/components/Navbar.tsx Outdated
Comment thread app/page.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
app/page.tsx (1)

466-473: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use regular <a> tag for external links in FooterIcon.

Same issue as DemoRow — Next.js Link should not be used for external URLs. For external links with target="_blank", use a regular anchor tag with rel="noopener noreferrer".

🔗 Recommended fix
-    <Link
-      href={href}
-      target="_blank"
-      aria-label={label}
-      className="flex h-10 w-10 items-center justify-center rounded-xl border border-violet-200/70 bg-white/60 text-zinc-500 transition-all duration-300 hover:-translate-y-0.5 hover:border-violet-300 hover:text-violet-700 hover:shadow-md dark:border-white/10 dark:bg-white/[0.04] dark:text-zinc-400 dark:hover:text-violet-200"
-    >
+    <a
+      href={href}
+      target="_blank"
+      rel="noopener noreferrer"
+      aria-label={label}
+      className="flex h-10 w-10 items-center justify-center rounded-xl border border-violet-200/70 bg-white/60 text-zinc-500 transition-all duration-300 hover:-translate-y-0.5 hover:border-violet-300 hover:text-violet-700 hover:shadow-md dark:border-white/10 dark:bg-white/[0.04] dark:text-zinc-400 dark:hover:text-violet-200"
+    >
       {children}
-    </Link>
+    </a>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/page.tsx` around lines 466 - 473, FooterIcon (the component rendering the
Link with href, target="_blank" and aria-label) is using Next.js Link for
external URLs; replace the Link with a regular anchor element (<a>) when
rendering external links, preserve href, target="_blank", aria-label, className
and children, and add rel="noopener noreferrer" to the anchor to prevent opener
vulnerabilities; ensure the change is made in the FooterIcon render function
where the Link JSX is used so internal navigation behavior remains unchanged for
internal routes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/page.tsx`:
- Around line 488-496: The FooterColumn mapping currently always wraps entries
from the links array with Next.js Link (the <Link ...> in app/page.tsx), which
breaks external (https://...) and mailto: URLs; change the map so it checks each
href: if it's an internal path (e.g., startsWith('/')) render Next.js Link with
the same className and key, otherwise render a plain <a> element for external
and mailto links, adding target="_blank" and rel="noopener noreferrer" for
http/https links (but not for mailto). Ensure you update the branch that renders
Link vs anchor where links.map(([label, href]) => ...) is defined.

---

Duplicate comments:
In `@app/page.tsx`:
- Around line 466-473: FooterIcon (the component rendering the Link with href,
target="_blank" and aria-label) is using Next.js Link for external URLs; replace
the Link with a regular anchor element (<a>) when rendering external links,
preserve href, target="_blank", aria-label, className and children, and add
rel="noopener noreferrer" to the anchor to prevent opener vulnerabilities;
ensure the change is made in the FooterIcon render function where the Link JSX
is used so internal navigation behavior remains unchanged for internal routes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d73666f-ea64-4d5e-9335-dd17b5194816

📥 Commits

Reviewing files that changed from the base of the PR and between d3d526c and 2d819cb.

📒 Files selected for processing (8)
  • app/[username]/ProfileCard.tsx
  • app/[username]/not-found.tsx
  • app/[username]/page.tsx
  • app/components/Navbar.tsx
  • app/components/ThemeToggle.tsx
  • app/globals.css
  • app/not-found.tsx
  • app/page.tsx
✅ Files skipped from review due to trivial changes (2)
  • app/not-found.tsx
  • app/[username]/page.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • app/[username]/ProfileCard.tsx
  • app/[username]/not-found.tsx
  • app/components/ThemeToggle.tsx
  • app/components/Navbar.tsx

Comment thread app/page.tsx
@vishnukothakapu

Copy link
Copy Markdown
Owner

Hi @deepsikha-dash , please resolve all the review comments above and make the required changes in the code. After pushing the fixes, kindly mark the resolved review comments as resolved in the PR as well.

@vishnukothakapu

vishnukothakapu commented May 19, 2026

Copy link
Copy Markdown
Owner

Hi @deepsikha-dash,
Thanks for the updates. There is currently a merge conflict in app/components/Navbar.tsx that needs to be resolved before the PR can be merged.

Please resolve the conflicts, push the updated changes.

Comment thread e -i HEAD~2
@@ -0,0 +1,133 @@
956791e (HEAD -> fix-navbar-links, origin/fix-navbar-links) Fix navbar navigation links on non-homepage routes

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please remove it from the PR.

@Anushreebasics Anushreebasics left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The mobile navbar still uses hash-only links in [Navbar.tsx], so the fix does not apply on non-home routes for phone/tablet users. Please change the mobile items to absolute home anchors too, like href="/#features", href="/#how", and href="/#demo"

@Anushreebasics

Copy link
Copy Markdown
Collaborator

@deepsikha-dash please resolve conflicts

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Navigation Links Not Working on Non-Homepage Routes

3 participants