Skip to content

fix: add dynamic page titles for all routes#220

Open
Ruchita564 wants to merge 1 commit into
kunalverma2512:mainfrom
Ruchita564:feat-page-titles-152
Open

fix: add dynamic page titles for all routes#220
Ruchita564 wants to merge 1 commit into
kunalverma2512:mainfrom
Ruchita564:feat-page-titles-152

Conversation

@Ruchita564

Copy link
Copy Markdown

Implemented unique page titles across frontend pages.

Each page now displays a descriptive browser tab title following the format:
{Page Name} - CodeLens

This improves:

  • Browser tab identification
  • SEO and search indexing
  • User experience across multiple open tabs

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@Ruchita564 is attempting to deploy a commit to the Kunal Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

🎉 Welcome to CodeLens — Thank You for Your Contribution!

Hey @Ruchita564! 👋

We are genuinely excited to have you here. Every single PR — big or small — makes CodeLens better, and yours is no exception. Take a moment to review the checklist below to help us merge your work quickly and smoothly.

✅ Before Requesting a Review

  • Keep code clean, readable, and consistent with the existing codebase
  • Avoid unrelated or unnecessary file changes
  • Make sure the UI is fully responsive across all device sizes
  • Attach screenshots or a short screen recording for any UI changes
  • Resolve all merge conflicts before marking the PR as ready
  • Do not submit AI-generated, copy-pasted, or low-effort implementations

💬 Join Our Community Channel — This is Mandatory

Being part of our communication channel is compulsory for all contributors, not optional.

📡 Join the CodeLens Matrix Channel

Why join? This is where all important announcements, PR review updates, contribution discussions, and maintainer decisions happen in real time. Contributors who are not in the channel regularly miss critical context and updates, which often leads to duplicated or misaligned work. Staying connected here is what keeps the community strong and your contributions impactful.


We are rooting for you! If you have any questions, drop them in the channel or comment right here on this PR. Let's build something great together. 🚀✨

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ 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 and usage tips.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

@kunalverma2512

Copy link
Copy Markdown
Owner

@coderabbitai please check this PR end to end

I think PR description is not as per PR template so indicate this in detail so that contributor can do the work more nicely and easily.

Please check whether the coding done in this PR is compatible with our codebase or not ?

Also check very honestly that is the coding done in each file was required according to this PR or not ?
Make sure that this PR work/coding does not make any UI distortion and error in production
atlast tell is this PR ready to merge or not ?

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

REPO="kunalverma2512/CodeLens"
PR_NUMBER=220

echo "=== PR Details ==="
gh pr view $PR_NUMBER --repo $REPO --json title,body,author,state,baseRefName,headRefName,files,additions,deletions

echo ""
echo "=== PR Template ==="
fd -e md . .github --type f | xargs cat 2>/dev/null || echo "No PR template found via fd"
cat .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null || cat .github/pull_request_template.md 2>/dev/null || echo "Template not found at default path"

echo ""
echo "=== Changed Files ==="
gh pr diff $PR_NUMBER --repo $REPO --name-only

echo ""
echo "=== Full Diff ==="
gh pr diff $PR_NUMBER --repo $REPO

Length of output: 27626



@kunalverma2512 Here is a thorough end-to-end review of PR #220.


📋 1. PR Description vs Template — ❌ Does Not Follow Template

The contributor's PR description is a plain paragraph and is missing all of the required template sections. Here's what needs to be filled in:

Template Section Status
🔗 Related Issue (Closes #) ❌ Missing
📝 Changes Made (bullet list) ❌ Missing
📝 Motivation ❌ Missing
🚀 Type of Change (checkboxes) ❌ Missing
🧪 Testing / Verification checkboxes ❌ Missing
📸 Screenshots / Demo ❌ Missing — this is a UI-visible change
✅ Self-review checklist ❌ Missing
📚 Additional Notes ❌ Missing

Action for contributor: Rewrite the PR description following the .github/PULL_REQUEST_TEMPLATE.md exactly. Since this is a visual change (browser tab titles), screenshots of the tab bar across several pages are required.


🔍 2. Code Compatibility — ⚠️ Inconsistent (3 Different Approaches)

The PR uses three different methods to set page titles, which is architecturally inconsistent:

Method Pages Using It
Raw <title> JSX tag (React 19+) About, Account, ApexAI, ApexWorkspace, BugReports, all Contest pages, Dashboard, Explore, GitHubIntelligence
<Helmet> from react-helmet-async LandingPage, LoginPage, NotFoundPage, PracticePage, PrivacyPage
document.title via useEffect SignupPage only

This is a problem because:

  • Raw <title> in JSX is a React 19 feature. If this project runs on React 18, those title tags will render as visible <title> DOM nodes inside the page body, not in <head> — potentially causing visible text in the UI.
  • HelmetProvider was added to main.jsx, but most pages don't use <Helmet>. This setup is partially wasted.
  • document.title via useEffect is an older imperative pattern and won't work well with SSR if ever added.

The entire PR should pick ONE approach (preferably <Helmet> from react-helmet-async since HelmetProvider was already set up) and apply it consistently to all 20 pages.


🧐 3. Was the Coding in Each File Required? — ⚠️ Issues Found

✅ Pages where the change is appropriate:

Most contest pages, About, Account, BugReports, Dashboard, Explore, GitHubIntelligence, ApexAI — adding a title-only change is valid and in-scope.

AlgoVersePage.jsx — Out-of-Scope Changes + Missing Title

This file has the most problematic changes:

  • A filteredAlgorithms variable with search/filter logic was added — completely unrelated to page titles.
  • The "Filter Results" button was replaced with a static result-count <div> — this is a functional UI change that removes an interactive element without any explanation.
  • The actual page title was never added to AlgoVersePage. The PR's stated goal is unmet for this file.
- <button className="px-8 py-4 border-4 border-black bg-black text-white font-black uppercase tracking-widest hover:bg-white hover:text-black transition-colors">
-   Filter Results
- </button>
+ <div className="px-8 py-4 border-4 border-black bg-black text-white font-black uppercase tracking-widest">
+   {filteredAlgorithms.length} Results
+ </div>

This button removal reduces functionality (was it wired to something? Even cosmetically it's different) and is completely out of scope.

⚠️ SignupPage.jsx — Wrong Approach

Only a useEffect(() => { document.title = "Sign Up - CodeLens"; }, []) was added — no <Helmet>, no <title> tag. This is inconsistent with both other approaches in the PR.


🚨 4. UI Distortion / Production Risk — ❌ Critical Bug Found

Bug in ApexWorkspacePage.jsx — Typo in className

- <div className="flex items-center justify-between mt-1.5 px-0.5">
+ <div className="flex items-cent  er justify-between mt-1.5 px-0.5">

A space was injected inside items-center, turning it into items-cent and ertwo invalid Tailwind classes. The flex alignment of the chat input bar in the Apex Workspace page will break in production. This is a regression introduced by this PR.

Minor indentation issues

Across multiple files, the closing </div> or </main> tags have incorrect indentation introduced by the wrapping <>...</> fragments. This doesn't affect runtime but reduces code readability significantly.

Missing newline at end of file

At least 8 files are missing the trailing newline:
ApexWorkspacePage.jsx, ContestCodeforcesPage.jsx, DashboardPage.jsx, GitHubIntelligencePage.jsx, LandingPage.jsx, LoginPage.jsx, NotFoundPage.jsx, PracticePage.jsx


✅ 5. Merge Readiness — ❌ NOT Ready to Merge

Check Status
PR description follows template
Consistent title implementation
No out-of-scope changes ❌ (AlgoVersePage)
No UI regressions ❌ (ApexWorkspacePage typo)
AlgoVersePage has a page title
No missing newlines
Screenshots provided

📝 Summary for Contributor

Please address the following before this can be merged:

  1. Rewrite the PR description using the full .github/PULL_REQUEST_TEMPLATE.md template, including the linked issue number, type of change checkboxes, testing details, and screenshots of the browser tab titles.
  2. Standardize the title approach — choose <Helmet> from react-helmet-async (since HelmetProvider is already set up in main.jsx) and apply it to all pages consistently.
  3. Fix the typo in ApexWorkspacePage.jsx: items-cent eritems-center.
  4. Revert out-of-scope changes in AlgoVersePage.jsx (the filter logic and button replacement), and add the missing page title for that page.
  5. Fix SignupPage.jsx to use <Helmet> instead of document.title.
  6. Fix indentation in closing tags across all modified files.
  7. Add trailing newlines to all files that are missing them.

🐇 (´• ω •`) ♡

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.

2 participants