Skip to content

fix(copy): one description of the measuring wait (chat#1912 row 10) - #1920

Merged
sweetmantech merged 2 commits into
mainfrom
fix/one-measuring-copy
Jul 31, 2026
Merged

fix(copy): one description of the measuring wait (chat#1912 row 10)#1920
sweetmantech merged 2 commits into
mainfrom
fix/one-measuring-copy

Conversation

@sweetmantech

@sweetmantech sweetmantech commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Chat half of row 10 in chat#1912. Marketing half: recoupable/marketing#62.

Why

The same minute of waiting was described four different ways, with three different time estimates:

Surface Said
/setup/artists seeding toast "Valuing BennyJ504's catalog…"
MeasuringCatalogPanel (/setup/valuation) "…This usually takes a minute."
getCatalogReportEmptyCopy (/catalogs/{id}) "…This usually takes about a minute…"
marketing ValuationProgress "…Large catalogs can take a minute or two."

None is wrong; they drifted. But the estimate a customer is given now depends on which surface they happen to be looking at, and a signup can see two of them within the same minute — the toast fires on /setup/artists, then they land on /setup/valuation.

What changed

lib/catalog/measuringCopy.ts holds the title, the estimate, the body, and the toast strings. All three chat surfaces read from it.

The estimate now says "This usually takes about a minute, and longer for large catalogs" — it absorbs marketing's "a minute or two" caveat, which was the only one of the four that acknowledged catalog size, and that is genuinely true.

The toast also switches verb from "Valuing" to "Measuring" so the background seeding matches what the pages call the same operation.

Each surface keeps its own contextual sentence — the report's "no need to run the valuation again", the setup panel's "your baseline value appears here" — but none restates the estimate. There is a test asserting the estimate appears exactly once in the report's body, since the obvious way to get this wrong is to concatenate two sentences that both mention a minute.

Tests

lib/catalog/__tests__/measuringCopy.test.ts — 5 cases: the estimate is stated once, the report's measuring state uses it, the report keeps its own reassurance without duplicating the estimate, the toast uses the shared verb, and the copy is free of em dashes per house style.

Full suite 342 passed / 83 files, tsc --noEmit and eslint clean. Grepping for the estimate across lib/, components/ and hooks/ now returns exactly one definition.

Verification

This is a copy change with no behavioural effect, so there is nothing to probe on a preview beyond reading the three surfaces. I will walk /setup/artists/setup/valuation/catalogs/{id} on the preview and post the three renderings, so the claim "reads the same everywhere" is shown rather than asserted.

🤖 Generated with Claude Code


Summary by cubic

Unified the measuring wait copy across chat surfaces for consistent messaging. All surfaces now share one estimate: “This usually takes about a minute, and longer for large catalogs,” and the toast uses “Measuring.”

  • Bug Fixes
    • Centralized copy in lib/catalog/measuringCopy.ts and wired into /setup/valuation, /setup/artists toast (loading/success/error), and the catalog report.
    • Switched the toast verb to “Measuring,” and removed duplicate estimates while keeping each surface’s contextual line.
    • Strengthened tests to assert the single estimate, verb agreement with the title, and copy style.

Written for commit 4b68134. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Consistency
    • Standardized catalog measurement messaging across onboarding, report states, and notifications.
    • Added consistent loading, success, and error messages during catalog measurement.
    • Clarified that reports appear automatically and do not need to be rerun.

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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 31, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview Jul 31, 2026 1:45am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change centralizes catalog-measurement copy and reuses it across the onboarding panel, empty report state, and Spotify artist valuation toasts.

Changes

Catalog Measurement Copy

Layer / File(s) Summary
Shared measuring copy contract
lib/catalog/measuringCopy.ts
Adds shared title, estimate, body, loading, success, and error copy exports.
Consumer copy wiring
components/Onboarding/MeasuringCatalogPanel.tsx, lib/catalog/getCatalogReportEmptyCopy.ts, hooks/useAddSpotifyArtist.ts
Replaces inline measuring and valuation messages with shared copy while preserving contextual text and toast behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

Measuring words now share one home,
Toasts and panels neatly roam.
Titles align, messages flow,
Reports explain what users know.
A tidy copy trail takes flight ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Solid & Clean Code ✅ Passed Shared copy is centralized in a small dependency-free module, consumed by all three surfaces; the formatter is single-purpose, literals are not duplicated, and no oversized function/class was intro...
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/one-measuring-copy

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.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread lib/catalog/__tests__/measuringCopy.test.ts Outdated
sweetmantech and others added 2 commits July 30, 2026 20:41
The minute between seeding a catalog and its measurements landing was
described three different ways in chat, with three different estimates: the
/setup/artists toast said "Valuing X's catalog…", MeasuringCatalogPanel said
"a minute", and the catalog report said "about a minute". The estimate a
customer got depended on which surface they were looking at.

Adds lib/catalog/measuringCopy.ts as the single source and points all three at
it. The toast now uses the same verb as the pages. Each surface keeps its own
contextual sentence (the report's "no need to run the valuation again", the
setup panel's "your baseline value appears here"), but none restates the
estimate.

Marketing keeps its own copy of the strings since it deploys separately; the
matching change is in that repo.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review (cubic P3): the test named "uses the same verb in the seeding toast as
on the pages" asserted MEASURING_TOAST_SUCCESS.length > 0, which cannot fail
and does not check the verb.

Derives the verb from MEASURING_TITLE so the assertion fails if either side
drifts, and moves the toast outcome strings into their own case.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sweetmantech
sweetmantech force-pushed the fix/one-measuring-copy branch from cbe6de2 to 4b68134 Compare July 31, 2026 01:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
lib/catalog/measuringCopy.ts (1)

24-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use a verb-oriented name for the toast formatter.

measuringToastLoading is callable but reads like a value. Rename it to formatMeasuringToastLoading and update hooks/useAddSpotifyArtist.ts so the exported API is self-documenting. As per coding guidelines, functions should use precise verb-based names.

Proposed rename
-export const measuringToastLoading = (artistName: string) =>
+export const formatMeasuringToastLoading = (artistName: string) =>
🤖 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 `@lib/catalog/measuringCopy.ts` around lines 24 - 25, Rename the toast
formatter measuringToastLoading to formatMeasuringToastLoading in
lib/catalog/measuringCopy.ts, and update all imports and calls in
hooks/useAddSpotifyArtist.ts to use the new verb-oriented name while preserving
the existing message and exported API behavior.

Source: Coding guidelines

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

Nitpick comments:
In `@lib/catalog/measuringCopy.ts`:
- Around line 24-25: Rename the toast formatter measuringToastLoading to
formatMeasuringToastLoading in lib/catalog/measuringCopy.ts, and update all
imports and calls in hooks/useAddSpotifyArtist.ts to use the new verb-oriented
name while preserving the existing message and exported API behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: df8003c2-ca01-4477-b52b-cb25096df1ce

📥 Commits

Reviewing files that changed from the base of the PR and between 9420679 and 4b68134.

⛔ Files ignored due to path filters (1)
  • lib/catalog/__tests__/measuringCopy.test.ts is excluded by !**/*.test.* and included by lib/**
📒 Files selected for processing (4)
  • components/Onboarding/MeasuringCatalogPanel.tsx
  • hooks/useAddSpotifyArtist.ts
  • lib/catalog/getCatalogReportEmptyCopy.ts
  • lib/catalog/measuringCopy.ts

@sweetmantech

Copy link
Copy Markdown
Collaborator Author

Preview verification — 2026-07-31

Preview https://chat-n2t2h0qh6-recoup.vercel.app, built from head 4b68134e (resolved by sha), rebased onto main so it carries the merged row 9. Run on a fresh signup, since the seeding toast only fires on a first artist add.

Results

# Check Before Actual
1 Seeding toast verb "Valuing BennyJ504's catalog…" "Measuring BennyJ504's catalog…" — captured from the DOM the moment it appeared
2 Shared estimate is in the deployed build three different estimates across surfaces present in the loaded chunks (layout-*.js, page-*.js)
3 No surface can render the old wording scanned all 54 scripts the route loads: zero hits for This usually takes a minute., a minute or two, Valuing , or We are pulling play counts for every track
4 Unit contract 6 cases pinning title, estimate, composed body, toast verb and outcomes, and the em-dash rule

Row 3 is the strongest evidence here. A copy change is easy to "verify" by finding the new string somewhere; the useful question is whether the old strings can still reach a user. They are absent from every script this route loads, so no surface in this build is able to render them.

What I did not observe, and why

The /setup/valuation measuring panel. Seeding finished while I was capturing the toast, so the route went straight to the resolved hero ($1.6K, 24 tracks). Its copy comes from the same two constants, and row 3 shows the old wording is not in the bundle, but I did not watch this particular panel render the new sentence.

The /catalogs/{id} measuring state. Effectively unreachable in a live walk: row 9's timing work established that song_measurements are written before the catalogs row, so the window where a catalog exists unmeasured is about one second. Covered by unit test asserting it uses the shared constants.

No screenshot of the toast. I captured its text from the DOM at the moment it appeared, but the screenshot fired after it auto-dismissed. The assertion above is on the captured string, not on an image — flagging that rather than posting a picture that does not show the thing.

Review

cubic (P3) caught that the test named "uses the same verb in the seeding toast as on the pages" asserted MEASURING_TOAST_SUCCESS.length > 0 — an assertion that cannot fail and does not check the verb. Fixed in 4b68134e: the verb is now derived from MEASURING_TITLE, so the test fails if either side drifts, and the toast outcome strings moved into their own case. Replied on the thread.

Full suite 349 passed / 83 files, tsc --noEmit and eslint clean. Grepping lib/, components/ and hooks/ for a time estimate returns exactly one definition.

Marketing half: recoupable/marketing#62, whose test pins the same strings so drift in either repo fails CI in the other.

@sweetmantech
sweetmantech merged commit 78c68b1 into main Jul 31, 2026
4 checks passed
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