Skip to content

MYC-1328: Stop automatic artist switching during chat creation#469

Merged
sidneyswift merged 1 commit into
mainfrom
sidney/myc-1328-p0-artist-automatically-switches-during-chat-creation
Mar 19, 2025
Merged

MYC-1328: Stop automatic artist switching during chat creation#469
sidneyswift merged 1 commit into
mainfrom
sidney/myc-1328-p0-artist-automatically-switches-during-chat-creation

Conversation

@sidneyswift

Copy link
Copy Markdown
Collaborator

Problem

When creating a new chat with a non-default artist selected (e.g., Chillpill), the app would automatically switch back to the first artist in the list. This happened because usePrompts.tsx had logic that would automatically select the first artist when no artist was selected, but this logic was triggering incorrectly during chat creation.

Solution

Modified usePrompts.tsx to:

  • Remove the auto-selection of first artist
  • Remove artists and setSelectedArtist from the hook
  • Keep the user's explicitly selected artist

Changes

  • Single file change: hooks/usePrompts.tsx
  • Removed 7 lines, added 2 lines
  • No new dependencies added
  • No database changes required

Testing

To verify this fix:

  1. Select a non-default artist (e.g., Chillpill)
  2. Create a new chat via /new (not via root) [separate ticket fixes root new chats redirection bug]
  3. Verify the selected artist remains the same
  4. Create multiple /new chats to ensure the artist selection persists

Other Bugs (Open Tickets)

  • Chat shows messages from other rooms.
  • Chats created from / redirect back to / instead of room.
  • Chat input box does not clear text after submit

- Remove auto-selection of first artist in usePrompts.tsx

- Remove artists and setSelectedArtist from hook dependencies

- Keep user's explicitly selected artist instead of auto-switching

This fixes the bug where creating a new chat would automatically switch back to the first artist in the list instead of keeping the user's selected artist.
@vercel

vercel Bot commented Mar 19, 2025

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
recoup-chat ✅ Ready (Inspect) Visit Preview Mar 19, 2025 3:22am

@supabase

supabase Bot commented Mar 19, 2025

Copy link
Copy Markdown

This pull request has been ignored for the connected project godremdqwajrwazhbrue because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

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.

2 participants