Skip to content

feat(ui): update sliding menu, onboarding progress bar, and add creator collaborations UI#151

Merged
Saahi30 merged 2 commits intodevfrom
feat/frontend-ui-components
Nov 10, 2025
Merged

feat(ui): update sliding menu, onboarding progress bar, and add creator collaborations UI#151
Saahi30 merged 2 commits intodevfrom
feat/frontend-ui-components

Conversation

@Saahi30
Copy link
Contributor

@Saahi30 Saahi30 commented Nov 10, 2025

📝 Description

This pull request updates and extends frontend UI components to improve user experience and support new collaboration features for creators. The changes enhance navigation, onboarding feedback, and introduce a dedicated collaborations interface.

🔧 Changes Made

  1. Updated SlidingMenu component for improved navigation and usability.
  2. Enhanced onboarding/ProgressBar component for better onboarding feedback.
  3. Added new creator collaborations UI under frontend/app/creator/collaborations/.

✅ Checklist

  • I have read the contributing guidelines.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if applicable).
  • Any dependent changes have been merged and published in downstream modules.

Summary by CodeRabbit

Release Notes

  • New Features
    • New Collaborations discovery hub for creators to find partnership opportunities
    • Two browsing modes: Browse all creators or get AI-powered recommendations based on collaboration ideas
    • Generate personalized collaboration ideas for each creator with ranked suggestions and explanations
    • View comprehensive creator profiles including bio, niches, social platforms, followers, and content types
    • AI recommendations include visual match scores and alternative creator suggestions

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Introduces a new creator collaboration discovery page with Browse and AI Matches tabs for finding and matching collaborators, alongside a corresponding navigation menu link. The Browse tab displays searchable creator cards with expandable details and collaboration idea generation; the AI Matches tab accepts collaboration ideas and recommends best-match creators with similarity scoring.

Changes

Cohort / File(s) Summary
New Collaborations Feature
frontend/app/creator/collaborations/page.tsx
Adds full-featured client-side page with two-tab interface: Browse tab loads creators via API with search, displays cards with expandable detail panels, generates collaboration ideas; AI Matches tab accepts collaboration input, fetches recommended creators with match scoring and alternatives, shows expandable details and idea generation. Includes loading states, error handling, modal for multiple ideas, and various UI polish elements.
Navigation Menu Update
frontend/components/SlidingMenu.tsx
Adds creator-only conditional menu item linking to /creator/collaborations with icon and "Collaborations" label.
Minor Formatting
frontend/components/onboarding/ProgressBar.tsx
Adds trailing newline at end of file.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Page as CollaborationsPage
    participant API as Backend API
    participant UI as UI Components

    rect rgb(240, 248, 255)
    note over User,UI: Browse Tab Flow
    User->>Page: View Browse Tab
    Page->>API: listCreators(search query)
    API-->>Page: Creator list
    Page->>UI: Render creator grid
    User->>Page: Click expand on creator
    Page->>API: getCreatorDetails(id)
    API-->>Page: Full creator details
    Page->>UI: Show expandable panel
    User->>Page: Click "Generate Ideas"
    Page->>API: generateCollaborationIdeas(creator_id)
    API-->>Page: Ideas list
    Page->>UI: Display first idea
    alt Multiple ideas
        User->>Page: View all ideas
        Page->>UI: Show modal with all ideas
    end
    end

    rect rgb(245, 255, 240)
    note over User,UI: AI Matches Tab Flow
    User->>Page: Activate AI Matches tab
    Page->>API: getCreatorRecommendations()
    API-->>Page: Recommendations
    User->>Page: Enter collaboration idea
    Page->>API: recommendCreatorForIdea(idea)
    API-->>Page: Recommended creator + match_score
    Page->>UI: Display match with score bar
    User->>Page: View creator or generate ideas
    Page->>API: getCreatorDetails(id) / generateIdeas()
    API-->>Page: Details or ideas
    Page->>UI: Render expanded details or ideas modal
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Specific areas requiring attention:
    • State management complexity: Multiple useState hooks managing tabs, loading states, expanded creators, collaboration ideas, AI recommendations, and match data
    • API integration patterns: Five distinct API endpoints called with varying triggers and error handling
    • Conditional rendering logic: Extensive nested conditionals for loading/error/empty states across two feature tabs
    • Modal/popup interactions: Collaboration ideas modal and expandable detail panels with data fetching on demand
    • Score formatting and UI styling: Custom formatting for match scores, social icons, verification badges

Possibly related PRs

  • FEAT: add SlidingMenu component #144: Extends SlidingMenu component to add creator-only navigation to collaborations feature, directly related to the menu link introduced in this PR.

Poem

🐰 Collaborators unite, through Browse and AI's light,
Where creators find their perfect match by day or night,
With ideas that sparkle, scores that glow,
A network of partnerships begins to grow! ✨

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 pull request title accurately summarizes the main changes: updating the sliding menu, onboarding progress bar, and adding a new creator collaborations UI, which directly correspond to the three files modified.

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.

@Saahi30
Copy link
Contributor Author

Saahi30 commented Nov 10, 2025

@CodeRabbit review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

✅ 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.

Copy link
Contributor

@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: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6930a57 and ca31438.

📒 Files selected for processing (3)
  • frontend/app/creator/collaborations/page.tsx (1 hunks)
  • frontend/components/SlidingMenu.tsx (1 hunks)
  • frontend/components/onboarding/ProgressBar.tsx (1 hunks)

Comment on lines +85 to +106
const handleExpand = async (creatorId: string) => {
if (expandedCreator === creatorId) {
// Collapse
setExpandedCreator(null);
setExpandedDetails(null);
setCollaborationIdeas([]);
} else {
// Expand
setExpandedCreator(creatorId);
setIsLoadingDetails(true);
setCollaborationIdeas([]);
try {
const details = await getCreatorDetails(creatorId);
setExpandedDetails(details);
} catch (err) {
console.error("Failed to load creator details:", err);
setError("Failed to load creator details.");
} finally {
setIsLoadingDetails(false);
}
}
};
Copy link
Contributor

@coderabbitai coderabbitai bot Nov 10, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Prevent stale creator details when switching cards quickly

getCreatorDetails resolves asynchronously, but we update expandedDetails unconditionally. If the user opens creator A, then immediately opens creator B, the request for A can finish last and overwrite the state so B’s card shows A’s bio and stats. Please tie the state update to the latest requested id (e.g. track it in a ref and bail when it no longer matches).

-import { useEffect, useState } from "react";
+import { useEffect, useRef, useState } from "react";+  const activeDetailsRequest = useRef<string | null>(null);
…
     if (expandedCreator === creatorId) {
       // Collapse
       setExpandedCreator(null);
       setExpandedDetails(null);
       setCollaborationIdeas([]);
+      activeDetailsRequest.current = null;
     } else {
       // Expand
       setExpandedCreator(creatorId);
       setIsLoadingDetails(true);
       setCollaborationIdeas([]);
       try {
-        const details = await getCreatorDetails(creatorId);
-        setExpandedDetails(details);
+        activeDetailsRequest.current = creatorId;
+        const details = await getCreatorDetails(creatorId);
+        if (activeDetailsRequest.current !== creatorId) return;
+        setExpandedDetails(details);
       } catch (err) {
🤖 Prompt for AI Agents
In frontend/app/creator/collaborations/page.tsx around lines 85 to 106, the
async getCreatorDetails call can race and overwrite expandedDetails with stale
data when switching creators quickly; add a ref (e.g. latestRequestedIdRef) and
set it to creatorId before calling getCreatorDetails, then after the await bail
if latestRequestedIdRef.current !== creatorId (skip
setExpandedDetails/setError), ensuring only the most recently requested creator
can update state; clear or reset the ref when collapsing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not necessary

Copy link
Contributor

Choose a reason for hiding this comment

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

@Saahi30, understood! I'll defer to your judgment on this. The current implementation should work fine for typical user interactions.

🐰📝
╱|、
(˚ˎ 。7
|、˜〵
じしˍ,)ノ

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@Saahi30 Saahi30 merged commit 75d828b into dev Nov 10, 2025
1 check passed
@Saahi30 Saahi30 deleted the feat/frontend-ui-components branch November 10, 2025 17:35
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.

1 participant