Skip to content

Profile icon position#1699

Merged
ragnep merged 2 commits intomainfrom
profile-icon-position
Jan 6, 2026
Merged

Profile icon position#1699
ragnep merged 2 commits intomainfrom
profile-icon-position

Conversation

@ragnep
Copy link
Copy Markdown
Contributor

@ragnep ragnep commented Jan 5, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Profile navigation item to the sidebar with authentication-backed functionality for quick access to user profiles.
  • Refactor

    • Reorganized sidebar navigation structure for improved component separation and maintainability.

✏️ Tip: You can customize this high-level summary in your review settings.

ragnep added 2 commits January 5, 2026 15:05
Signed-off-by: ragnep <ragneinfo@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 5, 2026

📝 Walkthrough

Walkthrough

Profile navigation logic is refactored from WebSidebarNav to WebSidebar. The parent component's props expand to include mobile/offcanvas state handlers and sidebar dimensions, while authenticating profile paths via useAuth hook and rendering the Profile navigation item conditionally based on available profile data.

Changes

Cohort / File(s) Summary
Profile Navigation Logic Relocation
components/layout/sidebar/WebSidebar.tsx
Expanded props with onToggle, isMobile, isNarrow, isOffcanvasOpen, onCloseOffcanvas, sidebarWidth; added useMemo-based profile path computation using authentication data; conditional Profile NavItem rendering with UserIcon and active state binding.
Child Component Cleanup
components/layout/sidebar/WebSidebarNav.tsx
Removed SeizeConnectContext integration, profile path computation, and Profile navigation item rendering; removed related imports (UserIcon); retained MagnifyingGlassIcon usage.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • simo6529

Poem

🐰 A sidebar profile takes flight,
From nav child to parent's delight,
With useMemo's embrace,
And auth in its place,
The component tree shines ever bright!

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Profile icon position' accurately reflects the main change: relocating the profile navigation item from WebSidebarNav to WebSidebar component, which changes where the profile icon appears in the sidebar layout.
✨ Finishing touches
  • 📝 Generate docstrings

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.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 5, 2026

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: 0

🧹 Nitpick comments (1)
components/layout/sidebar/WebSidebar.tsx (1)

178-189: Verify active state detection for profile sub-routes.

The active state uses an exact match (pathname === profilePath), which means the Profile item won't be highlighted when navigating to sub-routes like /{handle}/drops or /{handle}/collected. Other nav items like Waves and Messages use startsWith for broader matching.

If profile sub-routes should also highlight the Profile nav item, consider:

🔎 Suggested change for sub-route matching
 <WebSidebarNavItem
   href={profilePath}
   icon={UserIcon}
   iconSizeClass="tw-h-6 tw-w-6"
-  active={pathname === profilePath}
+  active={pathname?.startsWith(profilePath) || false}
   collapsed={shouldShowCollapsed}
   label="Profile"
 />
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9247c8f and a19ab55.

📒 Files selected for processing (2)
  • components/layout/sidebar/WebSidebar.tsx
  • components/layout/sidebar/WebSidebarNav.tsx
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Do not include any comments in the code; it should be self-explanatory
Write correct, up-to-date, bug-free, fully componentized, secure, and efficient code
Include all required imports and ensure proper naming of key components
Use NextJS features that match the current version

**/*.{ts,tsx,js,jsx}: Remove unnecessary Effects. If the Effect's only job is to derive or sync internal state, calculate during render or use useMemo instead.
Use useEffectEvent for non-reactive logic inside Effects to read the latest props/state without turning them into dependencies or causing unnecessary re-runs.
Use explicit caching with "use cache" directive at the top of Server Components, routes, or functions. Configure cacheComponents: true in next.config.ts as needed.

**/*.{ts,tsx,js,jsx}: Remove unnecessary Effects; if the Effect only derives state, compute during render instead
Use useEffectEvent when listening to external events but needing the latest props/state without re-running the Effect
Move data fetching from client Effects to Server Components; mutations go through Server Actions ('use server')

Files:

  • components/layout/sidebar/WebSidebarNav.tsx
  • components/layout/sidebar/WebSidebar.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{tsx,jsx}: Use FontAwesome for icons in React components
Use TailwindCSS for styling in React components
Use react-query for data fetching
Always add readonly before props in React components

**/*.{tsx,jsx}: Use internal links via <Link> component from Next.js instead of <a> tags
Replace <img> elements with <Image /> from next/image

Files:

  • components/layout/sidebar/WebSidebarNav.tsx
  • components/layout/sidebar/WebSidebar.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

Run npm run lint to ensure code satisfies ESLint (Next's Core Web Vitals + React Hooks). Code must pass linting before completing any task.

**/*.{js,ts,jsx,tsx}: Code must satisfy ESLint with Next's Core Web Vitals and React Hooks rules by running npm run lint
Do not add eslint-disable comments unless explicitly instructed; prefer refactors aligned with React 19.2, React Compiler, and Next.js 16 conventions

Files:

  • components/layout/sidebar/WebSidebarNav.tsx
  • components/layout/sidebar/WebSidebar.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

**/*.{jsx,tsx}: Replace <img> elements with <Image /> from next/image to comply with Next.js ESLint rule @next/next/no-img-element.
Use <Link href="/path"> from Next.js for internal navigation instead of raw <a> tags to comply with @next/next/no-html-link-for-pages.

Files:

  • components/layout/sidebar/WebSidebarNav.tsx
  • components/layout/sidebar/WebSidebar.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

Use TypeScript with React functional components and hooks. Follow existing code style and naming conventions.

Files:

  • components/layout/sidebar/WebSidebarNav.tsx
  • components/layout/sidebar/WebSidebar.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript with React functional components and hooks

Files:

  • components/layout/sidebar/WebSidebarNav.tsx
  • components/layout/sidebar/WebSidebar.tsx
**/*.{tsx,ts,jsx,js}

📄 CodeRabbit inference engine (AGENTS.md)

Prefer direct named imports from React (useMemo, useRef, FC) over React. namespace usage

Files:

  • components/layout/sidebar/WebSidebarNav.tsx
  • components/layout/sidebar/WebSidebar.tsx
🧠 Learnings (3)
📚 Learning: 2025-11-25T08:35:58.729Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{tsx,jsx} : Use FontAwesome for icons in React components

Applied to files:

  • components/layout/sidebar/WebSidebarNav.tsx
📚 Learning: 2025-12-30T14:32:19.339Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.339Z
Learning: Applies to **/*.{tsx,ts,jsx,js} : Prefer direct named imports from React (`useMemo`, `useRef`, `FC`) over `React.` namespace usage

Applied to files:

  • components/layout/sidebar/WebSidebarNav.tsx
  • components/layout/sidebar/WebSidebar.tsx
📚 Learning: 2025-12-30T14:32:19.339Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.339Z
Learning: Applies to **/*.{tsx,ts} : Use TypeScript with React functional components and hooks

Applied to files:

  • components/layout/sidebar/WebSidebarNav.tsx
🧬 Code graph analysis (1)
components/layout/sidebar/WebSidebar.tsx (2)
components/auth/Auth.tsx (1)
  • useAuth (117-119)
hooks/useIdentity.ts (1)
  • useIdentity (18-34)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
components/layout/sidebar/WebSidebarNav.tsx (1)

18-18: LGTM!

The import cleanup aligns with moving the Profile navigation item to WebSidebar.tsx. Only MagnifyingGlassIcon remains in use for the Search item.

components/layout/sidebar/WebSidebar.tsx (2)

4-14: LGTM!

The new imports are correctly added for the Profile navigation feature: useMemo for memoization, useAuth for accessing the connected profile, WebSidebarNavItem for rendering the nav item, and UserIcon from heroicons (consistent with MagnifyingGlassIcon usage in WebSidebarNav).


43-47: LGTM!

The profilePath computation correctly prioritizes the authenticated handle over the wallet address, with proper fallback to null when neither is available. The memoization dependencies are correct.

@ragnep ragnep merged commit a8e5cb5 into main Jan 6, 2026
9 checks passed
@ragnep ragnep deleted the profile-icon-position branch January 6, 2026 07:13
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