Repository navigation
Ship the gamified mobile Sweepza marketplace - #102
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe pull request replaces generated listing fallback images with owned static assets, adds tokenized theme synchronization, refreshes mobile navigation and theme handling, redesigns homepage and listing surfaces, restructures gamification, and expands cron schedules with configuration tests. ChangesProduct experience updates
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Client
participant ListingFallbackRoute
participant listingFallbackAssetUrl
participant OwnedFallbackAsset
Client->>ListingFallbackRoute: Request category fallback
ListingFallbackRoute->>listingFallbackAssetUrl: Normalize category and resolve asset
listingFallbackAssetUrl-->>ListingFallbackRoute: Return owned WebP URL
ListingFallbackRoute-->>Client: Return 307 redirect with cache headers
Client->>OwnedFallbackAsset: Fetch static WebP asset
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Overhauls Sweepza’s mobile marketplace presentation, listing trust details, representative media, gamification, and scheduled ingestion lifecycle.
Changes:
- Introduces jewel-themed responsive navigation and marketplace surfaces.
- Adds owned fallback photography with explicit disclosure.
- Schedules ingestion and expiration twice daily.
Validation: Static review and focused source tracing completed; commands were not rerun.
Blocked: Official attribution overlap, omitted eligibility facets, and stale cron documentation. Author should address these before independent review.
Reviewed changes
Copilot reviewed 19 out of 25 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
vercel.json |
Adds twice-daily ingest and expiration schedules. |
lib/og-theme.tsx |
Synchronizes Open Graph colors. |
lib/listing-media.ts |
Maps categories to owned fallback assets. |
lib/__tests__/mobile-navigation-theme.test.ts |
Checks navigation and theme integration. |
lib/__tests__/listing-media-presentation.test.ts |
Tests fallback mapping and redirects. |
lib/__tests__/listing-media-component.test.tsx |
Tests media disclosure rendering. |
components/public-shell.tsx |
Adds pinned public bottom navigation. |
components/public-header.tsx |
Simplifies the mobile header. |
components/mobile-shell.tsx |
Expands responsive widths and safe-area spacing. |
components/listing-media.tsx |
Adds representative-photo fallback behavior. |
components/listing-card.tsx |
Expands listing facts and card presentation. |
components/gamification-strip.tsx |
Redesigns activity and badge progress. |
components/bottom-nav.tsx |
Restyles responsive pinned navigation. |
app/tokens.css |
Defines purple, gold, and velvet tokens. |
app/page.tsx |
Reorders and redesigns marketplace content. |
app/manifest.ts |
Updates PWA colors. |
app/layout.tsx |
Updates browser theme colors. |
app/icon.svg |
Applies the new icon palette. |
app/api/images/listing-fallback/[category]/route.tsx |
Redirects generated fallbacks to static assets. |
app/api/cron/ingest/__tests__/route.test.ts |
Verifies cron ordering and gating. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad1787ca04
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
components/listing-card.tsx (1)
468-509: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winAttribution badge and new countdown/context chip can visually collide.
ListingMedia's ownattributionbadge renders atabsolute bottom-2 right-2(visible whenever a real, non-representative image haslisting.imageAttributionset). The new context/countdown row added here sits atabsolute inset-x-3 bottom-3 ... justify-between, placing the countdown chip in the same bottom-right corner. Neither element sets an explicitz-index, so whichever paints later in DOM order (the countdown row, added afterListingMedia) will overlap/obscure the attribution text for any listing that has both a real attributed image and an active countdown. Since "preserved official-media attribution" is an explicit goal for this cohort, this collision should be fixed (e.g., reposition the attribution badge — perhaps by extending therepresentativeLabelPosition-style prop pattern already added toListingMedia— so it doesn't share screen space with the new bottom row).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@components/listing-card.tsx` around lines 468 - 509, Prevent the bottom-right attribution badge rendered by ListingMedia from colliding with the countdown/context row in the listing card. Update the ListingMedia positioning API and its usage in the listing card, reusing the existing representativeLabelPosition pattern or equivalent, so attributed real images place their badge outside the bottom row while preserving attribution visibility.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@components/listing-card.tsx`:
- Around line 468-509: Prevent the bottom-right attribution badge rendered by
ListingMedia from colliding with the countdown/context row in the listing card.
Update the ListingMedia positioning API and its usage in the listing card,
reusing the existing representativeLabelPosition pattern or equivalent, so
attributed real images place their badge outside the bottom row while preserving
attribution visibility.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 56a09eb9-3fdd-4ef8-98fc-08764ce78093
⛔ Files ignored due to path filters (1)
app/icon.svgis excluded by!**/*.svg
📒 Files selected for processing (24)
app/api/cron/ingest/__tests__/route.test.tsapp/api/images/listing-fallback/[category]/route.tsxapp/layout.tsxapp/manifest.tsapp/page.tsxapp/tokens.csscomponents/bottom-nav.tsxcomponents/gamification-strip.tsxcomponents/listing-card.tsxcomponents/listing-media.tsxcomponents/mobile-shell.tsxcomponents/public-header.tsxcomponents/public-shell.tsxlib/__tests__/listing-media-component.test.tsxlib/__tests__/listing-media-presentation.test.tslib/__tests__/mobile-navigation-theme.test.tslib/listing-media.tslib/og-theme.tsxpublic/brand/sweepza-logo-mobile.webppublic/images/listing-fallbacks/cash-gift-card.webppublic/images/listing-fallbacks/electronics.webppublic/images/listing-fallbacks/general-prize.webppublic/images/listing-fallbacks/travel.webpvercel.json
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 24 out of 31 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (4)
app/layout.tsx:54
- This still selects browser chrome from the OS color-scheme, but the app selects its actual theme from the stored preference/local clock (
lib/theme.tsx:34-53). A user who pins dark mode—or uses auto mode at night with a light OS—therefore gets sunrise browser chrome around a midnight UI, despite the synchronization acceptance criterion. Update the theme-color meta whenresolvedchanges (and during the anti-flash bootstrap) rather than relying only on these media queries.
{
media: "(prefers-color-scheme: light)",
color: THEME_COLORS.sunrise.paper,
},
{
media: "(prefers-color-scheme: dark)",
color: THEME_COLORS.midnight.paper,
app/page.tsx:300
- The preview subtree is emitted before the page
<h1>, andListingCarditself emits an<h3>(the empty state emits another<h2>). CSSorderchanges only visual placement, so screen-reader/document order begins at level 2/3 before level 1. Keep the card visually first on mobile, but move the h1-containing grid child first in the markup and use the existing order classes for visual ordering.
<h1 className="mt-5 max-w-[15ch] font-display text-[40px] leading-[0.98] tracking-[-0.055em] text-paper sm:text-[54px] lg:text-[62px]">
Real sweeps. One bold daily run.
</h1>
app/api/images/listing-fallback/[category]/route.tsx:16
- This redirect removes the disclosure that was previously baked into the generated fallback image for consumers that do not render through
ListingMedia. In particular,components/winner-card.tsx:23-40usescategoryFallbackImageUrldirectly and will now show the representative photo with the listing alt text—or even “Photo shared by …”—and no representative label. Preserve disclosure in the asset itself or update every direct fallback consumer to detect it, label it, and use representative alt text before redirecting the legacy route.
const location = new URL(listingFallbackAssetUrl(category), request.url);
return new Response(null, {
status: 307,
headers: {
Location: location.toString(),
"Cache-Control": "public, max-age=86400, s-maxage=31536000, immutable",
lib/listing-media.ts:100
- Unknown categories matching inherited object keys do not fall back safely. For example,
normalizeFallbackCategory("constructor")returns"constructor"becauseTHEMES[category]seesObject.prototype.constructor; this lookup then selects the inherited function and produces an invalid/images/listing-fallbacks/function ...URL. Use an own-property check before indexing the asset map so every arbitrary route category resolves to the general asset.
const normalizedCategory = normalizeFallbackCategory(category);
const assetName =
ASSET_BY_CATEGORY[normalizedCategory] ?? ASSET_BY_CATEGORY.other;
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@components/winner-card.tsx`:
- Around line 46-54: Update the ListingMedia invocation in the Winner Wall card
to pass the listing’s image attribution via the existing attribution prop,
matching ListingDetail’s use of listing.imageAttribution while preserving the
current representativePhoto behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b37c299c-96c4-44dd-aac3-b210c91be790
⛔ Files ignored due to path filters (1)
lib/generated/theme-colors.tsis excluded by!**/generated/**
📒 Files selected for processing (23)
README.mdapp/api/cron/ingest/__tests__/route.test.tsapp/api/og/sweeps/[slug]/route.tsxapp/layout.tsxapp/manifest.tsapp/page.tsxcomponents/listing-card.tsxcomponents/listing-detail.tsxcomponents/listing-media.tsxcomponents/winner-card.tsxlib/__tests__/listing-media-component.test.tsxlib/__tests__/listing-media-presentation.test.tslib/__tests__/listing-seo.test.tslib/__tests__/mobile-navigation-theme.test.tslib/__tests__/winner-card-media.test.tsxlib/listing-media.tslib/listing-seo.tslib/og-theme.tsxlib/theme.tsxpackage.jsonscripts/__tests__/theme-colors.test.tsscripts/sync-theme-colors.mjsscripts/theme-colors-lib.mjs
🚧 Files skipped from review as they are similar to previous changes (6)
- app/manifest.ts
- app/api/cron/ingest/tests/route.test.ts
- lib/tests/listing-media-presentation.test.ts
- lib/listing-media.ts
- lib/tests/mobile-navigation-theme.test.ts
- components/listing-card.tsx
Summary
Ships a production-focused consumer marketplace overhaul using the existing canonical listing, ingestion, lifecycle, reminder, and seeker-state architecture.
Issue: founder-directed production release; no linked issue.
Lane: C / D / I
Acceptance criteria
Canon alignment
listingobject — no parallel listing models.Security & quality
pnpm test: 97 files / 1,398 tests passed.pnpm typecheckpassed.pnpm lintpassed with zero warnings.pnpm buildpassed on Node 24.16.0 / Next 15.5.19.Release boundaries
Merging
maindeployssweepza.com. The cron schedule is included, but ingestion still fails closed unlessINGESTION_ENABLED=trueand at least one source has explicit production/compliance approval. No email, payment, database migration, source approval, or provider activation is included.Summary by CodeRabbit
New Features
Improvements
Documentation