Skip to content

feat: collapse the $0 release tail on the valuation card#42

Open
sweetmantech wants to merge 1 commit into
mainfrom
feat/valuation-collapse-zero-tail
Open

feat: collapse the $0 release tail on the valuation card#42
sweetmantech wants to merge 1 commit into
mainfrom
feat/valuation-collapse-zero-tail

Conversation

@sweetmantech

@sweetmantech sweetmantech commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Part of recoupable/chat#1850 ("Open — marketing polish"). Independent of the companion header-auth PR — the two can land in any order.

Problem

The "What we measured" list on the valuation card renders every release, including ones with zero measured streams. For a real artist (Del Water Gap) that put ~18 "$0 · 0 streams" rows directly above the "Get the full report with Recoup →" CTA — the last thing a lead scrolls past before converting reads as failure.

Change

  • lib/valuation/partitionMeasuredAlbums.ts — pure function splitting releases into measured (sorted biggest-first, as before) and the zero-stream tail. TDD: test written and confirmed RED before implementation.
  • components/valuation/UnmeasuredReleasesRow.tsx — one collapsed row, "+N releases with no measurable streams" ("not counted in the estimate"), expandable via <details> to the release names + years, matching the existing row pattern.
  • components/valuation/MeasuredCatalog.tsx — renders measured rows then the collapsed row; sorting moved into the pure function.

Done-when check

  • A valuation containing unmeasured releases renders no $0 rows — they all fall into the collapsed row.
  • The collapsed row states the count (singular/plural handled).
  • pnpm build passes (47 pages, no errors); full vitest suite 73/73 (6 new).

Verification

  • 6 new unit tests on the pure grouping function (zero-split, sort order, all-measured, all-unmeasured, empty, no input mutation); full suite green.
  • Production build green.
  • Visual check on the Vercel preview is limited: running a live valuation requires Privy OTP auth this agent doesn't have. Verified via tests + build; a follow-up PR comment states exactly what was and wasn't visually verified.

🤖 Generated with Claude Code


Summary by cubic

Collapse zero‑stream releases on the valuation card into a single expandable row, keeping measured releases sorted by streams. This removes the wall of "$0 · 0 streams" rows above the CTA and makes the card read cleaner.

  • New Features
    • Added partitionMeasuredAlbums to split measured vs zero‑stream releases and sort measured biggest‑first.
    • Added UnmeasuredReleasesRow to show "+N releases with no measurable streams" (expandable to names and years, not counted in the estimate).
    • Updated MeasuredCatalog to render measured rows followed by the collapsed unmeasured row.

Written for commit 41a2d0a. Summary will update on new commits.

Review in cubic

Unmeasured releases rendered as a wall of "$0 · 0 streams" rows directly
above the "Get the full report" CTA (18 rows for Del Water Gap), reading
as failure at the conversion moment. Group them into one expandable row:
"+N releases with no measurable streams". Measured releases keep their
sorted display; the split is a pure, tested function.

Part of recoupable/chat#1850.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
marketing Ready Ready Preview Jul 6, 2026 5:27pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@sweetmantech, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 70fd850c-5775-4e68-804e-e2dc77ce86c2

📥 Commits

Reviewing files that changed from the base of the PR and between f9862ee and 41a2d0a.

📒 Files selected for processing (4)
  • components/valuation/MeasuredCatalog.tsx
  • components/valuation/UnmeasuredReleasesRow.tsx
  • lib/valuation/__tests__/partitionMeasuredAlbums.test.ts
  • lib/valuation/partitionMeasuredAlbums.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/valuation-collapse-zero-tail

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 4 files

Re-trigger cubic

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.

1 participant