Skip to content

connected contact page correctly in footer#415

Open
ArshiBansal wants to merge 1 commit into
knoxiboy:mainfrom
ArshiBansal:contact_page
Open

connected contact page correctly in footer#415
ArshiBansal wants to merge 1 commit into
knoxiboy:mainfrom
ArshiBansal:contact_page

Conversation

@ArshiBansal
Copy link
Copy Markdown

@ArshiBansal ArshiBansal commented May 28, 2026

User description

Description

Updated the footer contact links to route users to the internal /contact page instead of using a direct mailto: link.

Changes include:

Replaced footer "Contact" resource link with /contact
Updated email social icon to navigate to the contact page
Added conditional rendering for internal social links using next/link

Related Issue

Closes #388

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update (README, guides, comments)
  • [.] Style / UI change (no logic change)
  • Code refactor (no behavior change)
  • Test addition or update
  • Breaking change (fix or feature that would cause existing functionality to change)

Screenshots (if UI change)

Before After
(screenshot) (screenshot)

How Has This Been Tested?

  • [.] Tested locally with npm run dev
  • [.] Verified on mobile viewport (375px)
  • [.] Verified on desktop viewport (1440px)

Checklist

  • [.] I have tested my changes locally (npm run dev)
  • [.] My code follows the existing code style (TypeScript, Tailwind, no any types)
  • [.] I have not introduced unrelated changes (each PR should address one issue)
  • I have added comments where necessary
  • [.] My branch is up to date with main
  • [.] I have linked the related issue above
  • Screenshots are included (if this is a UI change)

CodeAnt-AI Description

Send footer contact links to the in-app contact page

What Changed

  • The footer’s Contact link now opens the site’s contact page instead of starting an email draft
  • The email icon in the footer now also routes to the contact page
  • Internal footer links now open as site navigation, while external links still open normally

Impact

✅ Fewer dead-end contact clicks
✅ Easier access to the contact page
✅ More consistent footer navigation

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • New Features

    • Added "Report Issue" link in the community section for easier bug reporting.
    • Converted contact navigation from email link to dedicated internal contact page.
  • Refactor

    • Reorganized footer layout with consistent link formatting across Platform and Resources sections.
    • Improved social icon navigation handling for both internal and external links.

Review Change Stack

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 28, 2026

CodeAnt AI is reviewing your PR.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

@ArshiBansal is attempting to deploy a commit to the Karan Mani Tripathi 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc'26 GSSoC program issue level:beginner Beginner level task type:docs Documentation update type:feature New feature labels May 28, 2026
@github-actions github-actions Bot requested a review from knoxiboy May 28, 2026 08:20
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Technical Review

Hi @ArshiBansal! Thank you for your contribution to DoubtDesk.

The code changes look good. Before we can complete the technical review, approve, and merge this pull request, we have one final requirement for all contributors: Please star the DoubtDesk repository.

Once you have starred the repository, please drop a comment here saying "done" (or we will automatically detect it) and we will proceed with approving and merging your PR. Thank you.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Walkthrough

The Footer component is updated to route contact navigation to an internal /contact page instead of mailto links, restructures footer link sections with consistent Next.js Link components and styling, and adds conditional logic that distinguishes between internal and external social icon URLs.

Changes

Footer Navigation and Routing

Layer / File(s) Summary
Code syntax and import updates
src/components/Footer.tsx
The "use client" directive and lucide-react import are updated with trailing semicolons.
Contact routing data restructure
src/components/Footer.tsx
Community navigation links are expanded to include "Report Issue" and "Contact" entries. Social links data is updated to replace mailto contact destination with internal /contact route and adjusted labels/aria text.
Footer markup refactoring and smart link rendering
src/components/Footer.tsx
Platform, Resources, and Community link sections are refactored to use consistent Next.js Link components with chevron icons and unified hover/transition styling. Footer description text is replaced. Social icon rendering branches on href type: internal / hrefs use Next.js Link, external URLs use <a target="_blank">. Copyright formatting is updated.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (4 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 change: updating footer links to route to an internal /contact page instead of mailto.
Linked Issues check ✅ Passed The PR successfully addresses issue #388 by replacing the broken mailto Contact link with an internal /contact route and adding conditional rendering for internal vs external social links.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the Contact page navigation. Minor refactoring of link lists and social icon rendering align with the objective to properly connect the contact 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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Copy Markdown

@coderabbitai review

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Hello there! 🎉 Thank you so much for your first pull request to DoubtDesk!

We really appreciate your contribution. A maintainer will review your code soon. If you are participating in GSSoC, ensure your PR is linked to an open issue. Please make sure you have followed all rules in our Contributing Guidelines. Happy coding!

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label May 28, 2026
@github-actions github-actions Bot added the level:critical Critical level task label May 28, 2026
Comment thread src/components/Footer.tsx
@@ -1,4 +1,4 @@
"use client"
"use client";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: The new client directive forces this footer to be hydrated on the browser even though it only renders static JSX and links. Since this component is mounted from the root layout, this adds unnecessary JavaScript to every page load and hurts performance. Remove the client directive unless you actually need client-only APIs (state/effects/browser APIs or interactive Clerk components) in this file. [performance]

Severity Level: Major ⚠️
- ⚠️ Root layout footer adds unnecessary client bundle overhead.
- ⚠️ Every route pays extra hydration cost for footer.
Steps of Reproduction ✅
1. Start the app with `npm run dev` so that the root layout at
`src/app/layout.tsx:108-132` is used, which imports `Footer` at line 7 and renders
`<Footer />` at line 125 for every page.

2. Open `src/components/Footer.tsx` and observe that it is marked as a Client Component
via the `"use client";` directive at line 1, while its implementation (lines 3-103,
114-77) only uses static JSX, `next/link`, `next/image`, simple data like `const
currentYear = new Date().getFullYear();` at line 82, and does not use React state,
effects, browser APIs, or the imported Clerk components (`SignedIn`, `SignedOut` at line 5
are unused).

3. Load the home page implemented in `src/app/page.tsx` in the browser and inspect the
React tree or network panel; you will see that a client bundle for `Footer` is downloaded
and hydrated because of the `"use client";` directive in `Footer.tsx`, even though all
footer content could be rendered purely on the server.

4. Navigate between routes (e.g., `/`, `/rooms`, `/dashboard`) and observe that this
unnecessary client hydration of `Footer` repeats on every page load since `Footer` is part
of `RootLayout`, adding avoidable JavaScript and runtime cost across the app.

Fix in Cursor | Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** src/components/Footer.tsx
**Line:** 1:1
**Comment:**
	*Performance: The new client directive forces this footer to be hydrated on the browser even though it only renders static JSX and links. Since this component is mounted from the root layout, this adds unnecessary JavaScript to every page load and hurts performance. Remove the client directive unless you actually need client-only APIs (state/effects/browser APIs or interactive Clerk components) in this file.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 28, 2026

CodeAnt AI finished reviewing your PR.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/Footer.tsx (1)

57-79: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove duplicate and unused socialLinks definition.

This module-level socialLinks definition is shadowed by the identical definition inside the Footer component at lines 84-103. The module-level definition is never used and creates unnecessary duplication.

🧹 Proposed fix

Remove lines 57-79 entirely, as the component uses the local definition at lines 84-103.

-const socialLinks = [
-  {
-    icon: Linkedin,
-    href: "https://www.linkedin.com/",
-    label: "LinkedIn",
-    ariaLabel: "Visit DoubtDesk on LinkedIn",
-    hoverColor: "hover:text-blue-500 dark:hover:text-blue-400",
-  },
-  {
-    icon: Github,
-    href: "https://github.com/knoxiboy/DoubtDesk",
-    label: "GitHub",
-    ariaLabel: "Visit the DoubtDesk GitHub repository",
-    hoverColor: "hover:text-slate-900 dark:hover:text-slate-300",
-  },
-  {
-    icon: Mail,
-    href: "/contact",
-    label: "Email",
-    ariaLabel: "Email the DoubtDesk team",
-    hoverColor: "hover:text-purple-500 dark:hover:text-purple-400",
-  },
-];
🤖 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 `@src/components/Footer.tsx` around lines 57 - 79, Remove the unused
module-level socialLinks array that duplicates the one inside the Footer
component: delete the top-level constant named socialLinks (the definition with
icon: Linkedin/Github/Mail, href, label, ariaLabel, hoverColor) so the Footer
component uses only its internal socialLinks; ensure no other code references
the removed module-level symbol and keep the Footer component's local
socialLinks at its current definition.
🧹 Nitpick comments (2)
src/components/Footer.tsx (2)

41-55: ⚡ Quick win

Hardcoded strings violate coding guidelines.

The labels "Report Issue" and "Contact" (and others in this data structure) are hardcoded strings. Per coding guidelines for **/*.tsx, strings should be extracted to constants for maintainability and potential i18n support.

♻️ Refactor to use constants

Consider extracting footer labels to a constants object:

const FOOTER_LABELS = {
  REPORT_ISSUE: "Report Issue",
  CONTACT: "Contact",
  // ... other labels
} as const;

Then reference them in the data structures:

  {
-   label: "Report Issue",
+   label: FOOTER_LABELS.REPORT_ISSUE,
    href: "https://github.com/knoxiboy/DoubtDesk/issues",
  },
- { label: "Contact", href: "/contact" },
+ { label: FOOTER_LABELS.CONTACT, href: "/contact" },

As per coding guidelines: "No hardcoded strings (use constants)" for files matching **/*.tsx.

🤖 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 `@src/components/Footer.tsx` around lines 41 - 55, The footer data currently
uses hardcoded label strings (e.g., "Report Issue", "Contact") which violates
the no-hardcoded-strings rule; create a constants object (e.g., FOOTER_LABELS
with keys REPORT_ISSUE, CONTACT, etc.) and replace all literal label usages in
the Footer component data structures and the communityIcons mapping (refer to
communityIcons and wherever the footer links/labels array is defined in
Footer.tsx) to reference FOOTER_LABELS.X constants instead, ensuring the mapping
keys and any lookups use the constant values consistently for maintainability
and i18n readiness.

135-136: ⚖️ Poor tradeoff

Extract hardcoded strings to constants.

The footer description and copyright text (and many other strings throughout the component) are hardcoded. Per coding guidelines for **/*.tsx, strings should be extracted to constants to improve maintainability and enable potential internationalization.

♻️ Example refactor
const FOOTER_TEXT = {
  DESCRIPTION: "Simplifying classroom doubt solving with AI-powered collaboration, smart discussions, and interactive virtual learning spaces.",
  COPYRIGHT: (year: number) => ${year} DoubtDesk. Built for collaborative AI-powered learning.`,
} as const;

Then use in JSX:

- Simplifying classroom doubt solving with AI-powered collaboration,
- smart discussions, and interactive virtual learning spaces.
+ {FOOTER_TEXT.DESCRIPTION}

- © {currentYear} DoubtDesk. Built for collaborative AI-powered
- learning.
+ {FOOTER_TEXT.COPYRIGHT(currentYear)}

As per coding guidelines: "No hardcoded strings (use constants)" for files matching **/*.tsx.

Also applies to: 326-327

🤖 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 `@src/components/Footer.tsx` around lines 135 - 136, Extract the hardcoded
footer strings in Footer.tsx into constants and replace JSX usages with those
constants; specifically create a constant object (e.g., FOOTER_TEXT) containing
DESCRIPTION and a COPYRIGHT factory (e.g., COPYRIGHT(year): string) and swap the
inline paragraph "Simplifying classroom doubt solving with AI-powered
collaboration, smart discussions, and interactive virtual learning spaces." and
the copyright text usages (the other hardcoded string around lines 326-327) to
use FOOTER_TEXT.DESCRIPTION and FOOTER_TEXT.COPYRIGHT(new Date().getFullYear())
respectively so the component no longer contains hardcoded strings.
🤖 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 `@src/components/Footer.tsx`:
- Around line 227-233: The Footer component now renders a Contact Link with
href="/contact", so update the test in src/__tests__/components/Footer.test.tsx
to stop asserting the old mailto href: search for assertions referencing
"mailto:karankmt.tripathi@gmail.com" or any getByRole/getByText that expects the
mailto and replace it with expect(screen.getByRole('link', { name: 'Contact'
})).toHaveAttribute('href', '/contact'); ensure the test imports/uses screen and
getByRole as in the existing test suite and run the test to confirm it passes
against the Footer component.

---

Outside diff comments:
In `@src/components/Footer.tsx`:
- Around line 57-79: Remove the unused module-level socialLinks array that
duplicates the one inside the Footer component: delete the top-level constant
named socialLinks (the definition with icon: Linkedin/Github/Mail, href, label,
ariaLabel, hoverColor) so the Footer component uses only its internal
socialLinks; ensure no other code references the removed module-level symbol and
keep the Footer component's local socialLinks at its current definition.

---

Nitpick comments:
In `@src/components/Footer.tsx`:
- Around line 41-55: The footer data currently uses hardcoded label strings
(e.g., "Report Issue", "Contact") which violates the no-hardcoded-strings rule;
create a constants object (e.g., FOOTER_LABELS with keys REPORT_ISSUE, CONTACT,
etc.) and replace all literal label usages in the Footer component data
structures and the communityIcons mapping (refer to communityIcons and wherever
the footer links/labels array is defined in Footer.tsx) to reference
FOOTER_LABELS.X constants instead, ensuring the mapping keys and any lookups use
the constant values consistently for maintainability and i18n readiness.
- Around line 135-136: Extract the hardcoded footer strings in Footer.tsx into
constants and replace JSX usages with those constants; specifically create a
constant object (e.g., FOOTER_TEXT) containing DESCRIPTION and a COPYRIGHT
factory (e.g., COPYRIGHT(year): string) and swap the inline paragraph
"Simplifying classroom doubt solving with AI-powered collaboration, smart
discussions, and interactive virtual learning spaces." and the copyright text
usages (the other hardcoded string around lines 326-327) to use
FOOTER_TEXT.DESCRIPTION and FOOTER_TEXT.COPYRIGHT(new Date().getFullYear())
respectively so the component no longer contains hardcoded strings.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 92e51d59-9ecc-4420-91ea-57fb66b88f2b

📥 Commits

Reviewing files that changed from the base of the PR and between 2e5b0a8 and e9cd69d.

📒 Files selected for processing (1)
  • src/components/Footer.tsx

Comment thread src/components/Footer.tsx
Comment on lines +227 to +233
<Link
href="/contact"
className="group flex items-center gap-1.5 transition-transform duration-200 hover:translate-x-0.5 hover:text-blue-500 dark:hover:text-blue-400"
>
<ChevronRight className="w-3.5 h-3.5 text-blue-500 shrink-0" />
<span>Contact</span>
</a>
</Link>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check the Footer test expectations for Contact link

rg -n "mailto:karankmt.tripathi@gmail.com" --type=ts --type=tsx -g "*Footer.test*"

Repository: knoxiboy/DoubtDesk

Length of output: 90


Update Footer test expectation for Contact link (/contact)

The component src/components/Footer.tsx now renders the Contact link as <Link href="/contact"> (link text: “Contact”), so any Footer test still asserting the old mailto:karankmt.tripathi@gmail.com href will fail.

Run a targeted search in src/__tests__/components/Footer.test.tsx to confirm what the test currently expects, and update it to:

expect(screen.getByRole('link', { name: 'Contact' })).toHaveAttribute('href', '/contact');
🤖 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 `@src/components/Footer.tsx` around lines 227 - 233, The Footer component now
renders a Contact Link with href="/contact", so update the test in
src/__tests__/components/Footer.test.tsx to stop asserting the old mailto href:
search for assertions referencing "mailto:karankmt.tripathi@gmail.com" or any
getByRole/getByText that expects the mailto and replace it with
expect(screen.getByRole('link', { name: 'Contact' })).toHaveAttribute('href',
'/contact'); ensure the test imports/uses screen and getByRole as in the
existing test suite and run the test to confirm it passes against the Footer
component.

@knoxiboy knoxiboy removed level:critical Critical level task size:L This PR changes 100-499 lines, ignoring generated files labels May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc'26 GSSoC program issue level:beginner Beginner level task size/m type:docs Documentation update type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Contact Page Redirects to 404 Error Page

2 participants