Skip to content

....docs #26

Merged
RISHIK92 merged 2 commits into
RISHIK92:mainfrom
Smanikanta21:main
Apr 13, 2026
Merged

....docs #26
RISHIK92 merged 2 commits into
RISHIK92:mainfrom
Smanikanta21:main

Conversation

@Smanikanta21
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 13, 2026 06:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the documentation page to use a shared DocumentationContent component, updates docs navigation behavior in the sidebar, and adds a docs entrypoint within the dashboard UI.

Changes:

  • Replace the /docs page’s inline content with a reusable DocumentationContent component.
  • Update docs sidebar “active section” tracking to use a scroll listener instead of IntersectionObserver.
  • Add a dashboard docs page and navigation link; update app metadata (title/icons).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
frontend/components/docs/Sidebar.tsx Switches active-section detection to scroll-based logic for the docs sidebar.
frontend/components/docs/DocumentationContent.tsx Introduces the shared documentation content component used across routes.
frontend/components/dashboard/LogoutButton.tsx Changes post-logout redirect target.
frontend/app/layout.tsx Updates metadata title and adds icon metadata entries.
frontend/app/docs/page.tsx Replaces the docs page body with DocumentationContent and new wrapper markup.
frontend/app/dashboard/layout.tsx Adds a “Documentation” link in the dashboard header.
frontend/app/dashboard/docs/page.tsx Adds a dashboard-scoped docs page rendering DocumentationContent.
Comments suppressed due to low confidence (1)

frontend/app/layout.tsx:28

  • SearchModal is imported but not used in RootLayout. Please remove the unused import (or render the modal) to avoid lint/build failures.
};

import { SearchModal } from "@/components/ui/SearchModal";
import Footer from "@/components/Footer";


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +39 to +47
// Run once on mount
setTimeout(handleScroll, 200);

return () => observer.disconnect();
// Attach to scroll listener
window.addEventListener('scroll', handleScroll, { passive: true });

return () => {
window.removeEventListener('scroll', handleScroll);
};
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

The setTimeout(handleScroll, 200) is never cleared. If the sidebar unmounts quickly (route change), handleScroll can still run and call setActiveId after unmount. Store the timeout id and clearTimeout it in the cleanup, or call handleScroll() synchronously/with requestAnimationFrame instead of setTimeout.

Copilot uses AI. Check for mistakes.
"compile_output": null
}`;
import DocumentationContent from '@/components/docs/DocumentationContent';
import Link from 'next/link';
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

Link is imported but never used in this page. Please remove the unused import to avoid lint/build failures.

Suggested change
import Link from 'next/link';

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +10
<main className="flex-1 w-full max-w-4xl mx-auto py-12 px-6">
<DocumentationContent />
</main>
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

This page renders a <main> element, but frontend/app/docs/layout.tsx already wraps children in <main>. Nesting <main> elements is invalid HTML and can confuse assistive technologies. Use a <div> here (or remove the extra wrapper) and let the layout own the single <main> landmark.

Suggested change
<main className="flex-1 w-full max-w-4xl mx-auto py-12 px-6">
<DocumentationContent />
</main>
<div className="flex-1 w-full max-w-4xl mx-auto py-12 px-6">
<DocumentationContent />
</div>

Copilot uses AI. Check for mistakes.
Comment thread frontend/app/layout.tsx
export const metadata: Metadata = {
title: "Velox | High-Performance Code Execution",
title: "Velox Engine",
description: "A distributed, high-performance Online Code Judger and Remote Code Execution Engine built for developers.",
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

Spelling: the metadata description says "Online Code Judger"; this should be "Online Code Judge".

Suggested change
description: "A distributed, high-performance Online Code Judger and Remote Code Execution Engine built for developers.",
description: "A distributed, high-performance Online Code Judge and Remote Code Execution Engine built for developers.",

Copilot uses AI. Check for mistakes.
Comment on lines 10 to 12
// Clear the authentication token
localStorage.removeItem('token');
// Redirect to the login page
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

Logout is clearing localStorage.removeItem('token'), but the rest of the app uses velox_token (e.g., login sets velox_token and API interceptors read/remove it). As-is, clicking logout likely leaves the user authenticated. Update this to remove the correct key (and consider also updating the comment that still says it redirects to the login page).

Suggested change
// Clear the authentication token
localStorage.removeItem('token');
// Redirect to the login page
// Clear the authentication token used by the app
localStorage.removeItem('velox_token');
// Redirect to the home page

Copilot uses AI. Check for mistakes.
@RISHIK92 RISHIK92 merged commit ed605d2 into RISHIK92:main Apr 13, 2026
13 of 14 checks passed
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.

3 participants