Skip to content

fix(wasap): deduplicate display labels in CovSpectrum collection mode#1329

Closed
fhennig wants to merge 1 commit into
mainfrom
fix/covspectrum-duplicate-display-labels
Closed

fix(wasap): deduplicate display labels in CovSpectrum collection mode#1329
fhennig wants to merge 1 commit into
mainfrom
fix/covspectrum-duplicate-display-labels

Conversation

@fhennig

@fhennig fhennig commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Closes #1328

Summary

  • Extracts a deduplicateDisplayLabels helper from useWasapPageData.ts and applies it to the queries array in fetchCovSpectrumCollectionModeData
  • Appends a counter suffix to subsequent duplicate labels (e.g. "Resistance" → "Resistance (2)")
  • Adds unit tests covering unique labels, consecutive duplicates, interleaved duplicates, and property preservation

Test plan

  • Unit tests pass (npm run test in website/)
  • Manually verify a CovSpectrum collection with duplicate variant names no longer throws "Display labels must be unique"

🤖 Generated with Claude Code

When a CovSpectrum collection contains multiple variants sharing the same
name, GsQueriesOverTime would throw because displayLabel must be unique.
Apply the same counter-suffix deduplication ('Resistance' → 'Resistance (2)')
that PR #1327 uses for the GenSpectrum collection mode.

Closes #1328

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
dashboards Ready Ready Preview, Comment Jul 9, 2026 7:04am

Request Review

@fhennig

fhennig commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Looks good, but we shouldn't duplicate code from #1327 - maybe we merge the other one first?

@fhennig

fhennig commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

#1327 will just cover this too.

@fhennig fhennig closed this Jul 13, 2026
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.

fix(wasap): handle duplicate variant display labels in CovSpectrum collection mode

1 participant