Skip to content

fix: restore filter behavior on All search tab#14266

Merged
dylanjeffers merged 4 commits intomainfrom
claude/relaxed-lehmann-55cccb
May 7, 2026
Merged

fix: restore filter behavior on All search tab#14266
dylanjeffers merged 4 commits intomainfrom
claude/relaxed-lehmann-55cccb

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

Filters on the All search tab (genre, mood, BPM, key, premium, downloads, verified) had no effect — clicking a filter would briefly add the param to the URL, then it would immediately disappear. This regression came from the recent header refactor in apps#14181, which introduced an else if branch in the SearchExplorePage URL-sync effect that wiped non-query params on every URL change while categoryKey === 'all'.

Because searchParams is in that effect's dep array, the branch fired the moment a filter was set — it would rewrite the URL back to just ?query=… and drop the filter the user had just chosen. The branch also contradicts categories.all.filters (which lists all 7 filters) and the filter UI that's rendered for the All tab via categories[categoryKey].filters.

The fix removes the buggy branch from both desktop and mobile SearchExplorePage.tsx. The remaining if branch handles search-input changes correctly; nothing else needed to change.

Test plan

I could not start the dev server in this worktree (env-cmd version mismatch — package wants 8.0.2, installed 10.1.0; missing .env.git; node_modules not linked). Reviewer should smoke-test in the browser:

  • Go to /search, type a query → results appear
  • Click a Genre filter → URL updates to include ?query=…&genre=… and stays that way
  • Verify search results actually filter (e.g. only Electronic tracks/users/albums/playlists in their respective carousels)
  • Repeat for Mood, BPM, Key, Premium, Downloads, Verified
  • Switch to Tracks/Albums/etc. tab and back to All — filters should be preserved across the URL
  • Mobile: same flow on /search

🤖 Generated with Claude Code

dylanjeffers and others added 4 commits May 7, 2026 13:08
The profile Contests tab and the upstream useUserHasRemixContest
gate both fetched the global remix-contests list and filtered
client-side by host userId. Hosts whose contests didn't fall on
page 1 of the global list silently rendered as "no contests"
unless we paginated up to a safety cap of 5 pages.

Switch both to the new GET /v1/users/{id}/contests endpoint via a
new useUserRemixContests hook. The has-contest gate becomes a
single pageSize=1 query, and the tab drops the per-row
HostedContestCard filter and the auto-pagination effect.

SDK regen picked up the new users.getContestsByUser method and the
GetContestsByUserStatusEnum.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the desktop change in this branch: drops the global
useAllRemixContests fetch + per-row HostedContestCard host filter +
auto-pagination, replacing them with useUserRemixContests, so the mobile
profile reads from GET /v1/users/{id}/contests directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The search-explore-page useEffect had an else-if branch that cleared
all URL params except query whenever URL params changed while on the
All tab. Since searchParams is in the deps array, setting any filter
on the All tab would immediately rewrite the URL and drop the filter.

The branch contradicted categories.all.filters (which lists all 7
filters) and the rendered filter UI for the All tab. Removing it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dylanjeffers dylanjeffers force-pushed the claude/relaxed-lehmann-55cccb branch from 1247379 to 1cfaacb Compare May 7, 2026 20:12
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 7, 2026

⚠️ No Changeset found

Latest commit: 1cfaacb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers dylanjeffers merged commit 144f65e into main May 7, 2026
6 checks passed
@dylanjeffers dylanjeffers deleted the claude/relaxed-lehmann-55cccb branch May 7, 2026 20:13
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14266.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant