Skip to content

Feat/submissions page#127

Merged
elliotBraem merged 5 commits intostagingfrom
feat/submissions-page
Apr 28, 2025
Merged

Feat/submissions page#127
elliotBraem merged 5 commits intostagingfrom
feat/submissions-page

Conversation

@saadiqbal-dev
Copy link
Copy Markdown
Collaborator

@saadiqbal-dev saadiqbal-dev commented Apr 28, 2025

Summary by CodeRabbit

  • New Features

    • Introduced new pages for viewing all submissions and detailed feed submissions, accessible via the /submissions route.
    • Added new layouts for feeds and submissions, including responsive sidebars and mobile panels.
    • Implemented a Top Curators leaderboard component, supporting feed-specific and overall rankings.
    • Added a customizable Select dropdown UI component.
    • Introduced a hero section for the submissions page.
  • Enhancements

    • Improved profile and authentication integration, displaying dynamic user data and login prompts.
    • Updated navigation: root URL now redirects to /submissions; "Feeds" navigation links are disabled.
    • Enhanced filtering, sorting, and search capabilities for submissions, with responsive filter panels.
    • Updated feed and submission lists for improved layout and responsiveness.
  • Bug Fixes

    • Corrected navigation links and improved responsive layouts in various components.
  • Chores

    • Updated dependencies and adjusted package configurations for improved development workflow.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
curatedotfun-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2025 3:33pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 28, 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

This update introduces a significant expansion and refactor of the frontend's submissions and feed management features. New layout and UI components are added for displaying feeds, submissions, and curator leaderboards, including responsive sidebars and mobile panels. The routing configuration is extended to support /submissions and /submissions/$feedId paths, with corresponding route components that fetch and display relevant data. Several components are updated for improved layout, filtering, and navigation, while new utility UI components (such as a custom Select dropdown) are introduced. Web3 authentication is integrated into profile-related components. The backend sees a minor script update for database migrations.

Changes

File(s) Change Summary
backend/package.json Updated the db:migrate-sqlite-to-pg script to use bun instead of pnpm run.
frontend/package.json Added @radix-ui/react-select dependency; moved @rsbuild/plugin-node-polyfill to devDependencies; reordered lucide-react.
frontend/public/images/ca1aeb55a83a97a139b53b47327bdcc0f02d6022.png:Zone.Identifier Added Zone.Identifier metadata for an image downloaded from Figma.
frontend/src/components/FeedItem.tsx Made the user info/timestamp container responsive with flex-direction changes.
frontend/src/components/FeedLayout.tsx Introduced new FeedLayout component with responsive sidebar and mobile panel for curators.
frontend/src/components/FeedList.tsx Refactored layout, updated link paths, removed scroll indicator, and restyled feed entries.
frontend/src/components/Header.tsx Updated navigation: "Feeds" link commented out, "Submit Content" renamed to "Create", and "Profile" now uses programmatic navigation.
frontend/src/components/InfiniteFeed.tsx Changed grid layout to a single column, removing responsive breakpoints.
frontend/src/components/SubmissionList.tsx Added layout prop for flex/grid display; now sorts by submission date and wraps items in a container.
frontend/src/components/SubmissionsHero.tsx Added new SubmissionsHero component with styled heading and background.
frontend/src/components/SubmissionsLayout.tsx Added new SubmissionsLayout component with responsive sidebars and mobile navigation for feeds and curators.
frontend/src/components/TopCurators.tsx Added new TopCurators component for displaying a leaderboard of curators, with filtering and social links.
frontend/src/components/UserMenu.tsx "Profile" now navigates to profile page; "Wallet" click handler removed; added hover styles.
frontend/src/components/profile/ProfileHeader.tsx Refactored to fetch and display dynamic Web3 user info using hooks and state.
frontend/src/components/ui/select.tsx Added a new customizable Select dropdown component built on Radix UI primitives.
frontend/src/index.css Commented out custom dark mode variant; set max width and centered the body.
frontend/src/routeTree.gen.ts Added /submissions and /submissions/$feedId routes with type and manifest updates.
frontend/src/routes/explore/index.tsx Updated FeedSection to accept a layout prop; type changes and prop passing to SubmissionList.
frontend/src/routes/index.tsx Changed root redirect from /feed to /submissions.
frontend/src/routes/profile/index.tsx Integrated Web3 authentication; conditional rendering based on login state; fetches user info.
frontend/src/routes/submissions/$feedId.tsx Added new route and component for feed details, displaying feed info and submissions in a grid.
frontend/src/routes/submissions/index.tsx Added new route and component for submissions index with filtering, sorting, searching, and infinite scrolling.
frontend/src/store/useFeedFilterStore.tsx Updated type alias to use Submission["status"] instead of TwitterSubmission["status"].

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Router
    participant SubmissionsIndexPage
    participant useAllSubmissions
    participant SubmissionList

    User->>Router: Navigate to /submissions
    Router->>SubmissionsIndexPage: Render route
    SubmissionsIndexPage->>useAllSubmissions: Fetch submissions (with filters, sort, pagination)
    useAllSubmissions-->>SubmissionsIndexPage: Return submissions data
    SubmissionsIndexPage->>SubmissionList: Pass filtered, sorted items
    SubmissionList-->>User: Render submissions list
Loading
sequenceDiagram
    participant User
    participant Router
    participant FeedDetailsPage
    participant useFeedConfig
    participant useFeedItems
    participant FeedLayout
    participant SubmissionList

    User->>Router: Navigate to /submissions/$feedId
    Router->>FeedDetailsPage: Render route
    FeedDetailsPage->>useFeedConfig: Fetch feed config
    FeedDetailsPage->>useFeedItems: Fetch feed items
    useFeedConfig-->>FeedDetailsPage: Return feed config
    useFeedItems-->>FeedDetailsPage: Return feed items
    FeedDetailsPage->>FeedLayout: Render layout
    FeedLayout->>SubmissionList: Render submissions for feed
    SubmissionList-->>User: Show feed submissions
Loading

Poem

🐇
New routes and layouts hop into view,
Feed lists and curators, all shiny and new!
Submissions now sorted, in grids or in rows,
With leaderboards showing who truly bestows.
Web3 profiles sparkle, select dropdowns gleam,
The rabbit's delighted—what a frontend dream!

— CodeRabbit


🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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

@saadiqbal-dev
Copy link
Copy Markdown
Collaborator Author

saadiqbal-dev commented Apr 28, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 28, 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
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: 10

🔭 Outside diff range comments (2)
frontend/src/components/profile/ProfileHeader.tsx (1)

42-105: 🛠️ Refactor suggestion

Social media links and wallet address remain static.

While profile image and name are now dynamic, the wallet address and social media links (Twitter, LinkedIn) remain hardcoded.

Consider updating these elements to use dynamic data from the user profile as well:

<p className="text-sm md:text-base font-normal text-[#64748B]">
-  6f2d.......xd345
+  {userInfo?.walletAddress ? 
+    `${userInfo.walletAddress.substring(0, 6)}...${userInfo.walletAddress.substring(userInfo.walletAddress.length - 5)}` : 
+    'No wallet connected'}
</p>

And similarly for social media links, display them only if available in the user profile.

frontend/src/components/ui/select.tsx (1)

146-158: ⚠️ Potential issue

Fix Prettier formatting issue.

The pipeline failure indicates a Prettier formatting issue. Run Prettier to fix the formatting.

Run the following command to fix the formatting:

npx prettier --write frontend/src/components/ui/select.tsx
🧹 Nitpick comments (18)
backend/package.json (1)

16-16: Ensure Bun is available or documented for migration scripts

The new db:migrate-sqlite-to-pg script uses bun, matching how other scripts (e.g., db:seed:dev/test) are run. Please confirm that Bun is installed in all developer and CI environments or document it as a prerequisite (e.g., in README or a setup script). Optionally, consider pinning a specific Bun version or adding a preinstall check to prevent runtime errors.

frontend/public/images/ca1aeb55a83a97a139b53b47327bdcc0f02d6022.png:Zone.Identifier (1)

1-4: Remove Windows Zone.Identifier metadata file

This file contains Windows-specific metadata about the downloaded image from Figma. While it doesn't affect functionality, it's generally a best practice to remove these metadata files before committing to a repository.

Consider adding .Zone.Identifier to your .gitignore file to prevent these metadata files from being committed in the future.

frontend/src/components/TopCurators.tsx (2)

150-152: Simplify complex inline conditional styling

The badge styling uses a lengthy inline conditional. Extract this logic to a helper function or use a more concise approach.

-                  <Badge
-                    className={`py-0.5 shadow-none rounded-sm min-w-12 w-full ${index + 1 === 1 ? "bg-[#B78722] text-white" : index + 1 === 2 ? "bg-[#94A3B8] text-white" : index + 1 === 3 ? "bg-[#854D0E] text-white" : "bg-[#F5F5F5] text-neutral-500"}`}
-                  >
+                  <Badge
+                    className={`py-0.5 shadow-none rounded-sm min-w-12 w-full ${
+                      getRankStyle(index + 1)
+                    }`}
+                  >

// Add this helper function at the top of the file:
// function getRankStyle(rank: number): string {
//   if (rank === 1) return "bg-[#B78722] text-white";
//   if (rank === 2) return "bg-[#94A3B8] text-white";
//   if (rank === 3) return "bg-[#854D0E] text-white";
//   return "bg-[#F5F5F5] text-neutral-500";
// }

86-101: Consider extracting SVG icons to separate components

The inline SVG icons for Twitter add significant markup to this component. Consider extracting these to separate icon components for better maintainability.

Extract Twitter and LinkedIn icons to separate components in a dedicated icons directory to reduce component complexity and improve reusability.

frontend/src/components/SubmissionsHero.tsx (4)

2-3: Remove unnecessary comment without implementation

The comment "Import as a static asset" appears to be a leftover note without any actual import statement following it. This should either be implemented or removed to avoid confusion.

-  // Import as a static asset
-

7-12: Consider moving background styling to a CSS class

The inline style for background image could be moved to a Tailwind CSS class or a separate CSS file for better maintainability and consistency with the rest of the application.

-      style={{
-        backgroundImage: 'url("/grid.png")',
-        backgroundRepeat: "repeat",
-        backgroundSize: "auto",
-        backgroundPosition: "center",
-      }}
+      className="flex flex-col items-center justify-center py-20 gap-2 border w-full bg-grid-pattern"

Then add the following to your global CSS or create a Tailwind plugin:

.bg-grid-pattern {
  background-image: url('/grid.png');
  background-repeat: repeat;
  background-size: auto;
  background-position: center;
}

17-19: Fix capitalization in paragraph text

The text has inconsistent capitalization with "All" capitalized mid-sentence. Consider making the capitalization consistent.

-        Interact with All submissions under one roof!
+        Interact with all submissions under one roof!

1-22: Add error handling for background image

The component doesn't handle potential loading errors for the background image. Consider adding a fallback background color or pattern if the image fails to load.

export default function SubmissionsHero() {
+  const [imageError, setImageError] = useState(false);
+
+  useEffect(() => {
+    const img = new Image();
+    img.src = "/grid.png";
+    img.onerror = () => setImageError(true);
+  }, []);

  return (
    <div
      className="flex flex-col items-center justify-center py-20 gap-2 border w-full"
      style={{
-        backgroundImage: 'url("/grid.png")',
+        backgroundImage: imageError ? 'none' : 'url("/grid.png")',
+        backgroundColor: imageError ? '#f9fafb' : 'transparent',
        backgroundRepeat: "repeat",
        backgroundSize: "auto",
        backgroundPosition: "center",
      }}
    >
      <h1 className="md:text-5xl text-2xl text-center font-bold">
        All Submissions.
      </h1>
      <p className="md:max-w-[766px] md:text-2xl text-lg text-center font-normal leading-8">
        Interact with All submissions under one roof!
      </p>
    </div>
  );
}

Don't forget to add the necessary imports:

+import { useState, useEffect } from "react";
+
export default function SubmissionsHero() {
frontend/src/components/Header.tsx (1)

76-78: Commented-out navigation elements may confuse developers.

The "Feeds" navigation links are commented out rather than removed in both desktop and mobile views. While this preserves the code for potential future use, it can confuse other developers about whether these links were meant to be temporarily or permanently removed.

If the "Feeds" link is no longer needed, consider removing the commented code completely. If it's temporarily disabled, add a comment explaining why it's commented out and when it might be reintroduced:

-{/* <Link to="/explore">
-  <Button variant={"ghost"}>Feeds</Button>
-</Link> */}
+{/* Feeds link temporarily hidden until the new submissions feature is fully integrated 
+<Link to="/explore">
+  <Button variant={"ghost"}>Feeds</Button>
+</Link> */}

Also applies to: 139-150

frontend/src/routes/profile/index.tsx (1)

20-36: User info fetching logic could be improved.

The effect hook properly fetches user info when logged in and clears it when logged out. However, there are production-ready improvements to consider.

Consider these enhancements:

  1. Remove console logs before production deployment
  2. Add a loading state while fetching user info
  3. Implement better error handling for failed user info fetches
 useEffect(() => {
+  const [isLoading, setIsLoading] = useState(false);
+  const [error, setError] = useState<Error | null>(null);
   const fetchUserInfo = async () => {
     try {
+      setIsLoading(true);
+      setError(null);
       const info = await getUserInfo();
       setUserInfo(info);
-      console.log("User Info:", info);
     } catch (error) {
-      console.error("Error fetching user info:", error);
+      setError(error instanceof Error ? error : new Error('Failed to fetch user info'));
+    } finally {
+      setIsLoading(false);
     }
   };

   if (isLoggedIn) {
     fetchUserInfo();
   } else {
     setUserInfo({});
+    setError(null);
   }
 }, [isLoggedIn, getUserInfo]);
frontend/src/components/FeedList.tsx (1)

42-55: Feed item design needs dynamic images.

The redesigned feed item provides a much better visual hierarchy, but the image implementation is static.

Consider making the feed image dynamic:

 <img
-  src="/images/feed-image.png"
+  src={feed.imageUrl || "/images/feed-image-placeholder.png"}
   alt="Feed Image"
   className="w-[50px] h-[50px] aspect-square object-cover"
   width={40}
   height={40}
 />

This assumes a property like imageUrl could be added to the feed schema in the future to support custom feed images.

frontend/src/components/FeedLayout.tsx (2)

24-56: Mobile navigation is well-implemented but could be more accessible.

The mobile panel implementation with backdrop and sliding animation provides a good user experience, but could benefit from accessibility improvements.

Consider these accessibility enhancements:

 <button
   onClick={toggleCurators}
   className="p-2 rounded-md bg-gray-100 hover:bg-gray-200"
   aria-label="Toggle curators"
+  aria-expanded={mobileCuratorsOpen}
+  aria-controls="mobile-curators-panel"
 >
   <span className="font-medium">Top Curators</span>
 </button>

 {/* Mobile Curators Panel (Slide in from right) */}
 <div
   className={`fixed inset-0 bg-black bg-opacity-50 z-40 transition-opacity duration-300 md:hidden ${
     mobileCuratorsOpen ? "opacity-100" : "opacity-0 pointer-events-none"
   }`}
   onClick={toggleCurators}
+  aria-hidden="true"
 />

 <div
+  id="mobile-curators-panel"
   className={`fixed top-0 right-0 h-full w-3/4 max-w-xs bg-white z-50 transform transition-transform duration-300 ease-in-out overflow-y-auto md:hidden ${
     mobileCuratorsOpen ? "translate-x-0" : "translate-x-full"
   }`}
+  role="dialog"
+  aria-modal="true"
+  aria-labelledby="mobile-curators-title"
 >
   <div className="flex justify-between items-center p-4 border-b">
-    <h3 className="font-medium text-lg">{titleText}</h3>
+    <h3 id="mobile-curators-title" className="font-medium text-lg">{titleText}</h3>
     <button onClick={toggleCurators} aria-label="Close curators">
       <X size={24} />
     </button>
   </div>

1-76: Consider adding loading and error states.

The component doesn't handle loading or error states for the TopCurators component, which could lead to a poor user experience if data fetching is slow or fails.

Consider working with the TopCurators component to handle loading and error states gracefully, perhaps passing loading and error states as props or implementing skeleton loaders.

frontend/src/routes/submissions/$feedId.tsx (1)

49-88: Consider extracting duplicated SVG icon to a component.

The SVG paths for Twitter icons are duplicated in the source and destination badges. This could be extracted into a reusable component to reduce duplication.

+// In a new file like IconTwitter.tsx
+export const TwitterIcon = () => (
+  <svg
+    xmlns="http://www.w3.org/2000/svg"
+    width="16"
+    height="16"
+    viewBox="0 0 16 16"
+    fill="none"
+  >
+    <path
+      d="M5.47681 2.1748L8.34204 5.96094L8.4729 6.13379L8.6145 5.9707L11.9094 2.1748H13.4788L9.28638 6.99902L9.1936 7.10645L9.27954 7.21973L14.3137 13.873H10.6301L7.46997 9.73828L7.34009 9.56836L7.19849 9.72949L3.55688 13.873H1.9856L6.49829 8.70117L6.59302 8.59375L6.5061 8.47949L1.68774 2.1748H5.47681ZM3.57642 3.25781L10.9661 12.9229L11.0188 12.9922H12.5813L12.3704 12.7109L5.08813 3.0459L5.0354 2.97559H3.36157L3.57642 3.25781Z"
+      stroke="#57534E"
+      strokeWidth="0.350493"
+    />
+  </svg>
+);

// Then in the current file:
-<svg
-  xmlns="http://www.w3.org/2000/svg"
-  width="16"
-  height="16"
-  viewBox="0 0 16 16"
-  fill="none"
->
-  <path
-    d="M5.47681 2.1748L8.34204 5.96094L8.4729 6.13379L8.6145 5.9707L11.9094 2.1748H13.4788L9.28638 6.99902L9.1936 7.10645L9.27954 7.21973L14.3137 13.873H10.6301L7.46997 9.73828L7.34009 9.56836L7.19849 9.72949L3.55688 13.873H1.9856L6.49829 8.70117L6.59302 8.59375L6.5061 8.47949L1.68774 2.1748H5.47681ZM3.57642 3.25781L10.9661 12.9229L11.0188 12.9922H12.5813L12.3704 12.7109L5.08813 3.0459L5.0354 2.97559H3.36157L3.57642 3.25781Z"
-    stroke="#57534E"
-    strokeWidth="0.350493"
-  />
-</svg>
+<TwitterIcon />
frontend/src/components/SubmissionsLayout.tsx (1)

13-33: Optimize redundant right sidebar assignment.

The variable finalRightSidebar is assigned to defaultRightSidebar but there's no logic to override it with a custom sidebar. This makes the assignment redundant and could be confusing for developers who might expect a way to customize the right sidebar.

-  // Create a default right sidebar that will be used if none is provided
+  // Create the right sidebar with top curators
   const defaultRightSidebar = (
     <div className="max-w-full overflow-x-hidden">
       <div>
         <h3 className="text-[32px] font-normal leading-[63px]">{titleText}</h3>
         <TopCurators feedId={feedId} />
       </div>
     </div>
   );

-  // Always use the default right sidebar
-  const finalRightSidebar = defaultRightSidebar;

Then in the JSX, replace all occurrences of finalRightSidebar with defaultRightSidebar.

frontend/src/routes/submissions/index.tsx (2)

67-72: Consider optimizing sorting logic.

The sorting logic creates a new array with spread operator and sorts it on each render. For larger datasets, this could cause performance issues. Consider memoizing this computation with useMemo.

-  // Sort items based on sort order
-  const sortedItems = [...items].sort((a, b) => {
-    const dateA = new Date(a.submittedAt || 0).getTime();
-    const dateB = new Date(b.submittedAt || 0).getTime();
-    return sortOrder === "newest" ? dateB - dateA : dateA - dateB;
-  });
+  // Sort items based on sort order - memoized to prevent unnecessary re-computations
+  const sortedItems = React.useMemo(() => {
+    return [...items].sort((a, b) => {
+      const dateA = new Date(a.submittedAt || 0).getTime();
+      const dateB = new Date(b.submittedAt || 0).getTime();
+      return sortOrder === "newest" ? dateB - dateA : dateA - dateB;
+    });
+  }, [items, sortOrder]);

74-86: Consider optimizing filtering logic.

Similar to the sorting logic, the filtering based on search query could be memoized to prevent unnecessary re-filtering on each render.

-  // Filter items based on search query
-  const filteredItems =
-    debouncedSearchQuery.trim() !== ""
-      ? sortedItems.filter(
-          (item) =>
-            item.content
-              ?.toLowerCase()
-              .includes(debouncedSearchQuery.toLowerCase()) ||
-            item.curatorUsername
-              ?.toLowerCase()
-              .includes(debouncedSearchQuery.toLowerCase()),
-        )
-      : sortedItems;
+  // Filter items based on search query - memoized to prevent unnecessary re-computations
+  const filteredItems = React.useMemo(() => {
+    if (debouncedSearchQuery.trim() === "") {
+      return sortedItems;
+    }
+    
+    const query = debouncedSearchQuery.toLowerCase();
+    return sortedItems.filter(
+      (item) =>
+        item.content?.toLowerCase().includes(query) ||
+        item.curatorUsername?.toLowerCase().includes(query)
+    );
+  }, [sortedItems, debouncedSearchQuery]);
frontend/src/components/ui/select.tsx (1)

1-6: Fix import path to use relative path.

The import on line 5 uses an absolute path src/lib/utils which might cause issues depending on the project's module resolution settings. It should be consistent with other imports using relative paths.

-import { cn } from "src/lib/utils"
+import { cn } from "../../lib/utils"
🧰 Tools
🪛 GitHub Actions: CI

[error] 1-1: Prettier formatting check failed. Run 'prettier --write' to fix code style issues.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e369f24 and f905fa3.

⛔ Files ignored due to path filters (2)
  • frontend/public/images/feed-image.png is excluded by !**/*.png
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (23)
  • backend/package.json (1 hunks)
  • frontend/package.json (3 hunks)
  • frontend/public/images/ca1aeb55a83a97a139b53b47327bdcc0f02d6022.png:Zone.Identifier (1 hunks)
  • frontend/src/components/FeedItem.tsx (1 hunks)
  • frontend/src/components/FeedLayout.tsx (1 hunks)
  • frontend/src/components/FeedList.tsx (1 hunks)
  • frontend/src/components/Header.tsx (6 hunks)
  • frontend/src/components/InfiniteFeed.tsx (1 hunks)
  • frontend/src/components/SubmissionList.tsx (2 hunks)
  • frontend/src/components/SubmissionsHero.tsx (1 hunks)
  • frontend/src/components/SubmissionsLayout.tsx (1 hunks)
  • frontend/src/components/TopCurators.tsx (1 hunks)
  • frontend/src/components/UserMenu.tsx (2 hunks)
  • frontend/src/components/profile/ProfileHeader.tsx (1 hunks)
  • frontend/src/components/ui/select.tsx (1 hunks)
  • frontend/src/index.css (2 hunks)
  • frontend/src/routeTree.gen.ts (16 hunks)
  • frontend/src/routes/explore/index.tsx (8 hunks)
  • frontend/src/routes/index.tsx (1 hunks)
  • frontend/src/routes/profile/index.tsx (1 hunks)
  • frontend/src/routes/submissions/$feedId.tsx (1 hunks)
  • frontend/src/routes/submissions/index.tsx (1 hunks)
  • frontend/src/store/useFeedFilterStore.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (8)
frontend/src/store/useFeedFilterStore.tsx (1)
backend/src/types/twitter.ts (1)
  • Submission (8-22)
frontend/src/components/SubmissionList.tsx (1)
frontend/src/components/FeedItem.tsx (1)
  • FeedItem (293-386)
frontend/src/components/FeedList.tsx (1)
backend/src/services/db/schema.ts (1)
  • feeds (32-37)
frontend/src/routes/profile/index.tsx (4)
frontend/src/types/web3auth.ts (1)
  • AuthUserInfo (4-29)
frontend/src/hooks/use-web3-auth.ts (1)
  • useWeb3Auth (6-12)
frontend/src/components/profile/ProfileHeader.tsx (1)
  • ProfileHeader (4-110)
frontend/src/components/ui/button.tsx (1)
  • Button (62-62)
frontend/src/routes/explore/index.tsx (1)
backend/src/types/twitter.ts (1)
  • SubmissionWithFeedData (23-27)
frontend/src/components/SubmissionsLayout.tsx (1)
frontend/src/components/SubmissionsHero.tsx (1)
  • SubmissionsHero (1-22)
frontend/src/components/ui/select.tsx (1)
frontend/src/lib/utils.ts (1)
  • cn (4-6)
frontend/src/components/TopCurators.tsx (2)
frontend/src/lib/api.ts (1)
  • useLeaderboard (99-113)
frontend/src/components/ui/badge.tsx (1)
  • Badge (42-42)
🪛 GitHub Actions: CI
frontend/src/components/ui/select.tsx

[error] 1-1: Prettier formatting check failed. Run 'prettier --write' to fix code style issues.

🔇 Additional comments (58)
frontend/src/index.css (2)

132-132: Apply maximum width constraint to the body

Setting a maximum width and centering the body will create a more consistent layout across different screen sizes. This change aligns with modern web design practices for content readability.


11-11:

Details

✅ Verification successful

Temporarily disabled dark mode variant

The dark mode custom variant is commented out. While this may be intentional for this feature, make sure this doesn't impact existing functionality that might depend on dark mode styling.


🏁 Script executed:

#!/bin/bash
# Check if any files in the codebase reference dark mode styling
rg -i "dark(\s+\*|\smount|mode)" --type ts --type tsx

Length of output: 83


To verify whether disabling the custom dark‐mode variant will affect any existing usage, let’s search for any Tailwind dark–variant references and inspect the Tailwind config:


🏁 Script executed:

#!/usr/bin/env bash
# 1) Locate and inspect tailwind.config.js for darkMode setting
fd tailwind.config.js | xargs -I{} sed -n '1,200p' {}

# 2) Confirm darkMode is set (class|media)
rg -n 'darkMode' $(fd tailwind.config.js)

# 3) Search for any Tailwind ‘dark:’ variant usage in code
rg -n 'dark:' --glob '*.{js,jsx,ts,tsx}'

# 4) Fallback: look for direct '.dark' class toggles in JS/TS
rg -n '\.dark' --glob '*.{js,jsx,ts,tsx}'

Length of output: 17468


No impact from disabling the custom dark-mode variant

Tailwind is configured with darkMode: "class" and all components use the built-in dark: utility (as seen throughout src/components/ui/**/*.{ts,tsx}). The commented-out @custom-variant dark … in frontend/src/index.css isn’t referenced elsewhere, so leaving it disabled won’t break existing dark-mode styling.

frontend/package.json (2)

24-24: Added Radix UI Select component

This dependency addition supports the implementation of custom select dropdowns, which is likely used in the submissions page UI.


58-58: Correctly moved node polyfill to devDependencies

Good change moving the @rsbuild/plugin-node-polyfill package from dependencies to devDependencies, as it's only needed during build time and not at runtime.

frontend/src/store/useFeedFilterStore.tsx (1)

2-4: Updated type import from TwitterSubmission to Submission

Good change to use the more generic Submission type instead of the platform-specific TwitterSubmission. This makes the code more abstract and adaptable.

frontend/src/components/TopCurators.tsx (1)

9-56: Well-structured component with proper loading states

The component is well structured with clear loading, error, and empty states. The implementation of filtering and sorting logic for curators based on feed is clean and effective.

frontend/src/routes/index.tsx (1)

7-7: Redirect path updated to new submissions feature

The root route now redirects to "/submissions" instead of "/feed", making the submissions page the new landing area. This change aligns well with the new submissions feature introduced in this PR.

frontend/src/components/FeedItem.tsx (1)

304-304: Improved responsive layout for user information

The change enhances the UI responsiveness by stacking user info and timestamp vertically on mobile devices (flex-col) and horizontally on larger screens (md:flex-row). This is a good improvement for mobile user experience.

frontend/src/components/UserMenu.tsx (2)

14-14: Appropriate usage of React Router navigation hook.

The addition of useNavigate from @tanstack/react-router is a good practice for programmatic navigation within the application.

Also applies to: 19-19


116-124: Good enhancement to user navigation flow.

The Profile dropdown item now correctly uses the navigation hook to route to the profile page rather than performing a direct action. This creates a more consistent user experience.

frontend/src/components/Header.tsx (3)

25-25: Appropriate usage of React Router navigation hook.

The addition of useNavigate from @tanstack/react-router is a good practice for programmatic navigation within the application.

Also applies to: 31-31


84-84: UI label change for consistency.

Changing "Submit Content" to "Create" makes the UI label more concise and consistent across the application.

Also applies to: 172-172


221-225: Good enhancement to user navigation flow.

The Profile dropdown item now correctly uses the navigation hook to route to the profile page, creating a more consistent user experience.

frontend/src/components/profile/ProfileHeader.tsx (2)

1-26: Good implementation of dynamic user data with web3 authentication.

The component now properly fetches and manages user information from the web3 authentication system. The useEffect hook correctly handles the authenticated state and properly cleans up when the user logs out.


32-32: Good integration of dynamic user data in UI.

The UI now displays real user data from web3 authentication rather than static placeholders.

Also applies to: 36-36

frontend/src/components/SubmissionList.tsx (4)

9-14: Good addition of layout prop with clear documentation.

The addition of the layout prop with JSDoc comments is a good practice that helps other developers understand how to use the component.


21-21: Appropriate default value for layout prop.

Setting "flex" as the default layout maintains backward compatibility with existing usage of the component.


51-55: Useful sorting improvement for chronological ordering.

Sorting submissions by date (newest first) improves the user experience by showing the most recent content at the top.


59-74: Good implementation of responsive layouts.

The conditional class assignment based on the layout prop is a clean approach to supporting multiple layout options. The grid layout provides a responsive design with different column counts based on screen size.

frontend/src/routes/explore/index.tsx (6)

13-13: Type import update is consistent with backend schema.

The update from TwitterSubmissionWithFeedData to SubmissionWithFeedData aligns with the backend type definitions and simplifies the import naming.


32-32: Adding the layout property ensures consistent rendering.

The new required layout property with union type "flex" | "grid" provides clear control over how submissions are displayed.


41-57: Component export improves reusability.

Converting FeedSection from a local component to an exported component allows it to be reused across the application, which is good for maintainability.


73-82: Type assertion updates align with the import changes.

The type assertions for items and the parameter type in renderItems have been updated to use SubmissionWithFeedData[], maintaining type consistency throughout the component.


87-87: Layout prop properly passed to child component.

The layout prop is correctly passed down to the SubmissionList component, allowing the parent to control the layout style.


176-176: Explicit layout values maintain consistent UI.

Both FeedSection instances use the "flex" layout consistently, which ensures a uniform user experience across the explore page.

Also applies to: 190-190

frontend/src/routes/profile/index.tsx (3)

5-8: Web3 authentication imports provide necessary functionality.

These imports bring in the authentication hook, React state management, user info type, and UI button component needed for the profile authentication flow.


15-18: User state and authentication hook are properly initialized.

The component correctly sets up state for user info and destructures all necessary authentication properties from the Web3Auth hook.


41-51: Conditional rendering provides a clean UX flow.

The component intelligently renders either the profile content when authenticated or a login prompt when not. The login button is correctly wired to the authentication hook.

frontend/src/components/FeedList.tsx (2)

19-28: Simplified header with cleaner styling.

The updated container and header styling creates a cleaner, more consistent layout. The removal of the "scroll" indicator simplifies the UI, which is a good choice if the feeds are now displayed vertically.


38-40: Updated route path aligns with new navigation structure.

Changing the link path from /feed/$feedId to /submissions/$feedId correctly aligns with the new routing structure introduced in this PR.

frontend/src/components/FeedLayout.tsx (2)

1-19: Well-structured component setup with dynamic title.

The component is properly typed with a clear interface and uses state appropriately for the mobile panel. The dynamic title based on feed context is a nice touch for user experience.


58-71: Responsive grid layout properly handles desktop/mobile views.

The grid layout with different column spans for desktop and mobile is well-implemented. The component effectively shows the top curators sidebar on desktop while hiding it on mobile in favor of the slide-in panel.

frontend/src/routes/submissions/$feedId.tsx (4)

1-13: Route implementation looks well-defined.

The route is correctly defined using createFileRoute with a dynamic parameter $feedId and correctly binds the FeedDetailsPage component. Good imports organization.


15-23: Data fetching pattern is appropriate.

The component properly uses route parameters and hooks to fetch related data. The use of destructuring for feed and items with a default empty array fallback is a good practice to avoid null checks later in the component.


28-48: Well-structured responsive UI for feed header.

The feed header section has good responsive design with proper gap spacing and flex direction changes between mobile and desktop views. The fallback text for missing name or description is a good touch.


90-102: Good usage of FeedLayout for content organization.

The component properly uses the FeedLayout component to organize content and pass the feedId prop for contextual filtering.

frontend/src/components/SubmissionsLayout.tsx (6)

1-12: Component interface is well-defined.

The layout component has clear props interface with appropriate types and optional flags. Good use of ReactNode for children and sidebar content.


34-36: Toggle functions are clean and concise.

The toggle functions for mobile menu and curators panel are well-implemented.


37-63: Mobile navigation controls look good.

The layout structure with header, hero, and mobile navigation controls is well-organized. Good use of aria-label attributes for accessibility.


64-98: Well-implemented mobile panels with transitions.

The mobile slide-in panels for feed list and curators are well-implemented with proper transitions, backdrop, and close buttons. Good accessibility considerations with aria labels.


99-116: Desktop grid layout is responsive and well-structured.

The desktop layout uses a grid system with appropriate column spans and overflow handling. The layout provides good separation of concerns between navigation, content, and supplementary information.


117-121: Mobile content is appropriately handled.

The mobile content area is properly hidden on larger screens and displayed with appropriate padding on mobile.

frontend/src/routes/submissions/index.tsx (4)

1-28: Route and imports are properly configured.

The route is correctly defined using createFileRoute and the imports are well-organized. Good separation between component imports, hooks, and UI elements.


47-54: Good implementation of search debouncing.

The search debouncing implementation is well done, preventing excessive filtering during user typing.


154-219: Filter panel UI is well-structured.

The filter panel has a clean layout with appropriate labels and controls. Good use of responsive design for different screen sizes.


221-237: Good implementation of infinite scrolling.

The InfiniteFeed component is well-integrated with appropriate props for loading states and rendering items. The condition hasNextPage && debouncedSearchQuery.trim() === "" correctly prevents loading more items when filtering.

frontend/src/components/ui/select.tsx (5)

7-12: Clean re-exports of Radix UI primitives.

Re-exporting the base components directly is a good approach for simplifying the API for consumers.


13-32: Well-structured SelectTrigger component.

The SelectTrigger component is well-implemented with proper props forwarding, ref handling, and styling. Good use of the cn utility for className composition.


33-66: Good implementation of scroll buttons.

Both scroll button components are properly implemented with consistent styling and icon usage.


68-98: SelectContent component is robust.

The SelectContent component handles positioning, animation, and viewport management well. Good use of conditional classes based on the position prop.


100-144: Label, Item, and Separator components look good.

These components are well-implemented with appropriate styling and props handling.

frontend/src/routeTree.gen.ts (7)

1-9: This is an auto-generated file

This file is automatically generated by TanStack Router and should not be manually edited. The correct process is to define your routes in the appropriate location and use TanStack Router's generation tools to update this file.

Since this file contains changes, please verify that these changes were generated by TanStack Router's tools rather than manual edits.


20-20: New routes for submissions feature

The imports for the new submissions routes have been properly added, supporting the new submissions feature with both an index page and feed-specific pages.

Also applies to: 25-25


73-77: Route definitions for submissions pages

The route definitions for both submissions routes are properly structured:

  1. /submissions/ - For the submissions index page
  2. /submissions/$feedId - For feed-specific submission views

These routes are correctly defined with proper parent routes and paths.

Also applies to: 103-107


192-198: Interface updates for FileRoutesByPath

The submissions routes have been correctly added to the FileRoutesByPath interface, ensuring they're properly typed throughout the application.

Also applies to: 227-233


273-273: Route type definitions updated consistently

All necessary type interfaces have been updated to include the new routes:

  • FileRoutesByFullPath
  • FileRoutesByTo
  • FileRoutesById
  • Path lists in FileRouteTypes

This ensures the new routes are properly typed throughout the application.

Also applies to: 278-278, 289-289, 292-292, 306-306, 311-311, 324-324, 329-330, 339-339, 341-342, 354-354, 358-359


371-371: Root route children updated with submissions routes

The new routes have been properly added to the RootRouteChildren interface and implementation, making them accessible from the root route.

Also applies to: 374-374, 385-385, 388-388


408-408: Route manifest updated

The route manifest section has been properly updated to include the new routes and their file paths, ensuring the router configuration is complete.

Also applies to: 410-412, 451-453, 468-470

Comment on lines +79 to +81
<p className="text-xs font-black">
{curator.name ? curator.name : "Web3Plug (murica/acc)"}
</p>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Replace hardcoded fallback name

The component uses a hardcoded fallback name that appears to be specific to a user. Use a more generic fallback.

-                    {curator.name ? curator.name : "Web3Plug (murica/acc)"}
+                    {curator.name || curator.curatorUsername || "Anonymous Curator"}
📝 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
<p className="text-xs font-black">
{curator.name ? curator.name : "Web3Plug (murica/acc)"}
</p>
<p className="text-xs font-black">
{curator.name || curator.curatorUsername || "Anonymous Curator"}
</p>


return (
<div className="grid grid-cols-1 lg:grid-cols-3 gap-4">
<div className="grid grid-col-1 gap-4">
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

Fix typo in grid class name

There's a typo in the CSS class name: grid-col-1 should be grid-cols-1. This will prevent the grid column styling from being applied correctly.

-    <div className="grid grid-col-1 gap-4">
+    <div className="grid grid-cols-1 gap-4">
📝 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
<div className="grid grid-col-1 gap-4">
<div className="grid grid-cols-1 gap-4">

💡 Verification agent

🧩 Analysis chain

Consider adding back responsive grid columns

The responsive layout (lg:grid-cols-3) was removed from this component. While this may align with using the new layout prop in SubmissionList, it reduces the component's flexibility when used in other contexts.


🏁 Script executed:

#!/bin/bash
# Check where InfiniteFeed is used in the codebase 
# to confirm if all usages have been updated to handle layout differently
rg -A 2 -B 2 "InfiniteFeed" --type=tsx

Length of output: 66


To ensure we capture all usages of InfiniteFeed, let’s search across .tsx files without relying on the built-in type definitions:


🏁 Script executed:

#!/bin/bash
# Find all references to InfiniteFeed in TSX files
rg "InfiniteFeed" -n -g "*.tsx"

Length of output: 805


Let’s verify whether a layout prop (or any grid-related props) are passed to InfiniteFeed in each route to ensure the default single-column class won’t break layouts:


🏁 Script executed:

#!/bin/bash
# Show context around InfiniteFeed usage in all route files
rg "InfiniteFeed" -n -g "frontend/src/routes/**/*.tsx" -A3 -B2

Length of output: 2907


Let’s verify whether SubmissionList actually exposes a layout (or similar) prop that we could leverage here:


🏁 Script executed:

#!/bin/bash
# Inspect SubmissionListProps to see if a layout or className prop exists
rg "interface SubmissionListProps" -A5 -B5 -g "frontend/src/components/SubmissionList.tsx"
rg "layout" -n -g "frontend/src/components/SubmissionList.tsx"

Length of output: 1126


Let’s inspect how InfiniteFeed renders its grid and uses SubmissionList:


🏁 Script executed:

#!/bin/bash
# Check where SubmissionList is used and if 'layout' is passed
rg "SubmissionList" -n -g "frontend/src/components/InfiniteFeed.tsx"
rg "layout" -n -g "frontend/src/components/InfiniteFeed.tsx"
# Show the container div and surrounding code
sed -n '50,100p' frontend/src/components/InfiniteFeed.tsx

Length of output: 1332


Restore responsive grid columns for InfiniteFeed
The container in frontend/src/components/InfiniteFeed.tsx is locked to a single column, preventing multi-column layouts on larger screens. Either re-introduce the responsive classes or expose a prop to override them.

• Location: line ~65 in InfiniteFeed.tsx
• Example diff:

- <div className="grid grid-col-1 gap-4">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-4">

• Alternatively, add a columns or className prop to make the number of columns configurable.

📝 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
<div className="grid grid-col-1 gap-4">
<div className="grid grid-cols-1 lg:grid-cols-3 gap-4">

Comment on lines +66 to +72
{sortedItems.map((item) => (
<FeedItem
key={item.tweetId}
submission={item}
statusFilter={statusFilter || "all"}
/>
))}
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

Potential null reference in submittedAt date sorting.

The code assumes that submittedAt is always present with the non-null assertion operator (!), but there's no check to ensure this property exists before sorting.

Add a fallback for items that might not have a valid submittedAt date:

const sortedItems = filteredItems.sort(
  (a, b) =>
-   new Date(b.submittedAt!).getTime() - new Date(a.submittedAt!).getTime(),
+   new Date(b.submittedAt || b.createdAt || Date.now()).getTime() - 
+   new Date(a.submittedAt || a.createdAt || Date.now()).getTime(),
);
📝 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
{sortedItems.map((item) => (
<FeedItem
key={item.tweetId}
submission={item}
statusFilter={statusFilter || "all"}
/>
))}
const sortedItems = filteredItems.sort(
(a, b) =>
new Date(b.submittedAt || b.createdAt || Date.now()).getTime() -
new Date(a.submittedAt || a.createdAt || Date.now()).getTime(),
);

layout="grid"
/>
</div>
<ProfileTabs />
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify the purpose of ProfileTabs component.

The ProfileTabs component is included within the FeedLayout without any props or context. Please verify if this component is necessary here and what functionality it provides in this context.


🏁 Script executed:

#!/bin/bash
# Check the implementation of ProfileTabs component to understand its purpose
cat frontend/src/components/profile/ProfileTabs.tsx

Length of output: 1647


🏁 Script executed:

#!/bin/bash
# Display the context around the ProfileTabs usage in the feed route
sed -n '1,200p' frontend/src/routes/submissions/\$feedId.tsx

Length of output: 5130


🏁 Script executed:

#!/bin/bash
# Inspect how FeedLayout uses its children to confirm context
sed -n '1,200p' frontend/src/components/FeedLayout.tsx

Length of output: 2618


🏁 Script executed:

#!/bin/bash
# List profile-related components to inspect their contents
ls frontend/src/components/profile

Length of output: 112


Review ProfileTabs Placement and Context

It looks like ProfileTabs renders a full user‐profile interface (overview, content, my-feeds, points, activity), but on the feed details page it’s included without any props (e.g. a user or profile ID) or context:

• File: frontend/src/routes/submissions/$feedId.tsx
• Line 103: <ProfileTabs />

Please clarify and address the following before merging:

  • Intended data source: Which user’s profile should these tabs display? If it’s the current user, ensure you pass the proper identifier or pull from context.
  • Required props/context: Should ProfileTabs accept a userId or similar prop here?
  • Component placement: Is this meant for the feed page, or should it live on a dedicated profile route?

Comment on lines +88 to +115
const sidebarContent = (
<div className="">
<FeedList />
</div>
);

// Handle search input changes
const handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setSearchQuery(e.target.value);
};

// Toggle filter visibility
const toggleFilters = () => {
setShowFilters(!showFilters);
};

// Apply filters
const applyFilters = () => {
// Update global filter state
setStatusFilter(localStatusFilter);
// Update other global filters (would need to add these to the store)
// setSortOrder(localSortOrder);
// setPlatform(localPlatform);

// Close the filter panel
setShowFilters(false);
};

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

Apply filters function needs completion.

The applyFilters function only applies the status filter but not the sort order or platform filters. This makes those UI controls effectively non-functional. Ensure all filter changes are applied.

Update the applyFilters function to apply all filter changes as suggested in the earlier comment about filter state management.

Comment on lines +34 to +62
const { statusFilter, sortOrder, setStatusFilter } = useFeedFilterStore();

// Local filter state (before applying)
const [localStatusFilter, setLocalStatusFilter] =
useState<StatusFilterType>(statusFilter);
const [localSortOrder, setLocalSortOrder] =
useState<SortOrderType>(sortOrder);
const [localPlatform, setLocalPlatform] = useState("twitter");

const [showFilters, setShowFilters] = useState(false);
const [searchQuery, setSearchQuery] = useState("");
const [debouncedSearchQuery, setDebouncedSearchQuery] = useState("");

// Debounce search query to avoid excessive filtering
useEffect(() => {
const timer = setTimeout(() => {
setDebouncedSearchQuery(searchQuery);
}, 300);

return () => clearTimeout(timer);
}, [searchQuery]);

// Fetch submissions with infinite scroll
const ITEMS_PER_PAGE = 20;
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, status } =
useAllSubmissions(
ITEMS_PER_PAGE,
statusFilter === "all" ? undefined : statusFilter,
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Filter state management needs completion.

The component manages local state for filters but doesn't fully apply them to the global store. The comments on lines 109-110 suggest that functions like setSortOrder and setPlatform should be implemented in the store.

// In useFeedFilterStore.ts
export const useFeedFilterStore = create<FeedFilterStore>((set) => ({
  statusFilter: "all",
  sortOrder: "newest",
  platform: "twitter",
  setStatusFilter: (status) => set({ statusFilter: status }),
+ setSortOrder: (sortOrder) => set({ sortOrder }),
+ setPlatform: (platform) => set({ platform }),
}));

// Then in this file:
- const { statusFilter, sortOrder, setStatusFilter } = useFeedFilterStore();
+ const { statusFilter, sortOrder, platform, setStatusFilter, setSortOrder, setPlatform } = useFeedFilterStore();

// And later in applyFilters():
  const applyFilters = () => {
    // Update global filter state
    setStatusFilter(localStatusFilter);
-   // Update other global filters (would need to add these to the store)
-   // setSortOrder(localSortOrder);
-   // setPlatform(localPlatform);
+   setSortOrder(localSortOrder);
+   setPlatform(localPlatform);

    // Close the filter panel
    setShowFilters(false);
  };
📝 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
const { statusFilter, sortOrder, setStatusFilter } = useFeedFilterStore();
// Local filter state (before applying)
const [localStatusFilter, setLocalStatusFilter] =
useState<StatusFilterType>(statusFilter);
const [localSortOrder, setLocalSortOrder] =
useState<SortOrderType>(sortOrder);
const [localPlatform, setLocalPlatform] = useState("twitter");
const [showFilters, setShowFilters] = useState(false);
const [searchQuery, setSearchQuery] = useState("");
const [debouncedSearchQuery, setDebouncedSearchQuery] = useState("");
// Debounce search query to avoid excessive filtering
useEffect(() => {
const timer = setTimeout(() => {
setDebouncedSearchQuery(searchQuery);
}, 300);
return () => clearTimeout(timer);
}, [searchQuery]);
// Fetch submissions with infinite scroll
const ITEMS_PER_PAGE = 20;
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, status } =
useAllSubmissions(
ITEMS_PER_PAGE,
statusFilter === "all" ? undefined : statusFilter,
);
// In useFeedFilterStore.ts
export const useFeedFilterStore = create<FeedFilterStore>((set) => ({
statusFilter: "all",
sortOrder: "newest",
platform: "twitter",
setStatusFilter: (status) => set({ statusFilter: status }),
setSortOrder: (sortOrder) => set({ sortOrder }),
setPlatform: (platform) => set({ platform }),
}));
// In frontend/src/routes/submissions/index.tsx
// … earlier imports and hooks …
const { statusFilter, sortOrder, platform, setStatusFilter, setSortOrder, setPlatform } =
useFeedFilterStore();
// Local filter state (before applying)
const [localStatusFilter, setLocalStatusFilter] = useState<StatusFilterType>(statusFilter);
const [localSortOrder, setLocalSortOrder] = useState<SortOrderType>(sortOrder);
const [localPlatform, setLocalPlatform] = useState(platform);
// … other state and effects …
const applyFilters = () => {
// Update global filter state
setStatusFilter(localStatusFilter);
setSortOrder(localSortOrder);
setPlatform(localPlatform);
// Close the filter panel
setShowFilters(false);
};

@elliotBraem elliotBraem merged commit 1b4c006 into staging Apr 28, 2025
4 of 5 checks passed
@elliotBraem elliotBraem deleted the feat/submissions-page branch April 28, 2025 15:34
@coderabbitai coderabbitai bot mentioned this pull request May 26, 2025
elliotBraem added a commit that referenced this pull request Jun 10, 2025
* Get basic working (#109)

* Get basic working

* adds rss feeds

* added stablewatch founder and stablecoin intern from messaria as approvers on stablecoins feed

* fixes to config for grants, sui, and telegram channels (#102)

* add query param for selective processing (#103)

* adds query param to process

* add query param for processing

* simplify

* add tags

* Feat: implement frontend leaderboard (#93)

* feat: implement frontend leaderboard

* feat: implement a leaderboard in frontend

* feat: implemented leaderboard

* fix: rebuild implement leaderboard

* fix: prettier

* fix: prettier

* fix: reimplement frontend leaderboard

* fix: implement frontend leaderboard

* approval rate

* sets approval rate and hides curator

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* remove tailwind-scrollbar

* added bob to desci feed

* Get basic working

* set .env.example

* nitpicks

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Elliot Braem <elliot@everything.dev>
Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com>

* fix polyfills

* Explore Page (#108)

* Explore Page - commit-1

* Explore Page - commit-2

* explore page - commit-3

* explore page - commit - 4

* explore page - commit - prettier

* explore page responsiveness + code Rabbit Comments

* code Rabbit Comments resolved

* css updates

* css changes 2

* header update + mobile responsive

* conflicts resolved

* Rebase and changes

* Fix fmt

* Header + Explore Page Style (#113)

* Explore Page - commit-1

* Explore Page - commit-2

* explore page - commit-3

* explore page - commit - 4

* explore page - commit - prettier

* explore page responsiveness + code Rabbit Comments

* code Rabbit Comments resolved

* css updates

* css changes 2

* header update + mobile responsive

* conflicts resolved

* Rebase and changes

* Fix fmt

* Header Updates + Web3Auth getUserInfo + Explore Page changes

* fmt

* coderabbit comments resolved

* Profile page (#120)

* Update the FE to have the profile page (header and tabs init)

* Move tabs to it's own component

* Add stats and top badges to overview

* Finish the overview tab

* Update overview page and init content page

* feat(profile-page): add Content and My Feed tags

* feat(profile-page): finish profile page static UI

* refactor: fmt

* [FEATURE] Create Feed Page - DRAFT (#121)

* Curate Engine Step 1

* content-progress-configuration step-1

* Curation Settings Part 2 and 3

* CodeRabbit Comments Resolved + Mobile Responsive

* Responsiveness: empty State, JSON check

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* update to main

* fmt

* Feat/submissions page (#127)

* Submissions Page + Feed Page + Mobile Responsiveness

* fixes

* craete-feed authenticated user condition

* fmt

* remove sqlite

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* Feed Page Tabs (#130)

* set tanstack routes (#132)

* [Task]: Add connect button to feed page  (#131)

* feat: Add connect button to feed page

* fix: recommit

* added back to stablecoins feed since stablewatch forked their own

* fix packages, update pg, and ignore cloudflare sockets

* fmt

---------

Co-authored-by: ethnclark <ethanclark1310@gmail.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* uses prod data

* Update changes to latest staging

* Revert "Update changes to latest staging"

This reverts commit cd12908.

* Fix Sort By Oldest (#136)

* fix: Sort By Oldest

* fix: Sort By Oldest

* fix: Fix RecentSubmissions Sort Order Update

* fix: All feed should be hidden, remove double title

---------

Co-authored-by: vohuunhan1310@gmail.com <ethanclark1310@gmail.com>

* UI fixes (#138)

* UI fixes

* fmt

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* Fix: Leaderboard improvements (#140)

* fix: Leaderboard improvements

* fix: fmt

* reorganize

* remove unused

* rename

* clean up

* fmt

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* clean up

* wallet wip

* todo

* auth flow, wip

* types clean up

* fix types

* login modal wip

* modals

* controller, service, successful create account

* clean with data, metadata, and pattern, validation, and json schema

* add migration doc

* add activity and delete user

* fix migration

* add seed remote method

* fix naming

* fix script call

* file extension

* remove build schema

* proper build time

* fix Dockerfile

* rsbuild

* Standard Header Component + Responsivenss Fixes (#146)

* Standard Header Component + Responsivenss Fixes

* fmt

* rename Hero

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* fix broken link

* don't distribute on staging

* fix path

* env log

* comment out

* railway env

* fix: Profile adjustments (#153)

* fix: Leaderboard improvements

* fix: fmt

* fix: Profile adjustments

* fix: resolve conversation

* Login Modal Fixes (#154)

* Login Modal Fixes

* Resolve Comments

* container

* container fixes

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* organize

* fmt

* update feeds (#156)

* Leaderboard width fixes

* feat: save profile image to pinata (#158)

* feat(fe): save profile image to pinata

* fix: fix comment

* Feat Integrate NEAR Solana, Ethereum wallet selection (#159)

* fix: Leaderboard improvements

* fix: fmt

* fix: Profile adjustments

* fix: resolve conversation

* feat: Integrate NEAR wallet selection

* fix: run fmt

* fix: add function create accesstokenpayload use wallet selector near

* fix: resolve conversation

* Feed Submission + Feed Review Page (#160)

* Feed Review Page and Feed Creation

* fmt

* coderabbit comments resolved

* comments resolved

* comments resolved

* reset routeTree

* minor fixes (#164)

* minor fixes

* fmt

* remove node-compile-cache

* reuse user menu

* header clean up

* remove how it works

* clean up

* set submissions at root route

* fmt

* clean

* create is coming soon

* clean up

* user link

* Adds caddyfile and frontend clean up (#165)

* removes serve static from backend

* fmt

* fix build

* adds caddyfile

* clean up submission feed

* pnpm lock

* fix turbo

* fix build

* db migration

* without time zone

* cleans up submission list

* Adds shared-db, types package, initial migration (#166)

* init

* upgrade tsconfigs

* shared-db build

* shared-db wip

* transfer getAllSubmissions

* hooked up

* moves to shared-db

* fmt

* update dockerfile

* monorepo

* working build

* migration service

* turbo

* install pnpm

* temp proxy

* no include request headers

* clean up

* proper path

* renaming

* fmt

* update caddyfile

* different strategy

* use route

* fix BACKEND to API

* ignore temp

* temp remove

* back to orig

* turn on auto https

* disable

* route block

* clean up

* configure host

* favicon

* add staging domain

* http:

* set domain adn host

* correct bash

* matching host

* Adds edit feed and image upload (#168)

* adds page

* image upload and edit feed

* update pnpm lock

* CSR

* vercel json

* move

* temp disable auth

* set image

* fix query

* submisison service running

* Migrates submission service, is running (#169)

* init

* wip

* clean up

* feed list clean up

* break up functions

* fix config path

* adds plugins route and integrates with plugin service

* remote curate.config.json

* plugins table

* adds plugin pages

* set type

* fix feed types

* plguin errors

* env injection

* fix queries

* fix migration

* fix migration

* fix migration

* redo migration

* decouples moderation

* fix status

* fix feeds

* hide moderation actions

---------

Co-authored-by: Zeeshan Ahmad <itexpert120@outlook.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com>
Co-authored-by: Muhammad Saad Iqbal <saadiqbal.dev@outlook.com>
Co-authored-by: ethnclark <ethanclark1310@gmail.com>
Co-authored-by: dungpt82 <69756171+dungpt99@users.noreply.github.com>
elliotBraem added a commit that referenced this pull request Jun 10, 2025
* Get basic working (#109)

* Get basic working

* adds rss feeds

* added stablewatch founder and stablecoin intern from messaria as approvers on stablecoins feed

* fixes to config for grants, sui, and telegram channels (#102)

* add query param for selective processing (#103)

* adds query param to process

* add query param for processing

* simplify

* add tags

* Feat: implement frontend leaderboard (#93)

* feat: implement frontend leaderboard

* feat: implement a leaderboard in frontend

* feat: implemented leaderboard

* fix: rebuild implement leaderboard

* fix: prettier

* fix: prettier

* fix: reimplement frontend leaderboard

* fix: implement frontend leaderboard

* approval rate

* sets approval rate and hides curator

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* remove tailwind-scrollbar

* added bob to desci feed

* Get basic working

* set .env.example

* nitpicks

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Elliot Braem <elliot@everything.dev>
Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com>

* fix polyfills

* Explore Page (#108)

* Explore Page - commit-1

* Explore Page - commit-2

* explore page - commit-3

* explore page - commit - 4

* explore page - commit - prettier

* explore page responsiveness + code Rabbit Comments

* code Rabbit Comments resolved

* css updates

* css changes 2

* header update + mobile responsive

* conflicts resolved

* Rebase and changes

* Fix fmt

* Header + Explore Page Style (#113)

* Explore Page - commit-1

* Explore Page - commit-2

* explore page - commit-3

* explore page - commit - 4

* explore page - commit - prettier

* explore page responsiveness + code Rabbit Comments

* code Rabbit Comments resolved

* css updates

* css changes 2

* header update + mobile responsive

* conflicts resolved

* Rebase and changes

* Fix fmt

* Header Updates + Web3Auth getUserInfo + Explore Page changes

* fmt

* coderabbit comments resolved

* Profile page (#120)

* Update the FE to have the profile page (header and tabs init)

* Move tabs to it's own component

* Add stats and top badges to overview

* Finish the overview tab

* Update overview page and init content page

* feat(profile-page): add Content and My Feed tags

* feat(profile-page): finish profile page static UI

* refactor: fmt

* [FEATURE] Create Feed Page - DRAFT (#121)

* Curate Engine Step 1

* content-progress-configuration step-1

* Curation Settings Part 2 and 3

* CodeRabbit Comments Resolved + Mobile Responsive

* Responsiveness: empty State, JSON check

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* update to main

* fmt

* Feat/submissions page (#127)

* Submissions Page + Feed Page + Mobile Responsiveness

* fixes

* craete-feed authenticated user condition

* fmt

* remove sqlite

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* Feed Page Tabs (#130)

* set tanstack routes (#132)

* [Task]: Add connect button to feed page  (#131)

* feat: Add connect button to feed page

* fix: recommit

* added back to stablecoins feed since stablewatch forked their own

* fix packages, update pg, and ignore cloudflare sockets

* fmt

---------

Co-authored-by: ethnclark <ethanclark1310@gmail.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* uses prod data

* Update changes to latest staging

* Revert "Update changes to latest staging"

This reverts commit cd12908.

* Fix Sort By Oldest (#136)

* fix: Sort By Oldest

* fix: Sort By Oldest

* fix: Fix RecentSubmissions Sort Order Update

* fix: All feed should be hidden, remove double title

---------

Co-authored-by: vohuunhan1310@gmail.com <ethanclark1310@gmail.com>

* UI fixes (#138)

* UI fixes

* fmt

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* Fix: Leaderboard improvements (#140)

* fix: Leaderboard improvements

* fix: fmt

* reorganize

* remove unused

* rename

* clean up

* fmt

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* clean up

* wallet wip

* todo

* auth flow, wip

* types clean up

* fix types

* login modal wip

* modals

* controller, service, successful create account

* clean with data, metadata, and pattern, validation, and json schema

* add migration doc

* add activity and delete user

* fix migration

* add seed remote method

* fix naming

* fix script call

* file extension

* remove build schema

* proper build time

* fix Dockerfile

* rsbuild

* Standard Header Component + Responsivenss Fixes (#146)

* Standard Header Component + Responsivenss Fixes

* fmt

* rename Hero

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* fix broken link

* don't distribute on staging

* fix path

* env log

* comment out

* railway env

* fix: Profile adjustments (#153)

* fix: Leaderboard improvements

* fix: fmt

* fix: Profile adjustments

* fix: resolve conversation

* Login Modal Fixes (#154)

* Login Modal Fixes

* Resolve Comments

* container

* container fixes

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* organize

* fmt

* update feeds (#156)

* Leaderboard width fixes

* feat: save profile image to pinata (#158)

* feat(fe): save profile image to pinata

* fix: fix comment

* Feat Integrate NEAR Solana, Ethereum wallet selection (#159)

* fix: Leaderboard improvements

* fix: fmt

* fix: Profile adjustments

* fix: resolve conversation

* feat: Integrate NEAR wallet selection

* fix: run fmt

* fix: add function create accesstokenpayload use wallet selector near

* fix: resolve conversation

* Feed Submission + Feed Review Page (#160)

* Feed Review Page and Feed Creation

* fmt

* coderabbit comments resolved

* comments resolved

* comments resolved

* reset routeTree

* minor fixes (#164)

* minor fixes

* fmt

* remove node-compile-cache

* reuse user menu

* header clean up

* remove how it works

* clean up

* set submissions at root route

* fmt

* clean

* create is coming soon

* clean up

* user link

* Adds caddyfile and frontend clean up (#165)

* removes serve static from backend

* fmt

* fix build

* adds caddyfile

* clean up submission feed

* pnpm lock

* fix turbo

* fix build

* db migration

* without time zone

* cleans up submission list

* Adds shared-db, types package, initial migration (#166)

* init

* upgrade tsconfigs

* shared-db build

* shared-db wip

* transfer getAllSubmissions

* hooked up

* moves to shared-db

* fmt

* update dockerfile

* monorepo

* working build

* migration service

* turbo

* install pnpm

* temp proxy

* no include request headers

* clean up

* proper path

* renaming

* fmt

* update caddyfile

* different strategy

* use route

* fix BACKEND to API

* ignore temp

* temp remove

* back to orig

* turn on auto https

* disable

* route block

* clean up

* configure host

* favicon

* add staging domain

* http:

* set domain adn host

* correct bash

* matching host

* Adds edit feed and image upload (#168)

* adds page

* image upload and edit feed

* update pnpm lock

* CSR

* vercel json

* move

* temp disable auth

* set image

* fix query

* submisison service running

* Migrates submission service, is running (#169)

* init

* wip

* clean up

* feed list clean up

* break up functions

* fix config path

* adds plugins route and integrates with plugin service

* remote curate.config.json

* plugins table

* adds plugin pages

* set type

* fix feed types

* plguin errors

* env injection

* fix queries

* fix migration

* fix migration

* fix migration

* redo migration

* decouples moderation

* fix status

* fix feeds

* hide moderation actions

* adds overwrite script

* migrate timestamps

* better date handling

---------

Co-authored-by: Zeeshan Ahmad <itexpert120@outlook.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com>
Co-authored-by: Muhammad Saad Iqbal <saadiqbal.dev@outlook.com>
Co-authored-by: ethnclark <ethanclark1310@gmail.com>
Co-authored-by: dungpt82 <69756171+dungpt99@users.noreply.github.com>
elliotBraem added a commit that referenced this pull request Jun 10, 2025
* Get basic working (#109)

* Get basic working

* adds rss feeds

* added stablewatch founder and stablecoin intern from messaria as approvers on stablecoins feed

* fixes to config for grants, sui, and telegram channels (#102)

* add query param for selective processing (#103)

* adds query param to process

* add query param for processing

* simplify

* add tags

* Feat: implement frontend leaderboard (#93)

* feat: implement frontend leaderboard

* feat: implement a leaderboard in frontend

* feat: implemented leaderboard

* fix: rebuild implement leaderboard

* fix: prettier

* fix: prettier

* fix: reimplement frontend leaderboard

* fix: implement frontend leaderboard

* approval rate

* sets approval rate and hides curator

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* remove tailwind-scrollbar

* added bob to desci feed

* Get basic working

* set .env.example

* nitpicks

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Elliot Braem <elliot@everything.dev>
Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com>

* fix polyfills

* Explore Page (#108)

* Explore Page - commit-1

* Explore Page - commit-2

* explore page - commit-3

* explore page - commit - 4

* explore page - commit - prettier

* explore page responsiveness + code Rabbit Comments

* code Rabbit Comments resolved

* css updates

* css changes 2

* header update + mobile responsive

* conflicts resolved

* Rebase and changes

* Fix fmt

* Header + Explore Page Style (#113)

* Explore Page - commit-1

* Explore Page - commit-2

* explore page - commit-3

* explore page - commit - 4

* explore page - commit - prettier

* explore page responsiveness + code Rabbit Comments

* code Rabbit Comments resolved

* css updates

* css changes 2

* header update + mobile responsive

* conflicts resolved

* Rebase and changes

* Fix fmt

* Header Updates + Web3Auth getUserInfo + Explore Page changes

* fmt

* coderabbit comments resolved

* Profile page (#120)

* Update the FE to have the profile page (header and tabs init)

* Move tabs to it's own component

* Add stats and top badges to overview

* Finish the overview tab

* Update overview page and init content page

* feat(profile-page): add Content and My Feed tags

* feat(profile-page): finish profile page static UI

* refactor: fmt

* [FEATURE] Create Feed Page - DRAFT (#121)

* Curate Engine Step 1

* content-progress-configuration step-1

* Curation Settings Part 2 and 3

* CodeRabbit Comments Resolved + Mobile Responsive

* Responsiveness: empty State, JSON check

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* update to main

* fmt

* Feat/submissions page (#127)

* Submissions Page + Feed Page + Mobile Responsiveness

* fixes

* craete-feed authenticated user condition

* fmt

* remove sqlite

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* Feed Page Tabs (#130)

* set tanstack routes (#132)

* [Task]: Add connect button to feed page  (#131)

* feat: Add connect button to feed page

* fix: recommit

* added back to stablecoins feed since stablewatch forked their own

* fix packages, update pg, and ignore cloudflare sockets

* fmt

---------

Co-authored-by: ethnclark <ethanclark1310@gmail.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* uses prod data

* Update changes to latest staging

* Revert "Update changes to latest staging"

This reverts commit cd12908.

* Fix Sort By Oldest (#136)

* fix: Sort By Oldest

* fix: Sort By Oldest

* fix: Fix RecentSubmissions Sort Order Update

* fix: All feed should be hidden, remove double title

---------

Co-authored-by: vohuunhan1310@gmail.com <ethanclark1310@gmail.com>

* UI fixes (#138)

* UI fixes

* fmt

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* Fix: Leaderboard improvements (#140)

* fix: Leaderboard improvements

* fix: fmt

* reorganize

* remove unused

* rename

* clean up

* fmt

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* clean up

* wallet wip

* todo

* auth flow, wip

* types clean up

* fix types

* login modal wip

* modals

* controller, service, successful create account

* clean with data, metadata, and pattern, validation, and json schema

* add migration doc

* add activity and delete user

* fix migration

* add seed remote method

* fix naming

* fix script call

* file extension

* remove build schema

* proper build time

* fix Dockerfile

* rsbuild

* Standard Header Component + Responsivenss Fixes (#146)

* Standard Header Component + Responsivenss Fixes

* fmt

* rename Hero

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* fix broken link

* don't distribute on staging

* fix path

* env log

* comment out

* railway env

* fix: Profile adjustments (#153)

* fix: Leaderboard improvements

* fix: fmt

* fix: Profile adjustments

* fix: resolve conversation

* Login Modal Fixes (#154)

* Login Modal Fixes

* Resolve Comments

* container

* container fixes

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* organize

* fmt

* update feeds (#156)

* Leaderboard width fixes

* feat: save profile image to pinata (#158)

* feat(fe): save profile image to pinata

* fix: fix comment

* Feat Integrate NEAR Solana, Ethereum wallet selection (#159)

* fix: Leaderboard improvements

* fix: fmt

* fix: Profile adjustments

* fix: resolve conversation

* feat: Integrate NEAR wallet selection

* fix: run fmt

* fix: add function create accesstokenpayload use wallet selector near

* fix: resolve conversation

* Feed Submission + Feed Review Page (#160)

* Feed Review Page and Feed Creation

* fmt

* coderabbit comments resolved

* comments resolved

* comments resolved

* reset routeTree

* minor fixes (#164)

* minor fixes

* fmt

* remove node-compile-cache

* reuse user menu

* header clean up

* remove how it works

* clean up

* set submissions at root route

* fmt

* clean

* create is coming soon

* clean up

* user link

* Adds caddyfile and frontend clean up (#165)

* removes serve static from backend

* fmt

* fix build

* adds caddyfile

* clean up submission feed

* pnpm lock

* fix turbo

* fix build

* db migration

* without time zone

* cleans up submission list

* Adds shared-db, types package, initial migration (#166)

* init

* upgrade tsconfigs

* shared-db build

* shared-db wip

* transfer getAllSubmissions

* hooked up

* moves to shared-db

* fmt

* update dockerfile

* monorepo

* working build

* migration service

* turbo

* install pnpm

* temp proxy

* no include request headers

* clean up

* proper path

* renaming

* fmt

* update caddyfile

* different strategy

* use route

* fix BACKEND to API

* ignore temp

* temp remove

* back to orig

* turn on auto https

* disable

* route block

* clean up

* configure host

* favicon

* add staging domain

* http:

* set domain adn host

* correct bash

* matching host

* Adds edit feed and image upload (#168)

* adds page

* image upload and edit feed

* update pnpm lock

* CSR

* vercel json

* move

* temp disable auth

* set image

* fix query

* submisison service running

* Migrates submission service, is running (#169)

* init

* wip

* clean up

* feed list clean up

* break up functions

* fix config path

* adds plugins route and integrates with plugin service

* remote curate.config.json

* plugins table

* adds plugin pages

* set type

* fix feed types

* plguin errors

* env injection

* fix queries

* fix migration

* fix migration

* fix migration

* redo migration

* decouples moderation

* fix status

* fix feeds

* hide moderation actions

* adds overwrite script

* migrate timestamps

* better date handling

* fix

---------

Co-authored-by: Zeeshan Ahmad <itexpert120@outlook.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com>
Co-authored-by: Muhammad Saad Iqbal <saadiqbal.dev@outlook.com>
Co-authored-by: ethnclark <ethanclark1310@gmail.com>
Co-authored-by: dungpt82 <69756171+dungpt99@users.noreply.github.com>
elliotBraem added a commit that referenced this pull request Jun 20, 2025
* Get basic working (#109)

* Get basic working

* adds rss feeds

* added stablewatch founder and stablecoin intern from messaria as approvers on stablecoins feed

* fixes to config for grants, sui, and telegram channels (#102)

* add query param for selective processing (#103)

* adds query param to process

* add query param for processing

* simplify

* add tags

* Feat: implement frontend leaderboard (#93)

* feat: implement frontend leaderboard

* feat: implement a leaderboard in frontend

* feat: implemented leaderboard

* fix: rebuild implement leaderboard

* fix: prettier

* fix: prettier

* fix: reimplement frontend leaderboard

* fix: implement frontend leaderboard

* approval rate

* sets approval rate and hides curator

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* remove tailwind-scrollbar

* added bob to desci feed

* Get basic working

* set .env.example

* nitpicks

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Elliot Braem <elliot@everything.dev>
Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com>

* fix polyfills

* Explore Page (#108)

* Explore Page - commit-1

* Explore Page - commit-2

* explore page - commit-3

* explore page - commit - 4

* explore page - commit - prettier

* explore page responsiveness + code Rabbit Comments

* code Rabbit Comments resolved

* css updates

* css changes 2

* header update + mobile responsive

* conflicts resolved

* Rebase and changes

* Fix fmt

* Header + Explore Page Style (#113)

* Explore Page - commit-1

* Explore Page - commit-2

* explore page - commit-3

* explore page - commit - 4

* explore page - commit - prettier

* explore page responsiveness + code Rabbit Comments

* code Rabbit Comments resolved

* css updates

* css changes 2

* header update + mobile responsive

* conflicts resolved

* Rebase and changes

* Fix fmt

* Header Updates + Web3Auth getUserInfo + Explore Page changes

* fmt

* coderabbit comments resolved

* Profile page (#120)

* Update the FE to have the profile page (header and tabs init)

* Move tabs to it's own component

* Add stats and top badges to overview

* Finish the overview tab

* Update overview page and init content page

* feat(profile-page): add Content and My Feed tags

* feat(profile-page): finish profile page static UI

* refactor: fmt

* [FEATURE] Create Feed Page - DRAFT (#121)

* Curate Engine Step 1

* content-progress-configuration step-1

* Curation Settings Part 2 and 3

* CodeRabbit Comments Resolved + Mobile Responsive

* Responsiveness: empty State, JSON check

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* update to main

* fmt

* Feat/submissions page (#127)

* Submissions Page + Feed Page + Mobile Responsiveness

* fixes

* craete-feed authenticated user condition

* fmt

* remove sqlite

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* Feed Page Tabs (#130)

* set tanstack routes (#132)

* [Task]: Add connect button to feed page  (#131)

* feat: Add connect button to feed page

* fix: recommit

* added back to stablecoins feed since stablewatch forked their own

* fix packages, update pg, and ignore cloudflare sockets

* fmt

---------

Co-authored-by: ethnclark <ethanclark1310@gmail.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* uses prod data

* Update changes to latest staging

* Revert "Update changes to latest staging"

This reverts commit cd12908.

* Fix Sort By Oldest (#136)

* fix: Sort By Oldest

* fix: Sort By Oldest

* fix: Fix RecentSubmissions Sort Order Update

* fix: All feed should be hidden, remove double title

---------

Co-authored-by: vohuunhan1310@gmail.com <ethanclark1310@gmail.com>

* UI fixes (#138)

* UI fixes

* fmt

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* Fix: Leaderboard improvements (#140)

* fix: Leaderboard improvements

* fix: fmt

* reorganize

* remove unused

* rename

* clean up

* fmt

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* clean up

* wallet wip

* todo

* auth flow, wip

* types clean up

* fix types

* login modal wip

* modals

* controller, service, successful create account

* clean with data, metadata, and pattern, validation, and json schema

* add migration doc

* add activity and delete user

* fix migration

* add seed remote method

* fix naming

* fix script call

* file extension

* remove build schema

* proper build time

* fix Dockerfile

* rsbuild

* Standard Header Component + Responsivenss Fixes (#146)

* Standard Header Component + Responsivenss Fixes

* fmt

* rename Hero

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>

* fix broken link

* don't distribute on staging

* fix path

* env log

* comment out

* railway env

* fix: Profile adjustments (#153)

* fix: Leaderboard improvements

* fix: fmt

* fix: Profile adjustments

* fix: resolve conversation

* Login Modal Fixes (#154)

* Login Modal Fixes

* Resolve Comments

* container

* container fixes

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>

* organize

* fmt

* update feeds (#156)

* Leaderboard width fixes

* feat: save profile image to pinata (#158)

* feat(fe): save profile image to pinata

* fix: fix comment

* Feat Integrate NEAR Solana, Ethereum wallet selection (#159)

* fix: Leaderboard improvements

* fix: fmt

* fix: Profile adjustments

* fix: resolve conversation

* feat: Integrate NEAR wallet selection

* fix: run fmt

* fix: add function create accesstokenpayload use wallet selector near

* fix: resolve conversation

* Feed Submission + Feed Review Page (#160)

* Feed Review Page and Feed Creation

* fmt

* coderabbit comments resolved

* comments resolved

* comments resolved

* reset routeTree

* minor fixes (#164)

* minor fixes

* fmt

* remove node-compile-cache

* reuse user menu

* header clean up

* remove how it works

* clean up

* set submissions at root route

* fmt

* clean

* create is coming soon

* clean up

* user link

* Adds caddyfile and frontend clean up (#165)

* removes serve static from backend

* fmt

* fix build

* adds caddyfile

* clean up submission feed

* pnpm lock

* fix turbo

* fix build

* db migration

* without time zone

* cleans up submission list

* Adds shared-db, types package, initial migration (#166)

* init

* upgrade tsconfigs

* shared-db build

* shared-db wip

* transfer getAllSubmissions

* hooked up

* moves to shared-db

* fmt

* update dockerfile

* monorepo

* working build

* migration service

* turbo

* install pnpm

* temp proxy

* no include request headers

* clean up

* proper path

* renaming

* fmt

* update caddyfile

* different strategy

* use route

* fix BACKEND to API

* ignore temp

* temp remove

* back to orig

* turn on auto https

* disable

* route block

* clean up

* configure host

* favicon

* add staging domain

* http:

* set domain adn host

* correct bash

* matching host

* Adds edit feed and image upload (#168)

* adds page

* image upload and edit feed

* update pnpm lock

* CSR

* vercel json

* move

* temp disable auth

* set image

* fix query

* submisison service running

* Migrates submission service, is running (#169)

* init

* wip

* clean up

* feed list clean up

* break up functions

* fix config path

* adds plugins route and integrates with plugin service

* remote curate.config.json

* plugins table

* adds plugin pages

* set type

* fix feed types

* plguin errors

* env injection

* fix queries

* fix migration

* fix migration

* fix migration

* redo migration

* decouples moderation

* fix status

* fix feeds

* hide moderation actions

* adds overwrite script

* migrate timestamps

* better date handling

* fix

* Adds auth (#174)

* adds fastintear auth, init

* auth flow

* fmt

* adds fastintear auth, init

* auth flow

* fmt

* frontend auth

* auth middleware

* feed protection

* fmt

* moderation wip

* update lock

* migration

* moderation actions

* hide moderation actions

* hack

* fix flow

* enable hosted service

* adds user identities and connect platform

* create profile

* ensureUserExists

* set network for staging

* near account id

* auth provider id not null

* init near

* fix monorepo build

* fmt

* user clean up

* update moderation

* switch to crosspost connected

* fix user id and error

* server side

* moderation hooks

* cleaner logs

* Update apps/api/src/services/moderation.service.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update apps/app/src/lib/near.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update apps/app/src/lib/near.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* adds feature flags and moderation service clean up

---------

Co-authored-by: Zeeshan Ahmad <itexpert120@outlook.com>
Co-authored-by: codingshot <45281667+codingshot@users.noreply.github.com>
Co-authored-by: Louis <112561517+louisdevzz@users.noreply.github.com>
Co-authored-by: Muhammad Saad Iqbal <saadiqbal.dev@outlook.com>
Co-authored-by: ethnclark <ethanclark1310@gmail.com>
Co-authored-by: dungpt82 <69756171+dungpt99@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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