Skip to content

Implement Projects Discovery View (Projects tab) + build fixes (Tailwind v4 + UI typings) - #19

Merged
0xdevcollins merged 7 commits into
boundlessfi:mainfrom
JamesVictor-O:Feat/Project-View
Jan 25, 2026
Merged

Implement Projects Discovery View (Projects tab) + build fixes (Tailwind v4 + UI typings)#19
0xdevcollins merged 7 commits into
boundlessfi:mainfrom
JamesVictor-O:Feat/Project-View

Conversation

@JamesVictor-O

@JamesVictor-O JamesVictor-O commented Jan 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a full Projects discovery experience where users can browse projects and drill into a project detail page. Includes a few small fixes required to keep Next.js/Turbopack builds green.

Close Issue #7

What’s Included

  • Projects discovery page (/projects)
    • Search across name + description
    • Tag filtering (multi-select)
    • Has open bounties toggle
    • Sorting: Newest, Most open bounties, Recently updated
    • Scannable project cards with consistent layout and line-clamped descriptions
    • Graceful missing-logo handling (initials fallback)
  • Project detail page (/projects/[id])
    • Project header, tags, bounty counts, timestamps
    • SSG via generateStaticParams
    • Not-found state
  • Build / TypeScript fixes
    • Tailwind v4 typography plugin loaded correctly in globals.css
    • Exported ButtonProps for shared button wrappers
    • Updated resizable wrapper to match installed react-resizable-panels exports

UX Notes

  • Cards remain consistent and easy to scan
  • Long descriptions are line-clamped so they don’t break layout
  • Missing logos show a clean initials fallback
  • Clicking a card navigates to the project detail page

Key Files

  • Types / data
    • types/project.ts
    • lib/mock-project.ts
  • Discovery + cards
    • app/projects/page.tsx
    • components/projects/projects-discovery.tsx
    • components/projects/project-card.tsx
    • components/projects/project-logo.tsx
  • Detail
    • app/projects/[id]/page.tsx
    • app/projects/[id]/not-found.tsx
  • Build fixes
    • app/globals.css
    • components/ui/button.tsx
    • components/ui/resizable.tsx

Preview

Uploading Screen Recording 2026-01-24 at 11.58.31.mov…

Summary by CodeRabbit

  • New Features
    • Projects discovery UI with search, multi-tag filtering, sorting (newest, most open, recently updated) and an “open bounties” toggle.
    • Individual project detail pages showing project overview, stats, tags, timeline and bounties placeholder.
    • Project cards and logos for richer listings and avatars.
    • Project-specific 404 page with a link back to the projects list.
    • Added global animation styles for enhanced UI motion.

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

@0xdevcollins

Copy link
Copy Markdown
Contributor

@JamesVictor-O Please add proof of your working implementation

@JamesVictor-O

Copy link
Copy Markdown
Contributor Author

@0xdevcollins

Screen.Recording.2026-01-24.at.11.58.31.mov

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a comprehensive Projects discovery experience with search, filtering, sorting capabilities, and a detailed project view page. It also includes several build fixes for Tailwind v4, TypeScript exports, and react-resizable-panels imports to keep the Next.js/Turbopack builds working correctly.

Changes:

  • Added Projects discovery page with search, tag filtering, status filtering, and multiple sorting options
  • Implemented project detail pages with SSG support and graceful not-found handling
  • Fixed build issues: Tailwind v4 typography plugin syntax, ButtonProps export, and react-resizable-panels imports

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
types/project.ts Defines the Project type with all necessary fields for discovery and detail pages
lib/mock-project.ts Provides mock project data and helper functions for retrieving projects and tags
app/globals.css Fixed Tailwind v4 typography plugin import syntax from @import to @plugin
components/ui/button.tsx Exported ButtonProps type for reuse in custom button wrappers
components/ui/resizable.tsx Updated imports to use named exports from react-resizable-panels v4
components/projects/projects-discovery.tsx Main discovery component with search, filters, and project grid layout
components/projects/project-card.tsx Displays project information in a consistent, scannable card layout
components/projects/project-logo.tsx Handles project logos with initials fallback for missing images
app/projects/page.tsx Server component that fetches projects and renders the discovery view
app/projects/[id]/page.tsx Project detail page with SSG, metadata generation, and bounty stats
app/projects/[id]/not-found.tsx Custom 404 page for missing projects

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/projects/projects-discovery.tsx
Comment thread components/projects/projects-discovery.tsx Outdated
Comment thread components/projects/projects-discovery.tsx Outdated
Comment thread components/projects/projects-discovery.tsx Outdated
Comment thread components/projects/project-card.tsx
Comment thread components/projects/project-card.tsx
Comment thread components/projects/projects-discovery.tsx Outdated
Comment thread components/projects/project-card.tsx
Comment thread components/projects/project-card.tsx
@JamesVictor-O

Copy link
Copy Markdown
Contributor Author

@0xdevcollins changes implemented

@0xdevcollins

Copy link
Copy Markdown
Contributor

@JamesVictor-O please resolve the conflict in the app/global.css.

So i can merge

@coderabbitai

coderabbitai Bot commented Jan 25, 2026

Copy link
Copy Markdown

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Adds a Projects feature: type and mock-data utilities, listing and detail pages (with static params and metadata), a searchable/filterable discovery UI, reusable project components, a not-found page, and small CSS and component export/import adjustments.

Changes

Cohort / File(s) Summary
Types & Mock Data
types/project.ts, lib/mock-project.ts
New Project type and mock dataset; exports mockProjects, getAllProjects(), getProjectById(id), and getAllProjectTags() for server-side data lookup.
Pages / Routing
app/projects/page.tsx, app/projects/[id]/page.tsx, app/projects/[id]/not-found.tsx
Projects listing page uses mock data to render discovery; detail page adds generateStaticParams() and generateMetadata() and calls notFound() when missing; dedicated not-found UI for missing projects.
Project UI Components
src/components/projects/project-card.tsx, src/components/projects/project-logo.tsx, src/components/projects/projects-discovery.tsx
New client components: ProjectCard (clickable card), ProjectLogo (avatar with initials fallback), and ProjectsDiscovery (search, tag multi-select, open-bounties toggle, sorting, filtered results grid).
UI / Styling tweaks
app/globals.css, components/ui/button.tsx, components/ui/resizable.tsx
Added @import 'tw-animate-css' to globals; ButtonProps made an exported type; consolidated react-resizable-panels imports to one line.

Sequence Diagram(s)

sequenceDiagram
  participant Browser as Browser
  participant NextJS as Next.js Page
  participant Data as Mock Data (lib/mock-project)

  Browser->>NextJS: Request /projects or /projects/{id}
  NextJS->>Data: call getAllProjects() or getProjectById(id)
  Data-->>NextJS: return project(s) or undefined
  alt project found
    NextJS->>Browser: render page with ProjectsDiscovery / ProjectPage (ProjectCard, ProjectLogo)
  else project missing
    NextJS->>Browser: render not-found page
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Poem

🐇 I hop with joy at cards and tags,

Filters snap and searchland brags,
Mock projects stitched, logos bright,
Pages render day and night,
A rabbit cheers this new delight! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the two main components of this PR: implementing a complete Projects discovery view with search, filtering, and sorting, plus necessary build/TypeScript fixes for Tailwind v4 and UI component exports.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

@JamesVictor-O

Copy link
Copy Markdown
Contributor Author

@0xdevcollins conflict resolve please merge

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@app/globals.css`:
- Around line 3-5: Move the `@import` 'tw-animate-css'; line above the `@plugin`
"@tailwindcss/typography"; so that all `@import` rules appear before other
at-rules; update the file so `@import` comes first, then `@plugin`, and leave the
`@custom-variant` dark (&:is(.dark *)); line after them unchanged.
♻️ Duplicate comments (3)
components/projects/project-card.tsx (3)

49-54: Consider using Next.js Image component for optimization.

Using a regular <img> tag misses out on Next.js automatic image optimization, lazy loading, and proper sizing. The codebase uses the Next.js Image component elsewhere (e.g., in bounty components).

Proposed refactor
+import Image from "next/image";
 
 // ...
 
-              <img
-                src={project.logoUrl}
-                alt={project.name}
-                className="h-10 object-contain brightness-90 grayscale hover:grayscale-0 transition-all opacity-80"
-              />
+              <Image
+                src={project.logoUrl}
+                alt={project.name}
+                width={40}
+                height={40}
+                className="h-10 w-auto object-contain brightness-90 grayscale hover:grayscale-0 transition-all opacity-80"
+              />

Note: You may need to configure next.config.js to allow external image domains if logoUrl points to external sources.


63-66: Guard against empty creatorName to prevent runtime error.

Accessing project.creatorName[0] will throw if creatorName is an empty string. Add optional chaining with a fallback.

Proposed fix
               <AvatarFallback className="bg-gray-800 text-[10px]">
-                  {project.creatorName[0]}
+                  {project.creatorName?.[0] || "?"}
               </AvatarFallback>

100-108: Duplicate status display and hardcoded timestamp.

Two issues persist in this footer section:

  1. The project status is shown both in the banner badge (line 44) and here (line 103), which is redundant.
  2. "Updated 2d ago" is hardcoded and doesn't reflect the actual project.updatedAt value. Use formatDistanceToNow from date-fns (already used in app/projects/[id]/page.tsx) to display the real relative time.
Proposed fix for dynamic timestamp

Add the import at the top of the file:

import { formatDistanceToNow } from "date-fns";

Then update the footer:

          <div className="border-t border-white/5 px-4 py-3 bg-[`#0D0F10`]/50">
-            <div className="flex items-center justify-between">
-              <span className="text-xs text-white/40 font-semibold uppercase tracking-widest">
-                {project.status}
-              </span>
+            <div className="flex items-center justify-end">
               <span className="text-[10px] text-white/30 font-medium">
-                Updated 2d ago
+                Updated {formatDistanceToNow(new Date(project.updatedAt), { addSuffix: false })} ago
               </span>
             </div>
           </div>
🧹 Nitpick comments (2)
components/projects/projects-discovery.tsx (1)

152-155: Associate the Label with the Switch for better accessibility.

The Label is visually adjacent to the Switch but not programmatically associated. Adding an id to the Switch and htmlFor to the Label improves screen reader support.

Proposed fix
              <div className="h-12 px-4 rounded-xl bg-[`#1A1F21`] border border-white/5 flex items-center gap-3">
-                <Switch checked={hasOpenBounties} onCheckedChange={setHasOpenBounties} />
-                <Label className="text-white/80 font-medium text-sm">Has open bounties</Label>
+                <Switch id="open-bounties" checked={hasOpenBounties} onCheckedChange={setHasOpenBounties} />
+                <Label htmlFor="open-bounties" className="text-white/80 font-medium text-sm">Has open bounties</Label>
              </div>
app/projects/[id]/page.tsx (1)

91-96: Placeholder section for bounties is clear.

The placeholder text appropriately indicates that this section awaits integration with a real data source. Consider adding a TODO comment or tracking this in an issue for visibility.

Would you like me to open an issue to track wiring up the bounties section to a real data source?

Comment thread app/globals.css
Comment on lines 3 to 5
@plugin "@tailwindcss/typography";

@import 'tw-animate-css';
@custom-variant dark (&:is(.dark *));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Move @import above @plugin to avoid invalid CSS.

@import rules must appear before other at-rules like @plugin, otherwise the import is ignored and lint/build fails.

💡 Suggested fix
`@import` url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
`@import` 'tailwindcss';
-@plugin "@tailwindcss/typography";
-@import 'tw-animate-css';
+@import 'tw-animate-css';
+@plugin "@tailwindcss/typography";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@plugin "@tailwindcss/typography";
@import 'tw-animate-css';
@custom-variant dark (&:is(.dark *));
`@import` 'tw-animate-css';
`@plugin` "@tailwindcss/typography";
`@custom-variant` dark (&:is(.dark *));
🧰 Tools
🪛 Biome (2.1.2)

[error] 4-4: This @import is in the wrong position.

Any @import rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset and @layer), or else the @import rule is invalid.
Consider moving import position.

(lint/correctness/noInvalidPositionAtImportRule)

🤖 Prompt for AI Agents
In `@app/globals.css` around lines 3 - 5, Move the `@import` 'tw-animate-css'; line
above the `@plugin` "@tailwindcss/typography"; so that all `@import` rules appear
before other at-rules; update the file so `@import` comes first, then `@plugin`, and
leave the `@custom-variant` dark (&:is(.dark *)); line after them unchanged.

@0xdevcollins

Copy link
Copy Markdown
Contributor
image @JamesVictor-O i am getitng build error here

@JamesVictor-O

Copy link
Copy Markdown
Contributor Author

@0xdevcollins build error resolved, just a minor type error

@0xdevcollins
0xdevcollins merged commit 5150c5c into boundlessfi:main Jan 25, 2026
2 checks passed
@JamesVictor-O

Copy link
Copy Markdown
Contributor Author

@0xdevcollins thank you 🙏 please can you help me close the issue so my points could be awarded to me 🙏

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.

Projects Tab – Projects Discovery View

3 participants