Skip to content

Retry catalog searches without FTS on MATCH failure#63

Merged
Jamesllllllllll merged 1 commit intomainfrom
codex/fix-viewer-choice-search
Mar 30, 2026
Merged

Retry catalog searches without FTS on MATCH failure#63
Jamesllllllllll merged 1 commit intomainfrom
codex/fix-viewer-choice-search

Conversation

@Jamesllllllllll
Copy link
Copy Markdown
Owner

Summary

Follow-up to #18 and #62.

Prevent viewer request submission from failing when the catalog FTS MATCH query errors on a streamer-choice search such as Smashing Pumpkins.

What Changed

  • Switched the generated catalog FTS query to explicit AND-joined prefix terms.
  • Added a fallback path in searchCatalogSongs that retries the same search without FTS if the MATCH query fails.
  • Added a regression test that simulates an FTS failure and verifies we still return results through the LIKE-based search path.

How To Test

  1. Open the public playlist page for a channel.
  2. Submit a regular streamer-choice request such as Smashing Pumpkins from the request panel.
  3. Confirm the request succeeds instead of returning the SQL error from /api/channel/:slug/viewer-request.
  4. Run npm run typecheck and npm run test -- tests/catalog-search.test.ts tests/viewer-request.test.ts.
  5. Run npm run check:prepush.

Screenshots Or UI Notes

No visible UI change. This is a backend search fallback fix.

Checklist

  • I tested the change locally
  • I updated docs or examples if needed
  • I called out any follow-up work or known limitations

@github-actions
Copy link
Copy Markdown

Preview deployment updated.

App: https://request-bot-pr-63.jameskeezer.workers.dev
Frontend worker: request-bot-pr-63
Backend worker: request-bot-backend-pr-63

@Jamesllllllllll Jamesllllllllll merged commit 71474bc into main Mar 30, 2026
3 checks passed
@Jamesllllllllll Jamesllllllllll deleted the codex/fix-viewer-choice-search branch March 30, 2026 00:07
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