Skip to content

feat: Just Added carousel on discover page#856

Open
onchainlu wants to merge 9 commits into
mainfrom
merchant-improvements
Open

feat: Just Added carousel on discover page#856
onchainlu wants to merge 9 commits into
mainfrom
merchant-improvements

Conversation

@onchainlu
Copy link
Copy Markdown
Contributor

@onchainlu onchainlu commented May 11, 2026

Summary

  • Adds a "Just Added" carousel section below Featured on the discover page, showing the 15 most recently registered x402 origins
  • Each card shows OG image (favicon/globe fallback), title, description, tags, endpoint count, and relative listing time ("Listed 2 hours ago")
  • Embla carousel with drag/wheel scroll, bottom pagination arrows (left arrow hidden until scrollable)
  • New listRecentOrigins query + api.public.origins.recent tRPC endpoint (direct DB read, no caching — indexed query is O(1))
  • Branded subtitle: "Newest services on [logo] x402scan" for screenshot-ability
  • "Add your API" CTA button inline with section title
  • Renames "Featured Services" → "Featured"

Test plan

  • Visit / (discover page) — "Just Added" section appears below Featured
  • Cards display correct data: title, description, favicon/OG image, tags, endpoint count, listing time
  • Carousel scrolls horizontally via drag, trackpad, and arrows
  • Left arrow only visible after scrolling right
  • Cards lift on hover without clipping
  • "Add your API" button links to /resources/register
  • Section renders correctly on mobile breakpoints

Adds a new section below Featured on the discover page showing the 15 most
recently registered x402 origins. Each card displays OG image (or favicon/globe
fallback), title, description, tags, endpoint count, and relative listing time.
Carousel uses Embla with drag/wheel scroll and bottom pagination arrows.

Also renames "Featured Services" → "Featured" on the discover page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
x402scan Ready Ready Preview, Comment May 12, 2026 10:11pm

Request Review

onchainlu and others added 2 commits May 11, 2026 18:59
Remove unused cn import, suppress no-img-element for OG images,
remove unused Skeleton import.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@onchainlu
Copy link
Copy Markdown
Contributor Author

image

Match the pattern used by listOriginsWithResources — filter out origins
whose resources have null responses to avoid returning broken/unparsed
endpoints.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wildcard HTTPS remotePatterns so OG images from arbitrary merchant
domains get full Next.js image optimization (resizing, WebP/AVIF,
CDN caching). Use optimized <Image fill> for Just Added cards.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove response and accepts filters — newly registered origins often
haven't been probed yet, so requiring a non-null response excludes
the freshest entries (defeating the purpose of "Just Added").
Only filter on deprecatedAt to exclude removed resources.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Revert wildcard hostname to prevent /_next/image abuse. Use
unoptimized flag for arbitrary-domain OG images, matching the
pattern used by Favicon (Radix Avatar) and composer agent components.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Debug: newly registered origins not appearing despite relaxed filters.
Remove all resource relation filters to test if the issue is in the
query filtering or elsewhere.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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