Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(frontend): break out the sidebar into a reusable component + use it for admin page #9618

Open
wants to merge 6 commits into
base: ntindle/secrt-1139-verify-if-auth-pages-still-work
Choose a base branch
from

Conversation

ntindle
Copy link
Member

@ntindle ntindle commented Mar 12, 2025

We need a sidebar for the admin page, might as well reuse the reusable component to do so!

Changes 🏗️

  • Extracts the agptui sidebar to a more reusable component
  • Update the usage of that sidebar in the settings page
  • Use that same sidebar for the admin page

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • Test the old sidebar
    • Test the new sidebar for admin

@ntindle ntindle requested a review from a team as a code owner March 12, 2025 03:23
@ntindle ntindle requested review from Bentlybro and majdyz and removed request for a team March 12, 2025 03:23
@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end labels Mar 12, 2025
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Unused Import

The ShoppingBag icon is imported in the admin layout file but not used anywhere in the component.

import Link from "next/link";
Potential Bug

The key for the Link components uses both href and index which could cause issues if the same href appears multiple times in different link groups. Consider using a more unique key.

<Link
  key={`${link.href}-${index}`}
  href={link.href}
  className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
Unused Import

The LogOut icon is imported but not used anywhere in the component.

import { Users, DollarSign, LogOut } from 'lucide-react';

Copy link

deepsource-io bot commented Mar 12, 2025

Here's the code health analysis summary for commits fefd48a..a5c2f0a. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ Success
❗ 4 occurences introduced
🎯 5 occurences resolved
View Check ↗
DeepSource Python LogoPython✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end Review effort 2/5 size/l
Projects
Status: 🆕 Needs initial review
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant