chore(orbit): pending-suggestion strip in guest queue

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-24 17:22:17 +02:00
parent cf6fbe527a
commit e6d15bf9ce
7 changed files with 106 additions and 3 deletions
+5
View File
@@ -504,6 +504,11 @@ export async function suggestOrbitTrack(trackId: string): Promise<void> {
const { songs } = await getPlaylist(outboxPlaylistId);
const nextIds = [...songs.map(s => s.id), trackId];
await updatePlaylist(outboxPlaylistId, nextIds, songs.length);
// Record the suggestion locally so the UI can surface it as "waiting on
// host" until the host's next sweep merges it into the shared queue.
// Drained by the guest tick's reconcilePendingSuggestions call.
useOrbitStore.getState().addPendingSuggestion(trackId);
}
/**