Skip to content

Fix/remove dashboard logout button#56

Open
Harkiratcodess wants to merge 6 commits into
kunalverma2512:mainfrom
Harkiratcodess:fix/remove-dashboard-logout-button
Open

Fix/remove dashboard logout button#56
Harkiratcodess wants to merge 6 commits into
kunalverma2512:mainfrom
Harkiratcodess:fix/remove-dashboard-logout-button

Conversation

@Harkiratcodess
Copy link
Copy Markdown

@Harkiratcodess Harkiratcodess commented May 15, 2026

Closes #49

The dashboard header contained a Logout button that duplicated the one
already present in the navbar. This created redundant UI and inconsistent
UX users had two ways to logout from the same page with no added value.

The in-header button has been removed. Cleanup includes:

  • Removed Logout button from the dashboard header
  • Removed unused handleLogout function
  • Removed unused logout from useAuth destructure
  • Removed unused useNavigate and navigate
  • Simplified header className (removed flex/justify classes that only
    existed to position the button)

Before:
Screenshot 2026-05-15 033022

After:
Screenshot 2026-05-15 180725

Summary by CodeRabbit

  • Refactor

    • Restructured the desktop "Tools" mega menu to render consistently and use visual-state controls (open/closed) for smoother interactions; simplified item/submenu rendering and removed legacy footer and border/title elements.
    • Removed the Logout button from the dashboard page header.
  • Style

    • Updated navigation panel layout, spacing, padding, and accent bar sizing; adjusted mobile behavior for action items.

Review Change Stack

@github-actions
Copy link
Copy Markdown

🚀 PR Received Successfully

Hello @Harkiratcodess,

Thank you for taking the initiative to contribute to this project.

Please ensure that your PR follows all project guidelines properly before requesting review.

⚠️ Important Instructions

  • Maintain proper code quality and structure
  • Do not make unnecessary changes/files
  • Ensure responsiveness across devices
  • Follow existing project conventions strictly
  • Attach screenshots/videos for UI-related changes
  • Resolve merge conflicts before requesting review
  • Avoid AI-generated low quality PRs or copied implementations

📌 Mandatory for GSSoC'26 Participants

Joining the community group and announcement channel is compulsory for all contributors participating through GSSoC'26.

Failure to follow contribution guidelines may lead to PR rejection.

We appreciate your effort and wish you a great open-source journey ahead. ✨

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4d8f9b3f-d1af-47cc-a023-09f26278aba8

📥 Commits

Reviewing files that changed from the base of the PR and between e155311 and 72b87c1.

⛔ Files ignored due to path filters (1)
  • server/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • frontend/src/pages/DashboardPage.jsx

📝 Walkthrough

Walkthrough

DashboardPage keeps a local handleLogout helper (calls logout() then navigates to /) but the page header’s “Logout” button was removed; Navbar’s Tools mega menu now always renders and uses conditional Tailwind classes plus aria-hidden to reflect open state and avoids passing to to button elements; App.jsx had whitespace-only formatting edits.

Changes

Logout button deduplication and Navbar accessibility improvements

Layer / File(s) Summary
DashboardPage logout adjustment
frontend/src/pages/DashboardPage.jsx
React Router imports updated; local handleLogout helper remains (calls logout() then navigates to /) but the header “Logout” button was removed, and the header container className was adjusted.
Navbar mega menu rendering and mobile wrapper fixes
frontend/src/components/shared/Navbar.jsx
Desktop Tools mega menu now renders unconditionally and controls visibility with conditional Tailwind classes (opacity, translate/scale, visible/invisible) and aria-hidden; menu layout/styling and item rendering were updated to choose Link vs button by item.to; mobile wrapper no longer passes to to button elements and sets type="button" for them.
App formatting cleanup
frontend/src/App.jsx
Whitespace-only changes: empty line after the import block and adjustments to blank lines around the </Routes> closing tag; no functional changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hop, hop—one logout stays, the page is clear,
The mega menu whispers, now both calm and near.
Links find their lanes, buttons keep their place,
A tidy navbar spring, with accessible grace. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR description claims only the logout button was removed, but the code changes show removal of handleLogout function, logout destructure, and useNavigate—scope creep beyond issue #49's requirement. Revert cleanup of handleLogout, logout, and useNavigate to focus solely on removing the logout button as requested in issue #49.
Out of Scope Changes check ⚠️ Warning Changes include removal of handleLogout function, logout from useAuth destructure, and useNavigate imports—these exceed the scope of removing the duplicate logout button from issue #49. Remove only the logout button UI element and its onClick handler binding; keep all supporting code (handleLogout, logout, useNavigate) that may be needed for future use.
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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Fix/remove dashboard logout button' directly and accurately summarizes the main change—removing the duplicate logout button from the dashboard.

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

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

🤖 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 `@frontend/src/components/shared/Navbar.jsx`:
- Around line 212-217: The inline style transform ("translateX(-50%)") on the
dropdown element overrides Tailwind's runtime transforms used for the open/close
animation (the className block that toggles based on megaOpen), preventing the
translate-y/scale transitions from running; remove the style prop and instead
apply Tailwind's horizontal centering class (e.g., -translate-x-1/2 together
with left-1/2) in the same className string so the element keeps the X-centering
without clobbering the translate-y/scale transitions controlled by megaOpen.
🪄 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

Run ID: 97bb81f0-6740-41ba-892e-e03794c7fe8d

📥 Commits

Reviewing files that changed from the base of the PR and between 12e4428 and e155311.

📒 Files selected for processing (3)
  • frontend/src/App.jsx
  • frontend/src/components/shared/Navbar.jsx
  • frontend/src/pages/DashboardPage.jsx

Comment thread frontend/src/components/shared/Navbar.jsx
@kunalverma2512
Copy link
Copy Markdown
Owner

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

✅ Actions performed

Full review triggered.

@kunalverma2512
Copy link
Copy Markdown
Owner

@Harkiratcodess dont clean up in this PR
just focus on to remove that logout button and come up with errorless code

@Harkiratcodess
Copy link
Copy Markdown
Author

Hey @kunalverma2512, made the changes removed only the logout button from the dashboard header, no other cleanup. Please review when you get a chance

@kunalverma2512
Copy link
Copy Markdown
Owner

From next time make sure to not do unneccesary changes and unneceesary spaces in files

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.

bug: Duplicate logout button appears on Dashboard page

2 participants