Skip to content

fix: remove duplicate logout button from dashboard page#54

Open
madhavbansal3006 wants to merge 2 commits into
kunalverma2512:mainfrom
madhavbansal3006:fix/duplicate-logout-button
Open

fix: remove duplicate logout button from dashboard page#54
madhavbansal3006 wants to merge 2 commits into
kunalverma2512:mainfrom
madhavbansal3006:fix/duplicate-logout-button

Conversation

@madhavbansal3006
Copy link
Copy Markdown

@madhavbansal3006 madhavbansal3006 commented May 15, 2026

Fixes #49

Removed the duplicate logout button hardcoded inside
the Dashboard header. The navbar already has a logout
button. Also cleaned up unused imports and functions.

Summary by CodeRabbit

  • Refactor
    • Removed the Logout button and the local logout action from the dashboard header, simplifying the header UI.
    • Navigation flow on the dashboard streamlined (no in-header logout redirect).
    • Dashboard behavior otherwise unchanged: loading state, external connection widgets, and AI insights/modal flows remain intact.

Review Change Stack

@github-actions
Copy link
Copy Markdown

🚀 PR Received Successfully

Hello @madhavbansal3006,

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: 655e9f5b-8116-4d71-bc8d-491731369ec2

📥 Commits

Reviewing files that changed from the base of the PR and between fb4650c and dd69b9d.

📒 Files selected for processing (1)
  • frontend/src/pages/DashboardPage.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/pages/DashboardPage.jsx

📝 Walkthrough

Walkthrough

DashboardPage stops destructuring logout from useAuth, removes the local handleLogout function, and deletes the header "Logout" button so the dashboard no longer initiates logout; navbar remains the single logout trigger.

Changes

Remove Duplicate Logout Button

Layer / File(s) Summary
Remove inline logout usage and header button
frontend/src/pages/DashboardPage.jsx
useAuth is now destructured to only user and loading; the component-local handleLogout (which called logout() and navigated to /) is removed; the header "Logout" button and its onClick handler are deleted.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nudged the extra button far away,
The navbar guards the single way.
One handler hopped off, out of sight—
Dashboard stays tidy, neat, and light. 🥕

🚥 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 pull request title accurately describes the main change: removing a duplicate logout button from the dashboard page.
Linked Issues check ✅ Passed The code changes directly address issue #49 by removing the hardcoded duplicate logout button and its unused handler from DashboardPage.
Out of Scope Changes check ✅ Passed All changes are scoped to removing the duplicate logout functionality from DashboardPage; no unrelated modifications are present.

✏️ 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.

@kunalverma2512
Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kunalverma2512
Copy link
Copy Markdown
Owner

@madhavbansal3006 provide video for this change

@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 kunalverma2512 added enhancement New feature or request good first issue Good for newcomers Frontend UI/UX labels May 15, 2026
@madhavbansal3006
Copy link
Copy Markdown
Author

@madhavbansal3006 provide video for this change

Hi @kunalverma2512,

Since the fix removes a hardcoded button from the code,
here is a before/after comparison:

Before: Two logout buttons were visible — one in navbar
and one inside the dashboard body

After: Only the navbar logout button remains. The duplicate
button and its unused handleLogout function have been removed.

I can provide a demo video if you can share how to
run the project locally, because i am facing problem in creating account on website.

@kunalverma2512
Copy link
Copy Markdown
Owner

@madhavbansal3006 in telegram group you can discuss with peers
make sure to join telegram group and channel

@kunalverma2512
Copy link
Copy Markdown
Owner

@madhavbansal3006 provide video for this change

Hi @kunalverma2512,

Since the fix removes a hardcoded button from the code, here is a before/after comparison:

Before: Two logout buttons were visible — one in navbar and one inside the dashboard body

After: Only the navbar logout button remains. The duplicate button and its unused handleLogout function have been removed.

I can provide a demo video if you can share how to run the project locally, because i am facing problem in creating account on website.

show a video for your work

@madhavbansal3006
Copy link
Copy Markdown
Author

@madhavbansal3006 provide video for this change

Hi @kunalverma2512,
Since the fix removes a hardcoded button from the code, here is a before/after comparison:
Before: Two logout buttons were visible — one in navbar and one inside the dashboard body
After: Only the navbar logout button remains. The duplicate button and its unused handleLogout function have been removed.
I can provide a demo video if you can share how to run the project locally, because i am facing problem in creating account on website.

show a video for your work

I have attached the 'after' screenshot. Since I am having trouble with the local account creation/login to capture a video, please let me know if there are specific logs or setup steps I should check to get the dashboard fully running for a demo.
Screenshot 2026-05-15 211104

@kunalverma2512
Copy link
Copy Markdown
Owner

@madhavbansal3006 you havent discussed in community , then how will you are going to understand codebase

@madhavbansal3006
Copy link
Copy Markdown
Author

Hi @kunalverma2512,

Thanks for the feedback! I wasn't aware that discussing in the community first was a requirement before submitting a PR. I'll definitely follow that process from now on.

Could you guide me to the right place to have these discussions (Discord, GitHub Discussions, etc.)? I want to contribute properly and understand the codebase better with the community's help.

Please let me know how you'd like me to proceed with this PR.

@kunalverma2512
Copy link
Copy Markdown
Owner

join this community group and try to be active from now - click here

Copy link
Copy Markdown

@Deniwn22 Deniwn22 left a comment

Choose a reason for hiding this comment

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

Good improvement overall. One edge case: empty string vs null aren't treated the same downstream — might need a normalization step.

@madhavbansal3006
Copy link
Copy Markdown
Author

Hi @Deniwn22, thank you for the review!

I've resolved the merge conflict in DashboardPage.jsx. Regarding your edge case feedback about empty string vs null — I'll add a normalization step to handle both cases consistently before the data flows downstream.

Will push the updated changes shortly. Please have a look once done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Frontend good first issue Good for newcomers UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Duplicate logout button appears on Dashboard page

3 participants