Skip to content

Fix: classroom chat button redirects to 404 navigation page.#694

Open
ArrushiTripathi2429 wants to merge 2 commits into
knoxiboy:mainfrom
ArrushiTripathi2429:fix/classroom-chat-env-659
Open

Fix: classroom chat button redirects to 404 navigation page.#694
ArrushiTripathi2429 wants to merge 2 commits into
knoxiboy:mainfrom
ArrushiTripathi2429:fix/classroom-chat-env-659

Conversation

@ArrushiTripathi2429

@ArrushiTripathi2429 ArrushiTripathi2429 commented Jun 23, 2026

Copy link
Copy Markdown

User description

Description

Classroom Chat sidebar button was redirecting to /chat on the main app, causing a 404 error. The chat-system runs as a separate Next.js app on a different port, but NEXT_PUBLIC_CHAT_SYSTEM_URL was missing from .env.example, so contributors didn't know to set it.

Related Issue

Closes #659

Changes

  • Add missing NEXT_PUBLIC_CHAT_SYSTEM_URL to .env.example with documentation
  • Remove duplicate nested grid <div> in features section causing JSX syntax error
  • Add missing scrollProgress useState and scroll event listener in page.tsx

Testing

Locally tested — chat system opens correctly on localhost:3001/chat when
env variable is set to http://localhost:3001

Screenshot

Screenshot 2026-06-18 185620

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

How Has This Been Tested?

  • Tested locally with npm run dev
  • Ran chat-system separately on localhost:3001
  • Confirmed Classroom Chat button redirects correctly when NEXT_PUBLIC_CHAT_SYSTEM_URL=http://localhost:3001 is set in .env.local

Checklist

  • I have tested my changes locally
  • I have not introduced unrelated changes
  • I have linked the related issue above

CodeAnt-AI Description

Add the Classroom Chat app URL to the environment setup

What Changed

  • Added the missing Classroom Chat environment variable to the example config
  • Documented that the chat system runs separately and should point to the chat app URL for local and production use

Impact

✅ Fewer setup errors for Classroom Chat
✅ Clearer local development setup

💡 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

  • Chores
    • Environment configuration updated with new chat system URL settings and deployment guidance for local and production environments.

- Add missing NEXT_PUBLIC_CHAT_SYSTEM_URL to .env.example
- Remove duplicate grid div in features section causing JSX syntax error
- Add missing scrollProgress state and scroll event listener
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@ArrushiTripathi2429 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.

@codeant-ai

codeant-ai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@github-actions github-actions Bot added gssoc'26 GSSoC program issue level:intermediate Intermediate level task type:bug Bug fix need-star labels Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

A new required environment variable section is added to .env.example for the classroom chat / peer-to-peer feature. The NEXT_PUBLIC_CHAT_SYSTEM_URL variable is documented with a local development URL (http://localhost:3001) and a placeholder production URL.

Changes

Chat System Environment Variable

Layer / File(s) Summary
Chat system URL environment variable
.env.example
Adds a new "Chat System" required section documenting NEXT_PUBLIC_CHAT_SYSTEM_URL with local (http://localhost:3001) and production URL guidance.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR successfully addresses issue #659 by adding the missing NEXT_PUBLIC_CHAT_SYSTEM_URL environment variable to .env.example, which resolves the root cause of the 404 error.
Out of Scope Changes check ✅ Passed The raw summary shows only changes to .env.example (+8/-0), which directly relates to the linked issue requirements. No out-of-scope changes are present in the actual merged code.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The PR title focuses on fixing a 404 error with the classroom chat button, which directly aligns with the main objective. However, the raw summary shows only .env.example changes (+8/-0), not the JSX fixes mentioned in the title context. The title is specific and clear about the problem being addressed.

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

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

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⭐ Star Required

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

Before we can complete the review and merge this pull request, please star the DoubtDesk repository.

Once you have starred the repository, please drop a comment here saying "done" and we will proceed with reviewing your PR. Thank you!

@github-actions

Copy link
Copy Markdown

@coderabbitai review

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Jun 23, 2026
@github-actions github-actions Bot removed the size:XS This PR changes 0-9 lines, ignoring generated files label Jun 23, 2026

@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

🤖 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 @.env.example:
- Around line 55-62: The .env.example file has formatting issues that need to be
corrected. Remove the extra blank lines that appear before the Chat System
configuration section comment. Additionally, ensure the file ends with a single
trailing newline after the NEXT_PUBLIC_CHAT_SYSTEM_URL variable assignment. The
Chat System section should have only one blank line separating it from any
preceding content, and the file should properly terminate with a newline
character.
🪄 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: 5423c30b-3523-4dce-b51f-7b7afe23a6b9

📥 Commits

Reviewing files that changed from the base of the PR and between e7adf9b and faddcc1.

📒 Files selected for processing (1)
  • .env.example

Comment thread .env.example
Comment on lines +55 to +62



# Chat System (Required for Classroom Chat & Peer-to-Peer features)
# Run the chat-system app separately and set its URL here.
# Local development: http://localhost:3001
# Production: https://your-chat-system.vercel.app
NEXT_PUBLIC_CHAT_SYSTEM_URL=http://localhost:3001 No newline at end of file

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove extra blank lines and add trailing newline.

Static analysis flags formatting issues: lines 56–57 have extra blank lines, and the file is missing a trailing blank line.

🔧 Proposed fix for formatting
---- unchanged lines 1-54 not shown ----

-
-
-
 # Chat System (Required for Classroom Chat & Peer-to-Peer features)
 # Run the chat-system app separately and set its URL here.
 # Local development: http://localhost:3001
 # Production: https://your-chat-system.vercel.app
 NEXT_PUBLIC_CHAT_SYSTEM_URL=http://localhost:3001
+
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Chat System (Required for Classroom Chat & Peer-to-Peer features)
# Run the chat-system app separately and set its URL here.
# Local development: http://localhost:3001
# Production: https://your-chat-system.vercel.app
NEXT_PUBLIC_CHAT_SYSTEM_URL=http://localhost:3001
# Chat System (Required for Classroom Chat & Peer-to-Peer features)
# Run the chat-system app separately and set its URL here.
# Local development: http://localhost:3001
# Production: https://your-chat-system.vercel.app
NEXT_PUBLIC_CHAT_SYSTEM_URL=http://localhost:3001
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 56-56: [ExtraBlankLine] Extra blank line detected

(ExtraBlankLine)


[warning] 57-57: [ExtraBlankLine] Extra blank line detected

(ExtraBlankLine)


[warning] 62-62: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)

🤖 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 @.env.example around lines 55 - 62, The .env.example file has formatting
issues that need to be corrected. Remove the extra blank lines that appear
before the Chat System configuration section comment. Additionally, ensure the
file ends with a single trailing newline after the NEXT_PUBLIC_CHAT_SYSTEM_URL
variable assignment. The Chat System section should have only one blank line
separating it from any preceding content, and the file should properly terminate
with a newline character.

Source: Linters/SAST tools

@ArrushiTripathi2429 ArrushiTripathi2429 changed the title Fix: classroom chat env #659 Fix: classroom chat button redirects to 404 navigation page. Jun 23, 2026
@knoxiboy knoxiboy added level:beginner Beginner level task and removed level:intermediate Intermediate level task labels Jun 23, 2026
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]: Classroom Chat button redirects to 404 Navigation Error page

2 participants