Skip to content

Conversation

@Spandan-Mishra
Copy link
Contributor

@Spandan-Mishra Spandan-Mishra commented Jul 25, 2025

Description

Brief description of what this PR does:
Added the feature to visit the profile of a user from projects and launches page
Fixes #91

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 📝 Documentation update
  • 🎨 Style/UI update
  • ⚡ Performance improvement
  • Other (please describe)

Testing

  • I have tested my changes locally

Checklist

  • My code follows the project style
  • I've updated relevant documentation

Screenshots (if applicable)

Add any relevant screenshots here


Please ensure your PR title clearly describes the change.

Summary by CodeRabbit

  • New Features

    • Project and launch cards now display the owner's avatar and details as clickable links to the owner's profile when available.
  • Style

    • Added hover effects to owner avatars for improved interactivity.

@vercel
Copy link

vercel bot commented Jul 25, 2025

@Spandan-Mishra is attempting to deploy a commit to the ossdotnow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Jul 25, 2025

Walkthrough

The rendering logic for project and launch cards was updated to wrap the project owner's avatar and name in a clickable link to their profile page if an owner ID exists. This enables navigation to user profiles directly from project and launch listings. Fallback UI for missing avatars remains unchanged.

Changes

File(s) Change Summary
.../projects/project-card.tsx Wrapped project owner's avatar in a conditional link to their profile if ownerId exists.
.../launches/launch-card.tsx Wrapped owner's avatar and name in a conditional link to profile if owner.id exists; consolidated owner info rendering.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ProjectCard
    participant LaunchCard
    participant Router

    User->>ProjectCard: Clicks on owner avatar
    alt ownerId exists
        ProjectCard->>Router: Navigate to /profile/{ownerId}
    else ownerId missing
        ProjectCard-->>User: No navigation
    end

    User->>LaunchCard: Clicks on owner avatar or name
    alt owner.id exists
        LaunchCard->>Router: Navigate to /profile/{owner.id}
    else owner.id missing
        LaunchCard-->>User: No navigation
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A hop, a skip, a profile to see,
With avatars linked, it’s easy as can be!
Click a bunny face, and off you go—
To meet the owner, in one smooth flow.
Profiles connected, just one hop away,
The rabbit approves: “Hooray, hooray!” 🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/web/app/(public)/launches/launch-card.tsx

Oops! Something went wrong! :(

ESLint: 9.32.0

ESLint couldn't find an eslint.config.(js|mjs|cjs) file.

From ESLint v9.0.0, the default configuration file is now eslint.config.js.
If you are using a .eslintrc.* file, please follow the migration guide
to update your configuration file to the new format:

https://eslint.org/docs/latest/use/configure/migration-guide

If you still have problems after following the migration guide, please stop by
https://eslint.org/chat/help to chat with the team.

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13714dd and bcc69a2.

📒 Files selected for processing (1)
  • apps/web/app/(public)/launches/launch-card.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/app/(public)/launches/launch-card.tsx
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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

🧹 Nitpick comments (1)
apps/web/app/(public)/(projects)/projects/project-card.tsx (1)

42-66: Consider reducing code duplication in the avatar rendering logic.

The implementation correctly adds profile navigation functionality, but the Image component is duplicated between the linked and non-linked branches. This could be refactored for better maintainability.

-            project.ownerId ? (
-              <Link
-                href={`/profile/${project.ownerId}`}
-                onClick={(e) => e.stopPropagation()}
-                className="z-10 shrink-0 rounded-none"
-              >
-                <Image
-                  src={repo?.owner?.avatar_url || `https://gitlab.com${repo?.namespace?.avatar_url}`}
-                  alt={project.name ?? 'Project Logo'}
-                  width={256}
-                  height={256}
-                  className="h-[78px] w-[78px] rounded-none hover:opacity-80 transition-opacity"
-                  loading="lazy"
-                />
-              </Link>
-            ) : (
-              <Image
-                src={repo?.owner?.avatar_url || `https://gitlab.com${repo?.namespace?.avatar_url}`}
-                alt={project.name ?? 'Project Logo'}
-                width={256}
-                height={256}
-                className="h-[78px] w-[78px] rounded-none"
-                loading="lazy"
-              />
-            )
+            (() => {
+              const avatarImage = (
+                <Image
+                  src={repo?.owner?.avatar_url || `https://gitlab.com${repo?.namespace?.avatar_url}`}
+                  alt={project.name ?? 'Project Logo'}
+                  width={256}
+                  height={256}
+                  className={`h-[78px] w-[78px] rounded-none ${
+                    project.ownerId ? 'hover:opacity-80 transition-opacity' : ''
+                  }`}
+                  loading="lazy"
+                />
+              );
+
+              return project.ownerId ? (
+                <Link
+                  href={`/profile/${project.ownerId}`}
+                  onClick={(e) => e.stopPropagation()}
+                  className="z-10 shrink-0 rounded-none"
+                >
+                  {avatarImage}
+                </Link>
+              ) : (
+                avatarImage
+              );
+            })()
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe6463f and 13714dd.

📒 Files selected for processing (2)
  • apps/web/app/(public)/(projects)/projects/project-card.tsx (1 hunks)
  • apps/web/app/(public)/launches/launch-card.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
apps/web/app/(public)/launches/launch-card.tsx (2)
packages/db/src/schema/projects.ts (1)
  • project (16-64)
packages/ui/src/components/link.tsx (1)
  • Link (17-44)
apps/web/app/(public)/(projects)/projects/project-card.tsx (2)
packages/db/src/schema/projects.ts (1)
  • project (16-64)
packages/ui/src/components/link.tsx (1)
  • Link (17-44)

@aysahoo
Copy link
Collaborator

aysahoo commented Jul 25, 2025

Good work @Spandan-Mishra

@ahmetskilinc
Copy link
Collaborator

@cursor run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bugbot free trial expires on July 29, 2025
Learn more in the Cursor dashboard.

@ahmetskilinc
Copy link
Collaborator

@Spandan-Mishra can you please check the comments from code-rabbit and cursor?

@Spandan-Mishra
Copy link
Contributor Author

Yeah sure I'll make the fixes.

@ahmetskilinc ahmetskilinc merged commit b28fc07 into collabute:dev Jul 26, 2025
1 of 2 checks passed
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.

Allow users to visit eachothers profile through projects and launches

3 participants